implement

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

/implement - Implementation Agent

/implement - 实现Agent

Model: opus (complex coding requires advanced reasoning)
模型: opus(复杂编码需要高级推理能力)

Command Flags

命令参数

FlagShortDescription
--help
-h
Show available commands and options
--version
-v
Show workflow skills version
--multi
-m
Multi-task mode: spawn parallel agents
auto
Enable auto-chain (test → document → ship)
FlagShort说明
--help
-h
显示可用命令和选项
--version
-v
显示工作流技能版本
--multi
-m
多任务模式:生成并行Agent
auto
启用自动链路(测试→文档→发布)

Flag Handling

参数处理

On
-h
or
--help
:
/implement - Implementation Agent

Usage:
  /implement {ID}                    Implement a single task
  /implement auto {ID}               Implement with auto-chain enabled
  /implement -m {ID1} {ID2} ...      Implement multiple tasks in parallel
  /implement auto -m {ID1} {ID2}     Multi-task with auto-chain
  /implement -h, --help              Show this help message
  /implement -v, --version           Show version

Arguments:
  {ID}    Task ID (number) or task filename (e.g., 001-auth-jwt)

Options:
  auto    After implementation, automatically chain through:
          test → document → ship
  -m      Spawn parallel agents for each task

Examples:
  /implement 1                       # Implement task #1
  /implement 001-auth-jwt            # Using task filename
  /implement auto 1                  # With auto-chain
  /implement -m 1 2 3                # Three tasks in parallel

Next: /test {ID}
On
-v
or
--version
:
Display:
Workflow Skills v1.4.1
https://github.com/eljun/claude-skills

触发
-h
--help
时:
/implement - Implementation Agent

Usage:
  /implement {ID}                    Implement a single task
  /implement auto {ID}               Implement with auto-chain enabled
  /implement -m {ID1} {ID2} ...      Implement multiple tasks in parallel
  /implement auto -m {ID1} {ID2}     Multi-task with auto-chain
  /implement -h, --help              Show this help message
  /implement -v, --version           Show version

Arguments:
  {ID}    Task ID (number) or task filename (e.g., 001-auth-jwt)

Options:
  auto    After implementation, automatically chain through:
          test → document → ship
  -m      Spawn parallel agents for each task

Examples:
  /implement 1                       # Implement task #1
  /implement 001-auth-jwt            # Using task filename
  /implement auto 1                  # With auto-chain
  /implement -m 1 2 3                # Three tasks in parallel

Next: /test {ID}
触发
-v
--version
时:
显示:
Workflow Skills v1.4.1
https://github.com/eljun/claude-skills

When to Use

使用场景

Invoke
/implement {ID}
when:
  • A task document exists in
    docs/task/
  • Task is in "Planned" status in TASKS.md
  • Ready to start coding
Example:
/implement 1
or
/implement 001-dashboard-redesign
满足以下条件时调用
/implement {ID}
  • docs/task/
    目录下存在对应的任务文档
  • 任务在TASKS.md中处于"Planned"状态
  • 准备好开始编码
示例:
/implement 1
/implement 001-dashboard-redesign

Invocation Options

调用选项

CommandModeBehavior
/implement {ID}
ManualImplement single task, then notify user to run
/test
/implement auto {ID}
AutomatedImplement, then auto-chain through test → document → ship
/implement -m {ID1} {ID2} ...
Multi-taskSpawn parallel agents for each task
/implement --multi {ID1} {ID2}
Multi-taskSame as
-m
/implement auto -m {ID1} {ID2}
Multi + AutoParallel tasks with auto-chain
命令模式行为
/implement {ID}
手动实现单个任务,完成后通知用户运行
/test
/implement auto {ID}
自动实现完成后自动执行测试→文档→发布全链路
/implement -m {ID1} {ID2} ...
多任务为每个任务生成并行Agent
/implement --multi {ID1} {ID2}
多任务
-m
功能相同
/implement auto -m {ID1} {ID2}
多任务+自动并行任务同时启用自动链路

Task ID Resolution

任务ID解析规则

The
{ID}
can be:
  • Numeric ID:
    1
    ,
    2
    ,
    3
    → Looks up in TASKS.md, finds matching task document
  • Padded ID:
    001
    ,
    002
    → Same as numeric
  • Full filename:
    001-dashboard-redesign
    → Direct file reference
Resolution process:
  1. If numeric → Read TASKS.md, find row with matching ID, get task doc path
  2. If filename → Look for
    docs/task/{filename}.md
    directly
{ID}
可以是:
  • 数字ID:
    1
    2
    3
    → 在TASKS.md中查找匹配ID的任务文档
  • 补零ID:
    001
    002
    → 与数字ID规则相同
  • 完整文件名:
    001-dashboard-redesign
    → 直接引用对应文件
解析流程:
  1. 如果是数字 → 读取TASKS.md,查找匹配ID的行,获取任务文档路径
  2. 如果是文件名 → 直接查找
    docs/task/{filename}.md

