agentleFS
VPDPersonalVPDPersonal/Aspid.MVVM/.claude/skills/asp-commit/SKILL.md

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

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
  1. Very specific:

    No output above? Your agent does not run this block: run sh scripts/ctx.sh from the folder of this file.

    line 13
  2. Very specific:

    Before a branch step, load the asp-branch skill to get <name>.

    line 26
  3. Very specific:

    Add the Unity .meta files of these files and of their folders.

    line 31
  4. Very specific:

    Run git diff -- <file> only for a file you did not change.

    line 35
  5. Very specific:

    Write the subject: type(scope): imperative summary, 72 chars max, no period.

    line 39
  6. Distinctive:

    Add a body of 2–4 bullets only if there are more than 5 files or the reason is not clear.

    line 40
  7. Very specific:

    Run the chain. At TOO LONG, rewrite the subject to 65 chars or fewer.

    line 41
  8. Very specific:

    Write failed if the push failed.

    line 44
  9. Distinctive:

    Run no other git commands, except git diff in Pick the files and in Special cases.

    line 46
  10. Very specific:

    Do not use ' in the subject: write "do not", not "don't".

    line 63
  11. Very specific:

    Write <paths> literally in git add and in git commit.

    line 65
  12. Very specific:

    Untrack a file but keep it on disk: Run git rm --cached -- <file> && git commit -m … with no -- <paths>.

    line 79
  13. Very specific:

    Run sh ${CLAUDE_SKILL_DIR}/scripts/ctx.sh <repo>.

    line 82
  14. Very specific:

    Run a separate chain with git -C <repo> in every git command.

    line 83
  15. Very specific:

    Never git add a folder that holds its own .git.

    line 84
  16. Distinctive:

    Run again only the steps that did not run: no branch step, no commits that succeeded.

    line 86

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md
sh ${CLAUDE_SKILL_DIR}/scripts/ctx.sh

No 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

LineAction
GONEThe branch was merged and deleted on origin. Ask with AskUserQuestion first.
CLEANNothing to commit. Go to Push only.
AHEAD, NO_UPSTREAMUsed only in Push only.
BRANCH newBranch step: git switch -c <name>.
BRANCH renameBranch 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 .meta files 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 AskUserQuestion whether to add them.
  • Run git diff -- <file> only for a file you did not change.

Commit and push: one Bash call, no subagents

  1. Write the subject: type(scope): imperative summary, 72 chars max, no period.
  2. Add a body of 2–4 bullets only if there are more than 5 files or the reason is not clear.
  3. Run the chain. At TOO LONG, rewrite the subject to 65 chars or fewer. Then run the chain again.
  4. 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 or HEAD. Write failed if 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 HEAD

Give 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:

  1. Continue only on AHEAD, or on NO_UPSTREAM if the user asked to push. Otherwise stop.
  2. On BRANCH new, ask with AskUserQuestion first.
  3. 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. One check-length.sh at 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.
    1. Run sh ${CLAUDE_SKILL_DIR}/scripts/ctx.sh <repo>. Act on its hint lines.
    2. Run a separate chain with git -C <repo> in every git command. Do not use cd.
    3. Never git add a folder that holds its own .git.
  • A pre-commit or commit-msg hook 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.*.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.