Shared prompt sections
Ortak yeniden kullanılabilir bölümler. Her aracı bunlara "cache_control" işaretleyicileri aracılığıyla başvurur.
Kaynak: davepoon/claude-code-subagents-collection · MIT
Ortak yeniden kullanılabilir bölümler. Her aracı bunlara "cache_control" işaretleyicileri aracılığıyla başvurur.
Kaynak: davepoon/claude-code-subagents-collection · MIT
mkdir -p .claude/skills/shared-prompt-sections && curl -sL https://www.antrophiclove.com/api/kaynak/shared-prompt-sections/raw -o .claude/skills/shared-prompt-sections/SKILL.mdHedef dosya: .claude/skills/shared-prompt-sections/SKILL.md
Common reusable sections. Each agent references these via cache_control markers.
Priority: PLAN.md > Language: → CLAUDE.md ## Language → en (default)
On dispatch: pass resolved language code in <context><language> field
Section headers (##) are also written in the resolved language (refer to language mapping table)
# Auto-detect Build (execute only if script exists)
if [ -f "package.json" ]; then
if node -e "const p=JSON.parse(require('fs').readFileSync('package.json','utf8')); process.exit(p.scripts&&p.scripts.build?0:1)" 2>/dev/null; then
npm run build 2>&1 || bun run build 2>&1 || yarn build 2>&1
fi
elif [ -f "Cargo.toml" ]; then
cargo build 2>&1
elif [ -f "go.mod" ]; then
go build ./... 2>&1
elif [ -f "pyproject.toml" ] || [ -f "setup.py" ]; then
python -m py_compile $(find . -maxdepth 3 -name "*.py" -not -path "*/venv/*" 2>/dev/null) 2>&1
elif [ -f "Makefile" ]; then
make build 2>&1 || make 2>&1
fi
# Auto-detect Lint (execute only if script exists)
if [ -f "package.json" ]; then
if node -e "const p=JSON.parse(require('fs').readFileSync('package.json','utf8')); process.exit(p.scripts&&p.scripts.lint?0:1)" 2>/dev/null; then
npm run lint 2>&1 || bun run lint 2>&1 || true
fi
elif [ -f "pyproject.toml" ]; then
ruff check . 2>&1 || python -m flake8 . 2>&1 || true
fi
works/{WORK_ID}/
├─ Requirement.md # Created by Specifier (mandatory)
├─ PLAN.md
├─ PROGRESS.md
├─ TASK-00.md # No WORK prefix
├─ TASK-00_progress.md # Separator: underscore
├─ TASK-00_result.md # Separator: underscore
└─ TASK-01.md ...
WORK-NN (e.g., WORK-03)TASK-NN (e.g., TASK-00) — WORK prefix must NOT be included# Find latest WORK with incomplete TASKs
# Use Glob tool: pattern "works/WORK-*/" → list all WORK directories (sorted)
# For each WORK (descending), compare:
# Glob "works/WORK-NN/TASK-*.md" (exclude *_result.md, *_progress.md) → TOTAL
# Glob "works/WORK-NN/TASK-*_result.md" → DONE
# First WORK where DONE < TOTAL is the active WORK
# List all WORKs
# Use Glob tool: pattern "works/WORK-*/"
# TASK completion status
# TOTAL = count of Glob "works/${WORK_ID}/TASK-??.md"
# DONE = count of Glob "works/${WORK_ID}/TASK-*_result.md"
<task-result work="{WORK_ID}" task="{TASK_ID}" agent="{agent}" status="{PASS|FAIL}">
<summary>{1-2 line summary}</summary>
<files-changed>
<file action="{created|modified|deleted}" path="{path}">{description}</file>
</files-changed>
<verification>
<check name="{type}" status="{PASS|FAIL|N/A}">{details}</check>
</verification>
<notes>{notes for next steps}</notes>
</task-result>
→ {REFERENCES_DIR}/file-content-schema.md § 1 reference
| Field | Required | Description |
|---|---|---|
> Created: | ✅ | YYYY-MM-DD |
> Requirement: | ✅ | REQ-XXX or user request text |
> Execution-Mode: | ✅ | direct / pipeline / full |
> Project: | ✅ | Project name |
> Tech Stack: | ✅ | Detected tech stack |
> Language: | ✅ | Language code (ko, en, etc.) |
> Status: | ✅ | Always starts as PLANNED |
File: works/WORK-LIST.md
Format:
LAST_WORK_ID: WORK-XX
| WORK | 제목 | 상태 | 생성일 | 완료일 |
|------|------|------|--------|--------|
| WORK-NN | ... | IN_PROGRESS | YYYY-MM-DD | |
| WORK-MM | ... | DONE | YYYY-MM-DD | YYYY-MM-DD |
| Status | Meaning | Trigger |
|---|---|---|
IN_PROGRESS | WORK is being executed | specifier creates WORK |
DONE | All TASKs completed, awaiting review/push | committer completes last TASK |
COMPLETED | Archived to _COMPLETED/ | push merge (Main Claude batch processes all DONE) |
Rules:
LAST_WORK_ID header tracks the highest WORK ID ever createdLAST_WORK_IDIN_PROGRESS → DONE and fill completion date (do NOT move folder or remove row)works/_COMPLETED/, remove their rows from WORK-LIST.md1. CLAUDE.md → check "Language: xx"
2. If not found, ask user for language
3. If not found, auto-detect system locale
- Windows: powershell -c "[CultureInfo]::CurrentCulture.TwoLetterISOLanguageName"
- Linux/Mac: locale | grep LANG | grep -oP '[a-z]{2}' | head -1
- Fallback: "en"
→ Bash command rules: see § 13 — each step below is a separate tool call.
Replace {CallbackType} with the actual key name (e.g., ProgressCallback, TaskCallback).
Step 1. Use Grep tool to find {CallbackType}: line in CLAUDE.md. If not found, skip callback entirely.
Step 2. Use Grep tool to find CallbackToken: line in CLAUDE.md (optional).
Step 3. Send callback with a single curl command:
curl -s -X POST "CALLBACK_URL" -H "Content-Type: application/json" -H "X-Runner-Api-Key: TOKEN" -d '{"workId":"WORK-01","taskId":"TASK-00",...}'
Agent-specific payload fields:
"status": "IN_PROGRESS", "currentReasoning": "...""status": "SUCCESS", "commitHash": "${COMMIT_HASH}"# 1. Check CLAUDE.md language setting
grep -oP '(?<=Language:\s?)[a-z]{2}' CLAUDE.md 2>/dev/null
# 2. Tech stack
head -50 package.json 2>/dev/null
head -30 pyproject.toml 2>/dev/null
head -20 Cargo.toml 2>/dev/null
head -10 go.mod 2>/dev/null
# 3. Structure (when needed)
find . -maxdepth 3 -type f \( -name "*.md" -o -name "*.json" -o -name "*.toml" \) -not -path "*/node_modules/*" 2>/dev/null
Gate conditions for works/WORK-NN/TASK-XX_progress.md:
Status: COMPLETED line is present## Files Changed section is present and non-emptyOn gate failure → return FAIL task-result immediately. Do not proceed to subsequent steps.
Bash commands MUST follow these rules for permission compatibility.
MANDATORY:
&&, ||, ;, |)cd dir && command — you are already in the project root$(date ...) inside printfworks/WORK-01/) — NO absolute pathsgit add file, git commit -m "msg" — NO git -C path flagFor file operations, prefer dedicated tools over Bash:
Read tool (NOT cat)Write tool (NOT echo >> or printf >>)Edit tool (NOT sed -i)Grep tool (NOT grep)Glob tool (NOT find)Activity log example:
WRONG: printf '[%s]_%s\n' "$(date ...)" "INIT" >> work.log
RIGHT: Use Write tool to append a line to the log file
Git example:
WRONG: cd /path/to/project && git add file && git commit -m "msg"
RIGHT: git add file (one call)
git commit -m "msg" (next call)