Auto Mode

自动模式

When invoked with
auto
, the implement skill:
  1. Sets
    Automation: auto
    in the task document (overrides any existing value)
  2. Implements the task as normal
  3. After completion, automatically spawns
    /test {ID}
    (haiku)
  4. The pipeline continues: test → document → ship
This lets you skip
/task auto
and trigger the full pipeline from implement:
/implement auto {ID} → implement code
/test (haiku)
PASS → /document → /ship → PR + notify
FAIL → /implement (with test report) → retry
使用
auto
参数调用时,实现技能会:
  1. 在任务文档中设置
    Automation: auto
    (覆盖现有值)
  2. 正常执行任务实现
  3. 完成后自动生成
    /test {ID}
    任务(使用haiku模型)
  4. 流水线继续执行:测试→文档→发布
此功能让你可以跳过
/task auto
,直接从实现环节触发完整流水线:
/implement auto {ID} → implement code
/test (haiku)
PASS → /document → /ship → PR + notify
FAIL → /implement (with test report) → retry

Multi-Task Mode

多任务模式

When invoked with
-m
or
--multi
, the implement skill spawns parallel agents:
/implement -m 1 2 3
       ├── Validate all tasks exist in TASKS.md
       ├── Check for file overlap warnings
       └── Spawn in parallel (using Task tool):
           ├── Agent-1: /implement 1
           ├── Agent-2: /implement 2
           └── Agent-3: /implement 3
       └── Wait for all agents to complete
       └── Report combined status
Multi-task with auto mode:
/implement auto -m 1 2 3
Each spawned agent runs with auto mode, chaining to test → document → ship.
使用
-m
--multi
参数调用时,实现技能会生成并行Agent:
/implement -m 1 2 3
       ├── 验证所有任务在TASKS.md中存在
       ├── 检查文件重叠警告
       └── 并行生成任务(使用Task工具):
           ├── Agent-1: /implement 1
           ├── Agent-2: /implement 2
           └── Agent-3: /implement 3
       └── 等待所有Agent执行完成
       └── 输出合并状态报告
自动模式多任务:
/implement auto -m 1 2 3
每个生成的Agent都会以自动模式运行,自动链接到测试→文档→发布流程。

Pre-Flight Checks for Multi-Task

多任务前置检查

CRITICAL: Background agents cannot prompt for permissions interactively. You MUST complete all checks and get user approval BEFORE spawning agents.
重要提示: 后台Agent无法交互式申请权限。生成Agent前必须完成所有检查并获得用户批准。
Step 1: Validate Tasks Exist
步骤1:验证任务存在
✓ Task 1: 001-auth-jwt.md (found)
✓ Task 2: 002-fix-portal.md (found)
✗ Task 3: Not found in TASKS.md → STOP if any missing
✓ Task 1: 001-auth-jwt.md (found)
✓ Task 2: 002-fix-portal.md (found)
✗ Task 3: Not found in TASKS.md → STOP if any missing
Step 2: Check for File Overlap
步骤2:检查文件重叠
Read each task's "File Changes" section:
⚠️ Warning: Tasks 1 and 2 both modify src/auth/middleware.ts

Options:
1. Continue anyway (may need manual conflict resolution)
2. Run sequentially instead
3. Cancel
读取每个任务的"File Changes"部分:
⚠️ Warning: Tasks 1 and 2 both modify src/auth/middleware.ts

Options:
1. Continue anyway (may need manual conflict resolution)
2. Run sequentially instead
3. Cancel
Step 3: Check Dependencies
步骤3:检查依赖关系
⚠️ Task 2 is blocked by Task 1
Recommendation: Run sequentially or resolve dependency first
⚠️ Task 2 is blocked by Task 1
Recommendation: Run sequentially or resolve dependency first
Step 4: Scan for Dangerous Operations
步骤4:扫描危险操作
Read each task document and scan for these keywords:
Keywords FoundRisk LevelAction
migration
,
schema
,
ALTER TABLE
,
prisma migrate
⚠️ DatabaseRequire explicit approval
rm 
,
delete file
,
remove
,
unlink
🚫 DeletionBlock - user must do manually
DROP
,
TRUNCATE
,
DELETE FROM
(without WHERE)
🚫 Data lossBlock - user must do manually
--force
,
reset --hard
,
-rf
🚫 DestructiveBlock
API_KEY
,
SECRET
,
password
,
credential
⚠️ SensitiveWarn user
sudo
,
chmod 777
,
chown
🚫 SystemBlock
读取每个任务文档,扫描以下关键词:
发现关键词风险等级操作
migration
schema
ALTER TABLE
prisma migrate
⚠️ 数据库需要明确批准
rm 
delete file
remove
unlink
🚫 删除操作阻止 - 用户必须手动执行
DROP
TRUNCATE
、无WHERE条件的
DELETE FROM
🚫 数据丢失阻止 - 用户必须手动执行
--force
reset --hard
-rf
🚫 破坏性操作阻止
API_KEY
SECRET
password
credential
⚠️ 敏感信息警告用户
sudo
chmod 777
chown
🚫 系统操作阻止
Step 5: Permission Approval (REQUIRED)
步骤5:权限审批(必填)
Display this prompt and WAIT for user confirmation:
═══════════════════════════════════════════════════════════════
MULTI-TASK PERMISSION CHECK
═══════════════════════════════════════════════════════════════

