/chitta:learnfrom chitta
Fetches web sources, tutorials, and docs to generate SKILL.md files and store patterns in soul memory. Invoke with /learn for topics, URLs, or GitHub repos.
Ships in chitta. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
[learn] topic|url|repo→discover→fetch→synthesize→SKILL.md+soul
pipeline:
1. recall: existing knowledge from soul
2. classify: topic|url|github-repo|npm-pkg|pypi-pkg
3. discover: WebSearch→candidate sources (if topic)
4. fetch: API-first→WebFetch fallback→normalize
5. synthesize: merge sources→SKILL.md with version pin
6. persist: SKILL.md + triangulated patterns→soul memory
triangulation: promote to memory only if 2+ sources OR 1 canonical
provenance: source, version, retrieved_at, confidence
output: skills/<topic>/SKILL.md + [SOLUTION]/[GOTCHA]/[PATTERN] markers
--global: ~/.claude/skills/<topic>/SKILL.md
--url: skip discovery, fetch directly
--repo: API-first via gh CLI
/learn <topic> # Search web, create project-local skill
/learn <topic> --global # Save to ~/.claude/skills/
/learn <url> # Learn from specific URL
/learn <owner/repo> # Learn from GitHub repository
/learn <topic> --depth shallow # Quick overview only
/learn <topic> --depth deep # Comprehensive with examples
Before any web activity, check what the soul already knows.
chitta recall --query "<topic>" --limit 10
If soul has relevant memories (< 30 days old), ask:
Soul has N memories about <topic>. Refresh from web? (y/N)
| Pattern | Type | Action |
|---|---|---|
https://... or http://... | URL | Skip to Stage 4 (fetch) |
owner/repo (no dots) | GitHub repo | API-first via gh CLI |
github.com/owner/repo | GitHub URL | Extract owner/repo, use gh |
@scope/package | npm package | npm view + registry API |
| Known PyPI name | PyPI package | pip show + PyPI JSON API |
| Everything else | Topic | WebSearch discovery |
Run targeted web searches:
WebSearch: "<topic> documentation guide"
WebSearch: "<topic> tutorial best practices"
WebSearch: "<topic> API reference examples"
Rank sources by quality:
Select top 3-5 sources with diversity.
API-first ingestion (preferred):
For GitHub repos:
gh api repos/<owner>/<repo> --jq '{name, description, language, topics}'
gh api repos/<owner>/<repo>/readme --jq '.content' | base64 -d
gh api repos/<owner>/<repo>/releases/latest --jq '{tag_name, published_at}'
For npm packages:
npm view <package> name version description homepage --json
For PyPI packages:
pip show <package>
# Or: WebFetch "https://pypi.org/pypi/<package>/json"
WebFetch for HTML (fallback):
WebFetch(url, prompt="Extract: 1) What this does, 2) Key concepts,
3) Installation, 4) Core API with examples, 5) Gotchas, 6) Version info")
JS-rendered docs: WebFetch cannot execute JavaScript. If minimal content returned:
[GOTCHA] <url> appears JS-rendered, content may be incomplete.
Falling back to: GitHub README, API endpoints, or package registry.
Generate SKILL.md with required sections:
---
name: <topic>
description: <one-line description>
version: <detected version or "unknown">
retrieved_at: <YYYY-MM-DD>
sources:
- <url1>
- <url2>
---
# <Topic>
## Overview
What it is, what problem it solves, when to use it.
## Installation / Setup
Version-pinned commands (npm install [email protected], pip install x==1.2.3).
## Core Concepts
Key abstractions, terminology, mental model.
## Usage Patterns
Code examples for common operations. At least 2 examples.
## API Quick Reference
Key functions/methods with signatures.
## Gotchas and Caveats
Non-obvious behavior. Common mistakes.
## Version Notes
Version this was written for. Breaking changes.
Conflict handling: If new sources contradict soul memories:
[DECISION] <topic>: Web says X, soul says Y. Adopting X because <reason>.
[GOTCHA] <topic>: Previous approach Z no longer recommended as of vN.
Write SKILL.md:
# Default (project-local)
mkdir -p ./skills/<topic>/
# Write to ./skills/<topic>/SKILL.md
# With --global
mkdir -p ~/.claude/skills/<topic>/
# Write to ~/.claude/skills/<topic>/SKILL.md
Store patterns in soul (triangulation required):
Only promote patterns confirmed by 2+ sources or 1 canonical source:
chitta remember --content "[<topic>:sol] <pattern>"
chitta remember --content "[<topic>:gotcha] <gotcha>"
chitta remember --content "[<topic>:pat] <usage pattern>"
Emit markers for stop-hook:
[SOLUTION] <topic>: <key approach>
[GOTCHA] <topic>: <trap or caveat>
[PATTERN] <topic>: <recurring pattern>
| Check | Required | If Missing |
|---|---|---|
| Frontmatter (name, description) | Yes | Add from synthesis |
| At least 1 code example | Yes | Fetch more examples |
| Gotchas section | Yes | Add "[none discovered]" |
| Version-pinned installs | Yes | Pin to latest |
| Sources in frontmatter | Yes | Add all URLs |
| retrieved_at date | Yes | Add current date |
## Learn: <Topic>
### Sources Consulted
1. [Official Docs](<url>) - canonical
2. [Tutorial](<url>) - authoritative
### Generated
SKILL.md written to: `<path>`
- Sections: N
- Code examples: N
- Version: <version>
### Stored to Soul
- [SOLUTION] N patterns
- [GOTCHA] N warnings
- Triangulation: N/M patterns confirmed by 2+ sources
/learn duckdb
[Recalling existing knowledge...]
Soul has 2 memories about duckdb.
[Discovering sources...]
1. https://duckdb.org/docs/ (canonical)
2. https://duckdb.org/docs/api/python (canonical)
3. https://motherduck.com/blog/duckdb-tutorial (authoritative)
[Synthesizing SKILL.md...]
SKILL.md written to: ./skills/duckdb/SKILL.md
- Sections: 7, Examples: 5, Version: 1.1.3
[SOLUTION] duckdb: in-memory OLAP, pandas integration via .df()
[GOTCHA] duckdb: default memory limit is 80% RAM
/learn duckdb/duckdb
[Fetching via GitHub API...]
repos/duckdb/duckdb → metadata
repos/duckdb/duckdb/readme → README
repos/duckdb/duckdb/releases/latest → v1.1.3
SKILL.md written to: ./skills/duckdb/SKILL.md
/learn https://docs.pydantic.dev/latest/
[Fetching URL directly...]
[Supplementing with WebSearch for triangulation...]
SKILL.md written to: ./skills/pydantic/SKILL.md
/learn fastapi --global
SKILL.md written to: ~/.claude/skills/fastapi/SKILL.md
Available across all projects.
| Error | Recovery |
|---|---|
| WebSearch no results | Broader query, check spelling |
| WebFetch empty/JS-rendered | GitHub README, API, registry |
| All sources fail | Report, suggest manual URL |
| Recent SKILL.md exists | Ask before overwriting |
| GitHub rate limited | WebFetch fallback |
latest or unpinned versions in install commands| Tool | Stage | Purpose |
|---|---|---|
recall | 1 | Check existing knowledge |
remember | 6 | Store confirmed patterns |
learn_insight | 6 | Promote cross-project patterns |
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub genomewalker/chitta --plugin chitta2 plugins ship this exact skill · first indexed Jun 2, 2026
31 skills in this plugin
/cc-soul-setup