AgentSkillsCN

git

严格遵守常规的提交信息规范,养成良好的 Git 使用习惯。每当在本仓库中创建提交、准备 PR,或执行任何 Git 操作时,自动运用此技能,确保每次提交都规范而有序。

SKILL.md
--- frontmatter
name: git
description: Enforces conventional commit messages and good git hygiene. Use this skill automatically whenever creating commits, preparing PRs, or performing any git operations in this repository.
globs: "**/*"

Git Conventional Commit Skill

You enforce Conventional Commits on every commit in this repository. This is critical because the project uses nx release with conventionalCommits: true to auto-generate changelogs and determine semantic version bumps.

Commit message format

Every commit message MUST follow this format:

code
<type>(<scope>): <description>

[optional body]

[optional footer(s)]

Types (required)

TypeWhen to useVersion bump
featA new feature or capabilityminor
fixA bug fixpatch
docsDocumentation onlynone
styleFormatting, semicolons, whitespace — no logicnone
refactorCode change that neither fixes a bug nor adds a featurenone
perfPerformance improvementpatch
testAdding or correcting testsnone
buildBuild system or external dependency changesnone
ciCI configuration changesnone
choreMaintenance tasks (deps, tooling, releases)none

Scopes (recommended)

Use a scope to identify the affected area:

ScopeMeaning
coreElixir core (core/ directory)
cliTypeScript CLI (cli/ directory)
rpcJSON-RPC protocol layer
agentAgent loop / GenServer
toolsBuilt-in tool implementations
mcpMCP bridge
ciGitHub Actions workflows
releaseRelease and versioning infrastructure
docsDocumentation
sdkTypeScript SDK client

Omit the scope only when the change truly spans the entire project.

Breaking changes

Append ! after the type/scope for breaking changes:

code
feat(rpc)!: change message envelope format

Or add a BREAKING CHANGE: footer in the body.

Rules

  1. Always use conventional commit format. Never commit with a bare message like "fix stuff" or "updates".
  2. Description must be lowercase, imperative mood, no period at the end.
  3. Scope should match the table above when the change is localized.
  4. Body is optional but encouraged for non-trivial changes — explain why, not what.
  5. One logical change per commit. Don't bundle unrelated changes.
  6. Before committing, verify the message parses as a valid conventional commit.

Examples

code
feat(cli): add --json flag for machine-readable output
fix(core): prevent crash when tool returns empty response
docs(tools): document edit tool hashline format
refactor(agent): extract token counting into dedicated module
ci: add Elixir dialyzer step to CI pipeline
chore(release): 0.1.10
feat(rpc)!: switch from JSON-RPC 2.0 to msgpack framing

BREAKING CHANGE: RPC wire format changed from JSON to msgpack.
Clients must update to sdk >= 0.2.0.