Tasks to implement in parallel:
  #1 {Task 1 name}
  #2 {Task 2 name}
  #3 {Task 3 name}

PERMISSIONS FOR BACKGROUND AGENTS
───────────────────────────────────────────────────────────────
✅ GRANTED (safe operations):
   • Read, Edit, Write files
   • Glob, Grep (search)
   • Git: add, commit, status, diff, checkout -b, log
   • npm/npx: install, run, build, test, lint

⚠️ REQUIRES APPROVAL (detected in tasks):
   • {e.g., "Database migration in Task #2"}
   • {e.g., "Schema changes in Task #1"}
   • (None detected)

🚫 BLOCKED (agents will stop if needed):
   • File deletion (rm, unlink, rimraf)
   • Destructive git (push --force, reset --hard, clean -f)
   • Database destruction (DROP, TRUNCATE)
   • System commands (sudo, chmod)

───────────────────────────────────────────────────────────────
If agents encounter blocked operations, they will STOP and
report back. You can then perform those manually.
═══════════════════════════════════════════════════════════════

Approve and start parallel implementation? (yes/no)
DO NOT spawn agents until user types "yes" or confirms.
显示以下提示并等待用户确认:
═══════════════════════════════════════════════════════════════
MULTI-TASK PERMISSION CHECK
═══════════════════════════════════════════════════════════════

Tasks to implement in parallel:
  #1 {Task 1 name}
  #2 {Task 2 name}
  #3 {Task 3 name}

PERMISSIONS FOR BACKGROUND AGENTS
───────────────────────────────────────────────────────────────
✅ GRANTED (safe operations):
   • Read, Edit, Write files
   • Glob, Grep (search)
   • Git: add, commit, status, diff, checkout -b, log
   • npm/npx: install, run, build, test, lint

⚠️ REQUIRES APPROVAL (detected in tasks):
   • {e.g., "Database migration in Task #2"}
   • {e.g., "Schema changes in Task #1"}
   • (None detected)

🚫 BLOCKED (agents will stop if needed):
   • File deletion (rm, unlink, rimraf)
   • Destructive git (push --force, reset --hard, clean -f)
   • Database destruction (DROP, TRUNCATE)
   • System commands (sudo, chmod)

───────────────────────────────────────────────────────────────
If agents encounter blocked operations, they will STOP and
report back. You can then perform those manually.
═══════════════════════════════════════════════════════════════

Approve and start parallel implementation? (yes/no)
在用户输入"yes"或确认前,不得生成Agent。
Step 6: Spawn Agents with Pre-Authorized Tools
步骤6:生成预授权工具的Agent
Only after user approval, spawn agents with these allowed tools:
Task({
  subagent_type: "general-purpose",
  model: "opus",
  prompt: "/implement {ID}",
  run_in_background: true,
  allowed_tools: [
    "Read",
    "Edit",
    "Write",
    "Glob",
    "Grep",
    "Bash(git add *)",
    "Bash(git commit *)",
    "Bash(git status)",
    "Bash(git diff *)",
    "Bash(git checkout -b *)",
    "Bash(git log *)",
    "Bash(npm install *)",
    "Bash(npm run *)",
    "Bash(npx *)"
  ]
})
Note: Dangerous operations are NOT in allowed_tools, so agents physically cannot perform them.
仅在获得用户批准后,使用以下允许的工具生成Agent:
Task({
  subagent_type: "general-purpose",
  model: "opus",
  prompt: "/implement {ID}",
  run_in_background: true,
  allowed_tools: [
    "Read",
    "Edit",
    "Write",
    "Glob",
    "Grep",
    "Bash(git add *)",
    "Bash(git commit *)",
    "Bash(git status)",
    "Bash(git diff *)",
    "Bash(git checkout -b *)",
    "Bash(git log *)",
    "Bash(npm install *)",
    "Bash(npm run *)",
    "Bash(npx *)"
  ]
})
注意: 危险操作不在允许工具列表中,因此Agent无法执行此类操作。

Workflow

工作流程

/implement [auto] [-m] {ID} [{ID2} ...]
1. Parse arguments: detect "auto" flag, "-m/--multi" flag, task ID(s)
2. If multi-task → Run pre-flight checks, spawn parallel agents, exit
3. Resolve task ID → find docs/task/{ID}-{name}.md
4. Read task document
5. If "auto" flag → set Automation: auto in task doc
6. Check Automation field (manual | auto)
7. Move task to "## In Progress" in TASKS.md
8. ⚠️ MANDATORY: Invoke specialized skills (see Step 2 below)
   └── /vercel-react-best-practices (if installed + React code)
   └── /supabase-postgres-best-practices (if installed + DB code)
