wiki-ingest
sanyuan0704/sanyuan-skills
Compile articles and documents into a structured, cross-referenced wiki knowledge base.
What is wiki-ingest?
Wiki Ingest organizes text content (articles, documents, notes) into a searchable wiki with interconnected pages. Use it when you need to build or update a knowledge base, compile research into structured pages, or ingest batch content with automatic cross-referencing.
- Extracts knowledge entities (concepts, products, patterns, comparisons) from input content
- Creates or updates wiki pages organized by category with one-entity-per-page structure
- Automatically establishes cross-references between related pages using Obsidian-compatible double-link format
- Maintains an append-only operation log and table of contents
- Supports single or batch ingestion from pasted text, file paths, or directories
- Prevents duplicates by checking existing wiki before creating new pages
How to install wiki-ingest
npx skills add https://github.com/sanyuan0704/sanyuan-skills --skill wiki-ingest- A project directory (wiki/ created automatically if not specified)
- Text content in supported formats (plain text, markdown, PDF, or pasted directly)
How to use wiki-ingest
- 1.Invoke the skill with content source (pasted text, file path, or directory path)
- 2.Optionally specify a custom wiki path; defaults to wiki/ in current project
- 3.The skill reads existing wiki/index.md to check for duplicates
- 4.Knowledge entities are extracted and categorized into concepts/, products/, patterns/, or comparisons/
- 5.New or updated pages are created with one-line definitions and cross-references
- 6.All existing pages are scanned and updated with new cross-references if relevant
- 7.wiki/index.md is updated with new page entries organized by category
- 8.wiki/log.md is appended with a timestamped record of all changes
Use cases
- Compile research papers or articles into a searchable concept wiki
- Build a product comparison knowledge base from multiple sources
- Ingest engineering documentation and design decisions into a patterns library
- Batch-process a directory of notes into an interconnected knowledge network
- Update an existing wiki with new information while preserving and linking to prior content
- Knowledge managers building internal wikis
- Researchers organizing literature and concepts
- Engineering teams documenting patterns and decisions
- Anyone maintaining a searchable reference knowledge base
wiki-ingest FAQ
The skill updates the existing page by appending new information without overwriting content. The one-line definition is kept stable unless the new content provides a clearly better one.
The skill uses Obsidian-compatible double-link format (e.g., [[concepts/agent-loop]]) and automatically updates Related Pages and Sources sections in all affected existing pages.
An entity deserves a page only if it would be referenced by other pages. Trivial one-off mentions are skipped to keep the wiki focused and navigable.
Yes, batch processing is supported. Provide a directory path and the skill extracts all entities first, then creates pages and updates references in one pass to maintain consistency.
By default, wiki/ is created in the current project root. You can specify a different path when invoking the skill.
Full instructions (SKILL.md)
Source of truth, from sanyuan0704/sanyuan-skills.
name: wiki-ingest description: "Compile articles, documents, or notes into a structured wiki knowledge base. Use when user says 'ingest to wiki', 'compile to knowledge base', 'update wiki', 'wiki ingest', 'add this to wiki', or invokes /wiki-ingest. Supports single or batch ingest. Triggers: wiki, ingest, knowledge base, compile, digest, index, catalog."
Wiki Ingest — Knowledge Base Compiler
Compile any text content (articles, documents, notes) into structured wiki pages with cross-references, building a searchable, interconnected knowledge network.
IRON LAW: One wiki page = one knowledge entity. Never cram multiple concepts into one page.
Wiki Directory Structure
Wiki defaults to wiki/ under the current project root. User may specify a different path.
wiki/
├── index.md # Full table of contents
├── log.md # Append-only operation log
├── concepts/ # Core concept pages
├── products/ # Product/tool entity pages
├── patterns/ # Engineering patterns & design decisions
└── comparisons/ # Cross-topic comparison pages
Workflow
1. Confirm Input
Accept user-specified content source:
- Pasted text directly
- File path(s) (md, txt, pdf, etc.)
- Directory path (batch processing)
If user doesn't specify a wiki path, use wiki/. Create the directory if it doesn't exist.
2. Check Existing Wiki
Read wiki/index.md (if exists) to understand existing pages and avoid duplicates.
3. Extract Knowledge Entities
Extract from content:
- Concepts (
concepts/): Abstract ideas, terminology, theories - Products (
products/): Specific products, tools, services - Patterns (
patterns/): Engineering patterns, design decisions, methodologies - Comparisons (
comparisons/): Cross-product or cross-approach analysis
Extraction threshold: An entity deserves its own page only if it would be referenced by other pages.
4. Create or Update Pages
Each entity maps to one wiki page.
→ Load references/page-templates.md for page templates.
Rules:
- If page already exists → update it, append new information, don't overwrite existing content
- Keep the one-line definition stable unless the new content provides a clearly better one
- Prioritize updating "Sources" and "Related Pages" sections
5. Update Cross-References
Check all existing wiki pages. If new content involves concepts referenced in other pages:
- Update their Related Pages list
- Update their Sources list
- Supplement new information in their detail sections
6. Update index.md
Add new page entries to wiki/index.md, organized by category.
7. Append to log.md
Append to wiki/log.md:
## YYYY-MM-DD: Ingest <source title>
**Source**: <file path or "user input">
**New pages**: list newly created pages
**Updated pages**: list modified pages
**New cross-references**: list newly established links
8. Report Results
Tell user: what pages were created, what pages were updated, what new cross-references were established.
File Naming
- All lowercase, hyphen-separated:
agent-loop.md,kv-cache.md - Name by entity, not by number
Cross-Reference Format
- Use
[[category/page-name]]double-link format (Obsidian-compatible), e.g.[[concepts/agent-loop]],[[products/claude-code]] - Always include the category prefix to avoid ambiguity across directories
- List all related pages at the bottom of each page
Guidelines
- Never create duplicate pages — always check wiki/ first
- Don't extract trivial entities — if a concept appears once and won't be referenced elsewhere, skip it
- For batch processing: extract all entities first, then create pages and update references in one pass to avoid inconsistent intermediate states
- Always update index.md and log.md after every ingest
Related skills
More from sanyuan0704/sanyuan-skills and the wider catalog.

book-study
Systematic reading coach with knowledge compilation, mastery testing, and spaced repetition for deep book learning.

code-review-expert
Expert code review of git changes detecting SOLID violations, security risks, and proposing actionable improvements.

sigma
Personalized 1-on-1 AI tutor using Bloom's 2-Sigma mastery learning with Socratic questioning and adaptive pacing.

skill-forge
Create production-grade skills for Claude Code with expert guidance on architecture, workflow design, and packaging.

dev-browser
Browser automation with persistent named pages via CLI—navigate, fill forms, scrape, and test websites.

excel-cli
Agent skill from sbroenne/mcp-server-excel.