PluginInstalls cleanly
Explain your changes before you push
know-your-code
Free MIT plugin that stops git push and new pull requests until you answer a few questions about what changed, so you understand the code you ship.
- Works with
- Claude Code, Codex CLI
- Good for
- Build an app
What it does
If an assistant writes most of your code, it is easy to push changes you don't really understand. know-your-code puts a short quiz in front of shipping.
A hook checks the shell commands the assistant runs. When it sees git push or gh pr create, it stops the command and the assistant asks you a few questions about the current change, such as why a function works the way it does. Answer in your own words. If you get something wrong, the assistant explains it, then you can push. A pass counts for that exact commit only, so a new commit means a new quiz.
There are three levels. Easy gives multiple choice with hints. Medium, the default, asks open questions about what changed, why, and what could break. Hard also asks you to plan before coding and checks the result against your plan.
Example prompts
- "Push this."
- "/kyc explain"
- "/kyc easy"
- "Open a pull request for this branch."
How to install
/plugin marketplace add MinitJain/know-your-code/plugin install know-your-code@know-your-codeHow to use it
Work as usual. When the assistant tries git push or gh pr create, it quizzes you on the change first. Type /kyc to quiz yourself early, /kyc explain for a walkthrough.
Check it works
Make a small change, commit it and ask the assistant to push. You should see "know-your-code: explain before you ship" and questions instead of a push.
Common problems
- Pushes go through with a warning — install
jq; without it the gate fails open — https://github.com/MinitJain/know-your-code - The gate never triggers in Codex — Codex skips hooks you haven't trusted; open
/hooks, review and trust them, and start a new thread — https://github.com/MinitJain/know-your-code - A push slipped past — aliases like
gpand commands insidesh -care not caught — https://github.com/MinitJain/know-your-code
Other assistants
- Codex:
codex plugin marketplace add MinitJain/know-your-code, thencodex plugin add know-your-code@know-your-code, then trust the hooks in/hooks; the README marks Codex as untested — https://github.com/MinitJain/know-your-code - Gemini CLI: not named in the README; its "anything else" route is to copy
AGENTS.mdinto a project as a rule the assistant follows on its own, with nothing that blocks a push. Not in the Gemini extensions gallery as of 2026-11-04 — https://github.com/MinitJain/know-your-code
What to watch out for
- Adds a PreToolUse hook on Bash (bash hooks/gate.sh) that checks every shell command the assistant runs for git push and gh pr create, and blocks them (exit 2) until the current commit has a pass
- Adds a UserPromptSubmit hook (bash hooks/hard-plan.sh) that runs jq and git on every message you send; it only adds text to the assistant's context in hard mode when the branch has no plan file
- A pass is a file (.kyc/passed-<commit>) that the assistant creates after you answer; nothing in the code checks your answers, so it is an honour system, as the README says
- Needs git and jq; without jq the gate lets pushes through with a warning, and outside a git repository it does nothing
- Writes state to a .kyc/ folder at the project root; the skill tells the assistant to add a .kyc/.gitignore so it stays out of commits
- Shell aliases (gp) and commands wrapped in sh -c are not caught, and /kyc off skips the gate once (logged)
- Version 0.2.0 in plugin.json with no GitHub release or tag; the Codex route is marked untested in the README
Licence and author
- Licence
- MIT
- Author
- Minit Jain (MinitJain)
- Source code
- github.com/MinitJain/know-your-code
How we tested it
We installed it on an empty test computer on 4 Nov 2026. Installed and started in a clean test system. Not yet used in a real AI session.
Not yet used on real work.
Technical details of the test
- Date
- 4 Nov 2026
- Method
- Intake sandbox run on 2026-11-04 in a clean container with no account: cloned the repository and checked its skill, agent and plugin files; installed know-your-code@know-your-code with the Claude Code command line.
Checked again on 4 Nov 2026
Alternatives
- Superpowers — structured workflows with planning, without a push gate
- PR Review Toolkit (Anthropic) — reviews the change for you instead of quizzing you
- Planning with Files — keeps a written plan for longer tasks
FAQ
- Q: Can I skip it when I'm in a hurry? A: Yes.
/kyc offskips the gate once, and the skip is logged. - Q: Does it slow down normal coding? A: Barely. A small script runs on each message, but it only adds anything in hard mode; the quiz appears at push or pull request time.
- Q: Is it a hard lock? A: No. The README calls it an honour system: the assistant writes the pass file, and you can always remove the hook.
Sources
- github.com/MinitJain/know-your-code
- github.com/MinitJain/know-your-code/blob/16fe56a24b72b5cabd64f537b398d3968ee58219/hooks/hooks.json
- github.com/MinitJain/know-your-code/blob/16fe56a24b72b5cabd64f537b398d3968ee58219/hooks/gate.sh
- github.com/MinitJain/know-your-code/blob/16fe56a24b72b5cabd64f537b398d3968ee58219/hooks/hard-plan.sh
- github.com/MinitJain/know-your-code/blob/16fe56a24b72b5cabd64f537b398d3968ee58219/.claude-plugin/plugin.json