learn

Research any topic online and create learning guides. Use when user asks to 'learn about', 'research topic', 'create learning guide', 'build knowledge base', or 'study subject'.

23 stars

Best use case

learn is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Research any topic online and create learning guides. Use when user asks to 'learn about', 'research topic', 'create learning guide', 'build knowledge base', or 'study subject'.

Teams using learn should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/learn/SKILL.md --create-dirs "https://raw.githubusercontent.com/christophacham/agent-skills-library/main/skills/game-dev/learn/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/learn/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How learn Compares

Feature / AgentlearnStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Research any topic online and create learning guides. Use when user asks to 'learn about', 'research topic', 'create learning guide', 'build knowledge base', or 'study subject'.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# learn

Research any topic by gathering online resources and creating a comprehensive learning guide with RAG-optimized indexes.

## Parse Arguments

```javascript
const args = '$ARGUMENTS'.split(' ').filter(Boolean);
const depth = args.find(a => a.startsWith('--depth='))?.split('=')[1] || 'medium';
const topic = args.filter(a => !a.startsWith('--')).join(' ');
```

## Input

Arguments: `<topic> [--depth=brief|medium|deep]`

- **topic**: Subject to research (required)
- **--depth**: Source gathering depth
  - `brief`: 10 sources (quick overview)
  - `medium`: 20 sources (default, balanced)
  - `deep`: 40 sources (comprehensive)

## Research Methodology

Based on best practices from:
- Anthropic's Context Engineering
- DeepLearning.AI Tool Use Patterns
- Anara's AI Literature Reviews

### 1. Progressive Query Architecture

Use funnel approach to avoid noise from long query lists:

**Broad Phase** (landscape mapping):
```
"{topic} overview introduction"
"{topic} documentation official"
```

**Focused Phase** (core content):
```
"{topic} best practices"
"{topic} examples tutorial"
"{topic} site:stackoverflow.com"
```

**Deep Phase** (advanced, if depth=deep):
```
"{topic} advanced techniques"
"{topic} pitfalls mistakes avoid"
"{topic} 2025 2026 latest"
```

### 2. Source Quality Scoring

Multi-dimensional evaluation (max score: 100):

| Factor | Weight | Max | Criteria |
|--------|--------|-----|----------|
| Authority | 3x | 30 | Official docs (10), recognized expert (8), established site (6), blog (4), random (2) |
| Recency | 2x | 20 | <6mo (10), <1yr (8), <2yr (6), <3yr (4), older (2) |
| Depth | 2x | 20 | Comprehensive (10), detailed (8), overview (6), superficial (4), fragment (2) |
| Examples | 2x | 20 | Multiple code examples (10), one example (6), no examples (2) |
| Uniqueness | 1x | 10 | Unique perspective (10), some overlap (6), duplicate content (2) |

**Selection threshold**: Top N sources by score (N = depth target)

### 3. Just-In-Time Retrieval

Don't pre-load all content (causes context rot):

1. **Collect URLs first** via WebSearch
2. **Score based on metadata** (title, description, URL)
3. **Fetch only selected sources** via WebFetch
4. **Extract summaries** (not full content)

### 4. Content Extraction Guidelines

For each source, extract:

```json
{
  "url": "https://...",
  "title": "Article Title",
  "qualityScore": 85,
  "scores": {
    "authority": 9,
    "recency": 8,
    "depth": 7,
    "examples": 9,
    "uniqueness": 6
  },
  "keyInsights": [
    "Concise insight 1",
    "Concise insight 2"
  ],
  "codeExamples": [
    {
      "language": "javascript",
      "description": "Basic usage pattern"
    }
  ],
  "extractedAt": "2026-02-05T12:00:00Z"
}
```

**Copyright compliance**: Summaries and insights only, never verbatim paragraphs.

## Output Structure

### Topic Guide Template

Create `agent-knowledge/{slug}.md`:

```markdown
# Learning Guide: {Topic}

**Generated**: {date}
**Sources**: {count} resources analyzed
**Depth**: {brief|medium|deep}

## Prerequisites

What you should know before diving in:
- Prerequisite 1
- Prerequisite 2

## TL;DR

Essential points in 3-5 bullets:
- Key point 1
- Key point 2
- Key point 3

## Core Concepts

### {Concept 1}

{Synthesized explanation from multiple sources}

**Key insight**: {Most important takeaway}

### {Concept 2}

{Synthesized explanation}

## Code Examples

### Basic Example

```{language}
// Description of what this demonstrates
{code}
```

### Advanced Pattern

```{language}
{code}
```

## Common Pitfalls

| Pitfall | Why It Happens | How to Avoid |
|---------|---------------|--------------|
| Issue 1 | Root cause | Prevention strategy |

## Best Practices

Synthesized from {n} sources:

1. **Practice 1**: Explanation
2. **Practice 2**: Explanation

## Further Reading

| Resource | Type | Why Recommended |
|----------|------|-----------------|
| [Title]({url}) | Official Docs | Authoritative reference |
| [Title]({url}) | Tutorial | Step-by-step guide |

---

*Generated by /learn from {count} sources.*
*See `resources/{slug}-sources.json` for full source metadata.*
```

### Master Index Template

Create/update `agent-knowledge/CLAUDE.md`:

```markdown
# Agent Knowledge Base

> Learning guides created by /learn. Reference these when answering questions about listed topics.

## Available Topics

| Topic | File | Sources | Depth | Created |
|-------|------|---------|-------|---------|
| {Topic 1} | {slug1}.md | {n} | medium | 2026-02-05 |
| {Topic 2} | {slug2}.md | {n} | deep | 2026-02-04 |

## Trigger Phrases

Use this knowledge when user asks about:
- "How does {topic1} work?" → {slug1}.md
- "Explain {topic1}" → {slug1}.md
- "{Topic2} best practices" → {slug2}.md

## Quick Lookup

| Keyword | Guide |
|---------|-------|
| recursion | recursion.md |
| hooks, react | react-hooks.md |

## How to Use

1. Check if user question matches a topic
2. Read the relevant guide file
3. Answer based on synthesized knowledge
4. Cite the guide if user asks for sources
```

Copy to `agent-knowledge/AGENTS.md` for OpenCode/Codex.

### Sources Metadata

Create `agent-knowledge/resources/{slug}-sources.json`:

```json
{
  "topic": "{original topic}",
  "slug": "{slug}",
  "generated": "2026-02-05T12:00:00Z",
  "depth": "medium",
  "totalSources": 20,
  "sources": [
    {
      "url": "https://...",
      "title": "...",
      "qualityScore": 85,
      "scores": {
        "authority": 9,
        "recency": 8,
        "depth": 7,
        "examples": 9,
        "uniqueness": 6
      },
      "keyInsights": ["..."]
    }
  ]
}
```

## Self-Evaluation Checklist

Before finalizing, rate output (1-10):

| Metric | Question | Target |
|--------|----------|--------|
| Coverage | Does guide cover main aspects? | ≥7 |
| Diversity | Are sources from diverse types? | ≥6 |
| Examples | Are code examples practical? | ≥7 |
| Accuracy | Confidence in content accuracy? | ≥8 |

**Flag gaps**: Note any important subtopics not covered.

## Enhancement Integration

If enhance=true, invoke after guide creation:

```javascript
// Enhance the topic guide for RAG
Skill({ name: 'enhance-docs', args: `agent-knowledge/${slug}.md --ai` });

// Enhance the master index
Skill({ name: 'enhance-prompts', args: 'agent-knowledge/CLAUDE.md' });
```

## Output Format

Return structured JSON between markers:

```
=== LEARN_RESULT ===
{
  "topic": "recursion",
  "slug": "recursion",
  "depth": "medium",
  "guideFile": "agent-knowledge/recursion.md",
  "sourcesFile": "agent-knowledge/resources/recursion-sources.json",
  "sourceCount": 20,
  "sourceBreakdown": {
    "officialDocs": 4,
    "tutorials": 5,
    "stackOverflow": 3,
    "blogPosts": 5,
    "github": 3
  },
  "selfEvaluation": {
    "coverage": 8,
    "diversity": 7,
    "examples": 9,
    "accuracy": 8,
    "gaps": ["tail recursion optimization not covered"]
  },
  "enhanced": true,
  "indexUpdated": true
}
=== END_RESULT ===
```

