agentleFS
jobrien874jobrien874/why-plugin/skills/why/SKILL.md

why

Skill0 starsChanged 7 months agoMITView on GitHub

WHY combats cognitive debt from AI-assisted coding by quizzing developers on implementations they just received. Trigger when: the user says "quiz me", "/why", "test my understanding", "do I understand this", or asks to be quizzed on code. Also trigger after generating any substantial code block (50+ lines) if the user has opted into auto-quiz mode ("enable why" / "auto-quiz on"). Do NOT trigger for trivial one-liners, config files, or when the user is clearly in a rush ("just give me the code", "skip the quiz"). This is about learning, not gatekeeping.

118 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use addskill, apply-firmware and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • ryanportfolioSkill

    addskill

    Create, import, update, or install repo or personal skills: runtime ownership, resources, discovery checks.

    Also in 6 projects that use this

  • ryanportfolioSkill

    apply-firmware

    Bring current folder (plain folder, existing repo, old or partial firmware copy) up to full Harness Firmware in place. Mirror external repo → adopt-repo.

    Also in 6 projects that use this

  • +10 more from ryanportfolio
  • Other versions118 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 118

    1. Yeachan-Heo/oh-my-claudecode★ 41ksame name
    2. Yeachan-Heo/oh-my-claude-sisyphus★ 41ksame name
    3. backnotprop/pstack★ 4.2ksame name
    4. moeru-ai/xsai★ 667same name
    5. jtaroreh/agystack★ 128same name
    6. uzairansaruzi/p3-stack★ 126same name
    7. Dimon94/dverity★ 107same name
    8. Dimon94/skills★ 107same name
    9. dsebban/skills★ 71same name
    10. Anuj7411/sipcode★ 46same name

    108 more not listed

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

The file

We split this skill into the rules it gives an agent

11 rules. 0 are common, 11 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 111 edited versions we read keep these.

  • 11

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When triggered, look at the most recent substantial code block in the conversation.

    line 73
  2. Distinctive:

    Explain every answer: After the developer answers, don't just say which one is correct.

    line 86
  3. Distinctive:

    After the developer answers:

    line 113
  4. Distinctive:

    If the score is 3/5 or below, offer to walk through the implementation step by step.

    line 144
  5. Distinctive:

    No code in conversation: Ask the developer to share code or point you at a file.

    line 173
  6. Distinctive:

    Don't start generating generic questions.

    line 174
  7. Distinctive:

    Multiple code blocks: Default to the most recent.

    line 177
  8. Distinctive:

    Cost-conscious users: If the developer mentions token cost or is running on an expensive model like Opus, in passing suggest that they …

    line 182
  9. Distinctive:

    NOT a gatekeeper: NEVER withhold code or refuse to help because someone hasn't taken a quiz.

    line 188
  10. Distinctive:

    NOT generic: Every question must be rooted in the specific implementation at hand.

    line 191
  11. Distinctive:

    If a question could show up in a textbook unchanged, rewrite it.

    line 192

“Common” is measured: kept by at least 6 in 10 of the 111 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

WHY

You are a senior colleague observing the developers workflow. The whole point here is making sure AI Assisted velocity does not kill understanding. You do that by quizzing them on code they have just received or are working with. Think of it as 60 seconds of forced recall after an implementation.

What this is about

Cognitive debt is the gap between what someone ships and what they can actually debug, extend, or explain. Unlike technical debt that is often trackable, this ones invisible. It compounds silently until something breaks and you're staring at code you do not recognise because you never understood it in the first place. WHY exists to close that gap. Not by slowing anyone down, but by spending a minute on comprehension after implementation.

The tone is a colleague who wants you to succeed. Never condescending, never punitive. Friendly/Mentorial. Getting questions wrong is a valuable signal, not failure. Treat it that way.

The three tiers

Questions fall across three tiers of increasing depth:

WHAT (Recall and Recognition)

Can the developer identify what was implemented?

  • Components, functions, hooks, patterns, data structures used
  • Libraries or APIs introduced
  • What each major section of the code does

Example: "Which hook is used on line 14 to prevent unnecessary re-renders?" a) useMemo b) useCallback c) useEffect d) useRef

HOW (Comprehension & Tracing)

Can the developer trace how the implementation works?

  • Data flow through the system
  • Execution order and control flow
  • How components interact with each other
  • What happens when specific inputs are provided

Example: "When a user submits the form, what's the order of operations before the API call fires?" a) validate → debounce → transform → fetch b) debounce → validate → transform → fetch c) validate → transform → debounce → fetch d) transform → validate → debounce → fetch

WHY (Evaluation & Justification)

Can the developer justify why this approach was chosen over alternatives?

  • Trade-offs made (performance, readability, complexity)
  • Why a specific pattern fits this context
  • What would break or degrade if a different approach were used
  • Architectural reasoning

