commit
3
总安装量
2
周安装量
#57808
全站排名
安装命令
npx skills add https://github.com/jacehwang/harness --skill commit
Agent 安装分布
opencode
2
gemini-cli
2
claude-code
2
github-copilot
2
codex
2
kimi-cli
2
Skill 文档
Context
- Current git status: !
git status - Current git diff (staged and unstaged changes): !
git diff HEAD - Untracked files: !
git ls-files --others --exclude-standard - Current branch: !
git branch --show-current - Recent commits: !
git log --oneline -10
Your task
Based on the above changes, create a single git commit.
Guidelines
1. Check for untracked files
- Review the list of untracked files above
- If there are untracked files that are relevant to the current changes, include them in the commit
- Common files to include: new source files, configuration files, documentation
- Files to typically exclude: build artifacts, temporary files, .env files
- ALWAYS include:
.claude/directory files (project Claude Code settings) - When in doubt, ask yourself: “Is this file part of the logical change I’m committing?”
- When using
git addwith file paths containing special characters (brackets, spaces, etc.), always quote the path:git add "path/with[brackets]/file.ts"
2. Commit message format
Subject line: 50 chars max. Be concise. Use short verbs (Add, Fix, Update, Remove, Refactor) + terse noun phrases.
â CORRECT examples (all under 50 chars):
- “Add user auth module” (20)
- “Fix login form validation” (25)
- “Update schema for user roles” (28)
- “Refactor database connection pool” (34)
- “Remove deprecated payment endpoint” (35)
Too long â shorten:
- “Add guidance for quoting special character paths” (49) â “Add special char quoting guidance” (32)
- “Implement investment proposal management feature” (48) â “Add proposal management” (22)
- “Reorganize skills into subdirectory and improve metadata” (56) â “Reorganize skills directory” (26)
â WRONG examples (NEVER DO THIS):
- “[TICKET-228] Add user authentication module” â WRONG: Has branch prefix
- “[TICKET-60] Fix validation errors” â WRONG: Has branch prefix
- “TICKET-228: Update schema” â WRONG: Has branch reference
- “feat: Add new feature” â WRONG: Has any kind of prefix
Rules:
- 50 chars max for the subject line â no exceptions
- Describe what changed, not why (put “why” in the commit body if needed)
- Drop filler words (the, a, for the, in the, etc.)
- NEVER include branch names, ticket numbers, or any prefixes
Self-check before committing:
-
“Is the subject line over 50 characters?”
- If YES â Shorten: drop adjectives, compress noun phrases, use a shorter verb
- If NO â Continue
-
“Does it include [BRANCH-NAME] or ticket number?”
- If YES â STOP and remove it immediately
- If NO â Proceed with commit
3. Commit body (optional)
When the subject line alone is not enough, add a commit body:
- Leave one blank line after the subject
- Use the body to explain why the change was made
- Wrap body lines at 72 characters