9. Implement following task document steps
10. Commit with [task-{ID}] prefix for traceability
11. Update status to "TESTING" when complete
┌─── Automation Mode? ───┐
│                        │
▼ Manual                 ▼ Auto
Notify user              Invoke /test {ID}
Ready for /test
⚠️ GUARDRAIL: Step 8 is NOT optional. If specialized skills are installed and relevant to the task, they MUST be invoked BEFORE writing any code. See "Step 2: Invoke Specialized Skills" below for details.
/implement [auto] [-m] {ID} [{ID2} ...]
1. 解析参数:检测"auto"参数、"-m/--multi"参数、任务ID
2. 如果是多任务 → 执行前置检查,生成并行Agent,退出
3. 解析任务ID → 查找docs/task/{ID}-{name}.md
4. 读取任务文档
5. 如果有"auto"参数 → 在任务文档中设置Automation: auto
6. 检查Automation字段(manual | auto)
7. 在TASKS.md中将任务移动到"## In Progress"部分
8. ⚠️ 强制要求:调用专业技能(见下文步骤2)
   └── /vercel-react-best-practices(如果已安装且涉及React代码)
   └── /supabase-postgres-best-practices(如果已安装且涉及数据库代码)
9. 按照任务文档步骤执行实现
10. 提交时使用[task-{ID}]前缀便于追溯
11. 完成后将状态更新为"TESTING"
┌─── 自动化模式? ───┐
│                        │
▼ 手动                 ▼ 自动
通知用户              调用/test {ID}
准备执行/test
⚠️ 防护规则: 步骤8不是可选步骤。如果专业技能已安装且与任务相关,必须在编写代码前调用。详情见下文"步骤2:调用专业技能"。

Auto Mode Behavior

自动模式行为

When invoked with
/implement auto {ID}
OR task document has
Automation: auto
:
  1. If invoked with
    auto
    argument, update the task document to set
    Automation: auto
  2. After implementation completes, automatically invoke
    /test {ID}
当使用
/implement auto {ID}
调用,或任务文档包含
Automation: auto
时:
  1. 如果通过
    auto
    参数调用,更新任务文档设置
    Automation: auto
  2. 实现完成后,自动调用
    /test {ID}

Pre-Implementation Checklist

实现前检查清单

Before writing ANY code:
编写任何代码前:

0. Parse Arguments

0. 解析参数

Check for flags and task ID(s):
  • -m
    or
    --multi
    → Multi-task mode (spawn parallel agents)
  • auto
    → Set automation mode
  • Remaining args → Task ID(s)
Examples:
  • /implement 1
    → Single task, manual mode
  • /implement auto 1
    → Single task, auto mode
  • /implement -m 1 2 3
    → Multi-task, manual mode
  • /implement auto -m 1 2
    → Multi-task, auto mode
If
auto
is detected, update the task document header:
markdown
> **Automation:** auto
检查参数和任务ID:
  • -m
    --multi
    → 多任务模式(生成并行Agent)
  • auto
    → 设置自动化模式
  • 剩余参数 → 任务ID
示例:
  • /implement 1
    → 单任务,手动模式
  • /implement auto 1
    → 单任务,自动模式
  • /implement -m 1 2 3
    → 多任务,手动模式
  • /implement auto -m 1 2
    → 多任务,自动模式
如果检测到
auto
参数,更新任务文档头部:
markdown
> **Automation:** auto

1. Resolve Task ID

1. 解析任务ID

Convert the task ID to the task document path:
  1. Read TASKS.md
  2. Find the row with matching ID in the first column
  3. Get the task doc path from that row
  4. Verify the file exists in
    docs/task/
Example:
Input: /implement 1
TASKS.md row: | 1 | Dashboard Redesign | HIGH | [001-dashboard-redesign.md](...) |
Resolved: docs/task/001-dashboard-redesign.md
将任务ID转换为任务文档路径:
  1. 读取TASKS.md
  2. 在第一列中查找匹配ID的行
  3. 从该行获取任务文档路径
  4. 验证
    docs/task/
    目录下存在该文件
示例:
Input: /implement 1
TASKS.md row: | 1 | Dashboard Redesign | HIGH | [001-dashboard-redesign.md](...) |
Resolved: docs/task/001-dashboard-redesign.md

2. Read the Task Document (Primary Context Source)

2. 读取任务文档(主要上下文来源)

