Skip to content
Automation
Skill

/llm-wiki

Xây dựng và duy trì knowledge base cá nhân theo pattern LLM Wiki (Karpathy). Hỗ trợ init, ingest, query, lint, discover, run, digest, pain-rank, setup, book-summary, competitive-brief, interview-prep.

From plugin
llm-wiki
2121 skill
Install
$ npx -y skills add mduongvandinh/llm-wiki --skill llm-wiki --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/llm-wiki

Context preview

The summary Claude sees to decide when to auto-load this skill.

Xây dựng và duy trì knowledge base cá nhân theo pattern LLM Wiki (Karpathy). Hỗ trợ init, ingest, query, lint, discover, run, digest, pain-rank, setup, book-summary, competitive-brief, interview-prep.

SKILL.md

llm-wiki.SKILL.md
name: llm-wiki
description: Xây dựng và duy trì knowledge base cá nhân theo pattern LLM Wiki (Karpathy). Hỗ trợ init, ingest, query, lint, discover, run, digest, pain-rank, setup, book-summary, competitive-brief, interview-prep.

LLM Wiki — Claude Code Skill

Hệ thống knowledge base cá nhân. LLM xây dựng và duy trì wiki từ nguồn thô. Dựa trên pattern của Andrej Karpathy, mở rộng với auto-discovery.

Sub-commands

Skill này hỗ trợ các sub-commands sau. Parse argument đầu tiên để xác định command:

| Command | Mô tả | Ví dụ | |---------|-------|-------| | `init` | Tạo wiki mới cho một chủ đề | `/llm-wiki init "AI Agents"` | | `ingest` | Xử lý nguồn mới trong raw/ | `/llm-wiki ingest` | | `query` | Hỏi đáp dựa trên wiki | `/llm-wiki query "So sánh RAG vs Wiki"` | | `lint` | Kiểm tra sức khỏe wiki | `/llm-wiki lint` | | `discover` | Tự tìm nguồn mới | `/llm-wiki discover` | | `run` | Chạy full cycle: discover → ingest → lint | `/llm-wiki run` | | `status` | Xem trạng thái wiki | `/llm-wiki status` | | `digest` | Daily brief — tóm tắt thay đổi wiki 24h | `/llm-wiki digest` | | `pain-rank` | Xếp hạng pain points theo cơ hội kinh doanh | `/llm-wiki pain-rank` | | `setup` | Khởi tạo wiki theo variant template có sẵn | `/llm-wiki setup book-companion` | | `book-summary` | Tóm tắt có cấu trúc toàn bộ wiki sách | `/llm-wiki book-summary` | | `competitive-brief` | Battlecard 1-pager cho một competitor | `/llm-wiki competitive-brief "Linear"` | | `interview-prep` | 1-pager chuẩn bị interview cho một công ty | `/llm-wiki interview-prep "Stripe"` |

Nếu không có sub-command → hiển thị trạng thái và hỏi user muốn làm gì.

Thư mục gốc

WIKI_ROOT = <current working directory>

Xác định WIKI_ROOT bằng cách tìm folder chứa CLAUDE.md + config.yaml + wiki/ + raw/. Thường là thư mục project hiện tại.

Luôn đọc `WIKI_ROOT/CLAUDE.md` trước khi thực hiện bất kỳ command nào — đó là schema quy định mọi quy tắc.

Command: init

**Mục đích:** Khởi tạo wiki mới hoặc thêm topic mới vào wiki hiện tại.

**Quy trình:** 1. Đọc `CLAUDE.md` và `config.yaml` 2. Nếu argument là topic mới → thêm vào `config.yaml` → topics 3. Nếu wiki chưa có folder structure → tạo theo CLAUDE.md 4. Ghi LOG.md

**Ví dụ:**

/llm-wiki init "Rust Programming"
→ Thêm topic "Rust Programming" vào config.yaml
→ Keywords tự sinh: ["Rust language", "Rust programming", "cargo", "rustc"]

Command: ingest

**Mục đích:** Xử lý mọi file mới/chưa xử lý trong `raw/`.

**Quy trình:** 1. Đọc `CLAUDE.md` (schema & quy tắc) 2. Đọc `.discoveries/history.json` → lấy danh sách đã xử lý 3. Scan `raw/` → tìm file chưa có trong history 4. Với mỗi file mới: a. Đọc nội dung (dùng Read cho text, WebFetch cho URL, PDF reader cho PDF) b. Tạo source summary → `wiki/sources/` c. Trích xuất entities → tạo/cập nhật `wiki/entities/` d. Trích xuất concepts → tạo/cập nhật `wiki/concepts/` e. Thêm cross-references `[[links]]` vào các trang liên quan f. Phát hiện contradictions → ghi chú vào trang liên quan 5. Cập nhật `wiki/INDEX.md` 6. Ghi `wiki/LOG.md` 7. Cập nhật `.discoveries/history.json`

