AgentSkillsCN

forge-conventions

针对 git 提交、分支命名和代码风格的项目规范。在提交代码、创建分支或审查代码风格时使用

SKILL.md
--- frontmatter
name: forge-conventions
description: Project conventions for git commits, branch naming, and code style. Use when committing code, creating branches, or reviewing code style.

Project Conventions

Git Commit Style: {{COMMIT_STYLE}}

{{#CONVENTIONAL}}

Conventional Commits

Format: type(scope): description

Types:

TypeUse For
featNew features
fixBug fixes
docsDocumentation
styleFormatting (no code change)
refactorCode restructuring
testAdding tests
choreMaintenance tasks

Examples:

code
feat(auth): add JWT token validation
fix(api): handle null response in user endpoint
docs(readme): update installation instructions

{{/CONVENTIONAL}}

{{#FREEFORM}}

Freeform Commits

Write clear, descriptive messages:

  • Start with imperative verb (Add, Fix, Update, Remove)
  • Keep first line under 72 characters
  • Add body for complex changes

Examples:

code
Add user authentication with JWT tokens
Fix null pointer in API response handler
Update README with new installation steps

{{/FREEFORM}}

Branch Naming: {{BRANCH_STYLE}}

{{#FEATURE_BRANCH}}

Feature Branch Style

Format: type/description

PrefixUse For
feature/New features
fix/Bug fixes
hotfix/Urgent fixes
docs/Documentation
refactor/Code cleanup

Example: feature/user-authentication {{/FEATURE_BRANCH}}

{{#INITIALS_BRANCH}}

Initials Style

Format: initials/description

Example: mr/user-authentication {{/INITIALS_BRANCH}}

See reference/commit-style.md for more examples.