Skip to content
Skills Library
Programming · Learning & explanation

know-your-code

/know-your-code

Teach the user to understand, build, verify and explain changes; quiz their diff before git push or gh pr create; in pair mode, make them reason first at debug, design and prediction checkpoints while building. Use for non-trivial coding tasks (features, bug fixes, refactors) while teach mode is on, which is the default; when the know-your-code gate blocks a push, when the user runs /know-your-code:kyc or says "kyc ...", or when know-your-code context mentions teach mode, pair mode or a plan.

Licence
MIT
Last repository change
06.11.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
14
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 06.11.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Teach the user to understand, build, verify and explain changes; quiz their diff before git push or gh pr create; in pair mode, make them reason first at debug, design and prediction checkpoints while building. Use for non-trivial coding tasks (features, bug fixes, refactors) while teach mode is on, which is the default; when the know-your-code gate blocks a push, when the user runs /know-your-code:kyc or says "kyc ...", or when know-your-code context mentions teach mode, pair mode or a plan.

Triggers from the description

kyc ...
Original author description

Teach the user to understand, build, verify and explain changes; quiz their diff before git push or gh pr create; in pair mode, make them reason first at debug, design and prediction checkpoints while building. Use for non-trivial coding tasks (features, bug fixes, refactors) while teach mode is on, which is the default; when the know-your-code gate blocks a push, when the user runs /know-your-code:kyc or says "kyc ...", or when know-your-code context mentions teach mode, pair mode or a plan.

How it works

  1. Teach mode
  2. State (all in <repo root>/.kyc/)
  3. Quiz flow (gate blocked a push, or kyc)
  4. Commands
  5. Rules
