agentleFS
edilsonvilarinhoedilsonvilarinho/usage-monitor/.claude/skills/usage-monitor-commit-push/SKILL.md

usage-monitor-commit-push

Skill19 starsChanged 50 days agoMITView on GitHub

Stage, commit and push only the intended changes in usage-monitor, with the repo's temporary git identity, narrow verification, never touching the author config. Use whenever committing or pushing in this project, especially with unrelated files around.

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 8 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Commit only the intended files with a temporary agent git identity, passed per command and never written to the git config.

    line 8
  2. Distinctive:

    Read AGENTS.md and README.md first.

    line 12
  3. Very specific:

    Prefer the bundled script scripts/commit_and_push.ps1 for the actual commit and push.

    line 25
  4. Distinctive:

    Use the bundled PowerShell helper to stage only the requested files, commit with the temporary git identity, and optionally skip the push.

    line 30
  5. Very specific:

    Use -SkipPush when the user asked only for a local commit.

    line 44
  6. Distinctive:

    Do not commit or push without explicit user approval in the current conversation.

    line 50
  7. Distinctive:

    Do not stage unrelated changes.

    line 51
  8. Distinctive:

    Do not force-push unless the user explicitly asks for it.

    line 52
  9. Distinctive:

    Keep commit messages focused on the actual change scope.

    line 53
  10. Distinctive:

    Do not modify another agent's uncommitted work in order to make a verification pass.

    line 54

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 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

Usage Monitor Commit Push

Commit only the intended files with a temporary agent git identity, passed per command and never written to the git config.

Workflow

  1. Read AGENTS.md and README.md first.
  2. Continue only after the user explicitly asks to commit, push, or publish changes.
  3. Inspect repository state with:
    • git status --short --branch
    • git branch --show-current
    • git remote -v
    • git diff --stat
    • git diff --cached --stat
  4. Stage only explicit file paths. Never use broad staging such as git add . when unrelated changes may exist.
  5. Choose the narrowest relevant verification before the commit:
    • Docs-only changes: inspect the diff for coherence.
    • Kotlin, UI, history, lifecycle, or repository changes: run gradlew.bat allTests or a narrower relevant test target.
    • Installer or packaging changes: run gradlew.bat packageInstaller when the installer behavior is part of the change.
  6. Prefer the bundled script scripts/commit_and_push.ps1 for the actual commit and push.
  7. Report the branch, commit hash, push result, and final git status --short --branch.

Script

Use the bundled PowerShell helper to stage only the requested files, commit with the temporary git identity, and optionally skip the push. It works in the main checkout and in a worktree.

Example:

powershell -ExecutionPolicy Bypass -File `
  .claude\skills\usage-monitor-commit-push\scripts\commit_and_push.ps1 `
  -RepoPath C:\Users\edils\workspace\usage-monitor `
  -Message "docs: sync README with current architecture and workflows" `
  -Files README.md `
  -TempUserName claude `
  -TempUserEmail claude@anthropic.com

Use -SkipPush when the user asked only for a local commit. Use -DryRun to preview the staging plan without touching the index.

The identity goes as git -c user.name=… -c user.email=… commit (#498): nothing is written to the config, so nothing is left behind if the commit, the push or the process fails, and a worktree (where .git is a file) works the same. Tests: pwsh -NoProfile -Command "Invoke-Pester -Path .claude/skills/usage-monitor-commit-push/scripts -Output Detailed".

Guardrails

  • Do not commit or push without explicit user approval in the current conversation.
  • Do not stage unrelated changes.
  • Do not force-push unless the user explicitly asks for it.
  • Keep commit messages focused on the actual change scope.
  • Do not modify another agent's uncommitted work in order to make a verification pass. Stop and report instead.

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.