skills-git-preflight
Use before build or ship operations to verify clean git state. Detects dirty working trees, orphaned worktrees, and branch mismatches. Can auto-stash or auto-clean worktrees. Other skills should invoke this as a precondition.
- License 许可
- AGPL-3.0
- 最近更新
- 2026-11-13
- Stars
- ★ 1
- Forks
- 1
01 前言 Front Matter
- name
- skills-git-preflight
- description
- Use before build or ship operations to verify clean git state. Detects dirty working trees, orphaned worktrees, and branch mismatches. Can auto-stash or auto-clean worktrees. Other skills should invoke this as a precondition.
- user-invocable
- true
- disable-model-invocation
- false
03 SKILL.md 正文
Git Preflight Skill
Runs git state checks before build/ship operations to prevent failures from dirty trees, orphaned worktrees, or wrong branches.
When to Use
- Before
/skills-build— ensure clean tree for exec - Before
/skills-ship— ensure committable state - When a build or ship fails with dirty tree or branch errors
- When the user asks to check git state or clean up worktrees
Instructions
Call the MCP tool directly:
mcp__rks__rks_preflight({ projectId: 'routekit-shell' })
If the projectId above is still an unsubstituted template token, resolve it from the projectId declared at the top of CLAUDE.md.
Optional parameters:
expectedBranch: verify current branch matches (e.g. 'staging')autoStash: true to auto-stash dirty changescleanWorktrees: true (default) to auto-remove orphaned worktrees
Interpreting Results
The result contains three sections:
dirtyTree:{ dirty, files, suggestion }— uncommitted changesworktrees:{ orphaned, cleaned, errors }— worktree statebranch:{ currentBranch, matches, tracking, ahead, behind }— branch verification
ok: true means all checks passed. ok: false means at least one issue needs attention before proceeding.
04 同仓库更多 Skills
doctor
Run `routekit doctor` against the invoking shell's child-project ecosystem and surface per-child outcomes. Default mode is detect + auto-fix across all registered children. Pass `--dry-run` to inspect the fix plan without mutating anything. Non-recoverable findings (pinned-but-drifted children) are reported but not repaired.
skills-telemetry
Use when the user asks about recent activity, failures, build history, or wants to query telemetry events. Calls MCP telemetry tools directly — no Task subagent needed. $ARGUMENTS can be: summary, failures, or an event type filter string.
skills-telemetry-export
Use when the user wants to EXPORT/SHARE a project's telemetry — e.g. for a UAT report or to attach to a GitHub issue. Produces a redacted .json + .md bundle via an MCP tool; no Task subagent or Governor is launched. $ARGUMENTS may be a storyId to scope the export.
skills-ship
Use when the user wants to commit and ship uncommitted changes. Accepts an optional commit message as $ARGUMENTS. Launches the Ship Governor via Task subagent. Handles both 2-branch (push → PR → merge) and 3-branch (local merge, no PR) workflows automatically based on project config.
skills-rks-welcome
Alias for /rks-onboard — same guided first-run tour through rks stories, permissions, cost, and first PR.
skills-rks-onboard
Run the rks onboarder — guided first-run tour through stories, permissions, cost, and first PR. Resumes from last completed stage if a session exists. Use when the user types /rks-onboard or asks to start onboarding.