
self-learning
/learn <topic>: researches a technology from its official docs, checks facts across sources, and writes a reusable skill (install, examples, pitfalls). /update-skill refreshes one; /list-skills shows them.
- GitHub stars
- 5
Add marketplace
/plugin marketplace add ychampion/ystackRun it inside Claude Code once, then install the plugin below.
Install
/plugin install self-learning@ystackRun it inside Claude Code after adding the marketplace.
Files
Discovered from sourceSelf-Learning Skill
Teach Claude about any new technology and create a permanent, reusable skill from the research.
Invocation
Trigger with:
/learn <topic>- e.g.,/learn anthropic api- "Create a skill for "
- "Teach yourself about "
- "Learn and save it as a skill"
Process
Step 1: Clarify Scope
Before researching, clarify ambiguous topics:
If topic is broad (e.g., "react", "aws"): Ask: "What aspect of should I focus on? For example:
- API/SDK usage
- Specific feature (e.g., hooks, lambda)
- Integration with another tool
- Or comprehensive overview?"
If topic is specific (e.g., "stripe webhooks", "prisma migrations"): Proceed directly to research.
Step 2: Discover Authoritative Sources
Use web search to find authoritative sources with targeted queries:
- Search:
official <topic> documentation site - Search:
<topic> quickstart guide getting started - Search:
<topic> API reference examples
Source prioritization:
- Official documentation (docs.*, *.dev, official GitHub)
- Official blog posts / announcements
- Reputable tutorials (MDN, Real Python, official guides)
- Avoid: Medium, dev.to, Stack Overflow (for primary sources)
Step 3: Extract Content from Top Sources
Fetch and extract content from the top 3-5 URLs found.
Extract these sections from each source:
- Installation / Setup
- Authentication / API keys
- Core concepts / Models / Endpoints
- Basic usage examples (Python, TypeScript)
- Advanced features (streaming, tools, etc.)
- Error handling patterns
- Best practices / Common pitfalls
- Pricing / Limits (if applicable)
Step 4: Verify and Cross-Reference
Before including any fact:
- Confirm it appears in 2+ sources OR is from official docs
- Check the publication/update date
- Note any version-specific information
- Flag anything that seems outdated or conflicting
If conflicts found: Prioritize official docs, note the discrepancy in the skill.
Step 5: Interactive Refinement (Key Differentiator)
After initial research, ask the user:
"I've researched . Here's what I found:
- Installation: [summary]
- Key features: [list]
- Code examples available for: [languages]
Should I:
- Proceed with generating the skill as-is
- Deep-dive into a specific feature
- Add examples for additional languages
- Focus on a particular use case"
This ensures the generated skill matches user needs.
Step 6: Generate the Skill
Create a complete SKILL.md using this structure:
---
name: <slugified-topic>
description: <One clear sentence about what this technology does and when to use it>
version: 1.0.0
sources_verified: <YYYY-MM-DD>
---
# <Topic Name>
<2-3 sentence overview of what this is and its primary use case>
## Quick Reference
| Item | Value |
|------|-------|
| Official Docs | <URL> |
| Installation | `pip install X` / `npm install X` |
| Auth Required | Yes/No - <how to get keys> |
| Primary Use | <main use case> |
## Installation
### Python
```bash
pip install <package>
JavaScript/TypeScript
npm install <package>
# or
bun add <package>
Authentication
<How to set up API keys, environment variables, etc.>
import os
# Recommended: Use environment variables
api_key = os.environ.get("<ENV_VAR_NAME>")
Basic Usage
Python
# <Clear comment explaining what this does>
from <package> import <Client>
client = <Client>(api_key="your-key")
try:
response = client.<method>(<params>)
print(response)
except <SpecificError> as e:
print(f"Error: {e}")
TypeScript
import { <Client> } from '<package>';
const client = new <Client>({ apiKey: process.env.<ENV_VAR> });
const response = await client.<method>(<params>);
console.log(response);
Key Capabilities
<Capability 1>
<Capability 2>
Best Practices
- :
- :
- :
Common Errors
| Error | Cause | Fix |
|---|---|---|
Additional Resources
Skill generated by claude-self-learning on Sources verified:
### Step 7: Save the Skill
After generating, offer storage options:
"Skill generated! Where should I save it?
1. **Project-local**: `.claude/skills/<topic>/SKILL.md` (this project only; commit it to share with the team)
2. **User-global**: `~/.claude/skills/<topic>/SKILL.md` (all projects)
3. **GitHub Gist**: Create a public gist for sharing"
Then create the file in the chosen location.
### Step 8: Versioning (Future Updates)
When saving, also create a `.meta.json`:
```json
{
"created": "<ISO date>",
"updated": "<ISO date>",
"sources": ["url1", "url2"],
"topic": "<original query>",
"version": "1.0.0"
}
This enables future /update-skill <topic> to refresh the skill.
Tool Requirements
This skill requires:
- Web search capability
- Web page fetching capability
- File system access (Write tool)
- Optional: GitHub CLI for gist creation
Examples
Example 1: Learn about Anthropic API
User: /learn anthropic api
Claude: I'll research the Anthropic API. Let me find the official documentation...
[Searches, extracts, generates skill]
Example 2: Learn about a specific feature
User: /learn stripe webhooks
Claude: I'll focus on Stripe Webhooks specifically...
[Targeted research, focused skill]
Example 3: Broad topic with clarification
User: /learn kubernetes
Claude: Kubernetes is a broad topic. What aspect should I focus on?
- Basic concepts and architecture
- Deployment and kubectl usage
- Helm charts
- Specific resource types (pods, services, etc.)
User: Focus on basic kubectl usage
Claude: Got it, focusing on kubectl fundamentals...
Notes
- Keep generated skills between 2,000-4,000 tokens
- Prioritize Python and TypeScript examples
- Include error handling in all code examples
- Verify all facts against official sources
- Include the verification date in every generated skill
From the ychampion/ystack README
ystack
ystack is a collection of mods, skills, and setup tools for Claude Code, Codex, OpenCode, Antigravity and Devin. It is for developers who run coding agents for long sessions and want checks on their work and usage.
On one heavy user's logs, it cut usage about 78% per hour of work and 39% per API call. How that was measured.
Early version (0.1). It works and is used daily, but expect frequent changes: broader host support, more mods and new skill packs are on the way. Issues and requests are welcome. Changelog.
Install for Claude Code: everything, one line
At the prompt of a Claude Code terminal session:
/plugin install ystack --marketplace ychampion/ystack
Or from a shell:
claude plugin install ystack --marketplace ychampion/ystack
This adds the ystack marketplace and installs all 37 mods plus the self-learning plugin. Restart Claude Code (or run /reload-plugins) to load them. Don't want one of them? claude plugin uninstall <mod> removes just that one. Mods with settings show a settings screen during install; change them later in /config.
Some mods act on their own from the start. For example, context-meter swaps a very long conversation for a short handoff note, keep-going sends Claude back to work when it offers to continue, and push-guard refuses risky pushes. Before installing everything, read what changes when you install everything, which also says how to turn each one off.
Then run /ystack-stats to see what ystack would have saved on your last two weeks of logs, and /ystack-setup to walk through the recommended settings. Nothing changes until you Apply.
In the Claude desktop app's Code tab, /plugin does not run: click + next to the prompt box, then Plugins, Add marketplace with ychampion/ystack, then Add plugin. A mod installed from a terminal at user scope also loads in the desktop app's local Code sessions. Mods run inside Claude Code; they don't run in claude.ai chat, and cloud sessions need their own installation.
Or pick the mods you want
/plugin install <mod> --marketplace ychampion/ystack
| Group | Mods |
|---|---|
| Start here | ystack-stats (your savings, from your own logs) · ystack-setup (recommended settings, one click each) · model-checkup (suggests /doctor prompt-audit on a model you haven't used before) |
| Guards | push-guard (keys in pushes, repos made public, force-pushes) · verify (no "done" without a real check) · package-bouncer (hallucinated or brand-new packages) · vault (API keys Claude uses but never sees) · iron-rules (your house rules on shell calls; off until you turn them on) · slop-guard (AI-made design tells) · codex-ladder (Codex effort ladder) |
| Delegation | model-router (right model and effort per subagent) · decision-inbox (agents keep going while your decisions wait) · brief-linter (complete subagent briefs) · assumptions-ledger (checks what subagents assumed) · spec-sharpener (pointed questions before big builds) · review-panel (parallel specialist review) |
| Long sessions | context-meter (handoffs and compaction at the right time) · session-board (every session on one board) · session-recovery (reopen sessions after a crash or restart) · night-shift (unattended task queue) · loop-breaker (stops going in circles) · lanes (several sessions, one repo) · pin (rules that survive compaction) · keep-going (no needless "want me to continue?") |
| Cost | prompt-diet (what every turn sends) · output-diet (shorter build and test output) · transcript-compress (frees disk space by compressing old transcripts, losslessly) |
| Look | living-themes (animated desktop-app backdrops that react to Claude, the time and the season; winter-cabin also shows context fill and cache time) · image-theme (any picture you choose becomes your background, with theme colours taken from it) |
| For the owner | owner-view (plain-English captions, /brief-me) · user-voice (what users said, on feature requests) · operator-context (your profile as facts) · twins (copies that fall behind) · weekly-digest (your week per repo) |
| Learning | code-threads (/why <file:line>: the Claude conversation that wrote that code, what was asked and why) · self-learning (/learn <topic>: researches a technology's docs and writes a reusable skill) · memory-recall (past fixes on a failing tool call) · auto-claudeception (saves what a debugging session learned) |
Each mod is independent. What each one does, with its settings: claude/README.md.
Update
ystack updates itself. With the ystack-setup mod installed (it comes with the bundle and the starter set), every Claude Code start and every /reload-plugins checks for a newer ystack in the background:
- it pulls your checkout when the remote has something newer (fast-forward only; never over local changes, which it tells you about instead);
- it re-runs setup for every agent that already has ystack skills (Claude Code, Codex, OpenCode, Antigravity, Devin), so their copies follow too;
- it updates the installed ystack mods whose version changed.
One line tells you what changed; restart or /reload-plugins to load updated mods. /ystack-setup update runs it now. To turn it off, set the mod's autoUpdate option to off (/plugin, ystack-setup, Configure).
Or update by hand:
claude plugin marketplace update ystack
claude plugin update <mod>@ystack
To update every installed ystack mod at once (bash):
claude plugin marketplace update ystack && for m in $(claude plugin list | grep -o '[a-z0-9-]*@ystack'); do claude plugin update "$m"; done
Restart Claude Code after an update to load the new versions.
Headless: claude -p and harnesses
ystack works when Claude Code runs headless: claude -p, the Agent SDK, and apps built on them such as T3 Code. Install it the same way; the harness runs the same Claude Code, so it loads the same mods and skills.
Headless, the guards and rewrites work as usual (push-guard, verify, package-bouncer, iron-rules, model-router and the rest). What needs a person is skipped: panes and the prompt box don't exist, toasts and status lines arrive as ui_toast and ui_status events the harness can show or ignore, and no mod starts a turn of its own. context-meter doesn't hand off or compact by itself there, since an unasked turn would show up in the harness's chat; Claude Code's own auto-compaction still runs. Commands you type, such as /review-panel or /queue, work as they do in a terminal.
Skills for Claude Code, Codex, OpenCode, Antigravity and Devin
git clone https://github.com/ychampion/ystack.git ~/ystack && ~/ystack/setup
Setup installs every skill in skills/ for each agent you have (Claude Code, Codex, OpenCode, Antigravity, Devin). For Antigravity it also installs the ystack-guards plugin into ~/.gemini/config/plugins; quit the Antigravity app before updating or removing it, because the app keeps the folder open. For Devin (Devin Desktop and the devin CLI) it installs the same guards as a Devin plugin and registers it with devin plugins install --local, which needs the CLI logged in once (devin auth login); Desktop picks it up in its next session. Run it again to update them. Machine-specific values, including your git identity, thresholds, and paths, are settings you fill in at install.
On macOS and Linux, skills are symlinks into the checkout, so git pull updates them. On Windows (Git Bash), they are copies: re-run ./setup after each pull, or use /ystack-upgrade.
| Flag | Does |
|---|---|
--host claude,codex,opencode,antigravity,devin | Pick hosts (default: every host found on this machine; all for all five; agy is short for antigravity) |
--agents | Also install the opus-medium, opus-high, and haiku-max subagent types into ~/.claude/agents |
--mods | Print the commands that add the marketplace and a starter set of mods; add --yes to run them |
--dry-run | Show what would change without changing anything |
--uninstall | Remove only what ystack installed |
Setup skips any skill or agent file that is yours, including a ystack skill you have edited, and tells you it skipped it. Use --force to replace it after moving your version to ~/.ystack-backup/. If any step fails, setup names it and exits 1.
The starter mods are ystack-stats, ystack-setup, context-meter, verify, push-guard, and model-router.
After setup:
- Copy or merge
claude/CLAUDE.starter.mdinto~/.claude/CLAUDE.md. It holds the working rules and names the mod that enforces each one. Setup doesn't install it. - Start each
codex execbrief fromcodex/briefs/brief-template.md.
Later, /ystack-upgrade pulls, re-runs setup for the same hosts, and updates installed mods.
What's included
| Folder | For | Status |
|---|---|---|
claude/ | Claude Code | 37 mods, three subagent types, a starter CLAUDE.md, and measured write-ups in claude/docs/ |
skills/ | Claude Code, Codex, OpenCode, Antigravity (Gemini models, in the app and the agy CLI), Devin (Devin Desktop and the devin CLI), and other agents that read skills | 51 skills: engineering workflow (blast-radius, interrogate, arena, recall, debug-loop, flaky-test, perf-loop, secure-diff, migration-plan and more), planning and agent-writing (grill, agent-writing, eval-judge), ideas from live evidence (idea-scout), 18 picked from other open collections (tdd, wayfinder, prototype, migrate-to-rust…), design (taste), screenshots, film and sound, agent-ops fixes, founder work (discovery, sales, weekly review, YC) |
antigravity/ | Antigravity (the app and the agy CLI) | ystack-guards, a plugin with three guards as Antigravity hooks: push-guard (no keys in a push, no repo made public, no force-push to main), package-bouncer (no made-up or brand-new packages) and verify (no "done" without a check). ./setup installs it with the skills |
devin/ | Devin (Devin Desktop and the devin CLI) | ystack-guards as a Devin plugin: the same three guards, as Devin hooks. ./setup --host devin installs it with the skills and registers it with Devin |
codex/ | Codex CLI | A brief template for unattended codex exec runs; pairs with the codex-ladder mod |
ops/ | Any Linux server | security-sweep: a weekly scan of OS packages, repos, and containers that installs only restart-free security patches and reports the rest |
Most agent stacks provide skills: written advice the model may or may not follow. ystack also has mods, which use hooks on tool calls, prompts, and subagent turns. Rules such as requiring a real check before reporting work done and checking for keys in pushed commits run as code every time, whether the model remembers them or not.
Guards cover keys pushed to a remote, private repos made public, force-pushes over main, and hallucinated packages installed. Decisions that need your input go to an inbox while the agent continues with its recommended default. The same skills work across Claude Code, Codex, OpenCode, Antigravity and Devin; Codex also gets a brief template and an effort ladder.
What the logs show
These figures come from one heavy user's logs. The long-session write-up distinguishes measurements from replays and covers handoff versus compaction.
Across about 248,000 real API calls from September to November, usage per active hour fell from 38.4M to 8.3M input-token equivalents as the rules and mods went in, and median context per call halved from 375k to 189k. That is about 78% less per active hour and about 39% less per API call. The hourly figure also reflects fewer agents running at once, and only 37 hours of the earliest logs survive. Treat 78% as the upper end and 39% per call as the firm floor. See the full table.
Subagents accounted for 73% of usage, and six sessions running for days near the compaction limit accounted for 91%. The mods' own prompt text was 0.3%.
Replaying those 14 days with handoffs at 252k and subagents compacting at 250k reduced usage from 1.90B to 1.61B input-token equivalents, a saving of about 15%. context-meter does this by itself between turns, without /clear: it hands off at the end of a phase, and when you step away it compacts if work is half done or hands off if it isn't.
Agent-team idle pings accounted for 32% of one 9-day session. High-effort subagents accounted for 59% of one day, mostly on work medium effort handles. /ystack-setup offers fixes for both settings; model-router enforces them per task.
On one mod, an independent review found three bugs that 12 passing tests missed. Any of the three could lose a conversation. The review loop is documented, and the mods enforce parts of it.
You can also use claude/tools/usage-report.py to get the same usage numbers from your own logs:
python claude/tools/usage-report.py --days 14
License
MIT. See LICENSE. Skills adapted from other authors (cinematic-shot, clean-ui-shot, earshot, real-sound, taste-skill) keep their own MIT licence and credits in their folders.
Details
- Marketplace
- ychampion/ystack
- Source
- claude/plugins/self-learning
- Category
- Community
More from ychampion/ystack
All 39Similar to self-learning
More Documentation & Learning
academy-guideanthropics/skills196.9K starsRecommends relevant Claude Academy courses, tutorials, and use cases when users ask how to use Claude
explanatory-output-styleanthropics/claude-code156.1K starsAdds educational insights about implementation choices and codebase patterns (mimics the deprecated Explanatory output style)
ruflo-docsruvnet/ruflo82.2K starsDocumentation generation, drift detection, and API docs automation
context7upstash/context765K starsUp-to-date documentation lookup. Pull version-specific documentation and code examples directly from source repositories into your coding agent's context.
googledocs-automationComposioHQ/awesome-claude-skills51.5K starsAutomate Google Docs tasks via Rube MCP (Composio): create, edit, search, export, copy, and update documents. Always search tools first for current schemas.
amazon-location-serviceanthropics/claude-plugins-official47.9K starsGuide developers through adding maps, places search, geocoding, routing, and other geospatial features with Amazon Location Service, including authentication se