commit

GitHub

负责 Storage Redirect X 项目的 Git 提交管理,包括确认仓库状态、验证变更、执行代码检查与格式化、审查提交信息并创建原子化提交,确保符合规范。

.claude/skills/commit/SKILL.md Kindness-Kismet/Storage-redirection-X-Public

Trigger Scenarios

用户请求创建或修改 Git 提交 助手主动发起 git commit 操作前

Install

npx skills add Kindness-Kismet/Storage-redirection-X-Public --skill commit -g -y
More Options

Non-standard path

npx skills add https://github.com/Kindness-Kismet/Storage-redirection-X-Public/tree/main/.claude/skills/commit -g -y

Use without installing

npx skills use Kindness-Kismet/Storage-redirection-X-Public@commit

指定 Agent (Claude Code)

npx skills add Kindness-Kismet/Storage-redirection-X-Public --skill commit -a claude-code -g -y

安装 repo 全部 skill

npx skills add Kindness-Kismet/Storage-redirection-X-Public --all -g -y

预览 repo 内 skill

npx skills add Kindness-Kismet/Storage-redirection-X-Public --list

SKILL.md

Frontmatter
{
    "name": "commit",
    "description": "Prepare, review, and create Git commits for Storage Redirect X. Use when the user requests a commit, a commit message, or an amendment, and before any assistant-initiated git commit, including --amend. Pushing requires separate explicit approval."
}

Local Commits

Create an atomic commit promptly after each independently working requirement passes its necessary checks. Include only changes belonging to that requirement and follow AGENTS.md.

Workflow

  1. Confirm the repository, current branch, upstream, and worktree with git status --short --branch. Inspect staged and unstaged changes separately. Do not switch branches or absorb unrelated changes.
  2. Verify the final behavior using the checks appropriate to the changed paths. Run clippy for srx_core/ changes and lintDebug for android/ changes. Do not create test files by default; run existing checks where relevant.
  3. Check each new path with git check-ignore --no-index -v <path>. A final negated pattern permits tracking; a positive pattern excludes it. Keep build artifacts, credentials, and local plans or records out of the index. Do not bypass the allowlist with git add -f.
  4. Stage explicit paths with git add -- <path>. To stop tracking an authorized file, confirm its absolute path and use git rm --cached -- <path> so its local copy remains intact. Never use broad staging commands.
  5. Review git diff --cached --check and the complete git diff --cached. Confirm scope, required build inputs, license notices, and actual verification results before committing. Do not commit incomplete work or claim failed checks passed.
  6. Review the message against the rules below, then execute git commit. Apply the same review before --amend.
  7. Verify the saved message with git log -1 --format=%B and inspect git status --short --branch.
  8. Complete the Rust formatting phase below before finishing. If the worktree was already clean at entry, skip creating a task commit and start that phase directly. Report all commit IDs, scopes, verification results, and remaining worktree changes.

Rust Formatting

  1. Start only with a clean index and worktree. If uncommitted changes exist, verify and commit the authorized changes first, following the workflow above; do not run even a formatting check before those commits. Preserve unrelated or unfinished changes and defer formatting until they are resolved. Do not stash, reset, or absorb them merely to obtain a clean worktree.
  2. Run cargo fmt --all --check. If it passes, no formatting commit is needed. If it reports formatting differences, run cargo fmt --all. Diagnose tool or parsing failures instead of treating them as formatting differences.
  3. Review the complete diff and confirm it contains only formatter-generated Rust changes. Run cargo fmt --all --check again and cargo clippy --manifest-path srx_core/Cargo.toml --target aarch64-linux-android -- -D warnings.
  4. Stage only the explicit formatted paths, review git diff --cached --check and git diff --cached, and create one separate commit such as chore: Format Rust sources. Never mix formatting with functional changes or amend it into the preceding task commit.
  5. Verify the saved commit and clean worktree. This formatting-only commit completes the phase; do not recursively start another formatting phase for it.

Commit Message

The subject and body must be entirely in English. Chinese response and source-comment rules do not apply to Git messages.

Use type: imperative summary, at most 70 characters. Supported types include feat, fix, build, docs, refactor, chore, and test.

Explain why the change is needed, its final behavior, and the checks actually performed. State relevant limitations without copying raw logs. Add an issue-closing reference only after reading the issue and verifying its complete acceptance criteria.

Push and Amend

Create the local commit first. Before pushing, describe the changes, remote, target branch, and all outgoing commits; wait for explicit approval. Follow any stricter task-specific push rule, including the version-bump skill.

Amend only unpublished task-owned commits when authorized. Do not rewrite public history or force-push without separate explicit approval.

If ownership is unclear or a command fails, preserve the worktree and index, report the concrete blocker, and do not reset or delete user changes.

Version History

  • e5eeb2e Current 2026-11-02 12:30

Same Skill Collection

.claude/skills/pull-request/SKILL.md
.claude/skills/version-bump/SKILL.md
.codex/skills/commit/SKILL.md
.codex/skills/pull-request/SKILL.md
.codex/skills/version-bump/SKILL.md

Metadata

Files
0
Version
e5eeb2e
Hash
c25e8f41
Indexed
2026-11-02 12:30

Accueil - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-11-03 13:24
浙ICP备14020137号-1