docs/task/{ID}-{task-name}.md
IMPORTANT — Context Efficiency: The task document was created by the
/task
agent, which already performed a thorough codebase analysis. The task document contains all the context you need: requirements, file paths, implementation steps, and architectural decisions.
  • DO trust the task document as your primary source of truth
  • DO read the specific files listed in the task document's "Files to Modify" or implementation steps
  • DO NOT perform broad codebase exploration (scanning directories, reading unrelated files, trying to "understand the entire codebase")
  • DO NOT re-analyze architecture that the plan agent already documented
If the task document references specific files, read only those files. This keeps your context window efficient and avoids redundant exploration.
Understand:
  • Task ID (for commit messages)
  • Requirements (must have vs nice to have)
  • Proposed solution
  • File changes needed
  • Implementation steps
docs/task/{ID}-{task-name}.md
重要提示 - 上下文效率: 任务文档由
/task
Agent创建,已经过全面的代码库分析。任务文档包含你需要的所有上下文:需求、文件路径、实现步骤和架构决策。
  • 务必将任务文档作为主要事实来源
  • 务必读取任务文档"Files to Modify"或实现步骤中列出的特定文件
  • 不要进行广泛的代码库探索(扫描目录、读取无关文件、尝试"理解整个代码库")
  • 不要重新分析规划Agent已经记录的架构
如果任务文档引用了特定文件,仅读取这些文件。这可以保持上下文窗口高效,避免冗余探索。
需要理解的内容:
  • 任务ID(用于提交信息)
  • 需求(必选 vs 可选)
  • 提议的解决方案
  • 需要修改的文件
  • 实现步骤

3. Invoke Specialized Skills (MANDATORY - DO NOT SKIP)

3. 调用专业技能(强制要求 - 不得跳过)

CRITICAL GUARDRAIL: Before writing ANY code, you MUST check for and invoke specialized skills. This is NOT optional.
关键防护规则: 编写任何代码前,必须检查并调用专业技能,这不是可选步骤。

Step 3a: Detect Installed Skills

步骤3a:检测已安装的技能

Check if these skills are available by looking for them in the available skills/tools:
SkillDetectionInvoke When
/vercel-react-best-practices
Skill is listed in available toolsANY React/Next.js/TypeScript code
/supabase-postgres-best-practices
Skill is listed in available toolsANY database queries, RLS, schema, Supabase code
通过查看可用技能/工具列表,检查是否存在以下技能:
技能检测方式调用时机
/vercel-react-best-practices
可用工具中列出该技能涉及任何React/Next.js/TypeScript代码时
/supabase-postgres-best-practices
可用工具中列出该技能涉及任何数据库查询、RLS、schema、Supabase代码时

Step 3b: Invoke BEFORE Writing Code

步骤3b:编写代码前调用

If skill is detected → MUST invoke it FIRST, before writing any code.
undefined
如果检测到对应技能 → 必须首先调用,然后再编写任何代码。
undefined

For React/Next.js projects:

对于React/Next.js项目:

/vercel-react-best-practices
/vercel-react-best-practices

For Supabase/PostgreSQL projects:

对于Supabase/PostgreSQL项目:

/supabase-postgres-best-practices
undefined
/supabase-postgres-best-practices
undefined

Step 3c: Verification Checklist

步骤3c:验证清单

Before proceeding to Step 4, confirm:
  • Checked if
    /vercel-react-best-practices
    is available
  • If available AND task involves React/Next.js → Invoked it
  • Checked if
    /supabase-postgres-best-practices
    is available
  • If available AND task involves database → Invoked it
进入步骤4前,确认:
  • 已检查
    /vercel-react-best-practices
    是否可用
  • 如果可用且任务涉及React/Next.js → 已调用该技能
  • 已检查
    /supabase-postgres-best-practices
    是否可用
  • 如果可用且任务涉及数据库 → 已调用该技能

HARD STOP - Do NOT Proceed If:

强制停止 - 出现以下情况不得继续:

⛔ STOP: You detected a specialized skill is installed but did not invoke it.

This is a guardrail violation. You MUST:
1. Invoke the skill NOW before writing any code
2. Apply the best practices from the skill to your implementation
3. Only then proceed to Step 3

Skipping specialized skills leads to:
- Suboptimal code patterns
- Performance issues
- Security vulnerabilities
- Technical debt
Why this matters: These skills contain critical best practices from Vercel and Supabase engineers. Skipping them means writing code that may have performance issues, security vulnerabilities, or anti-patterns that will need to be fixed later.
⛔ STOP: You detected a specialized skill is installed but did not invoke it.

This is a guardrail violation. You MUST:
1. Invoke the skill NOW before writing any code
2. Apply the best practices from the skill to your implementation
3. Only then proceed to Step 3

Skipping specialized skills leads to:
- Suboptimal code patterns
- Performance issues
- Security vulnerabilities
- Technical debt
重要性说明: 这些技能包含Vercel和Supabase工程师总结的关键最佳实践。跳过这些技能可能导致代码存在性能问题、安全漏洞或反模式,后续需要修复。

4. Update TASKS.md

