Skip to content
Back to skills

Feynman Thinking

ASecurity

Explains a software architecture, algorithm, or control flow in plain language, using a mental model (inputs, transformation, outputs), a text or ASCII flow diagram, and Socratic questions that expose hidden assumptions, then flags needless abstraction. Use when the user asks to explain something simply, "Feynman style", to build a mental model of a system, to explain an architecture to a junior developer, or to challenge a design for over-engineering. Do not use for mechanical edits (renames...

  • 51 stars
  • 0 votes
  • 0 copies
  • 6 views
  • Added October 6, 2026
ai-agentsjavascriptgojavasqlnode

Works with

  • cli

Security analysis

A100/100

Scanned December 5, 2026

npx -y skills add frankxai/claude-skills-library --skill feynman-thinking --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Feynman Thinking?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Feynman Thinking
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/frankxai-feynman-thinking/badge)](https://www.skillsdirectory.com/skills/frankxai-feynman-thinking)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: feynman-thinking
description: Explains a software architecture, algorithm, or control flow in plain language, using a mental model (inputs, transformation, outputs), a text or ASCII flow diagram, and Socratic questions that expose hidden assumptions, then flags needless abstraction. Use when the user asks to explain something simply, "Feynman style", to build a mental model of a system, to explain an architecture to a junior developer, or to challenge a design for over-engineering. Do not use for mechanical edits (renames, typo fixes, formatting, format conversions), boilerplate config, or when the user asks for code only without an explanation.
metadata:
  version: "2.1.0"
---

# Feynman Thinking

Explain a system so a junior developer could rebuild it from the explanation, then strip out what
does not need to exist. This applies to the request that triggered the skill, not to every later
task in the session.

## Response template

Answer in this order and use these headings:

1. **Problem**: one or two plain sentences. What goes in, what must come out, and what breaks
   without it.
2. **Mental model**: name the exact inputs (payload, file, request), each transformation step, and
   the output state. One concrete analogy at most.
3. **Flow**: a text diagram for anything with two or more steps, files, or state changes:
   ```text
   Client request ──> Auth middleware (verify JWT, attach user_id) ──> Suggestion engine (embed, vector query) ──> Top-K items
   ```
4. **Simplest solution**: the least code that solves the stated problem. Name any layer, flag, or
   interface that exists only for future extension, and say what deleting it would break.
5. **Questions**: two to four Socratic questions from the table below, aimed at assumptions the user
   has not stated.

When the user supplied code, quote the specific function or line each point refers to.

## Socratic questions

| Probe | Question template |
|---|---|
| Hidden assumption | "What are we assuming about the shape of this data that might not hold?" |
| Scope | "If we deleted this helper, what would break? Can it be inlined?" |
| Minimum | "What is the least code that would work, even if it feels too easy?" |
| Tradeoff | "We are buying speed (or memory, or readability) here. What are we paying for it?" |
| Failure | "What happens when this step fails or times out, and who finds out?" |

## Abstraction check

Flag each of these with the line or file it appears in:

- A single-caller pass-through class or wrapper that adds no logic.
- A factory, strategy, or plugin interface with one implementation.
- A config flag or branch that nothing sets.
- A vague verb ("streamline", "leverage", "optimize", "robustify") with no named mechanism. Replace
  it with the operation, for example "batch the 40 inserts into one query".

## Worked example: event-sourced memory vault

**Problem**: two devices edit agent memory offline and sync files through a shared folder. If both
overwrite one SQLite file, one device's edits are lost.

**Mental model**: each device appends only to its own ledger, `vault.<device-id>.jsonl` (one note
per line). One writer per file means the sync tool never sees two edits to the same file. The
explicit merge happens on read: concatenate every device file, de-duplicate by note `id`, and keep the
entry with the latest `ts`. SQLite FTS5 is a disposable index rebuilt from that merged stream.

**Flow**:

```text
Write: agent note ──> append one line to vault.<this-device>.jsonl
Read:  vault.*.jsonl ──> merge: de-dup by id, latest ts wins ──> SQLite FTS5 index ──> BM25 + recency rank ──> top-K snippets
```

**Simplest solution**, before and after:

```javascript
// BEFORE: a factory with one product, and a delegator that adds nothing
class AbstractStorageStrategyFactory {
  createAdapter(type) { return new JsonlAppendDelegator(type); }
}

// AFTER: the mechanism itself, one file per device
import { appendFileSync } from 'node:fs';
import { join } from 'node:path';
export function appendVaultEntry(vaultDir, deviceId, entry) {
  const line = JSON.stringify({ ...entry, device: deviceId, ts: new Date().toISOString() }) + '\n';
  appendFileSync(join(vaultDir, `vault.${deviceId}.jsonl`), line, 'utf8');
}
```

**Questions**: Two devices edit the same note id offline, and "latest ts wins" keeps one edit: is
losing the other acceptable, or do we need to keep both? Device clocks drift: is `ts` safe to order
by? Is a full index rebuild cheap enough at 100,000 lines, or do we track a byte offset per file?

## Check before sending

- [ ] Every vague verb is replaced by a named operation or data structure.
- [ ] Inputs, transformation, and output are named for each component explained.
- [ ] A text diagram is present for any flow of two or more steps.
- [ ] At least two Socratic questions target assumptions the user did not state.
- [ ] Each flagged abstraction says what breaks if it is removed.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.