## Error Handling

| Error | Action |
|-------|--------|
| WebSearch fails | Retry with simpler query |
| WebFetch timeout | Skip source, note in metadata |
| <minSources found | Warn user, proceed with available |
| Enhancement fails | Skip, note in output |
| Index doesn't exist | Create new index |

## Token Budget

Estimated token usage by phase:

| Phase | Tokens | Notes |
|-------|--------|-------|
| WebSearch queries | ~2,000 | 5-8 queries |
| Source scoring | ~1,000 | Metadata only |
| WebFetch extraction | ~40,000 | 20 sources × 2,000 avg |
| Synthesis | ~10,000 | Guide generation |
| Enhancement | ~5,000 | Two skill calls |
| **Total** | ~60,000 | Within opus budget |

## Integration

This skill is invoked by:
- `learn-agent` for `/learn` command
- Potentially other research-oriented agents

Related Skills

umap-learn

23
from christophacham/agent-skills-library

UMAP dimensionality reduction. Fast nonlinear manifold learning for 2D/3D visualization, clustering preprocessing (HDBSCAN), supervised/parametric UMAP, for high-dimensional data.

scikit-learn

23
from christophacham/agent-skills-library

Machine learning in Python with scikit-learn. Use when working with supervised learning (classification, regression), unsupervised learning (clustering, dimensionality reduction), model evaluation, hyperparameter tuning, preprocessing, or building ML pipelines. Provides comprehensive reference documentation for algorithms, preprocessing techniques, pipelines, and best practices.

learning-opportunities

23
from christophacham/agent-skills-library

Facilitates deliberate skill development during AI-assisted coding. Offers interactive learning exercises after architectural work (new files, schema changes, refactors). Use when completing features, making design decisions, or when user asks to understand code better. Triggers on "learning exercise", "help me understand", "teach me", "why does this work", or after creating new files/modules. Do NOT use for urgent debugging, quick fixes, or when user says "just ship it".

cc-skill-continuous-learning

23
from christophacham/agent-skills-library

Development skill from everything-claude-code

machine-learning-ops-ml-pipeline

23
from christophacham/agent-skills-library

Design and implement a complete ML pipeline for: $ARGUMENTS

repo-story-time

23
from christophacham/agent-skills-library

Generate a comprehensive repository summary and narrative story from commit history

release-notes

23
from christophacham/agent-skills-library

Generates structured release notes from git history between two references (tags, commits, branches). Groups changes by type (features, fixes, docs, breaking), extracts PR references, and produces a publish-ready document.

release-it

23
from christophacham/agent-skills-library

Build production-ready systems with stability patterns: circuit breakers, bulkheads, timeouts, and retry logic. Use when the user mentions "production outage", "circuit breaker", "timeout strategy", "deployment pipeline", or "chaos engineering". Covers capacity planning, health checks, and anti-fragility patterns. For data systems, see ddia-systems. For system architecture, see system-design.

pyzotero

23
from christophacham/agent-skills-library

Interact with Zotero reference management libraries using the pyzotero Python client. Retrieve, create, update, and delete items, collections, tags, and attachments via the Zotero Web API v3. Use this skill when working with Zotero libraries programmatically, managing bibliographic references, exporting citations, searching library contents, uploading PDF attachments, or building research automation workflows that integrate with Zotero.

pydicom

23
from christophacham/agent-skills-library

Python library for working with DICOM (Digital Imaging and Communications in Medicine) files. Use this skill when reading, writing, or modifying medical imaging data in DICOM format, extracting pixel data from medical images (CT, MRI, X-ray, ultrasound), anonymizing DICOM files, working with DICOM metadata and tags, converting DICOM images to other formats, handling compressed DICOM data, or processing medical imaging datasets. Applies to tasks involving medical image analysis, PACS systems, radiology workflows, and healthcare imaging applications.

pr-ready

23
from christophacham/agent-skills-library

Prepares a feature branch for pull request. Runs all checks, generates PR description, verifies documentation is updated, creates changelog entry, and suggests labels.

perf-theory-gatherer

23
from christophacham/agent-skills-library

Use when generating performance hypotheses backed by git history and code evidence.