Install
openclaw skills install @fize/first-principlesSystematically learn, study, or analyze any subject from first principles and produce a structured learning document the user can read and review. Use when the user wants to understand, study, onboard to, or reverse-engineer something — not just get a surface-level explanation. Triggers include: "learn/study/understand X", "explain X from first principles", "analyze X systematically", "help me understand this codebase/library/tech", "onboard me to X", "reverse-engineer how X works", "break down X to the fundamentals". Chinese triggers: "第一性原理", "探究本质", "逆向分析", "系统学习", "怎么实现的", "底层原理". Applies to ANY domain: source code / open-source libraries, technical concepts & theories, business models & systems, skills & crafts, organizational or product designs.
openclaw skills install @fize/first-principlesTurn any subject into a clear, verifiable mental model and a reusable learning document. The method refuses "it just is" authority and always asks "why can't it be otherwise?"
First principles = reduce conclusions back to irreducible facts, then re-derive from those facts. The five stages map to:
Core discipline: refuse "it just is" authority; always ask "why can't it be otherwise?"
Run these stages in order. Capture findings into the output document as you go
(see references/document-template.md for the section structure — load it before
writing the final doc).
Do NOT ask the user. Instead, ask yourself:
This is agent-internal calibration only — it determines document depth and entry angle. Do not surface "learning goal / target reader" meta lines in the final document. The document starts at the title and goes straight into the subject.
Identify the fundamental problem/need the subject addresses. Scenario prompts:
Establish the "problem space" before the "solution space".
Find the irreducible building blocks / core abstraction. Where to look:
git log/blame to find the author's first few commits (often closer to
the essence than the current layered code); locate the core data structure /
interface / algorithm.List each primitive with a one-line essence.
Recompose primitives into a minimal mental model; show how data / value / logic flows. The "build a toy version" sub-step is conditional:
For each major design choice ask: why not the alternative? Separate:
The gap between the two is where real engineering/design insight lives. Present in a table: Decision | Alternative | Constraint type | Rationale.
Produce 2–3 predictions under specific conditions, then cross-check against source code / experiment / reference material. Record: Prediction | Actual | What the gap means. Consistent correct predictions = genuine understanding; wrong predictions = cognitive blind spots → return to Stage 2–4.
Load references/document-template.md and write the learning document following
its section structure. Use scripts/scaffold_doc.py to create the file skeleton,
or write it directly. Keep it self-contained and readable without further
conversation.
references/document-template.md — the exact section structure for the output
learning document. Load before writing the final doc.scripts/scaffold_doc.py — writes an empty template skeleton to a path so the
document starts from a consistent structure.