Knowledge Wiki Enrich
Researchknowledge-wiki-enrichKnowledge Wiki Enrich is an Agent Skill for research published in the CatChen/knowledge-wiki-template repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Expand thin concept articles in the knowledge wiki using web search. Targets concepts with minimal prose assembled from few sources and supplements them with authoritative external information. Run after accumulating new concepts or when articles feel sparse.
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/CatChen/knowledge-wiki-template/blob/HEAD/.claude/skills/knowledge-wiki-enrich/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/knowledge-wiki-enrich, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Knowledge Wiki Enrich
Find concept articles that are thin relative to their source material and expand them using web search. Each article is supplemented with authoritative external information integrated naturally into the existing prose.
Steps
1. Establish the working directory
The knowledge base root is the Git repository root. Run git rev-parse --show-toplevel and store the result as KNOWLEDGE_PATH.
Use KNOWLEDGE_PATH for all subsequent steps.
2. Find thin concepts
Run:
node {KNOWLEDGE_PATH}/scripts/wiki/candidates.mjs find-thin-concepts
Output is { "concepts": [...] } — an array of concept file paths sorted by word count ascending, so the thinnest concepts come first. A concept is thin if it has fewer than 150 words in its body AND at most 2 entries in its ## Sources section.
If the array is empty, print No thin concepts found. and stop.
3. Expand each thin concept
For each path in the concepts array:
- Read the concept file. Note the display name from its
# Titleline, and derive the slug (basename without.md). - Use the WebSearch tool to search for the concept name. Choose 1–2 queries that would find authoritative reference material.
- Fetch or read the most relevant search results.
- Integrate new information into the article body: extend existing paragraphs or add new ones. Do not add content that contradicts existing text — flag contradictions in the print summary instead.
- Write the updated file back to disk.
- Derive a fresh one-line English description from the enriched article. Run:
node {KNOWLEDGE_PATH}/scripts/wiki/wiki-index.mjs upsert-concept "{slug}" "{display name from step 1}" "{fresh one-line description}"
Write in American English: use -ize not -ise (normalize, organize, recognise→recognize), -or not -our (color, behavior, honour→honor), -er not -re (center, theater). Do not modify frontmatter or the ## Sources / ## Connected Concepts sections.
4. Print summary
Knowledge Wiki Enrich
Expanded {N} concept(s):
- {Display Name}
- {Display Name}
...
Contradictions flagged:
- {Display Name}: {brief description of conflict}
[omit section if none]