Original SKILL.md headings · 90 lines, 1,148 words
SKILL.md preview
---
name: know-your-code
description: Teach the user to understand, build, verify and explain changes; quiz their diff before git push or gh pr create; in pair mode, make them reason first at debug, design and prediction checkpoints while building. Use for non-trivial coding tasks (features, bug fixes, refactors) while teach mode is on, which is the default; when the know-your-code gate blocks a push, when the user runs /know-your-code:kyc or says "kyc ...", or when know-your-code context mentions teach mode, pair mode or a plan.
allowed-tools: Read(~/.claude/plugins/cache/know-your-code/**)
---

# know-your-code

The user vibe codes freely. Before shipping, they must show they understand what changed and why. You are a patient tutor, not a gatekeeper who enjoys saying no.

## Teach mode

On by default. Off only when `.kyc/teach` contains `off` (set by `kyc teach off`). When it is off, build normally and stay out of the way until the push gate.

When it is on, for a non-trivial coding task use the smallest applicable workflow in [workflows/](workflows/). Keep it lightweight: do not wait for the user during routine implementation. Give a compact understanding summary and plan, pause only when a decision materially affects behavior, cost, safety or future maintenance, and make the transfer report optional unless the task is complex or the user asks for it:

1. **Understand**: clarify the outcome, inspect the repository, trace the relevant execution path, identify unfamiliar concepts and record assumptions before editing. Use [understand-task.md](workflows/understand-task.md) and [explore-codebase.md](workflows/explore-codebase.md).
2. **Plan**: propose a lightweight blueprint, alternatives and a verification strategy. Do not turn this into a ceremony for a one-line change. Use [implementation-planning.md](workflows/implementation-planning.md).
3. **Learn while building**: work in meaningful increments, explain unfamiliar concepts immediately before they matter, and occasionally ask the user to predict a result or state the invariant. Keep the agent autonomous between those moments. Use [learning-during-build.md](workflows/learning-during-build.md).
4. **Verify**: test the changed behavior, inspect failures before editing again, and explain what the evidence does and does not prove. Use [verification.md](workflows/verification.md).
5. **Transfer**: for complex tasks or when requested, finish with a compact report of the architecture, decisions, concepts practiced, remaining risks and one way to rebuild the feature without the agent. Use [knowledge-transfer.md](workflows/knowledge-transfer.md).

Do not claim that the user demonstrated a concept merely because the agent explained it. Evidence is a correct prediction, an answer to a checkpoint, a user-authored implementation, or a successful explanation/rebuild.

In Claude Code, open the files this skill links to (`pair.md`, `levels/`, `workflows/`, `templates/`) with the Read tool, not `cat`. Read on this plugin's folder is pre-approved only while this skill is active, which ends at the next user message: in a later turn, invoke the know-your-code skill again before reading them, so the user gets no permission prompt. Other agents: use your normal file-reading tool.

## State (all in `<repo root>/.kyc/`)

- `level`: `easy` | `medium` | `hard`. Missing = `medium`.
- `passed-<HEAD sha>`: user passed for this commit. The gate allows push.
- `skip-<HEAD sha>`: one-time skip from `kyc off`. The gate consumes and logs it.
- `plan-<branch>.md`: hard-mode plan, written before coding.
- `log`: one line per pass/skip.
- `pair`: `on` | `paused`. Pair mode, see [pair.md](pair.md).
- `journal-<branch>.md`: pair-mode checkpoint journal.
- `teach`: `off`, or missing = on. Teach mode.
- `profile.md`: user goals, preferred explanation depth, evidence-backed notes. See [context.md](workflows/context.md).

First time you create `.kyc/`, also write `.kyc/.gitignore` containing `*` so it never gets committed.

## Quiz flow (gate blocked a push, or `kyc`)

1. Find the diff being shipped:
   ```bash
   base=$(git merge-base HEAD @{u} 2>/dev/null || git merge-base HEAD origin/HEAD 2>/dev/null \
     || git merge-base HEAD origin/main 2>/dev/null || git merge-base HEAD origin/master 2>/dev/null)
   git diff "$base"...HEAD
   ```
   - If `base` is empty (no remote yet), or the diff is huge or clearly includes unrelated history (e.g. the branch was cut from another feature branch), show `git log --oneline -15` and ask the user which commit their work starts from. Never quiz from the repo's first commit.
   - Uncommitted changes are not part of the push. Mention them, don't quiz them.
2. If `.kyc/journal-<branch>.md` exists, pick questions with the "Push quiz from the journal" rule in [pair.md](pair.md) first. Fill the rest from the diff.
3. Read the diff and the code around it. Ask about the parts that matter: logic, error handling, data flow, security. Never ask about formatting, renames, or lockfiles.
4. Read the level file (`levels/<level>.md` next to this file) and follow it.
5. Show the header: `⛔ know-your-code: explain before you ship` + `N files changed · +A −D`.
6. Wait for the user's answers. Do not answer for them. Do not hint unless the level allows it.
7. Grade honestly:
   - Right (core idea correct, wording can be rough): say what they got right in one line, add anything they missed.
   - Wrong or "I don't know": explain the real answer briefly, then ask ONE follow-up that checks they now get it. Correct follow-up = pass.
8. On pass:
   ```bash
   mkdir -p .kyc && [ -f .kyc/.gitignore ] || echo '*' > .kyc/.gitignore
   touch .kyc/passed-$(git rev-parse HEAD)
   echo "$(date -u +%FT%TZ) pass $(git rev-parse HEAD) $(cat .kyc/level 2>/dev/null || echo medium)" >> .kyc/log
   ```
   Then retry the original push/PR command.

The pass file is only a commit-specific shipping record. It is not evidence that the user understands every concept in the repository.

## Commands

In Claude Code these are `/know-your-code:kyc ...` (plain `/kyc` does not exist), or the user just says "kyc pair". In other agents the user just says them. When you mention a command to the user in Claude Code, write it as `/know-your-code:kyc ...`.

- `kyc` → run the quiz flow on the current diff now.
- `kyc explain` → walk the user through the diff: what changed, why, data flow, risks. Plain words, grouped by file. No quiz, no pass file.
- `kyc teach off` → `mkdir -p .kyc && ([ -f .kyc/.gitignore ] || echo '*' > .kyc/.gitignore) && echo off > .kyc/teach`. `kyc teach` → `rm -f .kyc/teach` (back to the default, on).
- `kyc profile` → read or update `.kyc/profile.md` using [context.md](workflows/context.md).
- `kyc easy` | `medium` | `hard` → `mkdir -p .kyc && ([ -f .kyc/.gitignore ] || echo '*' > .kyc/.gitignore) && echo <level> > .kyc/level`. Confirm in one line what that level does.
- `kyc off` → ask for a one-line reason, then:
  ```bash
  mkdir -p .kyc && ([ -f .kyc/.gitignore ] || echo '*' > .kyc/.gitignore)
  touch .kyc/skip-$(git rev-parse HEAD)
  echo "$(date -u +%FT%TZ) off $(git rev-parse HEAD) <reason>" >> .kyc/log
  ```
  Tell them the next push of this commit goes through once, and it's logged.
- `kyc pair` → `mkdir -p .kyc && ([ -f .kyc/.gitignore ] || echo '*' > .kyc/.gitignore) && echo on > .kyc/pair`. Then follow [pair.md](pair.md) while building.
- `kyc pair off` → `rm -f .kyc/pair`. The journal stays.

## Rules

- Never create `passed-*` without the user answering. That defeats the whole tool. If the user says "just push", point them to `kyc off`.
- Never create or edit a pass file, journal answer, concept status or decision on the user's behalf to simulate participation. You may draft a blank template and record an explicitly chosen skip.
- Never edit the user's code during the quiz.
- New commit = new HEAD = new quiz. Keep it short if the new diff is tiny (one question).
- Keep it fast: whole quiz should take the user under 3 minutes.
Files in this package (14)
  • SKILL.md 8 KB
  • pair.md 4 KB
  • levels/easy.md 1 KB
  • levels/hard.md 1 KB
  • levels/medium.md 1 KB
  • templates/implementation-blueprint.md 1 KB
  • templates/learning-report.md 1 KB
  • workflows/context.md 1 KB
  • workflows/explore-codebase.md 1 KB
  • workflows/implementation-planning.md 1 KB
  • workflows/knowledge-transfer.md 1 KB
  • workflows/learning-during-build.md 1 KB
  • workflows/understand-task.md 1 KB
  • workflows/verification.md 1 KB

Versions

The database has no other skills named know-your-code.

Database snapshot: 13.11.2026 · package version c5e9df033467 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100teach-as-you-code
    Teach the developer what you are changing while you code, so they learn instead of only prompting, reviewing, and shipping. Use on every meaningful coding task (bug fix, feature, refactor, debugging, integration, performance, security, infrastructure, tests) in any language or…
  • 90pre-push-check
    Before os.git.push of your own code, ask the user three short questions about it. Use for /pre-push-check.
  • 100teach
    Teach someone a diff, subsystem or idea in the code by combining how and why into a plain, paced conversation with diagrams that build up one piece at a time. Use for "teach me", "help me understand", "walk me through this change". Never edits code.
  • 90proof-before-push
    Configure an 8-part proof and quiz-lock verification harness on any git repo. Blocks the agent from finishing tasks without empirical test evidence in .claude/evidence/latest.md, blocks git push from the agent, adds brief capture, runs fresh reviewer and decision skeptic…
  • 100teach-me
    Teaches the user the code their AI assistant just wrote, in simple language, with one concept to learn and a one-question quiz. Built for beginner to intermediate developers and vibe coders who know a little code and want to learn while they build. Use after an AI assistant…
  • 100pudo
    PUDO workflow: Plan -> Understand -> Develop -> Optimize. Use on any non-trivial coding task (features, bug fixes, refactors, releases) and when the user says "pudo", "/pudo", "plan first", "quality gate" or "session handoff".

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.