Agent SkillsLibPDF-js/core › conventional-commit

conventional-commit

GitHub

协助开发者按照 Conventional Commits 规范创建 Git 提交。通过分析代码变更,自动选择合适类型、范围和描述,安全地暂存文件并提交,确保提交信息格式规范且不含敏感数据。

.opencode/skills/conventional-commit/SKILL.md LibPDF-js/core

Trigger Scenarios

用户要求提交代码更改 需要生成符合规范的 Commit Message 执行 git commit 操作

Install

npx skills add LibPDF-js/core --skill conventional-commit -g -y
More Options

Non-standard path

npx skills add https://github.com/LibPDF-js/core/tree/main/.opencode/skills/conventional-commit -g -y

Use without installing

npx skills use LibPDF-js/core@conventional-commit

指定 Agent (Claude Code)

npx skills add LibPDF-js/core --skill conventional-commit -a claude-code -g -y

安装 repo 全部 skill

npx skills add LibPDF-js/core --all -g -y

预览 repo 内 skill

npx skills add LibPDF-js/core --list

SKILL.md

Frontmatter
{
    "name": "conventional-commit",
    "description": "Add and commit changes using conventional commits"
}

Create a git commit for the current changes using the Conventional Commits standard.

Context

Based on the conversation, determine what context is relevant for the commit message. If the user provided specific guidance about what to commit or the commit message, use that. Otherwise, analyze the changes to determine an appropriate commit message.

Process

  1. Analyze the changes by running:

    • git status to see all modified/untracked files
    • git diff to see unstaged changes
    • git diff --staged to see already-staged changes
    • git log --oneline -5 to see recent commit style
  2. Stage appropriate files:

    • Stage all related changes with git add
    • Do NOT stage files that appear to contain secrets (.env, credentials, API keys, tokens)
    • If you detect potential secrets, warn the user and skip those files
  3. Determine the commit type based on the changes:

    • feat: New feature or capability
    • fix: Bug fix
    • docs: Documentation only
    • style: Formatting, whitespace (not CSS)
    • refactor: Code restructuring without behavior change
    • perf: Performance improvement
    • test: Adding or updating tests
    • build: Build system or dependencies
    • ci: CI/CD configuration
    • chore: Maintenance tasks, tooling, config
  4. Determine the scope (optional):

    • Use a short identifier for the affected area: feat(parser):, fix(api):
    • Omit scope if changes are broad or scope is unclear
  5. Write the commit message:

    • Subject line: <type>[optional scope]: <description>
      • Use imperative mood ("add" not "added")
      • Lowercase, no period at end
      • Max 50 characters if possible, 72 hard limit
    • Body (if needed): Explain why, not what
      • Wrap at 72 characters
      • Separate from subject with blank line

Commit Format

<type>[scope]: <subject>

[optional body explaining WHY this change was made]

Examples

Simple change:

fix(parser): handle empty input without throwing

With body:

feat(api): add streaming response support

Large responses were causing memory issues in production.
Streaming allows processing chunks incrementally.

Rules

  • NEVER commit files that may contain secrets
  • NEVER use git commit --amend unless the user explicitly requests it
  • NEVER use --no-verify to skip hooks
  • If the pre-commit hook fails, fix the issues and create a NEW commit
  • If there are no changes to commit, inform the user and stop
  • Use a HEREDOC to pass the commit message to ensure proper formatting

Execute

Run the git commands to analyze, stage, and commit the changes now.

Version History

  • 9eedd5f Current 2026-07-24 22:02

Same Skill Collection

.opencode/skills/code-review/SKILL.md
.opencode/skills/continue-implementation/SKILL.md
.opencode/skills/create-documentation/SKILL.md
.opencode/skills/explore-references/SKILL.md
.opencode/skills/interview-spec/SKILL.md
.opencode/skills/create-plan/SKILL.md
.opencode/skills/create-scratch/SKILL.md
.opencode/skills/dx-review/SKILL.md
.opencode/skills/implement-spec/SKILL.md

Metadata

Files
0
Version
0fa22e0
Hash
56d871da
Indexed
2026-07-24 22:02

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