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

ask-wiki

Skill0 starsChanged 7 months agoMITView on GitHub

Query the LLM wiki to generate insights, research briefings, or answer questions. Synthesizes knowledge across the wiki/ folder and saves the outputs to output/ while also updating relevant wiki pages with the new insights.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 4 are distinctive, and 2 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.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When the user asks a question, requests a briefing, or asks you to find gaps in the knowledge base using this skill:

    line 12
  2. Distinctive:

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

    line 22
  3. Very specific:

    Prioritize by relevance: When a page has multiple outgoing [[wiki-links]], follow the link whose topic name is most semantically related to …

    line 28
  4. Distinctive:

    Track visited pages: Keep a mental set of pages already read.

    line 29
  5. Distinctive:

    Depth limit: Stop traversing after visiting ~8–10 pages (or sooner if new pages add diminishing context).

    line 31
  6. Very specific:

    If the generated answer uncovers a new connection, a synthesized insight, or a newly discovered gap, update the relevant pages back in the …

    line 44

≈ “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

Ask Knowledge Base Wiki

This skill formalizes the "Question -> Answer -> Save" loop. It instructs the AI to treat the wiki/ directory (as defined by AGENTS.md) as its sole truth and automatically save generated insights so they compound over time.

Instructions

When the user asks a question, requests a briefing, or asks you to find gaps in the knowledge base using this skill:

  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. Explore the Knowledge Base (Graph Traversal):
    • Start Token-Efficiently: First, scan wiki/index.md to identify the entry-point nodes (topics) directly relevant to the user's query.
    • Traverse the Knowledge Graph: Read the entry-point .md files in wiki/ (which may live in thematic subfolders like wiki/Building Energy/) and follow their internal [[wiki-links]] to navigate to related concepts. Obsidian resolves links regardless of subfolder, so search for the target filename across all subfolders. Follow links instead of blindly searching the entire wiki/ directory, staying within the cluster relevant to the query (e.g., a query about "Token Optimization" should not touch "HVAC Control" pages). Apply these traversal rules:
      • Summary-first reading: For pages over ~100 lines, read only the extended summary (opening paragraphs before the first ## section) and decide whether the full page is relevant before reading the rest. For shorter pages (≤100 lines), read the full page — the token savings from a partial read are negligible and the extra tool call to fetch the remainder is wasteful.
      • Prioritize by relevance: When a page has multiple outgoing [[wiki-links]], follow the link whose topic name is most semantically related to the query first. Skip links that clearly diverge from the query's scope.
      • Track visited pages: Keep a mental set of pages already read. Never re-read a page you have already visited, even if you encounter a link back to it.
      • Dead-end handling: If the current page's outgoing links all point to already-visited pages or clearly irrelevant topics, do not force further traversal from this path. Return to the index and try the next most relevant entry-point topic that has not yet been visited. This prevents wasting reads on tangential content.
      • Depth limit: Stop traversing after visiting ~8–10 pages (or sooner if new pages add diminishing context). The wiki is the summary layer — exhaustive reading defeats its purpose.
    • Optional Deep-Dive into Raw Sources: After the wiki traversal is complete, assess whether the wiki content alone is sufficient to answer the query. If — and only if — the wiki pages lack detail, contain "[citation needed]"-style gaps, or the user explicitly asks for primary-source grounding, review the Sources sections of visited pages and select up to 5 raw/ files most relevant to the query. To locate raw files, glob-search the raw/ folder by keywords from the source title (raw filenames match paper/article titles with special characters replaced). This two-phase approach (cheap wiki scan first, targeted raw reads only when needed) keeps token usage efficient while still allowing primary-source grounding when it matters.
  3. Generate the Insight / Answer: Synthesize an answer using the facts contained within the wiki/ folder and, if necessary, their original sources in raw/. Do not hallucinate external knowledge. If the answer cannot be found in your sources, clearly state that the knowledge base lacks information on the topic.
  4. Include References: At the end of every generated answer or briefing, you MUST include a "References" section. This section should list and link to all the original source documents (from the raw/ folder or cited in the wiki) that were used to compile the answer.
  5. Save to Outputs: Save the full generated response (including the References section) as a new .md file inside the output/ directory (e.g., output/Briefing - Agentic AI Workflows.md).
  6. Re-integrate (Compound) the Knowledge: If the generated answer uncovers a new connection, a synthesized insight, or a newly discovered gap, update the relevant pages back in the wiki/ directory.
    • For example, if the user asks you to compare Source A and Source B on a specific topic, and you find a novel insight, add a "Synthesized Insights" section to that topic's .md page in wiki/.
    • This ensures that every question asked makes the knowledge base permanently smarter for future queries.
  7. Log the Query: Append a row to wiki/log.md recording the timestamp, the query asked, and which wiki pages were updated during re-integration (if any). This keeps the log as the single audit trail for all wiki modifications.

Example Queries

  • "What are the three biggest gaps in my understanding of Agentic AI?"
  • "Compare what the wiki says about RAG vs LLM Wikis. Where do they disagree?"
  • "Write me a 500-word briefing on HVAC control using only what's in this knowledge base."

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.