Command Palette

Search for a command to run...

Back to skills
skill № 30184

commit-clean

Commit finished work cleanly on the shared trunk — lint the subject with `fak commit --preview`, then stage-and-commit EXACTLY your paths in one locked step…

FreeNo executable scripts
anthony-chaudharyby anthony-chaudhary★ 50 GitHub stars

Install commit-clean in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

About this skill

/commit-clean — Commit clean by default on the shared trunk

One repeatable pass that lands YOUR finished paths on main with a lintable, bindable subject — and refuses cleanly when a peer races you.

Git authorization. Invocation of this skill is the user's explicit authorization to run fak commit and fak sweep (which shell to git underneath) and to pass --push when the user asked to push or the tree is green and the ship-by-default rule applies. The "never commit/push unless asked" default does NOT apply here — committing IS the skill's job. Destructive operations the steps don't list (force-push, --amend, git reset --hard, rebase) still require explicit confirmation — and the tooling refuses them anyway.

Why this is hard

main is a shared multi-session trunk: at any moment hundreds of dirty files belong to live peers, not you. git add <paths> followed by a separate git commit is NOT atomic here — a background peer can sweep your staged file into their commit under their message, or their staged files can land inside yours. Furthermore, concurrent merges and upstream advances create divergence races. The remedy is to stage-and-commit by explicit pathspec in one locked step, wait out active peer merges (MERGE_HEAD), integrate upstream safely via fak sync apply / fak sync reconcile without raw merges or --autostash, and verify that only your paths and your message landed.

The mantra (from CLAUDE.md / AGENTS.md)

  • Work directly on the trunk (main). Never a feature branch — the trunk guard refuses OFF_TRUNK.
  • Safe merge & non-destructive convergence. Never run unverified raw git merges, force-push, or use git pull --rebase --autostash (which churns peers' dirty files). Check for and wait out any active peer MERGE_HEAD (MERGE_IN_PROGRESS). Integrate upstream advances non-destructively via fak sync apply (--ff-only) or fak sync reconcile (ROUTE_DISJOINT_INTEGRATE, ROUTE_SUPERSET_MERGE, or ROUTE_HOLD_DIRTY_COLLISION with fak wip park).
  • Dual-repo awareness (fak & fak-private). When committing shared interfaces (pkg/*) or companion modules affecting fak-private, synchronize both repositories: verify multi-module alignment with go work sync, verify zero private leak needles (python tools/scrub_public_copy.py --audit-staged), and coordinate commits across both repos.
  • Commit by explicit path. Name every path you own; never git add -A.
  • Sign off with -s (DCO). No Co-Authored-By trailer.
  • Conventional-Commits subject ending in a (fak <leaf>) stamp so the dos verify referee can bind the commit to its lane — e.g. fix(gateway): treat same-tick ready as positive (fak gateway). A bare un-stamped subject stays NOT_SHIPPED.
  • Default is to ship. Once the tree is green (make ci), commit AND push unprompted via fak sync push.
  • Autonomous landing upon task completion. Following the safe commit-and-land process to completion is MANDATORY and active BY DEFAULT when any task finishes (using a new subagent if needed). Never leave touched paths uncommitted or require an operator prompt to trigger landing.
  • Strict Ban on Staging PowerShell & Loose Scripts. Never stage or commit new .ps1 (PowerShell), .sh, .bat, or loose scripts. All new automation and tooling MUST be native Go programs (cmd/*, Go leaves registered as fak CLI verbs, or quarantined sub-modules) providing modular, integrated, long-term value. Unless there is an extraordinary, super heavily justified reason (~1 in entire repo), new scripts are rejected.

The tools (dogfood these, not raw git)

Check access in the actual landing executor

Before the first GitHub-dependent step or reporting an access blocker, check the executor and shell that will perform that step. A desktop terminal, noninteractive shell, and CI runner can share a host but have different HOME, PATH, and authentication state. A browser login or a successful read in another surface does not establish access for this gh invocation or for Git transport.

Use fak-dev orient env --paths <p> --json to choose the supported Git shell and inspect host routing and leases. Its CLEAR verdict is not a GitHub authentication or landing-readiness witness. In the intended executor, resolve git, gh, fak, and fak-dev with that shell's command-discovery mechanism, then run these read-only checks in the selected shell:

git rev-parse --show-toplevel
git rev-parse HEAD
gh auth status --hostname github.com
gh api --hostname github.com user --jq .login
gh repo view https://github.com/anthony-chaudhary/fak --json nameWithOwner,viewerPermission

Check that the resolved checkout is the intended workspace. Keep the GitHub host and target repository consistent when adapting these commands; an inherited GH_HOST must not silently change which service a check observes. Record the executor label, timestamp, c

Full SKILL.md on GitHub

Allowed tools

Tools this skill is permitted to call.

  1. 01Read
  2. 02Grep
  3. 03Glob
  4. 04Bash

FAQ

What does the commit-clean skill do?

Commit finished work cleanly on the shared trunk — lint the subject with `fak commit --preview`, then stage-and-commit EXACTLY your paths in one locked step via `fak commit --path … -m "…"`, verify the landed path-set and message are yours, and push when asked. Mechanizes the repo's "commit clean by default" mantra (trunk-only, explicit pathspec, DCO sign-off, Conventional-Commits subject with a bindable `(fak <leaf>)` stamp). Use when the user says "commit this", "ship my work", "commit cleanly", "land my change".

How do I install the commit-clean skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the commit-clean skill run scripts?

No, this skill is instructions only (SKILL.md) with no executable scripts.

Related skills

Compare commit-clean with