Repo commit
Run the test suite, then stage, commit, and push changes to the current branch with a conventional-commit message. Use when the user wants to commit, save, or push their work in a project repo — runs tests first. Pushes automatically when the user invokes it directly (/repo-commit); gates the push behind confirmation when invoked programmatically by Claude, another skill, or an agent. For committing the plugin repo itself, use plugin-commit instead.From its SKILL.md
npx -y skills add GBR-Perso-1/is-it-magic --skill repo-commitAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 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.
SKILL.md
4.8 KB, as published. Nobody here has run it
Arguments
$ARGUMENTSis optional. Scope the commit to a subdirectory path.- If empty, commit all changes across the whole repo.
Examples:
/repo-commit→ commit everything/repo-commit api→ commit only changes underapi//repo-commit packages/web→ commit only changes underpackages/web/
Important rules
Read and follow all rules in ${CLAUDE_PLUGIN_ROOT}/skills/shared/_ux-rules.md.
Read and follow the context resolution contract in ${CLAUDE_PLUGIN_ROOT}/skills/shared/_context-resolution.md.
Process
1. Run tests
Determine and run the test command(s) for the scope by detecting the toolchain(s) present in it:
- .NET — a
*.slnor*.csprojin scope →dotnet test <solution-or-project> - Node — a
package.jsonwith atestscript in scope → run it with the repo's package manager (detect from the lockfile:package-lock.json→npm test,pnpm-lock.yaml→pnpm test,yarn.lock→yarn test) - Python —
pyproject.toml,pytest.ini, or atests/directory in scope →pytest - Other toolchains: detect analogously from their manifest/runner.
Run the detected tests for the scope. If a scope has no detectable test setup, note no tests detected for <scope> and continue. If any test fails, report the failures and stop — do not proceed.
2. Stage and generate commit message
Stage changes:
- If scoped:
git add <scope-path>/ - If unscoped:
git addonly the changed files shown in step 1. Never usegit add -A.
Run git diff --cached to review the staged diff. Generate a conventional commit message:
- Format:
type(scope): description(e.g.feat(auth): add token refresh,fix(api): handle null value) - Short description (under 72 chars), lowercase, no period
- Multi-line body with bullet points if multiple distinct changes
- Always append
Co-Authored-By: Claude <[email protected]>
3. Commit
Create the commit with the message.
4. Pull and rebase
git fetch origin
git pull --rebase
If conflicts occur, abort the rebase (git rebase --abort) and stop. Tell the user their commit is saved locally but conflicts need manual resolution.
4a. Context consistency check (before push)
Apply R.2–R.3 from the context resolution contract against the current working directory:
- Read
%USERPROFILE%\.claude\contexts.json(Windows) /$HOME/.claude/contexts.json(Unix). If absent, skip this step and proceed to Step 5 with existing behaviour. - Match cwd against
path_globsin manifest order (first match wins). - If a context matches, extract the owner from
git remote get-url originand compare it to the context'sgithub_orgorgithub_user.- Match: proceed silently to Step 5.
- Mismatch: invoke the R.3 signal-mismatch path — report and ask via
AskUserQuestion. Do not push automatically. Options:- Push anyway — I've verified this is correct
- Cancel push — I'll fix the remote first
- The "save to manifest" opt-in is offered at most once per push if the user had to answer inline.
- If no context matches: proceed to Step 5 with existing behaviour (no context check).
5. Push
Always show the user:
- The commit message
- The target branch
- Whether any remote changes were rebased in
Push gate — conditional on how this skill was invoked:
- Direct user invocation — the user personally typed
/repo-commit(a user-issued slash command) this turn. The invocation is the authorisation: push immediately, without asking. - Programmatic invocation — this skill was triggered any other way: Claude calling it via the Skill tool, a step inside another skill or workflow, or any agent/subagent. Keep the gate — ask via
AskUserQuestionbefore pushing:Push now (Recommended)Don't push — leave the commit local
- When the invocation source is unclear, treat it as programmatic and ask. Only a direct, user-typed
/repo-commitskips the gate.
This conditional governs only the routine push confirmation. The Step 4a context-mismatch check is a safety gate and still applies in both cases — never push on a remote-owner mismatch without confirmation.
On push:
git push
Never force-push. If push fails, report the error and stop.
Output
Committed: <commit-message>
Pushed to: <branch-name>