4. 更新TASKS.md

Move task from "Planned" to "In Progress":
markdown
undefined
将任务从"Planned"移动到"In Progress":
markdown
undefined

In Progress

In Progress

IDTaskStartedTask DocStatus
1Quick Actions RedesignJan 25001-quick-actions.mdImplementing
undefined
IDTaskStartedTask DocStatus
1Quick Actions RedesignJan 25001-quick-actions.mdImplementing
undefined

5. Verify Dependencies

5. 验证依赖

Check that all prerequisites exist:
  • Required API endpoints
  • Required types/interfaces
  • Required packages installed
  • No blocking tasks

检查所有前置条件是否满足:
  • 所需API端点存在
  • 所需类型/接口存在
  • 所需包已安装
  • 无阻塞任务

Commit Convention

提交规范

IMPORTANT: All commits must include the task ID prefix for traceability.
重要提示: 所有提交必须包含任务ID前缀,便于追溯。

Format

格式

[task-{ID}] {type}: {description}

{optional body}

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
[task-{ID}] {type}: {description}

{optional body}

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Examples

示例

bash
undefined
bash
undefined

Feature commit

功能提交

git commit -m "[task-1] feat: Add JWT authentication middleware
Implements token validation and refresh logic.
Co-Authored-By: Claude Opus 4.5 noreply@anthropic.com"
git commit -m "[task-1] feat: Add JWT authentication middleware
Implements token validation and refresh logic.
Co-Authored-By: Claude Opus 4.5 noreply@anthropic.com"

Fix commit

修复提交

git commit -m "[task-2] fix: Resolve portal login redirect issue
Co-Authored-By: Claude Opus 4.5 noreply@anthropic.com"
undefined
git commit -m "[task-2] fix: Resolve portal login redirect issue
Co-Authored-By: Claude Opus 4.5 noreply@anthropic.com"
undefined

Why This Matters

重要性说明

The
[task-{ID}]
prefix enables:
  1. Traceability: Easy to see which commits belong to which task
  2. Multi-task support: When multiple agents work in parallel,
    /ship
    can identify task-specific changes
  3. Filtering:
    git log --grep="\[task-1\]"
    shows all commits for task 1
  4. PR generation:
    /ship
    can create accurate PR descriptions

[task-{ID}]
前缀可以实现:
  1. 可追溯性: 轻松查看哪些提交属于哪个任务
  2. 多任务支持: 多个Agent并行工作时,
    /ship
    可以识别特定任务的变更
  3. 过滤:
    git log --grep="\[task-1\]"
    可以显示任务1的所有提交
  4. PR生成:
    /ship
    可以生成准确的PR描述

Implementation Guidelines

实现指南

Follow the Task Document

遵循任务文档

The task document is your spec. Follow it step by step:
  1. Step 1 → Complete → Verify
  2. Step 2 → Complete → Verify
  3. Continue until all steps done
任务文档是你的规范,逐步执行:
  1. 步骤1 → 完成 → 验证
  2. 步骤2 → 完成 → 验证
  3. 继续直到所有步骤完成

Invoke Skills When Applicable (MUST Use If Installed)

适用时调用技能(已安装则必须使用)

SituationSkill (Required If Installed)
React/Next.js code
/vercel-react-best-practices
Database work
/supabase-postgres-best-practices
Need clarificationAsk user
场景技能(已安装则必须使用)
React/Next.js代码
/vercel-react-best-practices
数据库工作
/supabase-postgres-best-practices
需要澄清询问用户

Quality Standards

质量标准

  • No
    any
    types - use proper TypeScript types
  • All hooks before early returns
  • AbortController in useEffect with fetches
  • Clean, readable code
  • Handle loading/error/empty states
  • 不使用
    any
    类型 - 使用正确的TypeScript类型
  • 所有Hook放在提前返回之前
  • 在带请求的useEffect中使用AbortController
  • 代码简洁可读
  • 处理加载/错误/空状态

Track Progress

进度跟踪

Update the task document as you go:
  • Check off completed requirements
  • Note any deviations from plan
  • Document blockers encountered

随时更新任务文档:
  • 勾选已完成的需求
  • 记录任何与计划的偏差
  • 记录遇到的阻塞问题

Common Implementation Patterns

常见实现模式

Creating New Files

创建新文件

typescript
// 1. Create the file
// 2. Add to index exports if needed
// 3. Import where used
typescript
// 1. 创建文件
// 2. 如需则添加到index导出
// 3. 在使用位置导入

Modifying Existing Files

修改现有文件

typescript
// 1. Read the file first (always!)
// 2. Understand existing patterns
// 3. Make minimal, focused changes
// 4. Don't refactor unrelated code
typescript
// 1. 首先读取文件(必须!)
// 2. 理解现有模式
// 3. 进行最小化、聚焦的变更
// 4. 不要重构无关代码

Web Development

