🪨 why use many token when few token do trick — Claude Code skill that cuts 65% of tokens by talking like caveman
CLI for learning commands and skills in coding assistants
Learn Anything generates tool-specific skill and command files for 30+ assistants, including Claude Code, Cursor, Codex, Gemini CLI, Copilot, and Windsurf. It creates learning topics, recursive explanations, TDD-style exercises, quizzes, and spaced repetition data, then lets you browse it in a web dashboard.
Builders who want their coding assistant to teach, quiz, and review topics while they build.
You can learn a topic inside your assistant instead of switching to separate lessons or notes.
What it does
Tool-specific command generation
Creates skill and command files for many assistants, using formats each tool expects.
Recursive learning flow
Lets you start a topic, drill deeper on demand, and follow a knowledge map you can choose from.
TDD-style practice
Generates coding exercises with structured feedback and starter and solution material.
Quizzes and spaced repetition
Saves question decks, grades quick quizzes, and brings weak spots back for review.
Visual learning dashboard
Ships a web UI for knowledge maps, session notes, exercise results, and theme switching.
Context7 docs checking
Can fetch official documentation during setup or update to cross-check explanations.
How to get it
- 1Start a zero-config web dashboard to browse your learning data
# Start the visual dashboard (no npm install needed) npx learn-anything-cli serve # Custom port npx learn-anything-cli serve --port 8080 # Disable auto-open browser npx learn-anything-cli serve --no-open
- 2Run
git clone https://github.com/ChenChenyaqi/learn-anything.git cd learn-anything pnpm install
README
Learn Anything
AI-Powered Recursive Learning System
Turn your AI coding assistant into an interactive tutor — Socratic method & TDD-style exercises.
Now with a built-in visual learning dashboard.
What is Learn Anything?
Learn Anything generates skill and command files for 30+ AI coding tools — Claude Code, Cursor, Codex, OpenCode, and more. Once generated, your AI assistant gains six slash commands that guide you through systematically mastering any technical topic:
- 🧭 Choose your own path — AI generates a knowledge map; you decide what to learn next
- 🎓 Recursive learning method — Recursive explanations that follow your curiosity as deep as you want
- 🧪 TDD-style practice — Write real code with structured feedback, from beginner to challenge
- 📝 Adaptive quizzes — Quick text Q&A quizzes, graded and saved as reusable question decks
- 📊 Spaced repetition — Smart review that surfaces weak spots when you need them most
- 🔥 Knowledge visualization — Heatmap showing exactly where you stand
- 🖥️ Visual Dashboard — Browse knowledge maps, session notes, and exercises in a rich web interface
Quick Start
# Interactive mode — auto-detects your AI tools and prompts you to choose
npx learn-anything-cli init
# Target specific tools
npx learn-anything-cli init --tools claude
# Or install globally
pnpm add -g learn-anything-cli # npm install -g learn-anything-cli
learn-anything init
Context7 Integration (optional)
During init or update, you'll be prompted to enable Context7 for documentation verification. When enabled, the AI fetches official docs and cross-references its explanations against authoritative sources — dramatically improving teaching accuracy.
Setup: Run
npx ctx7 setupor visit the Context7 docs for your AI tool.
After Init — Six Learning Commands
| Command | What it does |
|---|---|
/learn:topic <name> | Initialize a topic, generate a knowledge map, track progress |
/learn:explain <name> | Recursive learning method — go as deep as you want |
/learn:practice <name> | TDD-style coding exercises with structured feedback |
/learn:review [name] | Spaced repetition review with personalized next-step plan |
/learn:status [name] | Knowledge map heatmap — mastery, practice counts, confidence |
/learn:quiz <name> | Quick text Q&A quiz — graded and saved for re-practice |
Visual Learning Dashboard
Start a zero-config web dashboard to browse your learning data:
# Start the visual dashboard (no npm install needed)
npx learn-anything-cli serve
# Custom port
npx learn-anything-cli serve --port 8080
# Disable auto-open browser
npx learn-anything-cli serve --no-open
The dashboard is pre-built and shipped with the CLI — no extra dependencies or
npm installrequired. If you installed globally, you can uselearn-anything serveinstead.
The dashboard provides:
- Knowledge Map — Markdown-rendered overview of your learning topic
- Session Notes — Browse and read all learning session notes organized by domain
- Exercise Viewer — View starter code, solutions, and practice results with syntax highlighting
- Dark Mode — Light/dark theme toggle
- i18n — Full English and Chinese interface
- Hot Reload — Auto-refresh when you add or modify topic files
How It Works
Your Project/
├── .claude/
│ ├── commands/learn/ # Slash commands for Claude
│ └── skills/ # Skill files with full workflow instructions
├── .cursor/commands/ # Cursor-specific command format
├── .gemini/commands/learn/ # Gemini TOML-format commands
├── .codex/prompts/ # Codex prompt files
│ ... # (30+ other tool formats)
│
├── .learn/ # 🧠 Your learning data lives here
│ └── topics/
│ └── typescript/
│ ├── state.json # Single source of truth
│ ├── knowledge-map.md # Auto-rendered from state.json
│ ├── sessions/ # Session history for spaced repetition
│ ├── exercises/ # TDD-style coding exercises
│ └── quizzes/ # Reusable text Q&A question decks
└── ...
Each AI tool receives tool-appropriate file formats via an adapter pattern — YAML frontmatter for Claude, TOML for Gemini, Markdown for Cursor, etc.
Monorepo Structure
learn-anything/
├── packages/
│ ├── cli/ # learn-anything-cli — published to npm
│ │ ├── site/ # Dashboard source (Vue 3 + Vite)
│ │ ├── scripts/ # Build scripts (bundle-site.mjs)
│ │ ├── src/
│ │ │ ├── cli/ # Commander.js CLI entry point
│ │ │ ├── core/ # init, config, command generation, templates
│ │ │ ├── i18n/ # en + zh-CN locales
│ │ │ └── utils/ # Filesystem, interactive helpers
│ │ ├── bin/ # learn-anything binary
│ │ └── package.json
│ └── gui/ # learn-anything-gui — coming soon 🚧
│ └── README.md
├── pnpm-workspace.yaml # pnpm workspace config
├── tsconfig.base.json # Shared compiler options
├── package.json # Workspace root (private)
└── pnpm-lock.yaml
| Package | npm | Description |
|---|---|---|
learn-anything-cli | CLI tool — generate skill/command files for 30+ AI tools | |
learn-anything-gui | private | Graphical desktop interface (in development) |
Supported AI Tools
Manage, Amazon Q Developer, Antigravity, Auggie, Bob Shell, Claude Code, Cline, Codex, ForgeCode, CodeBuddy Code, Continue, CoStrict, Crush, Cursor, Factory Droid, Gemini CLI, GitHub Copilot, iFlow, Junie, Kilo Code, Kiro, OpenCode, Pi, Qoder, Lingma, Qwen Code, RooCode, Trae, Windsurf, and AGENTS.md-compatible assistants.
# Update existing skill files to the latest version (auto-detects installed tools)
npx learn-anything-cli update
Development
Prerequisites
- Node.js ≥ 20
- pnpm ≥ 9
Setup
git clone https://github.com/ChenChenyaqi/learn-anything.git
cd learn-anything
pnpm install
Commands
| Command | Description |
|---|---|
pnpm build | Build all packages (tsc) |
pnpm test | Run all tests (vitest run) |
pnpm test:watch | Run tests in watch mode |
pnpm dev | TypeScript watch mode (all packages) |
pnpm lint | Lint all packages (eslint) |
pnpm format | Format code (prettier) |
pnpm dev:site | Dev server for the visual dashboard |
Per-Package Commands
pnpm -F learn-anything-cli build # Build only CLI
pnpm -F learn-anything-cli test # Test only CLI
pnpm -F learn-anything-cli dev:cli # Build and run CLI locally
Star History
License
Built with ❤️ for curious minds · GitHub · Contributing · Changelog
Files in the repo
- .github
- .husky
- openspec
- packages
- scripts
- .gitignore
- .prettierignore
- .prettierrc
- AGENTS.md
- CHANGELOG.md
- CLAUDE.md
- commitlint.config.js
- CONTRIBUTING.md
- eslint.config.mjs
- LICENSE
- logo.png
- package.json
- pnpm-lock.yaml
- pnpm-workspace.yaml
- README.md
- README.zh-CN.md
- tsconfig.base.json
Discussion (0)
Ask about usage, or say what you built with itSign in to join the discussion.
No comments yet. Be the first to say what this is good for.
More tools
The best-benchmarked open-source AI memory system. And it's free.
Orca is the ADE for working with a fleet of parallel agents. Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io
Never stop coding. Free MIT AI gateway: one endpoint, 352 providers (150+ free), 1200+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 550+ contributors
Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.