**Quy tắc QUAN TRỌNG:**

  • KHÔNG BAO GIỜ sửa file trong `raw/`
  • Mỗi source có thể ảnh hưởng 5-15 wiki pages
  • Luôn trích dẫn nguồn: `[Nguồn: filename](../raw/path)`
  • Nếu thông tin mới mâu thuẫn với cũ → giữ cả hai, ghi rõ
  • Không bịa thông tin — chỉ viết những gì có trong raw sources
  • Batch size theo config.yaml → `schedule.ingest.batch_size`

Command: query

**Mục đích:** Hỏi đáp dựa trên nội dung wiki.

**Quy trình:** 1. Đọc `wiki/INDEX.md` → tìm trang liên quan đến câu hỏi 2. Đọc các trang wiki liên quan (đọc đủ context, không chỉ 1-2 trang) 3. Tổng hợp câu trả lời với citations `[[trang-wiki]]` 4. Nếu câu trả lời có giá trị phân tích → lưu vào `wiki/syntheses/` hoặc `outputs/` 5. Ghi LOG.md

**Quy tắc:**

  • Trả lời DỰA TRÊN WIKI, không dùng kiến thức bên ngoài
  • Nếu wiki thiếu thông tin → nói rõ và gợi ý topic cần discover
  • So sánh, phân tích → tự động lưu thành synthesis page
  • Format đầu ra linh hoạt: markdown, bảng so sánh, bullet points

**Ví dụ:**

/llm-wiki query "So sánh RAG truyền thống vs LLM Wiki pattern"
→ Đọc INDEX.md → tìm trang về RAG, LLM Wiki
→ Đọc các trang liên quan
→ Tạo bảng so sánh
→ Lưu vào wiki/syntheses/rag-vs-llm-wiki.md

Command: lint

**Mục đích:** Kiểm tra sức khỏe wiki, phát hiện vấn đề.

**Quy trình:** 1. Đọc toàn bộ `wiki/INDEX.md` 2. Scan mọi file trong `wiki/` 3. Kiểm tra:

  • **Contradictions**: thông tin mâu thuẫn giữa các trang
  • **Orphans**: trang không ai link đến
  • **Missing pages**: `[[link]]` trỏ đến trang chưa tồn tại
  • **Stale claims**: thông tin cũ bị nguồn mới bác bỏ
  • **Broken links**: link đến raw source không còn tồn tại
  • **Gaps**: lĩnh vực quan trọng thiếu coverage
  • **Quality**: trang quá ngắn, thiếu sources, thiếu cross-refs

4. Tạo báo cáo → `outputs/lint-YYYY-MM-DD.md` 5. Cập nhật `.discoveries/gaps.json` (cho discover dùng) 6. Ghi LOG.md 7. Nếu `config.yaml → schedule.lint.auto_fix = true` → tự sửa lỗi đơn giản

**Output format:**

# Lint Report — YYYY-MM-DD

## Tóm tắt
- Tổng trang: N
- Contradictions: N
- Orphans: N
- Missing pages: N
- Gaps: N

## Chi tiết
### Contradictions
...
### Đề xuất
- Tạo trang mới: [danh sách]
- Tìm nguồn cho: [danh sách gaps]

Command: discover

**Mục đích:** Tự động tìm nguồn mới từ internet.

**Quy trình:** 1. Đọc `config.yaml` → topics, feeds, discovery settings 2. Đọc `.discoveries/gaps.json` → knowledge gaps cần lấp 3. Đọc `.discoveries/history.json` → tránh trùng lặp 4. Thực hiện theo strategies trong config: a. **reddit_scan**: WebSearch `site:reddit.com` theo subreddits + keywords trong config.yaml → tìm pain points, use cases, ý tưởng. Lưu vào `raw/reddit/YYYY-MM-DD-slug.md`. Trích xuất: vấn đề gốc, giải pháp được đề xuất, upvotes, sentiment. b. **github_trending**: WebSearch GitHub trending repos theo languages/topics filter c. **github_watch**: Kiểm tra repos/orgs/people trong conf

Read more
Ships withllm-wiki

A personal knowledge base that builds and maintains itself. Drop articles, notes, PDFs, or Reddit threads into a folder.

Get the whole plugin
Stats
212
Stars
94
Forks
Maintained
Maintenance
HTML
Language
MIT
License
3mo ago
Last commit
4mo ago
Created

Repo: mduongvandinh/llm-wiki