repo-state-checkpoint
Skill0 starsChanged 5 days agoMITView on GitHub
Verify an exact repository, checkout, branch, SHA, and dirty-state before code changes, release promotion, delegation, or handoff work. Use when the user gives a repo path, expected commit, setup command sequence, dirty-tree warning, release branch, worktree/clone request, or asks for precise repo location/state with no guessing.
In this repository7 other files it gives its agents.
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 9 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use this skill before changing code or reporting repo readiness when the task depends on the exact checkout.
- Distinctive: line 12
Treat an explicit user path as authoritative.
- Very specific: line 13
Read local guidance before edits: nearest AGENTS.md or CLAUDE.md, README*, release docs, or repo-specific scripts named by the user.
- Distinctive: line 14
If the worktree is dirty, stale, behind, detached unexpectedly, or ambiguous, do not make code changes until the blocker is reported and …
- Distinctive: line 15
When the user gives an expected SHA or command sequence, execute it literally unless unsafe, then verify exact output.
- Distinctive: line 20
Run the smallest useful set:
- Distinctive: line 34
If an exact branch or SHA is requested:
- Distinctive: line 42
If a release path is requested, also inspect likely policy files:
- Distinctive: line 50
Keep the checkpoint compact and concrete:
- Distinctive: line 61
When finishing repo work, include:
≈ “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
Repo State Checkpoint
Use this skill before changing code or reporting repo readiness when the task depends on the exact checkout. The goal is a small, reliable checkpoint: correct path, correct repo, correct branch/SHA, clean or explicitly blocked state.
Core Rules
- Treat an explicit user path as authoritative. If it does not exist, stop and report the missing path; do not silently substitute a nearby repo.
- Read local guidance before edits: nearest
AGENTS.mdorCLAUDE.md,README*, release docs, or repo-specific scripts named by the user. - If the worktree is dirty, stale, behind, detached unexpectedly, or ambiguous, do not make code changes until the blocker is reported and resolved.
- When the user gives an expected SHA or command sequence, execute it literally unless unsafe, then verify exact output.
- For release promotion, prefer repo-specific scripts/docs over generic PR or merge habits.
Checkpoint Procedure
Run the smallest useful set:
pwd
test -d "$REPO" && cd "$REPO"
git rev-parse --show-toplevel
git remote -v
git branch --show-current
git rev-parse HEAD
git status --short --branch
git fetch origin --prune
git status --short --branchIf an exact branch or SHA is requested:
git checkout <branch-or-ref>
git rev-parse HEAD
git status --short --branchIf a release path is requested, also inspect likely policy files:
rg -n "promote|release|production|main|develop|fast-forward|deploy" AGENTS.md CLAUDE.md README* docs scripts .github 2>/dev/nullReport Format
Keep the checkpoint compact and concrete:
repo: absolute path andgit rev-parse --show-toplevelremote: origin URLbranch: current branch/tracking stateHEAD: full SHAstatus: clean, dirty file list, behind/ahead, detached, or missing pathguidance: files/scripts found that constrain the taskblocker: exact reason work cannot proceed, if anynext action: the fetch/pull/checkout/branch/confirmation needed
When finishing repo work, include:
- changed files
- tests run
- branch/commit
- blockers or remaining risk
Common Pitfalls
- Nonexistent
workdirfailures happen before repo commands run; report the exact path failure. - A nearby similarly named checkout is only a clue, not permission to switch paths.
- Detached worktrees can be normal for automations; prefer SHA/file-path evidence over branch assumptions.
git add .is too broad in messy repos. Stage only the intended files after checkinggit diff --name-only.
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.

