Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问clear审计未展示

commit提交

Agent Skill

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

总安装

315

周安装

13

GitHub Stars

公开资料未说明

下载量

103
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

AgentSkills.tonpx skills
npx skills add johnie/skills --skill "commit"

简介

发现并安装 AI 代理的技能,协助扩展宿主平台的功能模块。

  • 适用于需要动态加载新能力或集成第三方插件的研究检索场景。
  • 通过 npx skills add johnie/skills --skill "commit" 命令从 GitHub 安装。
  • 需验证仓库来源可靠性及技能兼容性,防止引入恶意或不稳定组件。
  • 建议在安装后查阅原始 README 文档以了解具体用法和潜在影响。

SKILL.md

name
commit
description
Create semantically correct, granular git commits by analyzing staged and unstaged changes
allowed-tools

Commit Skill

Create semantically correct, granular git commits by analyzing staged and unstaged changes.

Auto-staging: All tracked changes are staged automatically. Use --dry-run to preview first.

Model

Use haiku for all operations unless complex reasoning is required.

Arguments

  • (none): Auto-commit without confirmation
  • -v or --verify: Show plan and ask for confirmation before committing
  • --dry-run: Show commit plan without executing
  • --amend: Amend last commit (always requires -v verification for safety)
  • push: After committing, push to current remote branch
  • push -v / push --verify: Push with verification prompt

Workflow

  1. Check for merge conflicts - abort if found
  2. Check current branch - warn if committing to main/master
  3. Run git status and git diff to understand current changes
  4. Run git diff --cached to see already staged changes
  5. Analyze changes and group them logically
  6. Create atomic commits with clear messages
  7. If push argument: push to remote

Grouping Strategy

Prefer more commits over fewer. Group by:

  • Feature/functionality: Related changes that implement one thing
  • File type: Config changes, test files, types, etc.
  • Scope: Single module/component changes together
  • Nature: Refactors separate from features separate from fixes

Never combine unrelated changes. When in doubt, split.

Commit Message Format

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

Types

  • feat: New feature
  • fix: Bug fix
  • refactor: Code restructuring without behavior change
  • chore: Maintenance, deps, config
  • docs: Documentation only
  • test: Adding/updating tests
  • style: Formatting, whitespace
  • perf: Performance improvement

Rules

  • Subject line: max 72 chars, imperative mood, no period
  • Body: only if necessary to explain why, not what
  • No body for obvious changes (typos, simple additions, config tweaks)

Good Examples

feat(auth): add JWT refresh token rotation
fix(api): handle null response from payment provider
refactor(utils): extract date formatting helpers
chore: upgrade typescript to 5.4
test(cart): add edge cases for discount calculation

Execution Steps

  1. Check safety: Detect conflicts, warn on protected branches (main/master)
  2. Analyze: git diff --stat and git diff for full context
  3. Plan: Determine commit groups with files and messages
  4. Verify (if -v/--verify/--dry-run/--amend): Show plan, wait for confirmation

- --dry-run: Exit after showing plan - --amend: Modify last commit instead of creating new

  1. Execute: For each commit:
   git add <files>
   git commit -m "<message>"
   # or for --amend:
   git add <files>
   git commit --amend -m "<message>"
  1. Push (only if push argument): Run git push origin HEAD

- On failure: show git error, stop (user handles manually)

Example Session

User: /commit

Claude: Analyzing 7 changed files...

✓ feat(api): add user preferences endpoint
  - src/routes/preferences.ts, src/types/preferences.ts

✓ test(api): add preferences endpoint tests
  - tests/preferences.test.ts

✓ chore: add zod dependency
  - package.json, package-lock.json

4 commits created.

With -v: Shows plan, asks "Proceed? (y/n/edit)" before executing

With --dry-run: Shows plan, exits without executing

With --amend -v: Shows plan to amend last commit, asks for confirmation

With push: Adds "Pushing to origin/main... ✓ Pushed successfully." at end

Edge Cases

  • Protected branches: Warn if committing directly to main/master
  • Merge conflicts: Abort and instruct user to resolve first
  • Single file: Still analyze if it contains multiple logical changes
  • Large refactors: May warrant a single commit if truly atomic
  • Mixed changes: Always split features from fixes from refactors
  • Already staged files: Respect existing staging, offer to commit separately or include

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

补充不同宿主或平台的使用分布数据

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

平台分布

Claude Code

26.24%
按下载量换算27

windsurf

23.13%
按下载量换算24

OpenCode

15.76%
按下载量换算16

Codex

12.88%
按下载量换算13

Antigravity

7.93%
按下载量换算8

Gemini CLI

3.45%
按下载量换算4

安全审计

暂无安全审计结果可展示。

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

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

来源信息

继续浏览同类 Skills