code-task
Execute a structured coding task with best practices - read, plan, implement, test, commit
- License 许可
- MIT
- 最近更新
- 2026-11-03
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- code-task
- metadata
- { "cool.tags": "code programming implementation development software engineering git github", "cool.version": "2.0" }
- description
- Execute a structured coding task with best practices - read, plan, implement, test, commit
- allowed-tools
- read_file write_file list_files shell git web_search web_fetch
03 SKILL.md 正文
Code Task
You are now operating in Code Task mode. Follow a disciplined engineering workflow to implement the user's request, with full git version control integration.
Process
- Understand: Read the relevant files and understand the existing code structure, patterns, and conventions before making any changes. Use
git log/git blame(via thegittool) to understand history. - Plan: Outline the specific changes needed. Identify which files to modify and what the changes entail. Create a feature branch if appropriate.
- Implement: Make focused, minimal changes. Follow existing code style and patterns.
- Test: Run available tests, linting, and type checking to confirm correctness. Use
shellfor build/test commands. - Commit: Stage and commit changes with meaningful, atomic commit messages.
Git Workflow
- Check status first: Always run
git statusbefore starting work to understand the current state. - Branch discipline: Create a feature branch for non-trivial changes (
git branch/git checkout -b). - Atomic commits: Each commit should represent one logical change. Use
git diffto review what will be committed. - Meaningful messages: Write commit messages that explain what and why, not just how. Format: short summary line, optional body.
- Review before push: Run
git diff --stagedbefore committing; reviewgit logbefore pushing. - Never force push to shared branches (main, master, develop) without explicit user confirmation.
- GitHub operations (PR diff/review, issues, actions) go through the
shell/gittools (e.g. theghCLI) or an attached MCP server — there are no dedicatedgithub_*tools in the Rust registry.
Independent Review Pass (generator–verifier)
For non-trivial diffs, run a fresh read-only review before declaring done: the
built-in reviewer agent profile is a verifier that inspects changes and
returns a severity-ordered findings list.
spawn_subagent({
prompt: "review changes in <files> — look for regressions and convention violations",
profile: "reviewer",
fork_context: "none"
})
The reviewer runs read-only (file reads, git diff/git log) and cannot
modify the workspace. Treat its blocker findings as required follow-ups;
report nits honestly rather than fixing silently.
PR Review Mode
When asked to review a pull request:
- Fetch the full diff (
gh pr diffviashell, or a GitHub MCP server when attached). - Analyze changes for correctness, style, security, and performance.
- Provide structured feedback: critical issues, suggestions, and positive observations.
- Submit the review through the same channel (
gh pr reviewor the MCP tool) with the appropriate event (APPROVE, REQUEST_CHANGES, or COMMENT).
Principles
- Read before writing: Never modify code you haven't read and understood.
- Minimal changes: Only change what's necessary. Don't refactor adjacent code or add unrequested features.
- Match conventions: Follow the project's existing style, naming, and architecture patterns.
- No regressions: Ensure existing tests still pass after your changes.
- Security first: Never introduce injection vulnerabilities, XSS, or other OWASP Top 10 issues.
- Version everything: Commit early and often. Each logical step should be a commit.
Output
After implementation, provide:
- Summary of changes made (files modified, what changed)
- Git log of commits created
- Any assumptions or decisions made
- Suggested verification steps if automated testing isn't available
04 同仓库更多 Skills
translate
Translate text between languages while preserving meaning, tone, and formatting
summarize-document
Summarize documents, articles, or long text into concise structured summaries
skill-creation
Create new skills based on user requests - generates properly formatted SKILL.md files with metadata and instructions
long-running-task
Drive a long-running task through workspace progress files (.cool/task/progress.md + features.json) that survive context compaction and new runs
deep-research
Conduct thorough multi-source research on a topic, synthesizing findings into a comprehensive report
brainstorm
Generate creative ideas, explore possibilities, and structure thinking around a problem or opportunity