Web开发

  • Check project's CLAUDE.md for patterns
  • Follow existing code patterns
  • Use proper authentication
  • Use ORM for database queries, not raw SQL

  • 查看项目的CLAUDE.md了解模式
  • 遵循现有代码模式
  • 使用正确的认证方式
  • 使用ORM进行数据库查询,不使用原生SQL

Completion Checklist

完成检查清单

Before marking as ready for testing:
标记为准备测试前:

Code Quality

代码质量

  • Code compiles without errors
  • No TypeScript errors
  • Follows existing patterns
  • No unnecessary complexity
  • 代码编译无错误
  • 无TypeScript错误
  • 遵循现有模式
  • 无不必要的复杂度

Functionality

功能

  • All "Must Have" requirements implemented
  • Happy path works
  • Loading states handled
  • Error states handled
  • Empty states handled
  • 所有"必选"需求已实现
  • 正常流程运行正常
  • 加载状态已处理
  • 错误状态已处理
  • 空状态已处理

Task Document

任务文档

  • Requirements checked off
  • Any deviations documented
  • Notes added for tester

  • 需求已勾选
  • 所有偏差已记录
  • 已添加测试人员注意事项

Update Status to TESTING

更新状态为TESTING

When implementation is complete:
实现完成后:

1. Update TASKS.md

1. 更新TASKS.md

Move to "Testing" section:
markdown
undefined
移动到"Testing"部分:
markdown
undefined

Testing

Testing

IDTaskTask DocTest ReportStatus
1Quick Actions Redesign001-quick-actions.mdPendingReady for test
undefined
IDTaskTask DocTest ReportStatus
1Quick Actions Redesign001-quick-actions.mdPendingReady for test
undefined

2. Update Task Document

2. 更新任务文档

Add completion notes:
markdown
> **Status:** TESTING
> **Completed:** {Date}
> **Implementation Notes:** {Any important notes for tester}
添加完成说明:
markdown
> **Status:** TESTING
> **Completed:** {Date}
> **Implementation Notes:** {Any important notes for tester}

3. Pre-Completion Verification (REQUIRED)

3. 完成前验证(必填)

Before marking implementation complete, verify:
┌─────────────────────────────────────────────────────────────┐
│ ⚠️ SPECIALIZED SKILLS VERIFICATION                          │
├─────────────────────────────────────────────────────────────┤
│ □ Did task involve React/Next.js code?                      │
│   → If YES: Did you invoke /vercel-react-best-practices?    │
│                                                             │
│ □ Did task involve database/Supabase code?                  │
│   → If YES: Did you invoke /supabase-postgres-best-practices│
│                                                             │
│ □ If skill was available but NOT invoked:                   │
│   → STOP. Go back and invoke it. Apply best practices.      │
│   → Then return here to complete.                           │
└─────────────────────────────────────────────────────────────┘
If you skipped a specialized skill: You must go back, invoke it, review your code against the best practices, and make any necessary corrections before proceeding.
标记实现完成前,验证:
┌─────────────────────────────────────────────────────────────┐
│ ⚠️ SPECIALIZED SKILLS VERIFICATION                          │
├─────────────────────────────────────────────────────────────┤
│ □ Did task involve React/Next.js code?                      │
│   → If YES: Did you invoke /vercel-react-best-practices?    │
│                                                             │
│ □ Did task involve database/Supabase code?                  │
│   → If YES: Did you invoke /supabase-postgres-best-practices│
│                                                             │
│ □ If skill was available but NOT invoked:                   │
│   → STOP. Go back and invoke it. Apply best practices.      │
│   → Then return here to complete.                           │
└─────────────────────────────────────────────────────────────┘
如果你跳过了专业技能: 必须返回,调用该技能,根据最佳实践检查代码,进行必要的修正后再继续。

4. Inform User / Chain to Next Skill

4. 通知用户 / 链接到下一个技能

Check the task document for
Automation: auto
field.
检查任务文档的
Automation: auto
字段。

Manual Mode (or if Automation field is missing)

手动模式(或缺少Automation字段)

Implementation complete for: #{ID} - {Task Title}

Files changed:
- path/to/file1.tsx (created)
- path/to/file2.tsx (modified)

Commits made:
- [task-{ID}] feat: Add authentication middleware
- [task-{ID}] feat: Add token refresh logic

Next Steps:
  /test {ID}              # e.g., /test 1
  /test {ID}-{task-name}  # e.g., /test 001-auth-jwt
Implementation complete for: #{ID} - {Task Title}

Files changed:
- path/to/file1.tsx (created)
- path/to/file2.tsx (modified)

Commits made:
- [task-{ID}] feat: Add authentication middleware
- [task-{ID}] feat: Add token refresh logic

Next Steps:
  /test {ID}              # e.g., /test 1
  /test {ID}-{task-name}  # e.g., /test 001-auth-jwt

Auto Mode

自动模式

Implementation complete for: #{ID} - {Task Title}

