Token导航 LogoToken导航TokenDH.com
研究检索只读github未标认证来源可访问许可证需确认审计提醒

git-commit-conventionalgit 常规提交

Agent Skill

git-commit-conventional 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

588

周安装

24

GitHub Stars

2

下载量

188
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:git-commit-conventional(git 常规提交)
来源仓库:https://github.com/liatrio-labs/ai-prompts
仓库路径:skills/git-commit-conventional
安装命令:
npx skills add https://github.com/liatrio-labs/ai-prompts --skill git-commit-conventional
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/liatrio-labs/ai-prompts --skill git-commit-conventional

简介

git-commit-conventional 根据 Conventional Commits 规范生成结构化提交消息。

  • 适合遵循 Angular 风格提交约定的项目,便于自动化版本管理。
  • 自动校验消息格式并提示缺失字段,如 type(scope): description。
  • 可与 husky、commitlint 等工具集成,强化提交前检查。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Git Commit Conventional

Overview

Generate clear Conventional Commit messages, decide commit grouping, run commit-time checks, and create commit(s) safely.

Context Marker

Always begin your response with all active emoji markers, in the order they were introduced.

Format: "<marker1><marker2><marker3>\n<response>"

The marker for this skill is: 🎯

Workflow

  1. Inspect repository context:

- Run git log -n 20 --pretty=format:%s for subject style context only. - Run git status.

  1. Select the diff to analyze:

- If staged changes exist, use git diff --staged and ignore unstaged changes. - If nothing is staged, run git diff and ask whether to stage all or specific files before committing.

  1. Evaluate commit pressure using balanced thresholds:

- Count changed files and changed lines from the active diff context. - Classify zone: - green: <=5 files and <=150 changed lines. - yellow: 6-12 files or 151-400 changed lines. - red: >12 files or >400 changed lines. - Apply zone behavior: - green: proceed with normal commit boundary analysis. - yellow: recommend splitting and record a risk note if user chooses a single commit. - red: require a split plan before proceeding; only continue single-commit flow with explicit user override.

  1. Decide single versus multiple commits with an explicit framework:

- Check logical separation: split when changes serve multiple distinct goals. - Check file-type mixing: split documentation changes from code changes when they can stand alone. - Check implementation versus tests: split when test updates are independent from implementation updates. - Check formatting versus logic: split formatting-only churn from behavior changes. - Check dependencies versus behavior: split dependency and tooling updates from code behavior changes. - Check mixed-purpose hunks in the same file: split by hunk when one file contains unrelated intents (for example, rename plus refactor). - Check size and reviewability: consider splitting broad changes (for example, over roughly 150 changed lines) by module or feature. - Check issue/feature boundaries: split when multiple bugs or features are addressed in one diff. - Keep together when changes are small and focused on one purpose. - Keep together when changes are tightly coupled and splitting would create non-functional or misleading history. - Keep together when all changes are part of one coherent refactor.

  1. Stage changes intentionally for the selected commit boundary:

- Use git add -p to stage only relevant hunks when a file mixes logical changes. - Use git add -e only when hunk editing is required and apply minimal edits. - After staging, verify scope with git diff --staged and git diff before proceeding. - If partial staging would create a broken intermediate commit, keep dependent hunks together.

  1. Run a concise quality review before committing:

- Check correctness, maintainability, security, performance, and tests. - Classify findings by severity: Critical, High, Medium, Low. - Present findings using this structure: Executive Summary; Issues by severity with file/line references; Suggested fixes with brief examples; Positive observations; Actionable next steps. - If any Critical or High issue is found, stop and request explicit user confirmation before committing.

  1. If .pre-commit-config.yaml exists, run pre-commit run:

- Never bypass hooks. - For trivial fixes, apply changes, restage files, and rerun hooks with a max of 2 retries. - Stop retrying when hooks pass, when retries are exhausted, or when reruns make no additional file changes. - If hooks still fail after retries, stop and ask the user for direction. - For non-trivial fixes, present the proposed fix to the user and get approval before applying and proceeding. - Treat formatting-only or whitespace-only hook edits as trivial auto-fixes. - Track every auto-fixed file and the hook that changed it.

  1. Generate commit message(s) in strict Conventional Commit format:

- Subject must match <type>(<scope>): <subject> or <type>: <subject>. - If subject format is invalid, regenerate until format is valid. - Keep subject imperative and concise. - If the change is breaking, use ! and add explicit breaking-change explanation in the body and/or footer (BREAKING CHANGE:...). - Include body to document context and rationale. - Only exclude a body when the changes are very, very small.

  1. Apply AI attribution policy before each commit:

- Always include a footer-only Co-Authored-By attribution on agent-created commits. - Never mention AI generation in the subject or body. - Use best effort self-identification to determine AI name and email from runtime/model self-awareness metadata. - If email is not readily available, use no-reply@example.com. - If name is not readily available, use AI Assistant. - Never block commit flow by asking the user for attribution identity.

  1. Use deterministic output contract for single-commit and multi-commit runs:

- Before committing, present Commit Plan: - commit_count - threshold_zone_encountered - boundaries_rationale - scope_per_commit - Before each commit, present Per-Commit Preview: - index (i/N) - staged_files - subject - body_present - footers - checks_to_run - After each commit, present Per-Commit Result: - hash - subject - hook_result - auto_fix_files

  1. Validate message format and create commit(s):

- Show generated message(s) in chat. - Run git commit with the generated message(s). - For multiple commits, stage the right files before each commit. - In the final commit summary to the user, include: - Ordered <hash> <subject> list. - Pre-commit changes note: - If auto-fixes were applied, list hook id(s) and file path(s). - If none were applied, explicitly say Pre-commit changes: none. - ai_attribution_applied: yes/no. - working_tree_status: clean/not clean.

Mandatory Rules

  • Never use hook bypass flags such as --no-verify or -n.
  • Never commit when Critical or High review issues are present unless the user explicitly confirms.
  • Never include unrelated files in a commit.
  • Never stage an entire file when only some hunks belong to the current commit boundary.
  • Always report whether pre-commit auto-fixed files before finalizing the commit result message.

References

  • Conventional commit types, scopes, and templates: references/conventional-commits.md
  • Review severity rubric and reporting format: references/review-guardrails.md
  • Commit pressure zones and threshold behavior: references/commit-hygiene-thresholds.md
  • AI attribution policy for commits: references/ai-attribution.md

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.99%
按下载量换算64

Claude

32.02%
按下载量换算60

Cursor

17.34%
按下载量换算33

Gemini CLI

9.52%
按下载量换算18

安全审计

Gen Agent Trust Hub

通过

Socket

可疑

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills