# wiki-ingest

Adopt this skill: https://proskills.md/skills/other/sanyuan0704-sanyuan-skills-skills-wiki-ingest

Page: https://proskills.md/skills/other/sanyuan0704-sanyuan-skills-skills-wiki-ingest
This document is the public skill bundle for that page. It contains SKILL.md and every helper file the catalog carries. No login is required.

## File: skills/wiki-ingest/SKILL.md
size: 3938
sha: d4e182fa19ac7b3e59ce2365b9bf02dc345014a3
upstream: https://github.com/sanyuan0704/sanyuan-skills/blob/HEAD/skills/wiki-ingest/SKILL.md

````text
---
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](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`:

```markdown
## 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
````

## File: skills/wiki-ingest/references/page-templates.md
size: 1476
sha: 2e414a5a12e957893f59444cadc7706a6ee93e0a
upstream: https://github.com/sanyuan0704/sanyuan-skills/blob/HEAD/skills/wiki-ingest/references/page-templates.md

````text
# Wiki Page Templates

## Concept Page (concepts/)

```markdown
# Page Title

> One-line definition

## Key Points
(3-5 points, 1-2 sentences each)

## Details
(Expanded explanation, may include subsections)

## Context
(Which articles/documents it appears in, what role it plays)

## Related Pages
- [[related-concept]]

## Sources
- Article/Document X: specific reference point
```

## Product Page (products/)

```markdown
# Product Name

> One-line positioning

## Core Capabilities
(3-5 key features)

## Technical Highlights
(Architecture, implementation approach, etc.)

## Use Cases
(When to use it)

## Related Pages
- [[related-product]]
- [[related-concept]]

## Sources
- Article/Document X: specific reference point
```

## Pattern Page (patterns/)

```markdown
# Pattern Name

> One-line summary of what problem this pattern solves

## Problem Context
(When you need this pattern)

## Solution
(Core approach of the pattern)

## Trade-offs
(What you give up by using this pattern)

## Related Pages
- [[related-pattern]]
- [[related-concept]]

## Sources
- Article/Document X: specific reference point
```

## Comparison Page (comparisons/)

```markdown
# A vs B

> One-line summary of the core difference

## Comparison

| Dimension | A | B |
|-----------|---|---|
| ... | ... | ... |

## Strengths of Each

## Selection Guide
(When to choose A, when to choose B)

## Related Pages
- [[A]]
- [[B]]

## Sources
- Article/Document X: specific reference point
```
````

## File: README.md
upstream: https://github.com/sanyuan0704/sanyuan-skills/blob/HEAD/README.md

````text
# sanyuan-skills

A collection of production-grade agent skills for Claude Code and other AI agent terminals.

<p align="center">
  <img src="https://img.shields.io/badge/Skills-6-blue" alt="6 Skills" />
  <img src="https://img.shields.io/badge/License-MIT-yellow" alt="MIT License" />
</p>

## Skills

| Skill | Description | Install |
|-------|-------------|---------|
| [**Code Review Expert**](./skills/code-review-expert/) | Senior engineer code review covering SOLID, security, performance, error handling | `npx skills add sanyuan0704/sanyuan-skills --path skills/code-review-expert` |
| [**Sigma**](./skills/sigma/) | 1-on-1 AI tutor based on Bloom's 2-Sigma mastery learning with Socratic questioning | `npx skills add sanyuan0704/sanyuan-skills --path skills/sigma` |
| [**Skill Review**](./skills/skill-review/) | Quality audit for skills: structure, description, workflow, token efficiency, anti-patterns | `npx skills add sanyuan0704/sanyuan-skills --path skills/skill-review` |
| [**Skill Forge**](./skills/skill-forge/) | Meta-skill for creating high-quality skills with 12 battle-tested techniques | `npx skills add sanyuan0704/sanyuan-skills --path skills/skill-forge` |
| [**Wiki Ingest**](./skills/wiki-ingest/) | Compile articles, documents, or notes into a structured, cross-referenced wiki knowledge base | `npx skills add sanyuan0704/sanyuan-skills --path skills/wiki-ingest` |
| [**Book Study**](./skills/book-study/) | Reading coach with knowledge compilation, Socratic mastery testing, spaced repetition, and cross-book querying | `npx skills add sanyuan0704/sanyuan-skills --path skills/book-study` |

## Quick Start

Install any skill with:

```bash
npx skills add sanyuan0704/sanyuan-skills --path skills/<skill-name>
```

Then invoke in your agent terminal:

```bash
/code-review-expert    # Review current git changes
/sigma <topic>         # Start a tutoring session
/skill-review          # Audit an existing skill's quality
/skill-forge           # Create a new skill
/wiki-ingest           # Compile content into a wiki knowledge base
/book-study <book>     # Start a guided reading session
```

## License

MIT
````
