Agent Skillsopenkursar/hello-halo › code-commit

code-commit

GitHub

用于代码提交前的审查与执行。检查临时代码、敏感文件及国际化规范,生成符合规范的 Commit Message 并执行 git commit,确保代码质量与合规性。

.claude/skills/code-commit/SKILL.md openkursar/hello-halo

Trigger Scenarios

用户要求提交代码 用户要求执行 git commit

Install

npx skills add openkursar/hello-halo --skill code-commit -g -y
More Options

Non-standard path

npx skills add https://github.com/openkursar/hello-halo/tree/main/.claude/skills/code-commit -g -y

Use without installing

npx skills use openkursar/hello-halo@code-commit

指定 Agent (Claude Code)

npx skills add openkursar/hello-halo --skill code-commit -a claude-code -g -y

安装 repo 全部 skill

npx skills add openkursar/hello-halo --all -g -y

预览 repo 内 skill

npx skills add openkursar/hello-halo --list

SKILL.md

Frontmatter
{
    "name": "code-commit",
    "description": "Must be invoked when the user asks to commit code, submit code, or any similar request."
}

Code Commit Skill

Commit Workflow

1. Review Changes

Run git status and git diff in the repository to understand all current changes.

2. Pre-commit Checks

Review all changed files. If any issues are found, report them to the user and wait for confirmation before committing.

2.1 Temporary Code Detection

Use your judgment to identify code that looks temporary or was clearly left in by accident -- things like debugger statements, placeholder values (test123, asdf, foo), commented-out code blocks, or anything that reads like a quick hack not meant for production. Don't be overly rigid; focus on what obviously doesn't belong.

2.2 Temporary File Detection

Check whether any files that should not be committed are included in the changes:

  • OS files: .DS_Store, Thumbs.db, etc.
  • Temp files: *.log, *.tmp, *.bak, *.swp, etc.
  • IDE configs: non-shared files under .idea/, .vscode/, etc.
  • Build artifacts: node_modules/, dist/, build/, etc.
  • Sensitive files: .env, credentials.json, private keys, etc.

2.3 Internationalization & Open-source Readiness

Ensure the code is suitable for an internationalized, open-source project:

  • No hardcoded Chinese strings in user-facing text (UI labels, prompts, error messages). These should go through the project's i18n mechanism.
  • Comments in English to align with open-source conventions.
  • No pinyin naming for variables, functions, or identifiers. Use meaningful English names.
  • No internal/private information such as internal IP addresses, intranet domains, personal emails, phone numbers, API keys, or secrets.
  • No specific company or brand names in code, comments, or commit messages — this includes but is not limited to Microsoft, Google, Tencent, Alibaba, Apple, Meta, Amazon, Baidu, ByteDance, etc. Use generic terms instead (e.g., "cloud provider", "search engine", "platform").

3. Generate Commit Message

Format:

<type>: #AI commit# <concise description>. collaboration and commit by halo

Supported types:

type usage
feat New feature
fix Bug fix
docs Documentation changes
style Code formatting (no logic changes)
refactor Refactoring (no new features or bug fixes)
perf Performance improvement
test Test-related changes
chore Build, tooling, dependency updates, etc.

Examples:

git commit -m "feat: #AI commit# add user authentication module. collaboration and commit by halo"
git commit -m "fix: #AI commit# resolve memory leak in event listener. collaboration and commit by halo"

4. Execute Commit

git add <relevant files>
git commit -m "<generated commit message>"
  • Only stage files that pass the checks. Do not blindly git add ..
  • Run git status after committing to verify.

Notes

  • If there are no changes, inform the user that there is nothing to commit.
  • Do not run git push unless the user explicitly asks.
  • When issues are found during checks, list all of them and ask the user how to proceed. Do not skip issues on your own.

Version History

  • 8e53dce Current 2026-08-20 09:12

Same Skill Collection

.claude/skills/code-merge/SKILL.md
.claude/skills/code-review/SKILL.md
.claude/skills/comment-review/SKILL.md
.claude/skills/halo-dev/SKILL.md
.claude/skills/code-review-simple/SKILL.md

Metadata

Files
0
Version
8e53dce
Hash
0d0c1f00
Indexed
2026-08-20 09:12

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-25 12:23
浙ICP备14020137号-1 $방문자$