Files changed:
- path/to/file1.tsx (created)
- path/to/file2.tsx (modified)

[AUTO] Spawning /test with haiku model...
Use Task tool to spawn test agent with model: haiku:
Task({ subagent_type: "general-purpose", model: "haiku", prompt: "/test {ID}" })
Implementation complete for: #{ID} - {Task Title}

Files changed:
- path/to/file1.tsx (created)
- path/to/file2.tsx (modified)

[AUTO] Spawning /test with haiku model...
使用Task工具生成模型:haiku的测试Agent:
Task({ subagent_type: "general-purpose", model: "haiku", prompt: "/test {ID}" })

Multi-Task Completion

多任务完成

When all parallel agents complete:
Multi-task implementation complete!

Results:
├── Task #1: ✓ Complete (3 commits)
├── Task #2: ✓ Complete (2 commits)
└── Task #3: ✗ Failed (blocked by missing API)

Next Steps (for successful tasks):
  /test 1                  # Test task #1
  /test 2                  # Test task #2
  /test 001-auth-jwt       # Using task name

Failed task requires attention:
  Task #3: See docs/task/003-feature-name.md for blocker details

所有并行Agent完成后:
Multi-task implementation complete!

Results:
├── Task #1: ✓ Complete (3 commits)
├── Task #2: ✓ Complete (2 commits)
└── Task #3: ✗ Failed (blocked by missing API)

Next Steps (for successful tasks):
  /test 1                  # Test task #1
  /test 2                  # Test task #2
  /test 001-auth-jwt       # Using task name

Failed task requires attention:
  Task #3: See docs/task/003-feature-name.md for blocker details

Handling Issues

问题处理

Blocked by Missing Dependency

缺少依赖被阻塞

  1. Document the blocker in task document
  2. Update TASKS.md status to "Blocked"
  3. Inform user with specific blocker details
  4. Create sub-task if needed via
    /task
  1. 在任务文档中记录阻塞问题
  2. 将TASKS.md状态更新为"Blocked"
  3. 向用户提供具体的阻塞详情
  4. 如需可通过
    /task
    创建子任务

Requirement Unclear

需求不明确

  1. Ask user for clarification
  2. Update task document with clarified requirements
  3. Continue implementation
  1. 向用户请求澄清
  2. 更新任务文档,记录澄清后的需求
  3. 继续实现

Scope Creep

范围蔓延

  1. Stick to task document scope
  2. Note additional ideas in "Nice to Have" or separate task
  3. Don't expand scope without user approval

  1. 严格遵循任务文档范围
  2. 将额外想法记录在"Nice to Have"或单独任务中
  3. 未经用户批准不得扩大范围

Specialized Skills (MANDATORY When Installed)

专业技能(安装后必须调用)

These plugins must be installed separately. Once installed, invocation is MANDATORY — not optional.
PluginInstall FromWhen to Invoke
vercel-react-best-practices
vercel-labs/agent-skillsANY React/Next.js/TypeScript code
supabase-postgres-best-practices
supabase/agent-skillsANY database queries, RLS, schema, Supabase code
这些插件需要单独安装。安装后必须调用,不是可选步骤。
插件安装来源调用时机
vercel-react-best-practices
vercel-labs/agent-skills涉及任何React/Next.js/TypeScript代码时
supabase-postgres-best-practices
supabase/agent-skills涉及任何数据库查询、RLS、schema、Supabase代码时

Enforcement Summary

执行总结

┌────────────────────────────────────────────────────────────────┐
│ SPECIALIZED SKILLS ARE NOT OPTIONAL ONCE INSTALLED             │
├────────────────────────────────────────────────────────────────┤
│ 1. BEFORE writing code → Check if skills are available         │
│ 2. IF available AND relevant → INVOKE immediately              │
│ 3. APPLY best practices to your implementation                 │
│ 4. BEFORE completing → Verify you invoked required skills      │
│ 5. IF skipped → Go back, invoke, review code, fix issues       │
└────────────────────────────────────────────────────────────────┘
Failure to invoke specialized skills when available leads to:
  • Code that violates best practices
  • Performance issues that need fixing later
  • Security vulnerabilities
  • Technical debt and rework
┌────────────────────────────────────────────────────────────────┐
│ SPECIALIZED SKILLS ARE NOT OPTIONAL ONCE INSTALLED             │
├────────────────────────────────────────────────────────────────┤
│ 1. BEFORE writing code → Check if skills are available         │
│ 2. IF available AND relevant → INVOKE immediately              │
│ 3. APPLY best practices to your implementation                 │
│ 4. BEFORE completing → Verify you invoked required skills      │
│ 5. IF skipped → Go back, invoke, review code, fix issues       │
└────────────────────────────────────────────────────────────────┘
可用时未调用专业技能会导致:
  • 代码违反最佳实践
  • 后续需要修复的性能问题
  • 安全漏洞
  • 技术债务和返工