Skip to content

About

Claude/Codex/Gemini skill: builds/updates a knowledge wiki (augmented Karpathy pattern) plus website, knowledge graph, and learning plan

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

51 Commits

Folders and files

Repository files navigation

wikifyskill

License: MIT Last Commit

A Claude Code global slash command that implements Andrej Karpathy's LLM Wiki pattern. When invoked via /wikify in any project directory, it auto-detects context and runs the appropriate workflow:

  • Init — Creates a layered folder structure (raw/, wiki/, WIKI_SCHEMA.md) with domain-aware categories proposed from your source material
  • Ingest — Processes new source files from raw/ one at a time, with human discussion, creating cross-referenced wiki pages
  • Query — Synthesizes answers from the compiled wiki with citations back to source material
  • Lint — Runs health checks for contradictions, orphan pages, stale claims, missing cross-references, and stub detection
  • Learning Plan — Generates a dependency-ordered reading guide across all wiki pages, organized into tiers from bedrock concepts to advanced topics

The core insight: LLMs should compile knowledge into a persistent, structured wiki rather than re-derive answers via RAG on every query. The human curates sources and asks questions; the LLM handles all the bookkeeping — cross-references, consistency, contradiction detection — at near-zero marginal cost.

Supports all source file types: markdown, PDFs, images (via vision), code repositories, and structured data files.

Table of Contents

Highlights

  • Zero dependencies — A single markdown file and a Python script; no npm packages, no server, no database
  • Auto-detection — /wikify figures out what to do based on folder state; no subcommands to remember
  • Domain-aware init — Scans your source material and proposes category structures tailored to your domain (fiction, research, technical, business, etc.)
  • Obsidian-compatible — All wiki pages use standard markdown with YAML frontmatter, viewable in Obsidian's graph view
  • Human-in-the-loop — Ingest processes one source at a time, pausing for your context and direction
  • Compiled knowledge — Cross-references, contradiction detection, and confidence tracking built into every page
  • Full lint suite — Six automated health checks catch orphans, stale claims, broken links, and more, with unambiguous fixes applied in batch and category-level chunking at scale
  • Nothing silently lost — Items noticed during ingest but not compiled into a page are logged to wiki/excluded.md and stay searchable; queries can fall back to the raw source on demand
  • Static site generator — Ships with a Python script that builds a browsable D3.js knowledge graph site from any wiki

Getting Started

Prerequisites

  • Claude Code installed and configured
  • Python 3 (for the static site generator)
  • Git (for version control of your wiki)
  • An MCP server providing read_pdf_content, only if ingesting PDF sources — other file types (markdown, text, images, code, data) have no external dependency beyond Python 3

Installation

git clone https://github.com/keithmackay/wikifyskill.git
cd wikifyskill
./scripts/install.sh

This copies:

  • src/wikify.md → ~/.claude/commands/wikify.md (the /wikify slash command)
  • src/skill/ → ~/.claude/skills/wikify/ (the autonomous skill + build-site.sh)

To install to a custom location:

WIKIFY_COMMANDS_DIR=~/.config/claude/commands WIKIFY_SKILLS_DIR=~/.config/claude/skills/wikify ./scripts/install.sh

Uninstall

./scripts/uninstall.sh

Installation

From the mackayi marketplace (recommended)

/plugin marketplace add keithmackay/mackayi
/plugin install wikify@mackayi

Claude Code

git clone https://github.com/keithmackay/wikifyskill.git
cd wikifyskill
./scripts/install.sh

This installs both the /wikify slash command and the autonomous skill. Invoke with /wikify.

Or install the skill only:

cp -r src/skill/ ~/.claude/skills/wikify/

Codex

Add the plugin to your marketplace config:

~/.agents/plugins/marketplace.json (create if absent):

{
  "name": "personal",
  "interface": { "displayName": "Personal Plugins" },
  "plugins": [
    {
      "name": "wikify",
      "source": { "source": "local", "path": "/path/to/wikifyskill/src/skill/" },
      "policy": { "installation": "AVAILABLE", "authentication": "ON_INSTALL" },
      "category": "Productivity"
    }
  ]
}

Antigravity

The root src/skill/SKILL.md is natively compatible with Antigravity (no platform-specific metadata to strip).

Global install (all workspaces):

cp -r src/skill/ ~/.gemini/antigravity/skills/wikify/

Workspace install (current project only):

cp -r src/skill/ .agents/skills/wikify/

Gemini CLI

Gemini CLI installs extensions directly from GitHub:

gemini extensions install https://github.com/keithmackay/wikifyskill

To update:

gemini extensions update wikify

The skill is auto-discovered from GEMINI.md after installation. Note: the repository must be publicly accessible on GitHub for gemini extensions install to work.

Compatibility

Feature Claude Code Codex Antigravity Gemini CLI
Core skill (Init, Ingest, Query, Lint, Learning Plan) ✅ ✅ ✅ ✅
Sub-documents (wikify-init.md, etc.) ✅ ✅ ✅ ✅
Scripts (scripts/build-site.sh) ✅ ✅ ✅ ✅
/wikify slash command ✅ ❌ ❌ ❌

Legend: ✅ Supported · ❌ Not supported

Note on the slash command: The /wikify slash command is a Claude Code-specific convenience that mirrors the skill. On Codex, Antigravity, and Gemini CLI, invoke the skill by name (e.g., "run wikify" or mention /wikify).

References

Usage

Initialize a new wiki

Navigate to any project directory and run:

/wikify

When no raw/ or wiki/ folder exists, wikifyskill scans for existing files in raw/ and proposes domain-appropriate categories. For a fiction corpus it might suggest characters, locations, factions; for a technical corpus, concepts, tools, apis. Confirm or provide your own list, and the full folder structure is created.

For corpora over 100 files, categories are proposed from a 5-file sample by default — wikifyskill will flag this and offer to sample more broadly (15-20 files) before you confirm. Category choices aren't refactored in place after Init; if you need a different structure later, delete wiki/ and re-run Init with updated categories against the same immutable raw/ folder — nothing is lost, and re-ingestion is fast.

project-root/
├── raw/                    # Layer 1: Your source material (read-only)
│   ├── articles/
│   ├── papers/
│   ├── repos/
│   ├── data/
│   ├── images/
│   └── assets/
├── wiki/                   # Layer 2: LLM-maintained knowledge base
│   ├── index.md            # Content catalog
│   ├── log.md              # Processing history
│   ├── overview.md         # High-level summary
│   ├── concepts/           # (or your chosen categories)
│   ├── entities/
│   ├── sources/
│   └── comparisons/
└── WIKI_SCHEMA.md          # Layer 3: Schema and conventions

Ingest sources

Drop files into raw/ (articles, PDFs, images, code, data files) and run:

/wikify

The skill detects unprocessed files and walks you through each one:

  1. Reads the source and presents key takeaways, identified entities, and identified concepts — plus an Excluded list of items noticed but not judged page-worthy, so you can promote any of them before they're dropped
  2. Asks for your context or direction before writing anything
  3. Creates or updates wiki pages with full cross-references
  4. Updates the index and processing log, and logs confirmed exclusions to wiki/excluded.md so they stay searchable instead of disappearing

Query the wiki

/wikify what's the relationship between X and Y?

Synthesizes an answer from your compiled wiki with inline citations. Flags knowledge gaps and suggests sources to fill them. Offers to save the answer as a new wiki page.

If a query touches something logged in wiki/excluded.md, wikifyskill offers to read the raw source directly instead of returning nothing — stating the tradeoff first (more time/tokens, no cross-referencing or confidence tracking) so you can decide whether an ad-hoc answer is worth it or whether the item should be promoted to a full page. For wikis with more than ~15 relevant pages, queries shortlist from index.md before reading full pages; for wikis over ~200 pages, answers are synthesized hierarchically (category summaries first, then a final pass) to stay within context.

Run a health check

/wikify lint

Runs six checks and presents a summary table:

Check What it catches
Contradictions Conflicting claims across pages
Orphan pages Pages with zero inbound links
Stale claims Raw files modified after their summary was written
Missing cross-references One-directional links that should be bidirectional
Stub detection Terms mentioned in 2+ pages but lacking their own page
Broken links References to files that no longer exist

Unambiguous missing cross-references (reciprocal related: links) are fixed in batch per category with a summary count; contradictions, stub creation, and other judgment calls stay one-at-a-time with your approval. On wikis over 50 pages, contradiction, cross-reference, and stub checks run one category at a time rather than across the whole wiki.

Generate a learning plan

/wikify learning_plan

Reads all wiki pages and produces wiki/learning_plan.md — a dependency-ordered reading guide organized into tiers from bedrock concepts to advanced and integrative topics. Rebuilds the static site automatically if one exists.

Supported file types

Type Extensions Method
Markdown/text .md, .txt, .html Direct read
PDF .pdf PDF MCP tool
Images .png, .jpg, .svg, .webp Vision
Code .py, .js, .ts, .rs, etc. Direct read
Data .csv, .json, .yaml Direct read
Repositories Directories in raw/repos/ README first, then key files

Build Static Website

Generate a browsable static site from your wiki with an interactive D3.js knowledge graph:

python3 ~/.claude/skills/wikify/scripts/build-site.sh wiki website

Or directly from this repo before installing (also works on Codex, Antigravity, and Gemini CLI):

python3 src/skill/scripts/build-site.sh wiki website

This creates a website/ folder with:

  • Landing page — Full-screen D3 force-directed graph with all wiki pages as nodes
  • Right-click panel — Right-click any node to preview the wiki entry in a slide-out panel without leaving the graph
  • Category pages — Two-column layout with expandable list items and a D3 bubble chart or timeline visualization
  • Individual pages — HTML version of each wiki entry with related page links

Node sizes scale across 7 tiers based on inbound link count. Edge thickness reflects connection strength (number of shared sources between connected pages). The site works when opened directly via file:// with no server required.

Development

git clone https://github.com/keithmackay/wikifyskill.git
cd wikifyskill
./tests/run_tests.sh

Tests are shell scripts using grep-based assertions to verify the skill file contains the correct instructions. Run a single test file:

./tests/run_tests.sh tests/test_skill_file.sh

The main skill file is src/wikify.md. After changes, reinstall with ./scripts/install.sh.

See docs/TESTING_GUIDELINES.md for guidance on writing new tests.

Contributing

Contributions are welcome — fork the repo, create a branch, and open a PR. See CONTRIBUTING.md for the full development workflow, PR process, and code style conventions.

Changelog

See CHANGELOG.md for release history.

License

MIT

About

Claude/Codex/Gemini skill: builds/updates a knowledge wiki (augmented Karpathy pattern) plus website, knowledge graph, and learning plan

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages