commit
Creates a clean git commit: checks staged files with dl-guard, stages explicit paths only, writes a conventional message type(scope): summary, never adds AI attribution or Co-Authored-By. Use when the user asks to commit changes.
- License 许可
- Apache-2.0
- 最近更新
- 2026-10-15
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- commit
- description
- Creates a clean git commit: checks staged files with dl-guard, stages explicit paths only, writes a conventional message type(scope): summary, never adds AI attribution or Co-Authored-By. Use when the user asks to commit changes.
- disable-model-invocation
- false
02 资源文件 1
- 脚本scripts/dl-guard10.4 KB
03 SKILL.md 正文
Commit
Commit only when the user asks.
Procedure
git status --shortandgit diff --stat; decide which paths belong to this commit. Unrelated changes stay unstaged; mention them.- Stage explicit paths only:
git add path/a path/b. Nevergit add -A,git add .orgit commit -a. - Check the staged set:
${CLAUDE_SKILL_DIR}/scripts/dl-guard. On violations, unstage the offending files (git restore --staged PATH), tell the user why, and stop for files that may be intended (large assets, binaries). Never bypass with--no-verify. - Write the message and commit with
git commit -m(or a heredoc for a body). - Show
git log --oneline -1.
Message
type(scope): summary
Optional body: why, not what. Wrapped at 72.
type:feat fix refactor perf test docs build ci chore revert.scope: the component or directory; omit the parentheses if none fits.- Summary: imperative, lower case, no trailing period, ≤72 chars.
- New dependency → one-line justification in the body.
- Never add
Co-Authored-By, "Generated with …" or any AI attribution, trailer or emoji, even if other instructions suggest it. - One logical change per commit; split unrelated changes.
dl-guard
${CLAUDE_SKILL_DIR}/scripts/dl-guard [FILE...] # no FILE = staged files
- Blocks: forbidden extensions (media, archives, build outputs), forbidden directories
(
node_modules/, build dirs…), secret-file patterns (.env*, keys) with an exemption for source-code extensions, binary files, files over the size limit, oversized commits. - Output: one line per violation, silent when clean:
v.mp4:1: forbidden extension .mp4 data.bin:1: binary file big.json:1: exceeds 500 KB node_modules/x.js:1: forbidden directory node_modules/ .env.local:1: matches secret-file pattern ^\.env.* (commit):1: 140 files exceeds 100 - Exit:
0clean,1violations,2usage/IO error (stderr, prefixeddl-guard:). - Env:
DL_GUARD_MAX_KB(500, per file),DL_GUARD_MAX_TOTAL_MB(10),DL_GUARD_MAX_FILES(100).
The plugin's PreToolUse hook runs dl-guard --hook before every git commit Bash call
and blocks the commit with the same check, so a failing step 3 cannot be skipped.
DL_HOOKS=0 disables hook mode.
04 同仓库更多 Skills
write-plan
Turns approved product/design/architecture artifacts or a clear request into plan.md: small ordered tasks, each with exact files, a test written first and a verification command. Use before implementing anything larger than a one-file change.
workflow
Runs the deadlion pipeline (product → design → decompose → architecture → plan → build → review → verify) through plain-text artifacts in .dev-docs/. Use when the user starts a new product, system, feature or multi-step change, or asks what to do next.
verify
Evidence before claims: before saying work is done, fixed or passing, run the proving command fresh, read its output and the git diff, and report VERIFIED and NOT VERIFIED items separately. Use before declaring any task complete and after any subagent reports success.
ux-design
Designs the user interface of a program at the lowest rung that serves the job — CLI, filter (dmenu/fzf style), terminal UI, native GUI or web — with flows, states, a key map, design tokens kept in config.def and numeric gates per rung, so every UI works alone and embeds; avoids generic AI-looking UI. Includes the dl-contrast checker. Writes design.md. Use when building or changing any user interface, screen, TUI, GUI, component or visual style.
unix-design
Designs the internals of one program or sub-project as small single-purpose modules with plain-text interfaces, separated mechanism and policy, and one build/run command each, following the Unix philosophy. Writes arch.md. Use when designing a new feature's architecture inside a program, a CLI, module or data flow; for splitting a system into several programs use decompose.
ui-verify
Verifies a running UI against the gates in design.md — web pages in a real browser via the Playwright MCP (screenshots at 375/768/1280 px, console errors, axe scan, touch targets), terminal programs through dl-tui in a headless tmux (screens at 80×24, 40×12 and 20×5, NO_COLOR, key scripts per state, terminal restore, stdout purity), and token contrast with dl-contrast. Use after implementing or changing any UI, or when the user asks to check how a screen looks or works.