asp-commit
Skill65 starsChanged 18 days agoMITView on GitHub
Git commit + push of current-session changes only, in one Bash chain. Use when the user asks to commit or push.
- Reads credentials
- Commits and pushes
In this repository9 other files it gives its agents.
- AGENTS.mdAGENTS.md
- asp-branchSkill
- aspid-code-styleSkill
- asp-mvvm-releaseSkill
- asp-prSkill
- docs-siteSkill
- starterkit-binder-authoringSkill
- starterkit-converter-authoringSkill
- starterkit-layoutSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. About 0 are common, 3 are distinctive, and 13 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
13
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 13
No output above? Your agent does not run this block: run sh scripts/ctx.sh from the folder of this file.
- Very specific: line 26
Before a branch step, load the asp-branch skill to get <name>.
- Very specific: line 31
Add the Unity .meta files of these files and of their folders.
- Very specific: line 35
Run git diff -- <file> only for a file you did not change.
- Very specific: line 39
Write the subject: type(scope): imperative summary, 72 chars max, no period.
- Distinctive: line 40
Add a body of 2–4 bullets only if there are more than 5 files or the reason is not clear.
- Very specific: line 41
Run the chain. At TOO LONG, rewrite the subject to 65 chars or fewer.
- Very specific: line 44
Write failed if the push failed.
- Distinctive: line 46
Run no other git commands, except git diff in Pick the files and in Special cases.
- Very specific: line 63
Do not use ' in the subject: write "do not", not "don't".
- Very specific: line 65
Write <paths> literally in git add and in git commit.
- Very specific: line 79
Untrack a file but keep it on disk: Run git rm --cached -- <file> && git commit -m … with no -- <paths>.
- Very specific: line 82
Run sh ${CLAUDE_SKILL_DIR}/scripts/ctx.sh <repo>.
- Very specific: line 83
Run a separate chain with git -C <repo> in every git command.
- Very specific: line 84
Never git add a folder that holds its own .git.
- Distinctive: line 86
Run again only the steps that did not run: no branch step, no commits that succeeded.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
sh ${CLAUDE_SKILL_DIR}/scripts/ctx.shNo output above? Your agent does not run this block: run sh scripts/ctx.sh from the folder of this file. There, ${CLAUDE_SKILL_DIR} is that folder.
Hint lines
| Line | Action |
GONE | The branch was merged and deleted on origin. Ask with AskUserQuestion first. |
CLEAN | Nothing to commit. Go to Push only. |
AHEAD, NO_UPSTREAM | Used only in Push only. |
BRANCH new | Branch step: git switch -c <name>. |
BRANCH rename | Branch step: git branch -m <name>. The app made this worktree branch, and origin does not have it yet. |
SKIP_ADD <path> | The path is already gone from the index. Keep it in git commit -- <paths>, but not in git add. |
Before a branch step, load the asp-branch skill to get <name>.
Pick the files
- Take the files you changed in this session and the files the user named.
- Add the Unity
.metafiles of these files and of their folders. - Take paths only from the status lines. A file inside
?? <dir>/counts. - A changed file is not in the status? In another repo, see Special cases. Otherwise it is ignored: skip it.
- Changes that are not yours and that the user did not name? Ask with
AskUserQuestionwhether to add them. - Run
git diff -- <file>only for a file you did not change.
Commit and push: one Bash call, no subagents
- Write the subject:
type(scope): imperative summary, 72 chars max, no period. - Add a body of 2–4 bullets only if there are more than 5 files or the reason is not clear.
- Run the chain. At
TOO LONG, rewrite the subject to 65 chars or fewer. Then run the chain again. - Report the commits in a table with the columns: subject, short SHA, push. List the skipped files below the table.
In the push column, write the branch name, for example
feat/login. Do not use the SHA range orHEAD. Writefailedif the push failed.
Run no other git commands, except git diff in Pick the files and in Special cases.
The chain
sh ${CLAUDE_SKILL_DIR}/scripts/check-length.sh '<subject>' \
&& [<branch step> &&] git add -- <paths> && git commit -m "$(cat <<'MSG'
<subject>
<bullets, if any>
<attribution lines from the system reminder, if any>
MSG
)" -- <paths> && git push -u origin HEADGive check-length.sh the subject in single quotes, the same text as in the message.
Do not use ' in the subject: write "do not", not "don't".
Write <paths> literally in git add and in git commit. Do not put them in a shell variable: zsh does not split it.
Push only
On CLEAN:
- Continue only on
AHEAD, or onNO_UPSTREAMif the user asked to push. Otherwise stop. - On
BRANCH new, ask withAskUserQuestionfirst. - Run
[<branch step> &&] git push -u origin HEAD.
Special cases
- Unrelated changes. One
git add && git commit -- <paths>per group in the same chain. One push at the end. Onecheck-length.shat the start takes the subjects of all groups. - Untrack a file but keep it on disk. Run
git rm --cached -- <file> && git commit -m …with no-- <paths>. With-- <file>, the commit adds the file back from disk. - Files in another repo (outside cwd, a package with its own
.git). The hint lines above do not cover it.- Run
sh ${CLAUDE_SKILL_DIR}/scripts/ctx.sh <repo>. Act on its hint lines. - Run a separate chain with
git -C <repo>in every git command. Do not usecd. - Never
git adda folder that holds its own.git.
- Run
- A
pre-commitorcommit-msghook failed. Fix the cause. Run again only the steps that did not run: no branch step, no commits that succeeded. - Push failed. Report it. Do not retry.
Forbidden
git add -A,git add .,git add -u.--amend,--no-verify, force-push.- Committing
.env,*.pem,*.key,*.keystore,*.jks,*.p12,id_rsa*,credentials.*.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

