spec:do-task
9
总安装量
7
周安装量
#31543
全站排名
安装命令
npx skills add https://github.com/ikatsuba/skills --skill spec:do-task
Agent 安装分布
claude-code
6
codex
5
opencode
4
cursor
4
kiro-cli
3
Skill 文档
Execute Specific Task
Executes a specific task by its number from a specification’s tasks document. This skill allows targeted execution of any task in the plan.
When to use
Use this skill when the user needs to:
- Execute a specific task out of order
- Re-run a previously completed task
- Jump to a particular task in the implementation plan
Specification Files Structure
All specification documents are located in .specs/<spec-name>/ directory:
| File | Description |
|---|---|
.specs/<spec-name>/requirements.md |
Requirements and acceptance criteria |
.specs/<spec-name>/design.md |
Technical design and architecture |
.specs/<spec-name>/tasks.md |
Implementation tasks with checkboxes |
Always read all three files to understand the full context before executing tasks.
Instructions
Step 1: Parse Arguments
The <args> should contain:
- Task number (required) – e.g., “1”, “1.2”, “3.1”
- Spec name (optional) – e.g., “user-auth”
Format examples:
spec:do-task 1.2– Execute task 1.2 from the current/only specspec:do-task user-auth 2.1– Execute task 2.1 from the user-auth specspec:do-task 3– Execute major task 3 (and all its subtasks)
Step 2: Locate and Read Specification Documents
- If spec name provided, look in
.specs/<spec-name>/ - If no spec name, check if there’s only one spec in
.specs/ - If multiple specs exist without a name specified, list them and ask user to choose
- Read and parse all specification documents:
requirements.md– understand what needs to be builtdesign.md– understand how it should be builttasks.md– get the list of tasks to execute
Step 3: Find the Specified Task
- Search for the task matching the provided number
- If task number is a major task (e.g., “2”), include all subtasks (2.1, 2.2, etc.)
- If task not found, list available tasks and ask for correction
Step 4: Execute the Task
- Mark as in-progress – Update the checkbox to
[-]in tasks.md - Show task info – Display to the user:
- Task number and description
- Files to create/modify
- Requirements being addressed
- Current status (pending/in-progress/completed)
- Read context – Load relevant files mentioned in the task
- Implement the task – Follow the task description:
- Create new files as specified
- Modify existing files as described
- Follow project patterns and conventions
- Verify implementation – Ensure the change is correct
- Mark as complete – Update the checkbox to
[x]in tasks.md - Commit the changes – Create a git commit for the completed task (see Committing Changes section)
Step 5: Handle Subtasks
If executing a major task with subtasks:
- Execute each subtask in order
- Mark each subtask as complete when done
- Mark the major task as complete when all subtasks finish
Step 6: Report Completion
After completing the task:
- Summarize what was implemented
- Note if this was a re-execution of a completed task
- Show related tasks that might need attention
Committing Changes
After completing the task, create a git commit unless the user has specified otherwise:
- Stage the changed files related to the task
- Create a commit with a descriptive message referencing the task number
- Do NOT include Co-Authored-By in commit messages
Commit message format (Conventional Commits):
<type>(<spec-name>): <description>
Types: feat, fix, refactor, test, docs, chore, etc.
Examples:
feat(user-auth): add login form component
fix(payment): resolve checkout validation error
refactor(api): simplify request handling
test(user-auth): add unit tests for login service
Skip committing if:
- The user explicitly asked not to commit
- The task only modified the tasks.md file (checkpoint tasks)
Warning on Dependencies
If the specified task depends on incomplete prerequisite tasks:
- Warn the user about missing dependencies
- List the prerequisite tasks
- Ask if they want to:
- Execute prerequisites first
- Proceed anyway
- Cancel
Error Handling
- If the task fails, keep it marked as
[-] - Report the issue to the user
- Suggest fixes or ask for guidance
Arguments
<args>– Task number and optionally spec name- Format:
[spec-name] <task-number> - Task number: “1”, “1.2”, “2.3.1”, etc.
- Spec name: kebab-case identifier
- Format:
Examples:
1.2– Task 1.2 from the default/only specuser-auth 3.1– Task 3.1 from user-auth specpayment-flow 2– All of task 2 from payment-flow spec