agentleFS
jlbgitjlbgit/PersonalKnowledgeBaseCreator/skills/compile-wiki/SKILL.md

compile-wiki

Skill0 starsChanged 7 months agoMITView on GitHub

Process new raw notes into the organized wiki. Reads new files in raw/, creates/updates entity pages in wiki/ following the schema, adds [[wiki-links]], and updates index.md.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. chappyasel/meta-kb★ 25same name

    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 repository3 other files it gives its agents.

The file

Show its rules and text

We split this skill into the rules it gives an agent

14 rules. About 0 are common, 4 are distinctive, and 10 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 10

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When the user asks you to update the wiki, process new files, or compile the wiki:

    line 12
  2. Distinctive:

    If neither file exists, fall back to relative paths from the workspace root.

    line 22
  3. Very specific:

    Read wiki/log.md. Identify any files in raw/ that have not yet been logged as processed.

    line 25
  4. Distinctive:

    After finishing the batch, clearly tell the user how many files were processed, how many remain, and ask them to run compile-wiki again to …

    line 36
  5. Very specific:

    If the topic exists: Update the existing .md file.

    line 45
  6. Very specific:

    If the topic does NOT exist: Create a new .md file dedicated to that single concept.

    line 46
  7. Very specific:

    Every topic gets its own .md file, saved into a relevant subfolder within wiki/ (e.g., wiki/Agentic AI/, wiki/Building Energy/).

    line 49
  8. Distinctive:

    Every wiki file MUST have YAML frontmatter containing:

    line 50
  9. Very specific:

    Body structure: After # Title, write a 2–4 paragraph extended summary (~250–300 words) covering what, why, and how.

    line 58
  10. Very specific:

    Every wiki file MUST end with a ## Sources section whose entries include at least one clickable markdown link per source (primary URL, DOI, …

    line 59
  11. Very specific:

    Update wiki/index.md to include any new topics with a one-line description (Do NOT use [[wiki-links]] in the index so it doesn't clutter …

    line 68
  12. Very specific:

    If you process Energy_Systems.pdf (a paper titled "Physics-Constrained Neural Networks for HVAC Control" by Jane Doe, DOI: 10.1234/example):

    line 72
  13. Very specific:

    Ensure the body has the 2–4 paragraph extended summary, ## Key Takeaways (up to 10 bullets), further sections, and ## Sources with a …

    line 89
  14. Very specific:

    Update wiki/index.md with descriptions for both new pages.

    line 91

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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.

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

Compile Knowledge Base Wiki

This skill instructs the agent to compile raw notes into the compounding knowledge base wiki, following the exact best practices defined by Andrej Karpathy and the LLM Wiki pattern.

Instructions

When the user asks you to update the wiki, process new files, or compile the wiki:

  1. Resolve Paths (always do this first): First, check if a wiki-config.md exists in the current workspace root (this indicates a project-local wiki). If not found, read wiki-config.md from the same directory as this skill (e.g., ~/.cursor/skills/wiki-config.md) for the global wiki. The file contains four absolute paths labelled Wiki root, Wiki folder, Raw folder, and Output folder. Use these paths everywhere below instead of the relative wiki/, raw/, and output/ defaults. If neither file exists, fall back to relative paths from the workspace root.
  2. Check for Unprocessed Files: Read wiki/log.md. Identify any files in raw/ that have not yet been logged as processed. Use your native capability to read the text of these files (including PDFs).

1a. Decide on Batch Size (do this before reading any file content): Count the unprocessed files and estimate load:

  • Small load (≤ 4 files, all appear short/lightweight): Process all in one pass — skip to step 2.
  • Medium load (5–10 files, or any single file is a long PDF/article): Process in batches of 5 files per run.
  • Large load (> 10 files, or multiple long documents): Process in batches of 4 files per run.

When batching:

  • Pick the oldest unprocessed files first (by filename or modification date).
  • Process only the current batch (steps 2–4) and fully complete it (wiki pages written, index updated, log appended) before stopping.
  • After finishing the batch, clearly tell the user how many files were processed, how many remain, and ask them to run compile-wiki again to continue. Do NOT attempt to process the next batch in the same turn.
  1. Extract Key Concepts: For each new file, extract the core ideas, processes, abstract concepts, and domains (e.g., "building HVAC control", "token minimization"). Focus the primary organization and [[wiki-links]] on topics, but do extract and record the author(s) of the source material as plain text (e.g., to include in YAML frontmatter or a "Sources" section; NEVER wrap authors in [[ ]] so they don't become nodes in the graph). Also, generate 1-3 broad categorizing tags (e.g., knowledge-management, agentic-ai, rag) to include in the YAML frontmatter. Capture source URLs from the raw material when available (article link, DOI, arXiv, blog URL) for frontmatter url: and for clickable links in ## Sources. Extract methods when relevant: technologies, frameworks, tools, lab or experimental techniques (e.g., FastAPI, Neo4j, MCP, three-point bending test) for optional YAML methods:. Record the original title of the source (paper title, article headline, repo name) for title: in frontmatter. Determine the source type (paper, preprint, article, blog-post, github-repo, book, video, documentation, or concept for synthesized pages) for type:.
  2. Create or Update Wiki Pages: For every extracted concept, modify the wiki/ directory following the schema rules:

    • If the topic exists: Update the existing .md file. Synthesize the new information without overwriting old knowledge. Flag any contradictions between the new source and existing knowledge.
    • If the topic does NOT exist: Create a new .md file dedicated to that single concept.

    Page Rules:

    • Every topic gets its own .md file, saved into a relevant subfolder within wiki/ (e.g., wiki/Agentic AI/, wiki/Building Energy/).
    • Every wiki file MUST have YAML frontmatter containing:
      • title: — the original source title (or wiki page title for concept pages)
      • type: — one of paper, preprint, article, blog-post, github-repo, book, video, documentation, concept
      • authors: — plain text, no [[ ]]
      • tags: — standard lowercase-dash format
      • date_added: — ISO YYYY-MM-DD (today's date for this compile run)
      • url: — include when a clear primary source URL exists
      • methods: — include when the source names specific technologies or techniques worth indexing
    • Body structure: After # Title, write a 2–4 paragraph extended summary (~250–300 words) covering what, why, and how. Then add ## Key Takeaways with up to 10 bullets (concrete concepts, results, or implications — not vague restatements of the summary). Add any further sections (e.g. Ecosystem, Integration) with [[wiki-links]].
    • Every wiki file MUST end with a ## Sources section whose entries include at least one clickable markdown link per source (primary URL, DOI, or arXiv as available).
    • Linking philosophy — quality over quantity: Link pages when the connection is specific and meaningful — when someone reading page A would genuinely benefit from navigating to page B to deepen their understanding of A's content. A well-linked page typically has 2–5 outgoing links targeting the most conceptually significant relationships. Cross-domain links are valuable when the connection is a core contribution (e.g., an LLM paper whose main novelty is its application to building control should link to both AI and building energy topics). The text inside [[ ]] must match the target page's filename (without .md); ensure the target page exists in wiki/ or will be created in this same compile run. If a related concept deserves linking but has no page yet, create a brief stub page (frontmatter + 1-paragraph summary) rather than leaving a dangling link or omitting the connection.
    • Avoid hub pollution: Do not link to broad umbrella concepts (e.g., "LLM Agents", "Machine Learning") unless the page's content is specifically about that concept's mechanism or a direct, novel application of it. A building control paper that happens to use an LLM should not link to a generic LLM Agents page — only link if the LLM agent architecture itself is a core contribution. Hub nodes that everything links to destroy graph structure and make ask-wiki traversal inefficient.
    • NEVER wiki-link to operational tooling: Do not wrap this system's own skills, infrastructure, or meta-concepts about the wiki workflow in [[ ]] (e.g., never link to "compile-wiki", "lint-wiki", "ask-wiki", "AGENTS.md", or "schema file"). These are operational tooling, not knowledge topics — linking them pollutes the Obsidian graph with non-knowledge nodes. Mention them in plain text if relevant.

    Link verification (mandatory final step before updating index/log): After writing all pages for the current batch, collect every [[wiki-link]] target across all files you created or edited. For each target, verify that a .md file with that exact filename exists somewhere in wiki/. If any target is missing, either create a stub page for it now or remove the link. Never leave dangling [[links]].

  3. Update the Index and Log:
    • Update wiki/index.md to include any new topics with a one-line description (Do NOT use [[wiki-links]] in the index so it doesn't clutter the Obsidian graph).
    • Append a new row to wiki/log.md with the Date/Time, File Name, and Key Topics Extracted to mark the file as processed.

Example

If you process Energy_Systems.pdf (a paper titled "Physics-Constrained Neural Networks for HVAC Control" by Jane Doe, DOI: 10.1234/example):

  • Determine topics: building HVAC control and physics-constrained neural networks.
  • Create wiki/Control Systems/building HVAC control.md with:
    title: "Physics-Constrained Neural Networks for HVAC Control"
    type: paper
    authors:
      - "Jane Doe"
    tags:
      - building-energy
      - control-systems
    date_added: 2026-04-21
    url: "https://doi.org/10.1234/example"
    methods:
      - physics-constrained neural networks
      - HVAC simulation
  • Ensure the body has the 2–4 paragraph extended summary, ## Key Takeaways (up to 10 bullets), further sections, and ## Sources with a clickable DOI link.
  • Add 2–5 [[wiki-links]] to closely related pages (existing or created in this same run), focusing on the most meaningful conceptual relationships. If a related concept has no page yet, create a stub (frontmatter + 1-paragraph summary) so the link resolves. Avoid linking to broad umbrella topics unless the relationship is a core contribution.
  • Update wiki/index.md with descriptions for both new pages.
  • Log the file in wiki/log.md.

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.