一键导入
mach6-implement
Implement a plan from a PR, or fix review findings / CI failures. Usage: mach6-implement 42 [finding-numbers] or mach6-implement 42 ci
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Implement a plan from a PR, or fix review findings / CI failures. Usage: mach6-implement 42 [finding-numbers] or mach6-implement 42 ci
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Pre-merge checks, version bump, merge PR, git tag, GitHub release. Version bump happens BEFORE merge (on the feature branch) because master requires PRs. Usage: mach6-publish 42
Run specialized review agents in parallel on a PR (code-reviewer, error-auditor, test-reviewer, completeness-checker, simplifier), post findings, then independently assess each finding to separate genuine issues from nitpicks and false positives. Usage: mach6-review 42 [aspects]
Assess an existing GitHub issue (explore codebase, identify scope/risks/ambiguities, post assessment) or create a new structured issue. Usage: mach6-issue 42 (assess) or mach6-issue (create) or mach6-issue <description> (create with context)
Explore codebase, create implementation plan, create feature branch with dummy commit, open draft PR, post plan as PR comment. Everything lives on the PR from this point forward. Usage: mach6-plan 42
Commit changes, push to remote, and post a progress comment on the associated PR or issue. Stages files by name (never git add -A), matches existing commit style, auto-detects PR from branch. Usage: mach6-push [optional commit message]
Review code changes, provide feedback, and suggest improvements.
| name | mach6-implement |
| description | Implement a plan from a PR, or fix review findings / CI failures. Usage: mach6-implement 42 [finding-numbers] or mach6-implement 42 ci |
| argument-hint | <pr-number> [finding-numbers | ci] |
User input: $ARGUMENTS
This skill has two modes:
ci): fixes specific review findings or CI failures#N in comment bodies — Use "finding 3", "item 3" etc. instead.git add -A or git add .. Stage files by name. Never stage secrets.update_task tool to show progress.gh — Set GH_PAGER=cat and GH_EDITOR=cat before all gh commands to prevent interactive prompts from hanging the agent. Use --body-file instead of inline --body for all gh pr comment, gh pr create, and gh issue create calls to avoid shell interpretation of backticks.Extract:
1,2,3)ci flag (optional — fix CI failures instead of review findings)If only a PR number is given → implement mode.
If finding numbers or ci → fix mode.
gh pr checkout <pr-number>
git pull
Read ALL PR comments and the PR body to get complete context:
gh pr view <pr-number> --json title,body,comments
Inline review comments (comments on specific lines of the diff) are NOT included in the above output. Fetch them separately:
gh api repos/{owner}/{repo}/pulls/<pr-number>/comments --jq '.[] | {user: .user.login, path: .path, line: (.original_line // .line // "?"), body: .body, diff_hunk: .diff_hunk, url: .html_url}'
Find the plan comment (contains <!-- mach6-plan --> marker) from the regular comments. If no plan comment exists, tell the user and suggest running /skill:mach6-plan first.
Also read any progress updates, prior review findings, assessments, inline review comments, and discussion — all of this context informs implementation.
Create tasks based on the plan's deliverables/features. Example:
Read all files mentioned in the plan. Understand the existing code before making changes.
Use the implement role subagent to implement each deliverable. Use default model role if implement is not defined.
For each deliverable in the plan, launch a implement subagent via the Agent tool. Provide each agent with:
Test coverage is part of the deliverable, not an afterthought. If the plan specifies tests for a deliverable, the feature-dev agent must implement them. If the target package lacks test infrastructure, add it.
Parallelism: If deliverables are independent (don't modify the same files), run their implement agents in parallel.
Small plans (1-2 simple deliverables): You may implement directly instead of delegating, if the changes are straightforward enough that subagent overhead isn't justified.
Update task tracking as each deliverable completes.
After all implement agents complete:
Suggest next step: /skill:mach6-push then /skill:mach6-review <pr-number> for review.
ci)ci was specified:gh pr checks <pr-number>
gh run view <run-id> --log-failed
Note: gh pr checks returns exit code 8 while checks are still pending — this is expected, not a failure. Wait and re-run if needed.
Read the failed CI logs and identify issues. Extract test failures, stack traces, error messages. If all checks pass, report this and stop.
Read ALL PR comments to get full context:
gh pr view <pr-number> --json title,body,comments
Inline review comments (comments on specific lines of the diff) are NOT included in the above output. Fetch them separately:
gh api repos/{owner}/{repo}/pulls/<pr-number>/comments --jq '.[] | {user: .user.login, path: .path, line: (.original_line // .line // "?"), body: .body, diff_hunk: .diff_hunk, url: .html_url}'
Find the review (<!-- mach6-review -->) and assessment (<!-- mach6-assessment -->) comments, then extract the specific findings to fix. Also review inline review comments for any additional context or feedback. Prior progress comments and discussion may also provide useful context.
ci:Read ALL PR comments AND inline review comments, find review/assessment comments, present genuine findings, and ask which to fix. Use both commands above.
If more than batch size, fix first batch and tell user to re-run.
Use the implement subagent to implement fixes. implement is a model role. If it isn't specified, then just use default.
For each finding (or batch of related findings), launch a implement subagent with:
Parallelism: If findings touch different files, run their implement agents in parallel. If findings overlap (same file/function), batch them into a single agent.
Simple fixes (typos, naming, one-line changes): You may fix these directly instead of delegating.
Defer out-of-scope items to new issues. Update task tracking per finding.
After all implement agents complete:
Suggest next step: /skill:mach6-push then /skill:mach6-review <pr-number> for re-review.