Skip to main content
skill CX Codex

self-learning · philschmid — Claude Code skill: learn new tech from the web

This skill searches the web for docs on an unfamiliar library and turns them into a reusable skill with instructions and examples.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add philschmid/self-learning-skill --skill self-learning -a claude-code
Open on GitHub

What self-learning does

Run /learn <topic> and it works on its own: it clarifies vague topics, finds official documentation, reads 3–5 pages, then synthesizes a new skill. The topic is normalized to kebab-case, which becomes the skill folder name.

Four steps sit inside. Web search with queries like official documentation, getting started guide, API reference and the GitHub repository. URL reading of the selected pages. Generation of SKILL.md with YAML frontmatter. Saving to .agent/skills/<skill-folder>/ or to the global ~/.gemini/antigravity/skills/<skill-folder>/. JavaScript-heavy sites fall back to a browser subagent, and if discovery turns up nothing credible the skill asks you for a URL.

The hard rule: it never invents APIs. When the docs are unclear it asks you instead of guessing, so thinly documented libraries will stall — have your links ready before you start. It warns you before overwriting an existing skill.

What it helps with

  • build a skill for a library the agent has never seen
  • find official docs instead of third-party tutorials
  • pull install steps, key functions and examples out of documentation
  • save a researched technology as a reusable skill
  • narrow a vague topic like react or aws down to a specific library

Example prompts for the agent

  • /learn react-query
  • /learn DynamoDB
  • /learn how to use apollo federation

How to install self-learning

1Skills CLI (Vercel)

npx skills add philschmid/self-learning-skill --skill self-learning -a claude-code

2Manually: put the files in place

~/.claude/skills/self-learning/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/self-learning/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about self-learning

How do I install self-learning in Claude?

Run npx skills add philschmid/self-learning-skill --skill self-learning -a claude-code. The skill lands in ~/.claude/skills/self-learning/SKILL.md.

What does self-learning do?

It searches the web for documentation on a given topic, reads the selected pages and synthesizes a new skill with instructions and examples.

What does the skill need to work?

Access to web search and URL reading. If automated discovery finds no sources, the skill asks you for links.

Source text

SKILL.md · Apache-2.0
---
name: self-learning
description: "Autonomous skill generator that learns new technologies from the web. Use when, users want to learn about a new library/framework/tool, need to create a skill for an unfamiliar technology, want to research and document a technology's usage patterns, or invoke with `/learn <topic>`. This skill uses web search and browser tools to discover, extract, and synthesize documentation into a reusable skill."
---

# Self-Learning Skill Generator

Autonomously research and learn new technologies from the web, then generate a reusable skill.

## Usage

```
/learn <topic>
```

If `<topic>` is missing, show usage. If topic is ambiguous, ask to clarify:

- "react" → "React for web, React Native, or a specific library like react-query?"
- "apollo" → "Apollo GraphQL client, Apollo Server, or Apollo Federation?"
- "aws" → "Which AWS service? (S3, Lambda, DynamoDB, etc.)"

Normalize to **kebab-case** for filenames.

### 2. Discover Sources (Web Search)

Use web search tool to find authoritative documentation:

**Search queries to try:**
1. `<topic> official documentation`
2. `<topic> getting started guide`
3. `<topic> API reference`
4. `<topic> GitHub repository`

**Source prioritization:**
1. Official docs sites (e.g., docs.*, *.dev)
2. Official GitHub repositories (README, /docs)
3. Official blogs/announcements

Select **3–5 high-quality URLs** maximum.

If no credible sources found, ask user to provide a URL.

---

### 3. Extract Content (URL Reading)

For each selected URL, read the content:

**Extract only relevant sections:**
- Installation / setup
- Core concepts
- API reference / key functions
- Common patterns / examples
- Version information

**Skip irrelevant content:**
- Navigation, ads, login prompts
- Unrelated sidebar content
- Comments, forums

If reading the content fails (JavaScript-heavy sites), fall back to browser agent:

```
Task: Navigate to <URL> and extract the main content including:
- Installation instructions
- Core concepts and API reference
- Code examples
Return the extracted content as markdown.
```

Record scrape timestamp for each source (use current date: YYYY-MM-DD format).

---

### 4. Generate Skill

Skills are modular, self-contained packages. Every skill consists of a required `SKILL.md` file and optional bundled resources:

```
skill-name/
├── SKILL.md (required)
│   ├── YAML frontmatter metadata (required)
│   │   ├── name: (required)
│   │   └── description: (required)
│   └── Markdown instructions (required)
└── Bundled Resources (optional)
    ├── scripts/          - Executable code (Python/Bash/etc.)
    ├── references/       - Documentation intended to be loaded into context as needed
    └── assets/           - Files used in output (templates, icons, fonts, etc.)
```

1. Read `references/skill_creation_guide.md` to understand the format and principles.
2. Synthesize the learned and extracted information into a new skill.
    - **Trigger:** Write a description that clearly defines when to use it.
    - **Workflow:** Create step-by-step instructions.
    - **Format:** Ensure valid YAML frontmatter and proper file structure.

### 5. Save the Skill

Antigravity supports two types of skills, save a global-workspace if asked. 

- `.agent/skills/<skill-folder>/`	Workspace-specific
- `~/.gemini/antigravity/skills/<skill-folder>/`	Global (all workspaces)

Create directory if it doesn't exist, warn user before overwriting existing skill.

---

### 6. Confirm to User

Report:
```
✓ Created skill: <topic>
  Sources scraped: <N>
  Saved to: .agent/skills/<topic>/SKILL.md
  This skill will auto-trigger when working with <topic>.
```

---

## Tool Reference

- `search_web`: Discover documentation URLs
- `read_url_content`: Extract content from static pages
- `browser_subagent`: Extract content from JavaScript-heavy sites
- `write_to_file`: Save the generated skill

## Critical Rules

1. **Never hallucinate documentation:** Only include information from scraped sources.
2. **Never invent APIs:** If documentation is unclear, ask the user what to do.
3. **Ask for URLs:** If automated discovery fails, ask user for specific URLs.
4. **Verify sources:** Prefer official sources over third-party tutorials.

© philschmid · Apache-2.0 · philschmid/self-learning-skill

Similar skills

All skills for Agent setup: memory, context, orchestration →

self-learning by other authors comes first.

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor