- name
SKILL.md
ไฟล์สกิลยังคงอยู่ในรีโพซิทอรีของผู้เผยแพร่
วางคำสั่งที่คัดลอกไว้ในเทอร์มินัล คำสั่งจะติดตั้ง SKILL.md นี้ลงในเอเจนต์ตัวนั้น
npx skills add phuryn/product-engineering --skill claude-agents -a cursor -yวางคำสั่งที่คัดลอกไว้ในเทอร์มินัล คำสั่งจะติดตั้ง SKILL.md นี้ลงในเอเจนต์ตัวนั้น
npx skills add phuryn/product-engineering --skill claude-agents -a claude-code -yวางคำสั่งที่คัดลอกไว้ในเทอร์มินัล คำสั่งจะติดตั้ง SKILL.md นี้ลงในเอเจนต์ตัวนั้น
npx skills add phuryn/product-engineering --skill claude-agents -a codex -yวางคำสั่งที่คัดลอกไว้ในเทอร์มินัล คำสั่งจะติดตั้ง SKILL.md นี้ลงในเอเจนต์ตัวนั้น
npx skills add phuryn/product-engineering --skill claude-agents -a grok -yส่งข้อความที่คัดลอกไว้ในแชต Grok Bot แล้ว Bot จะดึง SKILL.md นี้จาก GitHub และเพิ่มลงในสกิลที่ Bot ทุกตัวของคุณใช้ร่วมกัน
Install this skill: https://github.com/phuryn/product-engineering/tree/HEAD/agent-teams/skills/claude-agentsจากผู้เผยแพร่
Run headless Claude Code as a peer, builder or fresh reviewer. Any agent can run claude -p for a full session: the repository's instructions, its tools and a conversation that can continue. It is a partner with the same standing as its caller. A peer argues a decision through, a builder takes a stage, and a reviewer has never seen the build. This skill covers briefs, modes and mechanics through <skill dir>/scripts/claude_agent.py.
Apply the delegation skill for the full partner discipline. These rules must hold even when this folder is copied alone.
test-harness § The gate and independent-review § When.delegation. The builder makes each operational step one command and names it; you run it.--fork-session copies the builder's beliefs with its transcript. --mode review always starts a fresh session and never saves it.independent-review skill's wrapper. Review mode has no shell and cannot read a git range. The wrapper's --reviewer claude uses this same fresh headless session for a change before a push or a release. It writes the range's log and diffs to a file the reviewer pages through, and fails short rounds loudly. It loops until nothing introduced is above Low and no High or Critical of any age is open. Don't give review mode git commands instead: Bash(git diff:*) also allows git diff --output=<file> to write.independent-review wrapper's default, as grok-agents describes. Without Grok, that wrapper runs a fresh Codex session; without Codex too, its accepted fallback is this same fresh headless session.CLAUDE.md, or AGENTS.md when no CLAUDE.md exists, and the user's ~/.claude/CLAUDE.md. The project's auto-memory, hooks and skills load too. This suits a builder but makes it dependent on those instructions, which review mode excludes.Give the brief what the repository's instructions do not contain. Consult and build read those instructions themselves. Supply the decision at hand, conversation so far, and what you have already tried and rejected.
Name the binding-spec files in a review brief. Review mode reads nothing on its own.
Put long briefs in a file and read them from there. The wrapper sends every prompt on stdin, never as an argument.
python <skill dir>/scripts/claude_agent.py --new --cwd <repo> --read <brief file>
python <skill dir>/scripts/claude_agent.py --new --mode build --cwd <worktree> --read <stage brief>
python <skill dir>/scripts/claude_agent.py --mode review --cwd <repo> --read <review brief>
Run a partner on the strongest model the account offers. --model opus tracks the newest Opus; best picks Fable where the account has it. The wrapper sends xhigh effort by default and max for a review. Without an explicit level, Opus, Sonnet and Haiku 5.5 run at medium (model configuration docs, read 2026-10-24).
React like a colleague and continue the conversation already under way. Agree where it is right, push back where it is wrong, ask why where it surprises you, and name what it missed. Do not re-package the goal as a new structured prompt. Rewriting the goal in turn 3 leaves the conversation.
python <skill dir>/scripts/claude_agent.py --cwd <repo> "agree on the queue, but a poison message would block the shard — doesn't that kill it?"
A plain call continues the session the wrapper last opened in that directory, in the same mode, on the same model and effort.
Keep iterating while a critique, disputed choice or unexplored option remains. This includes a critique you haven't voiced and a choice you don't buy but haven't pushed on. The temptation to ask the human “which of these two?” also signals unfinished work. You have converged when you would defend the result against your critique, neither partner finds new angles, and only taste remains. Surface genuine deadlock, ambiguity about what the human wants, or a fact only they have.
--new. Project knowledge belongs in its docs and the brief. A long thread carries assumptions those docs have since replaced. If a fresh session would miss something, that is a gap in the docs.CLAUDE_AGENT_STATE=<a file per session> on every call for that session.--session <id>. The wrapper prints every run's id. Claude Code finds an id in any project on the machine and keeps transcripts 30 days by default (sessions docs, read 2026-10-24). --session fails rather than starting a new session.Each rule's origin, the case that taught it, is in receipts.md beside this file; read it when a rule's edge is unclear.
The answer came from a session that started with only your brief. You read its exit code and output from the run itself, and anything it built was reviewed before it was trusted.
Use the wrapper's absolute path and pass its repository through --cwd. This skill's <skill dir>/scripts/claude_agent.py works from any directory and uses only the Python standard library. --check shows the binary, version and state file without running anything. --dry-run prints the exact claude command.
Apply the mode's flags again on every turn.
Read that line before trusting a round. After each run, the answer goes to stdout and one status line to stderr. It names the new or resumed session id, mode, actual permission mode, model, reply effort, this run's cost, session cost and turns. It warns about differences from requested values, lists denied tool calls and warns when Claude Code saved no transcript. All modes add -p --output-format stream-json --verbose --effort <level>. A failed run prints nothing on stdout and exits non-zero; a bad wrapper argument exits 2.
Resume the recorded session id rather than the directory's latest conversation. Each working directory has a small state file under <claude config dir>/claude-agent/. It records the id Claude Code reported on opening, plus mode, model, effort and extra directories. The next call uses --resume <id> with those settings. --continue instead takes the directory's latest conversation, whoever started it. claude -p --continue includes every -p session there (CLI reference, read 2026-10-24).
The state names the last session that opened, including failed runs. A usage limit or mid-build timeout leaves state on the session holding the brief and work so far. The next call continues it; --new starts over. Automatic resume falls back to a new session only when Claude Code has no transcript for the id. That returns No conversation found with session ID, exit 1, without opening a session (observed 2026-10-24). Explicit --session fails instead.
claude -p --resume restores the model and nothing else the wrapper sets. Observed 2026-10-24, Claude Code 2.1.310: a Haiku session started at effort low, with --permission-mode dontAsk, three tools and no MCP servers. Bare --resume <id> kept Haiku but changed effort to medium, permission mode to default, and access to 145 tools and 11 MCP servers.
A resume starts in the permission mode a new -p run would. Pass --add-dir, --mcp-config and --settings again (sessions docs, read 2026-10-24). The wrapper re-sends mode, model, effort and directories every turn. Pass them all every time when calling claude -p --resume directly. Without its permission mode, a resumed build denies writes and reports work it never did.
-p session loadsConsult and build load project context; review excludes it. The observed entries below were checked on 2026-10-24.
Leave MCP out unless asked. A delegate does not need the owner's mailbox.
Measured 2026-10-24, a plain claude -p in a scratch folder loaded 145 tools and 11 MCP servers. These included the account's mail, chat and drive connectors, alongside 15 plugins and 110 skills. Its first reply wrote a 47k-token prompt cache. That cost $0.0096 on Haiku 5.5, against $0.0012 with three tools and no MCP.
--bare cannot use subscription login and skips the project's instructions. It never reads OAuth or the keychain. The headless docs, read 2026-10-24, say it will become the default for -p in a future release. Re-check claude --help when wrapper runs start answering without the project's instructions.
Point consult and build only at repositories you trust. Without --bare or --restricted, a -p run executes the project's hooks even in a folder never trusted, with no trust dialog (headless docs, read 2026-10-24). Without --strict-mcp-config, it connects .mcp.json servers even in a folder never trusted, with no trust dialog (headless docs, read 2026-10-24). Consult and build keep the hooks.
Pass the permission mode explicitly and disable permission prompts. Since 2.1.302, a -p run without a mode starts in Manual unless settings specify defaultMode (permission-modes docs, read 2026-10-24). Manual denies every call needing approval. The wrapper always passes a mode and --permission-prompts none (2.1.259+). Calls that would prompt are denied immediately, Claude learns nobody can approve them, and the run continues. dontAsk still runs calls allowed by the user's settings; review's --restricted ignores those settings.
Observed 2026-10-24: consult had no Write tool; echo x > f and a python -c file write were denied (two permission_denials). git status ran, and the disk was unchanged. Review had only Read, Grep and Glob and attempted no write. Build, in auto mode on Haiku 5.5, edited a file, ran it and ran git status.
Keep operational changes and production credentials out of auto-mode builds. Auto mode is a safety net, not a boundary. It needs a supported model and an organization that hasn't disabled it; otherwise the session starts in Manual (permission-modes docs, read 2026-10-24). Supported Anthropic API models are Opus 4.6+, Sonnet 4.6+, Haiku 5.5 and Fable; cloud providers support fewer. The wrapper's stderr line shows the mode that actually ran. Permit development suite runs only within the brief's delegation boundaries; production access and operational changes stay out.
Give the Claude process network access and a writable config directory. It needs the network to reach the API and config writes to save the session. claude auth status prints that directory as configDirectory.
Configure both network and config writes inside Codex workspace-write. On Codex CLI 0.159, Windows, both were needed for a resumable conversation (observed 2026-10-24). Default config opened the session, then failed with API Error: Connection refused … (ECONNREFUSED) after about three minutes of retries. With -c sandbox_workspace_write.network_access=true, it answered in seven seconds but saved no transcript, preventing continuation. The wrapper now warns when that happens. Adding the config directory as a writable root made a two-turn conversation work:
codex exec -s workspace-write \
-c sandbox_workspace_write.network_access=true \
-c "sandbox_workspace_write.writable_roots=['<claude config dir>']" ...
Codex's config reference and approvals-and-security page document both keys, also as [sandbox_workspace_write] entries in config.toml (read 2026-10-24). danger-full-access also works, with no sandbox. Codex ran the command through PowerShell, so put messages containing quotes in a file passed with --read.
Check transcript saving when running inside another agent's sandbox. Cursor, Gemini CLI, OpenCode and Grok Build were not tested here. The same network and config-write needs apply; check the disk for the transcript or read the wrapper's warning.
total_cost_usd is the whole session total. The wrapper prints this run's cost from model_usage_since_last_result beside it (observed 2026-10-24).--budget and --max-turns both stop the run. Budget exhaustion returns error_max_budget_usd (observed 2026-10-24), and spend can exceed the cap, so leave headroom (CLI reference). --max-turns appears in the CLI reference but not claude --help.rate_limit_event with five-hour and seven-day utilization (observed 2026-10-24).--log to watch events. After its last turn, a -p run waits up to ten idle minutes for background work it started. CLAUDE_CODE_PRINT_BG_WAIT_CEILING_MS controls this (headless docs, read 2026-10-24).claude --bg "<task>", then claude agents --json, claude logs <id>, claude attach <id> and claude stop <id>. --bg cannot combine with -p; it prints a session id and returns immediately instead of a result (CLI help and headless docs, read 2026-10-24). The wrapper runs in the foreground.Use the configured binary, then PATH, then native installer locations. Lookup tries $CLAUDE_BIN, then claude on PATH. Windows prefers native claude.exe over an npm .cmd shim. Native locations are ~/.local/bin, ~/.claude/local, and macOS's /opt/homebrew/bin and /usr/local/bin. The wrapper refuses versions older than 2.1.259, which lack --permission-prompts.
modelUsage and the init event's model, but not effort. The transcript records effort on every reply. The wrapper reads it best-effort because that format is internal (observed 2026-10-24). Environment variable CLAUDE_CODE_EFFORT_LEVEL overrides --effort (env-vars docs). The wrapper warns when it is set and removes it in review mode, so reviews run at the requested effort.There's an issue with the selected model (API 404), exit 1 (observed 2026-10-24). State keeps that session, so pass --model again or --new.result is the error text. The wrapper prints it on stderr, never as the answer. When calling claude -p directly, check is_error rather than exit code alone.CLAUDECODE=1 and CLAUDE_CODE_CHILD_SESSION=1. Its -p sessions remain saved and resumable (observed 2026-10-24; env-vars docs agree).Apply delegation for briefs, boundaries, parallel work and handoff verification. Apply independent-review for the release-gate review loop, and codex-agents to drive the Codex CLI the same way.
'Ask Claude', 'have Claude build or review this': drive Claude Code headless (claude -p) from another agent as a peer, builder or fresh reviewer.
---name: claude-agentsdescription: 'Ask Claude', 'have Claude build or review this': drive Claude Code headless (claude -p) from another agent as…---# agent-teams/skills/claude-agents/SKILL.mdFAQ
ดาวน์โหลด agent-teams/skills/claude-agents/SKILL.md จากผู้เผยแพร่ หรือคัดลอกพาธแล้วเปิดรีโพซิทอรี PlugMCP แสดงรายการสกิลเท่านั้น ไม่ได้โฮสต์ไฟล์
ผู้เผยแพร่เก็บไว้ที่ https://github.com/phuryn/product-engineering
Claude, Cursor, Codex และ Grok Build อ่าน SKILL.md ที่คุณเพิ่มจากรีโพซิทอรีของผู้เผยแพร่ได้ ส่วน Grok Bot จะติดตั้งให้เมื่อคุณส่งลิงก์โฟลเดอร์ GitHub ของสกิลในแชต