跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
浏览器与自动化

using-karpathy-wiki

Auto-loaded by the SessionStart hook. Defines when to capture and routes the main agent or detached ingester to the appropriate on-demand skill.

toolboxmd · 已有 AI 审核记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add toolboxmd/karpathy-wiki --skill using-karpathy-wiki

技能说明


name: using-karpathy-wiki description: | Auto-loaded by the SessionStart hook. Defines when to capture and routes the main agent or detached ingester to the appropriate on-demand skill.

karpathy-wiki — loader (read once per session, applies for the whole session)

You are operating in a project that uses the karpathy-wiki plugin. Durable knowledge surfaced in this conversation must be captured to a wiki so future sessions can find it.

Announce when you act

When you write a capture, run an ingest, or answer from the wiki, prefix your reply with one line:

Using the karpathy-wiki skill to [capture this / ingest pending captures / answer from wiki].

This is the ONLY wiki-mechanics text the user sees. Do not narrate orientation, capture authoring, dispatch mechanics, or state-machine progress. Do all the wiki work silently after the announce line.

Instruction priority

If the user's CLAUDE.md / AGENTS.md or an explicit user instruction conflicts with the rules below, follow the user. The wiki rules override the default system prompt where they conflict, but never override the user's direct instructions.

Iron laws

NO WIKI WRITE IN THE FOREGROUND
NO PAGE EDIT WITHOUT READING THE PAGE FIRST
NO SKIPPING A CAPTURE BECAUSE "IT DOESN'T LOOK WIKI-SHAPED"
NO ANSWERING ANY USER QUESTION WITHOUT ORIENTING FIRST

Captures go to <wiki>/.wiki-pending/<timestamp>-<slug>.md. The bounded dispatcher assigns each capture to the configured provider/model profile and ingests it in the background.

Orient before answering — the read protocol

For ANY user message that is asking a QUESTION (vs requesting a code edit, file operation, or pure command), you must orient on the wiki BEFORE drafting the answer. Pre-classifying a question as "general knowledge" or "not wiki-relevant" is the forbidden rationalization Iron Rule 4 was written to forbid.

Cost framing. Orientation is a once-per-session investment:

  • First wiki-eligible question of the session: read <wiki>/schema.md and the relevant <wiki>/<category>/_index.md (or root <wiki>/index.md for cross-category questions). Two file reads, ~10-30 KB total.
  • Subsequent questions in the same session: the schema and index are already in your working memory; the marginal check is a candidate-count scan against the (already-read) _index.md. Near-zero cost.

Load karpathy-wiki-read/SKILL.md for the deterministic 6-step ladder (orient → count candidates → inline-read OR subagent OR web-search → cite). Do NOT skip the load because "this question seems trivial" — the iron rule is unconditional.

Resist-table for the read protocol (capture-side resist-table is below, after TRIGGER):

RationalizationReality
"This is general knowledge / I know this from training"Pre-classifying questions as wiki-irrelevant is the forbidden rationalization. The wiki's scope is whatever has been captured. You don't know without checking. Orient.
"This question is trivial; reading two files is overkill"Orientation is once per session. After the first orient, the marginal cost on the next question is near-zero (a re-scan of the already-read _index.md). The "trivial question" carve-out is the same drift that dropped the read protocol in v2.4.
"Pure syntax question, the wiki won't cover this"You cannot know without checking. If _index.md has zero matches, the read skill's Step F handles it (web search + capture the gap). The orient itself is what proves there are no candidates.
"User asked me to fix a bug, not answer a question"Code-edit requests don't trigger the read protocol; question-shaped requests do. If unsure (e.g. "why isn't this working" — could be a question OR a debug request), orient.
"I already oriented earlier this session, I'll skip this time"Correct! Re-use the schema and index you already have. Run only the candidate-count check on the new question's terms. The protocol's deterministic part (Step B) is the only thing that re-runs per question.

TRIGGER — when to capture

Write a capture when ANY of these fire (immediate-capture triggers):

  • A research subagent or research agent completes or returns a file with durable findings.
  • New factual information is found (web search, doc fetch, external fact surfaced in conversation).
  • Session resolves a confusion — something neither of you knew before.
  • A gotcha, quirk, or non-obvious behavior in a tool is discovered.
  • A pattern is validated (approaches compared, one picked, with reasons).
  • An architectural decision is made with explicit rationale.
  • User pastes a URL or document for study.
  • <wiki>/inbox/ or <wiki>/raw/ has unprocessed files.
  • User says "add to wiki" / "remember this" / "wiki it" / "save this".
  • Two claims contradict each other.

Also TRIGGER (orientation + citation): the user asks "what do we know about X" / "how do we handle Y" / "what did we decide about Z" / "have we seen this before" — or any question the wiki might cover.

SKIP — when not to capture

  • Routine file edits, syntax lookups, one-off debugging with trivial root causes.
  • Time-sensitive data that must be fetched fresh.
  • Questions clearly outside any wiki's scope.

Do NOT skip based on tone or shape. "This looks like casual chat", "there's no code here", "this isn't a wiki context" are forbidden rationalizations. If new factual information appeared, capture. Tone is not the trigger.

Resist-table for capture triggers. When you're about to skip a capture, check these red flags. Skipped captures are invisible — the user cannot observe them, so the discipline is yours alone.

RationalizationReality
"The
阅读完整来源 ↗