Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
avifenesh avatar

Learn

  • 84 installs
  • 931 repo stars
  • Updated July 26, 2026
  • avifenesh/agentsys

learn is a Claude Code skill that researches a topic online and creates a structured, RAG-optimized learning guide and index for an agent to reference.

About

learn researches a topic online and turns the gathered sources into a structured learning guide plus RAG-optimized indexes an agent can later reference. It uses a progressive broad-to-deep query strategy, scores each source on authority, recency, depth, examples and uniqueness, then fetches only the top sources to extract insights. A developer uses it to build a project knowledge base under agent-knowledge/ that Claude reads when answering questions about those topics. Depth is configurable to 10, 20 or 40 sources.

  • Researches a topic online and writes a RAG-optimized learning guide the agent can reference
  • Scores sources on authority, recency, depth, examples and uniqueness before fetching
  • Builds a master index (CLAUDE.md/AGENTS.md) with trigger phrases and quick lookup

Learn by the numbers

  • 84 all-time installs (skills.sh)
  • Ranked #5,072 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
At a glance

learn capabilities & compatibility

Capabilities
deep research · web search
Use cases
research · web search · documentation
From the docs

What learn says it does

Research any topic by gathering online resources and creating a comprehensive learning guide with RAG-optimized indexes.
SKILL.md
brief`: 10 sources (quick overview)
SKILL.md
Don't pre-load all content (causes context rot):
SKILL.md
npx skills add https://github.com/avifenesh/agentsys --skill learn

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs84
repo stars931
Last updatedJuly 26, 2026
Repositoryavifenesh/agentsys

What it does

Research a topic online and generate a RAG-optimized learning guide plus index for an agent to reference.

Who is it for?

Building a persistent, source-scored knowledge base an agent can reference later.

Skip if: Copying verbatim source text, since it stores summaries and insights only.

When should I use this skill?

The user asks to learn about, research a topic, or build a knowledge base.

What you get

  • Learning guide markdown, master index, and sources metadata JSON under agent-knowledge/

By the numbers

  • Three depth tiers gather 10, 20 or 40 sources
  • Scores sources on 5 weighted factors up to 100 points

Files

SKILL.mdMarkdownGitHub ↗

learn

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

Parse Arguments

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):

FactorWeightMaxCriteria
Authority3x30Official docs (10), recognized expert (8), established site (6), blog (4), random (2)
Recency2x20<6mo (10), <1yr (8), <2yr (6), <3yr (4), older (2)
Depth2x20Comprehensive (10), detailed (8), overview (6), superficial (4), fragment (2)
Examples2x20Multiple code examples (10), one example (6), no examples (2)
Uniqueness1x10Unique 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:

{
  "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:

# 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

// Description of what this demonstrates {code}


### Advanced Pattern

{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:

# 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:

{
  "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):

MetricQuestionTarget
CoverageDoes guide cover main aspects?≥7
DiversityAre sources from diverse types?≥6
ExamplesAre code examples practical?≥7
AccuracyConfidence in content accuracy?≥8

Flag gaps: Note any important subtopics not covered.

Enhancement Integration

If enhance=true, invoke after guide creation:

// 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

ErrorAction
WebSearch failsRetry with simpler query
WebFetch timeoutSkip source, note in metadata
<minSources foundWarn user, proceed with available
Enhancement failsSkip, note in output
Index doesn't existCreate new index

Token Budget

Estimated token usage by phase:

PhaseTokensNotes
WebSearch queries~2,0005-8 queries
Source scoring~1,000Metadata only
WebFetch extraction~40,00020 sources × 2,000 avg
Synthesis~10,000Guide generation
Enhancement~5,000Two skill calls
Total~60,000Within opus budget

Integration

This skill is invoked by:

  • learn-agent for /learn command
  • Potentially other research-oriented agents

Related skills

Forks & variants (1)

Learn has 1 known copy in the catalog totaling 2 installs. They canonicalize to this original listing.

AI & Agent Buildingresearchagents

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.