Agent Skills › lthoangg/OpenAgentd › oad/commit

oad/commit

GitHub

规范 Git 提交流程,包括检查暂存区差异、清理调试代码、同步文档及撰写符合规范的提交信息。

.agents/skills/oad/commit/SKILL.md lthoangg/OpenAgentd

Trigger Scenarios

用户要求提交代码 执行 commit 操作

Install

npx skills add lthoangg/OpenAgentd --skill oad/commit -g -y
More Options

Non-standard path

npx skills add https://github.com/lthoangg/OpenAgentd/tree/main/.agents/skills/oad/commit -g -y

Use without installing

npx skills use lthoangg/OpenAgentd@oad/commit

指定 Agent (Claude Code)

npx skills add lthoangg/OpenAgentd --skill oad/commit -a claude-code -g -y

安装 repo 全部 skill

npx skills add lthoangg/OpenAgentd --all -g -y

预览 repo 内 skill

npx skills add lthoangg/OpenAgentd --list

SKILL.md

Frontmatter
{
    "name": "oad\/commit",
    "description": "OpenAgentd commit workflow — check the staged diff, sync the feature catalogue, and write a conventional commit (Motivation \/ Technical Changes \/ Impact). Use whenever the user asks to commit."
}

Commit only what belongs to the change, with the documentation it needs.

1. Stage deliberately

git status --short
git diff --cached --stat
  • If nothing is staged, stage the files of the change you made (git add <paths>). Never sweep in unrelated work the user left in the tree; ask when ownership is unclear.
  • New files, deletions, and renames count: check ?? and D entries.

2. Check the staged diff

Read git diff --cached. Stop and report (file and line) instead of committing when it contains:

  • debug leftovers: stray console.log, dbg!, println!, print(), enabled debug flags;
  • temporary or rigged code: "temp", "wip", hardcoded test data, mocked responses in source;
  • commented-out code blocks, or new TODO / FIXME / HACK markers.

3. Sync documentation

Pick the smallest durable record for what changed:

Change Record
Shipped user-visible capability or behavior change Version-cited entry in documents/docs/features.md (the canonical catalogue). Use the next release version; mark removed features (deprecated) for at least one release before deleting them.
Product story or first-run/setup change README.md
Non-obvious invariant, security, or architecture rationale A comment beside the code (why, not what)
Future work, bugs, roadmap A GitHub issue, never a repository doc
Implementation, API, config, CLI, UI detail Nothing: source, tests, CLI help, and the UI are authoritative
Repository policy or tooling The nearest AGENTS.md or the matching .agents/skills/oad/* skill

Do not create guides, API references, or troubleshooting pages under documents/. After any Markdown change run make verify-docs: it checks frontmatter, local links, AGENTS.md references, and that every backticked make <target> exists. If nothing user-visible changed, say so in one line of the commit body.

4. Size the commit

  • One logical change per commit: aim for ~100 changed lines, ~300 for one cohesive change; split ~1000+.
  • Keep refactors and behavior changes in separate commits.
  • Do not force a split when the pieces depend on each other.

5. Write the message

<type>(<optional scope>): <imperative subject, ≤72 chars>

Motivation:
<why this change, what was wrong or missing>

Technical Changes:
- <one bullet per meaningful change, naming files or modules>

Impact:
<user-visible effect, risk, follow-ups; or "No user-visible change.">

Types: feat, fix, refactor, perf, test, docs, chore, style, ci. Scopes in use: web, desktop, mobile, appv3 (or a crate such as api, agent), scripts.

6. Commit

git commit -F - <<'EOF'
<message>
EOF
git log --oneline -1

Pre-commit hooks run file hygiene, oxlint, and tsc for web/. If a hook fails, fix the cause and commit again; never bypass it with --no-verify. Report the hash and a one-line summary. Do not push unless asked.

Version History

  • 7571dbc Current 2026-10-19 04:10

Same Skill Collection

.agents/skills/guidelines/SKILL.md
.agents/skills/oad/debug/SKILL.md
.agents/skills/oad/release/SKILL.md
.agents/skills/oad/review/SKILL.md
.agents/skills/oad/testing/SKILL.md
.openagentd/skills/guidelines/SKILL.md
.openagentd/skills/oad/commit/SKILL.md
.openagentd/skills/oad/debug-prod/SKILL.md
.openagentd/skills/oad/debug/SKILL.md
.openagentd/skills/oad/diagram/SKILL.md
.openagentd/skills/oad/docs/SKILL.md
.openagentd/skills/oad/plan/SKILL.md
.openagentd/skills/oad/release/SKILL.md
.openagentd/skills/oad/review/SKILL.md
.openagentd/skills/oad/search-doc/SKILL.md
.openagentd/skills/oad/test-driven-development/SKILL.md
.openagentd/skills/oad/testing/SKILL.md
app/agent/builtin_skills/self-healing/SKILL.md
app/agent/builtin_skills/skill-installer/SKILL.md
appv3/contract/builtin_skills/self-healing/SKILL.md

Metadata

Files
0
Version
7571dbc
Hash
70cf5cd7
Indexed
2026-10-19 04:10

Accueil - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-10-31 12:07
浙ICP备14020137号-1