prefill
Skill1.7k starsChanged 34 days agoMITView on GitHub
Seed wiki/foundations/ with domain background knowledge so subsequent /ingest does not create duplicate concept pages for textbook material
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 0 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 44
If domain argument given → use it.
- Very specific: line 50
Catalog mode: read .claude/skills/prefill/foundations-catalog.yaml.
- Very specific: line 107
Write each file to wiki/foundations/{slug}.md.
- Very specific: line 138
foundations are terminal: never write key_papers, related_concepts, or any outbound reference field on a foundation page.
- Very specific: line 142
only writes to
wiki/foundations/: never creates pages under papers/, concepts/, topics/, etc. - Very specific: line 146
wiki/foundations/does not exist: run python3 tools/research_wiki.py init wiki/ first.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/prefill
Sediments foundational background (seminal methods, common practice, standard architectures) into
wiki/foundations/as terminal pages. Foundations are single-direction by design: other pages link to them, foundations write no reverse links.
Trigger
Manual: /prefill [domain] or /prefill --add "concept name".
Inputs
domain(positional, optional): research domain — one ofgeneral,NLP,CV,ML Systems,Robotics. If omitted, infer fromwiki/topics/tags; ifwiki/topics/is empty, prompt the user.--add "<concept>": skip the catalog and seed exactly one foundation by name.
Outputs
wiki/foundations/{slug}.md— one page per seeded concept- Updated
wiki/index.md(foundations section regenerated byrebuild-index) wiki/log.mdentry
Wiki Interaction
Reads
wiki/topics/*.md— for domain inference (whendomainis omitted)wiki/foundations/*.md— to skip already-seeded concepts (idempotent).claude/skills/prefill/foundations-catalog.yaml— seed list
Writes
wiki/foundations/{slug}.md(new only — never overwrite)wiki/index.md(viatools/research_wiki.py rebuild-index)wiki/log.md(viatools/research_wiki.py log)
Workflow
Pre-conditions: working directory contains wiki/, tools/, .claude/. Set WIKI_ROOT=wiki/.
Step 1: Resolve domain
- If
domainargument given → use it. - Else if
--addmode → domain isgeneralunless the user specified one. - Else: read all
wiki/topics/*.mdfrontmattertags; if a single dominant domain is detected, use it; otherwise ask the user.
Step 2: Load seeds
- Catalog mode: read
.claude/skills/prefill/foundations-catalog.yaml. Pick all entries underdomains.{domain}plus everything underdomains.general(general foundations apply to every research field). --addmode: synthesize a single seed entry{slug: <slugified concept>, title: <concept>, summary: ""}. Usepython3 tools/research_wiki.py slug "<concept>"to derive the slug.
For each seed, check wiki/foundations/{slug}.md. If it already exists, skip (do not overwrite, do not warn).
Step 3: Fetch background from Wikipedia
For each remaining seed, call tools/fetch_wikipedia.py:
python3 tools/fetch_wikipedia.py summary "<title>"
python3 tools/fetch_wikipedia.py sections "<title>"
python3 tools/fetch_wikipedia.py section "<title>" --index <N> # for relevant sections- The summary call returns
{title, extract, url}. - The sections call returns a list of
{index, line, level}— pick sections whoselinematchesVariants,Types,Architecture,History,Limitations,Applications(case-insensitive substring match). - Exit code
2from any call means page not found — fall back to LLM knowledge for that seed and setsource_url: ""in the resulting frontmatter.
Step 4: Compose the foundation page
Render each seed into the template below. Distinguish Wikipedia-derived content from LLM-supplied content by appending (LLM analysis) to sections that have no Wikipedia source material.
---
title: "{title}"
slug: "{slug}"
domain: "{domain}"
status: mainstream # or historical, if the seed is a superseded technique
aliases: [] # list any common aliases the LLM is confident about
first_introduced: "{year if present in Wikipedia summary, else empty}"
date_updated: "{today}"
source_url: "{wikipedia url, or empty if 404}"
---
## Definition
{First paragraph of Wikipedia summary, or LLM-supplied definition.}
## Intuition
{Plain-language explanation built on the definition.}
## Formal notation
{Math/notation extracted from Wikipedia, or LLM-supplied with `(LLM analysis)` tag.}
## Key variants
{Bulleted list distilled from Wikipedia "Variants"/"Types"/"Architecture" sections.}
## Known limitations
{From Wikipedia + LLM judgment.}
## Open problems
{LLM analysis (LLM analysis)}
## Relevance to active research
{LLM analysis (LLM analysis)}Write each file to wiki/foundations/{slug}.md.
Step 5: Refresh navigation and log
python3 tools/research_wiki.py rebuild-index wiki/
python3 tools/research_wiki.py log wiki/ "prefill | {N} foundations created for {domain}"Step 6: Report
Print a grouped summary:
## Prefill Report — {date}
**Domain**: {domain}
**Created**: {N} **Skipped (already present)**: {M}
### mainstream
- foundations/gradient-descent — Gradient Descent
- ...
### historical
- foundations/recurrent-neural-networks — Recurrent Neural NetworksRemind the user that subsequent /ingest runs will dedup against these foundations and create wikilinks ([[foundation-slug]]) instead of new concept pages.
Constraints
- foundations are terminal: never write
key_papers,related_concepts, or any outbound reference field on a foundation page. Other pages may link in. - never overwrite an existing
wiki/foundations/{slug}.md(idempotent re-runs). - distinguish sources: Wikipedia-derived content vs. LLM-derived content must be visually distinct in the page body.
- catalog is advisory: the YAML seed list is hand-curated and incomplete. Users may extend it without code changes.
- only writes to
wiki/foundations/: never creates pages underpapers/,concepts/,topics/, etc.
Error Handling
wiki/foundations/does not exist: runpython3 tools/research_wiki.py init wiki/first.- Wikipedia 404: log the missing page, fall back to LLM knowledge for that seed (
source_url: ""). - Network failure: print which seeds failed and continue with the remainder; do not abort the whole batch.
- Catalog file missing: print error pointing to
.claude/skills/prefill/foundations-catalog.yaml.
Dependencies
Tools (via Bash)
python3 tools/fetch_wikipedia.py summary|sections|section|wikitext "<title>" [--index N]python3 tools/research_wiki.py slug "<title>"python3 tools/research_wiki.py rebuild-index wiki/python3 tools/research_wiki.py log wiki/ "<message>"
Catalog
.claude/skills/prefill/foundations-catalog.yaml
Trending
More talk lately.thin dataabout the whole repository
Who's talking about PKU-DAIR/AutoSci
The biggest 1 of 1 mention linking to the repository that our crawl found. Each line is their own headline.
Other versions4 projects use a version of this.
Word for word · 3
- DAIR-AutoResearch/AutoSci★ 1.7k100% same
- skyllwt/AutoSci★ 1.7k100% same
- skyllwt/OmegaWiki★ 1.7k100% same
Edited · 1
- Lambenthan/empiricalwiki★ 8522% same
Wrote their own version · 0
None found.
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.
In this repository30 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- runtime/CLAUDE.mdCLAUDE.md
- askSkill
- checkSkill
- daily-arxivSkill
- discoverSkill
- editSkill
- exp-designSkill
- exp-evalSkill
- exp-pilot-evalSkill
- exp-pilot-runSkill
- exp-runSkill
- exp-statusSkill
- hiera-experimentSkill
- ideateSkill
- ingestSkill
- initSkill
- noveltySkill
- paper-compileSkill
- paper-draftSkill
- paper-planSkill
- posterSkill
- rebuttalSkill
- refineSkill
- researchSkill
- resetSkill
- reviewSkill
- setupSkill
- surveySkill
- visualizeSkill
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
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.

