baseline: Skill for Claude Code

.claude/skills/commit/SKILL.md

commit is a skill for Claude Code from friedbotstudio/baseline. It costs 59 tokens per session (2,902 once invoked), scanned A, original, Apache-2.0.

A workflow phase prepares and creates a Git commit after required archiving, memory synchronization, and commit authorization are complete.

In plain words
What is it for?
It checks whether the project is a Git repository, archives the workflow record, and stages and commits the completed work when eligible.
Why use it?
It prevents work from being committed before the project's required records and consent checks are in place.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md.

This is friedbotstudio/baseline's own configuration. It tells Claude Code how to work on baseline itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything baseline configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is node .claude/skills/power/commit-split.mjs plan --json # wraps commit-split.mjs -> planCommits.

Reuse

Borrowing it

Nothing to install: this file belongs to friedbotstudio/baseline. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/friedbotstudio/baseline/main/.claude/skills/commit/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/friedbotstudio/baseline

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for commit

README.md
[![agentmods](https://agentmods.dev/badge/skills/friedbotstudio/baseline/commit/github.svg)](https://agentmods.dev/skills/friedbotstudio/baseline/commit)
Your own site
<a href="https://agentmods.dev/skills/friedbotstudio/baseline/commit"><img src="https://agentmods.dev/badge/skills/friedbotstudio/baseline/commit/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for commit

Your own site · 80×15
<a href="https://agentmods.dev/skills/friedbotstudio/baseline/commit"><img src="https://agentmods.dev/badge/skills/friedbotstudio/baseline/commit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,902 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 3 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Tool Misuse · line 34
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
  • high Tool Misuse · line 38
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
  • medium Excessive Agency · line 37
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00059 $0.02902
Opus 5.5 $0.00024 $0.01161
Sonnet 5.5 $0.00012 $0.00580
Haiku 4.5 $0.00006 $0.00290

Measured 1mo ago against content hash 27c3c6e47026, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

commit scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

The scan reads SKILL.md. This mod also ships 3 executable files (cli.mjs, closure-precommit-check.mjs, epic_close.mjs), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/commit/SKILL.md · 40 lines

How it starts

The opening of the file, as written. The whole thing — 40 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Prereq: ALL of archive AND memory-sync in completed (Phase 10.5 archives slug artifacts; Phase 10.6 curates _pending.md) AND a valid consent token at .claude/state/commit_consent (the Git Commit Guard hook enforces this independently). On any workflow where memory-sync is in exceptions (e.g. non-git projects auto-except it), this skill SHALL refuse to proceed unless that exception is explicit in workflow.json.

Applicability. This skill applies only when the project is a git repository. Non-git projects auto-except commit at /triage time (CLAUDE.md Article IV); the workflow ends after /archive.

Steps:

  1. Git-repo precheck. Run git rev-parse --is-inside-work-tree 2>/dev/null. If exit non-zero, exit cleanly with: "Not a git repository — /commit is inapplicable. Per CLAUDE.md Article IV, commit is auto-excepted on non-git projects; the workflow ended at /archive. Persistence outside git is your responsibility." Do not run any subsequent step.
  2. Archive workflow.json itself. This is the final piece of the archival bundle, held back until now so phase-ordering checks worked up through this point. Read .claude/state/workflow.json to get the slug, then move the file into the already-existing archive bundle: docs/archive/<date>/<slug>/workflow.json. Use plain mv, not git mv — .claude/state/ is gitignored, so git has no index entry for the source and git mv fails with not under version control. (Step 2.8 and /archive Step 4 both say git mv; those move tracked paths, which is the difference.) Use the bundle's <date> directory (the one /archive created — inspect docs/archive/ to find the most recent bundle matching the slug).
  3. Verify workflow prereq: memory-sync is the final non-commit entry in completed; archive is the entry immediately before it; no open consent gates remain. 2.5. Branch topology (Art. VII). Read git.workflow_model. If it resolves to an enforced model (direct-to-main / github-flow), the commit SHALL land on a branch the model permits — git_commit_guard blocks anything else (under direct-to-main, commit on a release_branches member; do NOT reflexively create a feature branch). If it resolves to ask (default), the guard passes on topology grounds and the branch decision is YOURS to surface: ask the user which branch this commit belongs on rather than improvising one. Never create/switch branches to satisfy a model the project did not declare. 2.7. Stamp closure pre-stage (only when populated). Read source_backlog_keys from the archived copy docs/archive/<date>/<slug>/workflow.json (Step 1 moved the live file). If the array is absent OR empty, skip this step (back-compat — unchanged commit behavior). Otherwise run node .claude/skills/memory-sync/sweep.mjs --mode stamp-closure --memory-dir .claude/memory --backlog-keys <comma-separated keys>. This writes status: picked-up + superseded-at: <today> to each named entry BEFORE staging, so the closure stamp rides THIS commit (atomic). The store is shape-aware: on a sharded store the stamp lands in the frontmatter of .claude/memory/backlog/<key>.md; on a flat store it lands in the ## <key> block of .claude/memory/backlog.md. sweep.mjs is the sole writer to backlog entries — never edit them directly, and never add a commit-SHA provenance note (atomicity forbids a self-referential SHA). 2.8. Epic fold — close the epic when this commit finishes it (on the epic-child and power tracks). Read workflow.json → track_id; on any other track, skip this step. BEFORE staging, register the slices this commit closes in .claude/state/epic/<epic>.json → children[] via .claude/skills/commit/epic_close.mjs → registerClosedChildren({rootDir, epic, slices}) — one slice on an epic-child (the child's own), every ticket id in workflow.json → tickets[] on a power batch, which lands them all in one cycle and has no per-slice commit to hang the flip on. The helper leaves an already-closed slice alone, so a superseded slice keeps the reason it closed. A refusal (ok: false) names the offending slice; stop and fix it rather than committing an epic record that disagrees with its roadmap rows. This registration flips each child to status: "committed" (this is the pre-commit flip — it must precede the all-committed check so the close can ride THIS commit; the harness post-commit flip is now only an idempotent backstop). Then invoke node .claude/skills/commit/epic_close.mjs <epic> (where <epic> is workflow.json → epic). The helper no-ops while any declared slice is still uncovered; once this registration covers them all, it git mvs the epic's discovery bundle into docs/archive/<date>/<epic>/ (staged) and merges closed:true + closed_at into the epic state file. The staged bundle move then rides the SAME commit produced below — no separate consent gate. (Run outside the harness, the same helper is the standalone recovery path: it stages the move and prints a /grant-commit + /commit prompt.)
  4. git status + git diff --stat to confirm the change set. The diff now includes: production code changes + archive bundle additions + the workflow.json move + (when Step 2.7 stamped) the backlog.md closure stamp + (when Step 2.8 closed an epic) the epic discovery-bundle move into docs/archive/<date>/<epic>/. Stage named paths explicitly (never git add -A / git add . — seed.md forbids it). When Step 2.7 stamped, stage the entry paths it reported so the closure rides this commit — git add .claude/memory/backlog/<key>.md per stamped key on a sharded store, or git add .claude/memory/backlog.md on a flat one. Staging a path that does not exist aborts the add and leaves the closure unstaged, which git_commit_guard then hard-blocks.
  5. Draft the commit message from the spec + diff. Conventional-style prefix (feat: / fix: / refactor: / docs: / test:) followed by a 1-line summary and a short body explaining the WHY. The subject line is a fixed-register one-liner — leave it alone. The body is reviewer-facing prose — pass it through Skill(humanizer) before step 5 so AI-writing tells (em-dash overuse, rule of three, inflated verbs, vague attributions) get scrubbed. Keep the brief tight: tell humanizer the register is "factual reviewer-facing commit body — describe the diff faithfully, do not invent rationale, preserve any spec quotes verbatim". 4.5. Closure preflight (only when Step 2.7 stamped). Write the staged path list with git diff --cached --name-only > .claude/state/.closure-staged and the drafted message to a temp file, then run node .claude/skills/commit/closure-precommit-check.mjs --memory-dir .claude/memory --backlog-keys <comma-separated keys> --staged-file .claude/state/.closure-staged --message-file <message temp>. Exit 0 → proceed. Exit 1 → ABORT before git commit: the JSON report names what is unstamped/unstaged or which Closes <key> line is unreconciled; fix it and retry. This is the friendly pre-guard check — git_commit_guard independently re-verifies the same atomicity at commit time and will hard-block a split. 4.7. Power-track batch split (only when track_id == "power"). Read track_id from the archived docs/archive/<date>/<slug>/workflow.json (Step 1 moved the live file); if it is not power, skip this step and continue to Step 5 (one commit). Otherwise do NOT write a single commit. Parse the dirty tree yourself — git status --porcelain, one entry per line as {path, status} — and pass that array to planCommits(entries) from .claude/skills/power/commit-split.mjs:

Read the full file on GitHub · 40 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 40 lines · 59 tokens per session scan A 27c3c6e47026

Subscribe to this mod's changes

commit is a skill published in the GitHub repository friedbotstudio/baseline (14 stars, last pushed 13d ago), licensed Apache-2.0. It adds 59 tokens to every session and 2,902 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

core-workflow

Detailed development workflow patterns, checklists, and standards. Auto-loads for complex tasks, planning, debugging, or when explicit patterns are needed. Contains session protocols, git conventions, security checklists, review-based validation, and communication standards.

travisjneuman/.claude · 52 tokens

commit-gate

Create a verified local Git commit when committing changes is requested. Not for explaining commit history, drafting a message only, or postponing a commit. Applies every commit gate and never implies a push or PR.

arbiterForge/codeArbiter · 45 tokens

ca-commit

Create a verified local Git commit when committing changes is requested. Not for explaining commit history, drafting a message only, or postponing a commit. Applies every commit gate and never implies a push or PR.

arbiterForge/codeArbiter · 45 tokens

git-workflow

Skill "git-workflow" from halflength-ampleness75/claude-code-recipes, covering git workflow, branch naming, rules, conventional commits and format.

halflength-ampleness75/claude-code-recipes · 0 tokens

autoresearch-agent

Autonomous experiment loop that optimizes any file by a measurable metric. Inspired by Karpathy's autoresearch. The agent edits a target file, runs a fixed evaluation, keeps improvements (git commit), discards failures (git reset), and loops indefinitely. Use when: user wants to optimize code speed, reduce…

sinhoneyy/master-skills · 115 tokens

git-pushing-hardened

Stage, commit, and push git changes with conventional commit messages. Use when user wants to commit and push changes, mentions pushing to remote, or asks to save and push their work. Also activates when user says "push changes", "commit and push", "push this", "push to github", or similar git workflow requests.

faberlens/hardened-skills · 73 tokens