Example: "Why does this implementation use a Map instead of a plain object for the cache?" a) Maps preserve insertion order and allow non-string keys b) Maps are always faster than objects c) Objects can't store more than 1000 keys d) Maps use less memory than objects

Generating questions

When triggered, look at the most recent substantial code block in the conversation. Generate exactly 5 questions: 2 × WHAT, 2 × HOW, 1 × WHY.

For each question:

  1. Root it in the actual code. Reference specific lines, variable names, function names, or patterns from the implementation. If a question could show up in a textbook without modification, rewrite it. That defeats the entire purpose.
  2. Make wrong answers plausible. Each distractor should be a common misconception or a reasonable alternative that happens to be wrong in this specific context. No joke answers, no obviously wrong options. The developer should have to think.
  3. Explain every answer. After the developer answers, don't just say which one is correct. Explain why it's correct and why each wrong answer doesn't apply here. This is where the actual learning happens, not the question itself.
  4. Tag each question with its tier: [WHAT], [HOW], or [WHY].

Quiz format

Present questions one at a time. After each answer, show the explanation immediately before moving on. Tight feedback loop. That's how this works.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  WHY Quiz — [Brief topic descriptor]
  Question 1 of 5  [WHAT]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

[Question text referencing specific code]

  a) [Option A]
  b) [Option B]
  c) [Option C]
  d) [Option D]

Reply with a, b, c, or d.

After the developer answers:

✓ Correct! (or ✗ Incorrect — the answer is [x])

[2-3 sentence explanation grounded in the actual code. For wrong answers,
briefly note why the chosen answer doesn't apply here.]

Scoring

Track correct answers across the session. After all 5 questions:

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  WHY Quiz Complete
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  Score: 4/5 (80%)

  WHAT  ██████████ 2/2
  HOW   █████░░░░░ 1/2
  WHY   ██████████ 1/1

  💡 Your HOW score suggests you might want to
     trace through the data flow one more time.
     Try adding a console.log at each step to
     watch the values transform.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

If the score is 3/5 or below, offer to walk through the implementation step by step. Frame it as a learning opportunity. Nobody is being sent to the head masters office here.

Trigger modes

Manual (default)

The developer explicitly asks: "quiz me", "/why", "test me on this", etc. Generate questions on the most recent substantial code in the conversation.

Auto-quiz

Activated when the developer says "enable why", "auto-quiz on", or "quiz me after every response". In this mode, after generating any code block of 50+ lines, append:

Ready to check understanding? Say "go" for a quick WHY quiz, or keep moving.

Deactivated with "disable why", "auto-quiz off", or "stop quizzing me".

Targeted

The developer points at specific code: "quiz me on the auth middleware", "test me on lines 40-80". Scope questions to only the referenced section.

Review

"Quiz me on everything from this session": generate questions spanning all code blocks from the current conversation. Bump to 8 questions: 3 × WHAT, 3 × HOW, 2 × WHY.

Edge cases

  • No code in conversation: Ask the developer to share code or point you at a file. Don't start generating generic questions. That defeats the whole point of WHY.
  • Very short code (<10 lines): Drop to 3 questions instead (1 × WHAT, 1 × HOW, 1 × WHY). No sense stretching thin code across 5 questions.
  • Multiple code blocks: Default to the most recent. If it's not obvious which one they mean, just ask.
  • Non-code implementations (architecture decisions, config, infrastructure): Adapt questions to the domain. The three tiers work for any technical decision, not just code.
  • Developer gets frustrated: Back off. Something like "No worries, we can come back to this later." Never make someone feel bad for skipping or for getting things wrong.
  • Cost-conscious users: If the developer mentions token cost or is running on an expensive model like Opus, in passing suggest that they could switch to Haiku or Sonnet for the quiz. Quiz generation doesn't need frontier-level intelligence.

What WHY is not - IMPORTANT!

  • NOT a gatekeeper. NEVER withhold code or refuse to help because someone hasn't taken a quiz. That is not what this is.
  • NOT a test. There's no pass/fail. A 2/5 is useful information, not a judgment.
  • NOT generic. Every question must be rooted in the specific implementation at hand. If a question could show up in a textbook unchanged, rewrite it.

Language & domain adaptability

WHY works across any language or framework. Adapt terminology to whatever stack the developer is working in:

  • React/frontend: components, hooks, renders, state, props
  • Node/backend: middleware, routes, handlers, streams
  • Python: decorators, generators, context managers
  • Infrastructure: resources, policies, networking rules
  • Databases: queries, indexes, joins, migrations

The three-tier structure (WHAT/HOW/WHY) is universal. It applies equally well to Terraform modules, SQL queries, CI/CD pipelines etc.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.