commit
Stage the current changes, lint shell scripts with shellcheck, and create a single git commit with a conventional message generated from the diff. Use when the user says "commit", "save this", "snapshot this state", or "checkpoint" without specifying a commit message. Skip if the user asked you to push, open a PR, or do anything beyond a local commit — those need confirmation per the global git safety protocol.
- License 许可
- MIT
- 最近更新
- 2026-11-07
- Stars
- ★ 1
- Forks
- 1
01 前言 Front Matter
- name
- commit
- description
- Stage the current changes, lint shell scripts with shellcheck, and create a single git commit with a conventional message generated from the diff. Use when the user says "commit", "save this", "snapshot this state", or "checkpoint" without specifying a commit message. Skip if the user asked you to push, open a PR, or do anything beyond a local commit — those need confirmation per the global git safety protocol.
03 SKILL.md 正文
Commit current work
A small, opinionated commit flow tuned for this repo's iterative workflow. The goal is to make snapshotting working state cheap so debug rounds don't accumulate uncommitted regressions.
Steps
Run these in parallel where possible:
git status(no-uall) to see untracked + modified files.git diff(staged + unstaged) to see what would actually be committed.git log --oneline -10to match this repo's commit message style.
Then sequentially:
- Lint any changed
.shfiles withshellcheck. If shellcheck reports errors (not info/style), surface them and ask the user whether to commit anyway — don't auto-block, but don't silently ship known issues either. - Stage the relevant changes by file name. Never
git add -Aorgit add .— that risks committing.env, build artifacts, or other untracked files you did not mean to commit. - Generate a commit message:
- Title (≤72 chars): imperative mood, lowercase, no trailing period. Match the style of recent commits in this repo.
- Body (optional): one or two sentences focused on the why, not the what. Skip the body for trivial changes.
- Add whatever attribution trailer the repo/harness requires.
- Commit via heredoc (always — preserves formatting):
git commit -m "$(cat <<'EOF' <title> <body if any> EOF )" git statusafter to confirm the commit landed.
Hard rules
- Never amend. Use a new commit even if the previous one was small. Amending a pushed commit is hostile to anyone who pulled it.
- Never
--no-verify. If a pre-commit hook fails, fix the underlying issue and re-stage. - Don't commit secrets. If you see something that looks like a token, key, or credential staged, abort and warn the user.
- Don't commit generated project files,
build/,.tmp/, anything gitignored. - One commit per call. If the changes are clearly two unrelated things, ask the user whether to split — don't decide unilaterally.
When NOT to use this skill
- User asked for "push" or "open PR" — don't bundle push or PR creation into the commit flow; pushing follows the repo's own authorization rules.
- User specified the commit message themselves — just commit with their message verbatim, skip the message-generation step.
- Mid-rebase or mid-merge — investigate state first; don't blindly snapshot a half-resolved conflict.
04 同仓库更多 Skills
second-wind
Orchestrate long unattended Claude Code runs across multiple repos with the wind CLI. Use when the user wants to run Claude Code overnight, resume sessions after the 5-hour usage limit, run Claude in many repos at once via tmux, or says "set up second wind", "wind up", "overnight run", "resume after limit", "usage limit orchestrator".
structured-output-adaptive-thinking-token-bloat
A Claude API call using output_config.format (json_schema structured outputs) with thinking:{type:"adaptive"} burns most of its output budget on thinking (observed ~21k of ~24k tokens) without improving JSON quality, making the run up to ~5x more expensive than the same call with thinking omitted — use when calling the Messages API with a json_schema output format for extraction, ranking, classification, or summarization tasks, or when a schema-constrained call's usage.output_tokens is far larger than the returned JSON.
review
Apply a code-review lens to a diff, branch, or file — find correctness bugs, security issues, and quality problems, ranked by severity, with a concrete fix for each. Use when the user says "review this", "review my diff", "check this PR", "look this over before I commit", or "is this safe". Skip when the user wants the code written, not reviewed.
refresh
Rebuild the prompt-craft command registry and usage profile, and print a summary of installed commands and your personalized recommendations. Use when you install or update plugins and want the advisor to pick them up immediately, or say "refresh prompt-craft", "rebuild the command registry".
refactor
Apply a refactoring lens — restructure code without changing behavior, guarded by tests that pass before and after. Use when the user says "refactor", "clean this up", "extract this", "simplify this", "reduce duplication", or "make this readable" on existing working code. Skip when the change is meant to alter behavior (that's a feature or a fix).
plan
Decompose a non-trivial task into an explicit, tracked plan with goals and per-step acceptance criteria before writing code. Use when the user says "plan this", "break this down", "what's the plan", or asks for a multi-step feature/refactor that touches more than one file. Pairs with plan mode. Skip for single-edit changes that need no decomposition.