Worker Prompt Craft
Worker/子代理 Prompt 编写指南 — 写出让子代理一次做对的 prompt。解决"子代理看不到上下文"、"指令模糊导致返工"、"委托理解而非综合"的问题。适用于:(1) 使用 sessions_spawn/sessions_send 时 (2) 调度 CC 子任务时 (3) 任何需要给 AI 子代理写指令的场景。灵感源自 Claude Code Coordinator Prompt Guidelines。
Install
npx skills add kadaliao/claude-code-skills-collection --skill worker-prompt-craftgit clone --depth 1 https://github.com/kadaliao/claude-code-skills-collection.git /tmp/claude-code-skills-collection
mkdir -p ~/.claude/skills
cp -r /tmp/claude-code-skills-collection/worker-prompt-craft ~/.claude/skills/worker-prompt-craftPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Worker Prompt Craft ## 核心原则 > Worker 看不到你的对话。每个 prompt 必须是自包含的。 ## 必须包含的要素 1. **具体文件/路径/行号** — 不是"那个文件",而是 `src/auth/validate.ts:42` 2. **完成标准** — "做完"长什么样 3. **目的陈述** — 帮 Worker 校准深度 ### 目的陈述示例 - "这个研究用于写 PR 描述 — 聚焦用户可见的变更" - "我需要这个来规划实现 — 报告文件路径、行号、类型签名" - "这是合并前的快速检查 — 只验证 happy path" ## 反模式(绝对禁止) ``` ❌ "修复我们讨论的 bug" → Worker 不知道你讨论了什么 ❌ "基于你的发现,实现修复" → 把理解委托给 Worker,不是综合 ❌ "创建最近变更的 PR" → 哪些变更?哪个分支?draft? ❌ "测试好像出了问题,你看看" → 没有错误信息、文件路径、方向 ``` ## 正确写法示例 ### 实现类 ``` 修复 src/auth/validate.ts:42 的空指针。 Session 过期时 user 字段为 undefined 但 token 仍在缓存。 在 user.id 访问前加 null check — null 则返回 401 'Session expired'。 运行相关测试和类型检查,提交并报告 hash。 ``` ### 研究类 ``` 调查 src/auth/ 模块。找到 session 处理和 token 验证 可能出现空指针的位置。 报告具体文件路径、行号和涉及的类型。 不要修改文件。 ``` ### 纠正类(Continue 场景,简短) ``` 你加的 null check 导致两个测试失败 — validate.test.ts:58 期望 'Invalid session' 但你改成了 'Session expired'。 修复断言,提交并报告 hash。 ``` ### Git 操作类 ``` 从 main 创建分支 'fix/session-expiry'。 只 cherry-pick commit abc123。 Push 并创建 draft PR 指向 main。 添加 anthropics/claude-code 为 reviewer。 报告 PR URL。 ``` ## Prompt 技巧清单 - [ ] 包含文件路径、行号、错误信息 - [ ] 声明"完成"标准 - [ ] 实现类:"运行测试+类型检查,提交并报告 hash" - [ ] 研究类:"报告发现,不要修改文件" - [ ] Git 操作:指定分支名、commit hash、draft/ready、reviewer - [ ] Continue 纠正:引用 Worker 做了什么,不是你和用户讨论了什么 - [ ] 实现类:"修复根因,不是症状" - [ ] 验证类:"证明有效,不要只确认存在"
Details
- Skill name
worker-prompt-craft- Repository
- kadaliao/claude-code-skills-collection
- Path
worker-prompt-craft/SKILL.md- Repo updated
- 31 March 2026
FAQ
What does the Worker Prompt Craft skill do?
Worker/子代理 Prompt 编写指南 — 写出让子代理一次做对的 prompt。解决"子代理看不到上下文"、"指令模糊导致返工"、"委托理解而非综合"的问题。适用于:(1) 使用 sessions_spawn/sessions_send 时 (2) 调度 CC 子任务时 (3) 任何需要给 AI 子代理写指令的场景。灵感源自 Claude Code Coordinator Prompt Guidelines。
How do I install the Worker Prompt Craft skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add kadaliao/claude-code-skills-collection --skill worker-prompt-craft. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Worker Prompt Craft popular?
It lives in kadaliao/claude-code-skills-collection, which has 9 GitHub stars and 8 forks.
Related skills
Adversarial Verification
9kadaliao/claude-code-skills-collection
对抗性验证技能 — 验证代码变更/部署/任务交付物的正确性。不是确认"它能工作",而是尝试"把它搞坏"。用于:(1) 完成非平凡任务后自验 (2) 审查 PR/MR (3) 部署后验证 (4) bobooo 说"验证一下"。灵感源自 Claude Code Verification Agent 设计。
Coordinator Orchestrator
9kadaliao/claude-code-skills-collection
多 Agent 协调者模式 — 你是指挥官,不是执行者。调度 Worker 做研究/实现/验证,你负责综合和决策。适用于:(1) 复杂任务需要多步骤并行 (2) 需要研究→综合→实现→验证的工作流 (3) bobooo 说"用 CC 做"时的编排模式。灵感源自 Claude Code Coordinator Mode。
Lightweight Explorer
9kadaliao/claude-code-skills-collection
轻量探索模式 — 用最少 token 完成代码搜索和调研。核心理念:只读搜索不需要加载全部工具和项目规则。适用于:(1) 搜索代码库找文件/函数 (2) 调研项目架构 (3) 多文件分析 (4) 回答"代码里哪里有 X"类问题。灵感源自 Claude Code Explore Agent 设计。
Forecast Call Prep
9elijeangilles/revops-skills
Prepare the executive summary for a weekly forecast call by reconciling rep commits against historical close-rate models and surfacing material variance. Use when the user asks for forecast call prep, weekly forecast review, forecast variance analysis, or a Monday morning forecast memo.
Self Rationalization Guard
9kadaliao/claude-code-skills-collection
自我合理化防护 — 识别和反制 AI Agent 常见的偷懒/逃避/自我欺骗模式。不限于验证,适用于所有任务执行。当 Agent 即将跳过步骤、简化问题、或用"看起来对"替代"运行验证"时触发。灵感源自 Claude Code Verification Agent 的 Rationalization Detection。
Scylladb
9scylladb/agent-skills
Overview of ScyllaDB and a map of the ScyllaDB agent skills, with instructions to install or fetch a skill that is missing. Use this skill when starting a project on ScyllaDB or moving an existing project to ScyllaDB, when a task covers more than one ScyllaDB area, or when no more specific ScyllaDB skill matches. Child skill scylladb-data-modeling wins for CQL schemas, keys, indexes, TTL, and compaction. Child skill scylladb-cloud-setup wins for connections, drivers, and credentials. Also use to find the skill for vector, full-text, and hybrid search, the DynamoDB API (Alternator), Kubernetes
Browse the most popular Claude skills, all ai, llms & agents skills, or write your own with the skills generator.