Refactron-ai

Check Locked — Git skill for Claude Code

Git community

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

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

  1. Determine the current branch's diff base (git merge-base HEAD main).
  2. Run git diff --name-only ..HEAD and check for any of the three locked paths.
  3. 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 Repository