Check Locked — Git skill for Claude Code
Verify the locked-contract invariant: fails if any locked file has been modified on the current branch.
How to install Check Locked
Installs to ~/.claude/commands/refactron-ai-refactron-check-locked.md
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/Refactron-ai/refactron/HEAD/.claude/commands/check-locked.md -o ~/.claude/commands/refactron-ai-refactron-check-locked.md Restart Claude Code, or start a new session, for it to be picked up.
What Check Locked does
description: Verify the locked-contract invariant: fails if any locked file has been modified on the current branch.
Check whether the current branch modifies any locked file. The locked files are:
src/contracts.ts
Steps:
- Determine the current branch's diff base (
git merge-base HEAD main). - Run
git diff --name-only ..HEADand check for any of the three locked paths. - If any locked file appears in the diff:
- Show the user which file(s) and the diff.
- State
Alternatives in Git
- Ws Reset — Reset the current branch to main, fetch upstream, and update submodules 38.1k ★
- PR Summary — Generate a pull request summary for the current branch 5.8k ★
- Loki Verify — Run Loki's deterministic PR verification on the current change and summarize the evidence verdict 1.1k ★
Full documentation available on GitHub
View Source RepositoryRelated Skills
Check Active Git Files.Prompt
You are an expert at analyzing git history. Given a list of files and their modification counts, return exactl
Extend
Capture a mid-PR sub-idea and implement it onto the current open PR's branch — no new branch, no new PR. Prese
Worktree Check
Check current worktree status, branch, and assigned task
Factory Release Manual
Human-invoked, one-shot release of a factory campaign branch into (never main) — refuse if locked, re-confirm
Unity Sessions
List all saved sessions with branch, phase, modified-file count, and timestamp. Sessions are snapshots in .cla
Diff Explain
Explain a git diff or branch comparison in plain language. Describes the intent behind changes, not just what
Related Agents
Cb Adversary
CoalBoard's falsification lens (adversary, high/nasa rigor) — searches for the one input, case, or sequence wh
CI Watcher
Watch PR checks for the current branch and report pass/fail with relevant links and concise next steps. Use wh
Fact Check
Verify load-bearing empirical claims before they are taught. Dispatched by /teach during its plan phase for to