Committing
Portable engineering policies for coding agents — git, testing, logging, and language conventions written once and referenced everywhere
npx -y skills add andr-ca/agentharness --skill committingAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 27 days oldThe repository was created 27 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Use when creating a git commit — atomic commits, message format, what never to commit, and the agent workflow-completion requirement (run completion gate; stage or publish per publish authority).
SKILL.md
5.4 KB, ~1.3k tokens by cl100k_base, as published. Nobody here has run it
Committing
Full reference: .github/COMMITTING_GUIDELINES.md (examples, git aliases,
commit template). This skill is the actionable summary.
Before you commit
git statusandgit diff— know exactly what you're about to commit.- Stage specific files, not
git add ./git add -Ablind. git diff --cached— review staged content one more time, scan for secrets (API keys, tokens, passwords).- Let hooks run. Never
--no-verify, never--no-gpg-sign. If a hook fails, fix the underlying issue and re-stage — don't bypass it.
Writing the commit
- Atomic: one logical change per commit. Don't mix a feature, a fix, and a refactor in one commit.
- Message explains WHY, not WHAT — the diff already shows what changed.
- Imperative mood summary ("Add X", not "Added X"), ideally under ~50 chars, blank line, then body wrapped at ~72 chars if more explanation is needed.
- Reference issues (
Fixes #123,Relates to #456) when applicable.
What never gets committed
- Secrets: API keys, tokens, passwords, private credentials.
.envand its variants — but DO commit.env.sample(sanitized template).- Debug code: stray
console.log/print, commented-out code, debugger statements. - Build artifacts,
node_modules/, and anything covered by.github/.gitignore.template.
After the commit — run the completion gate, then follow publish authority
-
Run
bash tools/check-completion.sh— all quality gates must pass before declaring work done. This is enforced by the Stop hook in.github/hooks/completion-gate.json(Copilot) and.claude/settings.json(Claude Code).This path is specific to the agentharness repo itself. If this skill file is symlinked/copied into a consumer project instead (the normal case — see
harness-link.sh),tools/check-completion.shdoes not exist there and will exit 127. Check for a generated, consumer-local completion gate first:[ -x .agentharness-bin/check ].harness-link.sh init/updategenerates this wrapper automatically forlink/submodule/npmmodes — runbash .agentharness-bin/checkin its place. It delegates to the resolved harness checkout's ownenforce-profilecommand against this project, not the harness's.--mode copyhas no live harness checkout to delegate to, so no wrapper exists there —harness-link.sh audit --json'scan_mechanically_enforcefield tells you up front whether a given install has one at all, rather than finding out mid-task. Either way, also run this project's own lint/type/test commands if it has any not covered by the gate. Don't silently skip verification just because the harness's own path doesn't resolve — find the equivalent for this repo. -
Default (no publish authority): stop at the commit. Stage the commit locally, summarize what was done, and ask the user to confirm before pushing or opening a PR. Work is "done" when the user has reviewed and approved the staged changes.
-
With publish authority: push and open a PR. Publish authority is granted when
.agentharness-publish-modeexists at the repo root — check with[ -f .agentharness-publish-mode ](ortest -e), never by reading its contents. The file is typically empty by design; an agent thatcats it, sees nothing, and concludes "not active" has the check backwards — presence alone grants authority, content is irrelevant.harness-link.sh audit --json'spublish_mode_activefield already implements this correctly if you'd rather not shell out totestdirectly. Publish authority is also granted when the user explicitly authorizes it in the current session.git push -u origin <branch>(first push) orgit push(subsequent). If this fails with an SSH key error (Permission denied (publickey)) even thoughgh auth statusshows a valid session: the remote is an SSH URL ([email protected]:...) but no SSH key is configured in this environment — a real, seen-in-practice mismatch, not a sign the push itself is wrong. Don't permanently reconfigure the remote to work around a one-off environment gap. Instead, push to an explicit HTTPS URL for this one invocation, usinggh's own credentials:git push "https://github.com/$(gh repo view --json nameWithOwner -q .nameWithOwner).git" <branch>. If pushing will be a recurring need in this environment,gh auth setup-gitis the durable fix (configures git's credential helper to usegh's token for HTTPS) — but that's a persistent environment change, so confirm with the user before running it, the same as any other durable configuration change.gh pr createwith a real title, body, and test/verification notes.- Work is not "done" until the PR exists, CI is green, and review comments have been addressed.
See CLAUDE.md's "Agent Workflow Completion" section for the full rules
and the 📋 Completion Gate section for the gate commands.
If tests or hooks fail
Fix the underlying issue (lint error, failing test, secret detected). Don't commit broken code planning to fix it "in the next commit."
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.