> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# AI Skill Generator

> Generate comprehensive SKILL.md files from multiple web sources

Transform any topic into a comprehensive learning guide by automatically discovering, scraping, and synthesizing content from documentation, GitHub, StackOverflow, and blogs.

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
flowchart LR
    A["🎯 Topic"] --> B["🔍 Discover"]
    B --> C["📥 Scrape"]
    C --> D["✨ Synthesize"]
    D --> E["📄 SKILL.md"]
    
    style A fill:#8B0000,color:#fff
    style B fill:#189AB4,color:#fff
    style C fill:#189AB4,color:#fff
    style D fill:#189AB4,color:#fff
    style E fill:#8B0000,color:#fff
```

## Quick Start

> [tab] CLI
>
> ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
> praisonai recipe run ai-skill-generator \
>   --var topic="react hooks"
> ```

> [tab] Python
>
> ```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
> from praisonai import recipe
>
> result = recipe.run(
>     "ai-skill-generator",
>     input={"topic": "kubernetes pods"}
> )
> print(result.output)
> ```

## How It Works

**1. Source Discovery**

AI-powered search finds **8 relevant URLs**:

* 2 documentation sources
* 2 GitHub repositories
* 2 StackOverflow Q\&As
* 2 blog tutorials

**2. Parallel Scraping**

All 8 sources scraped simultaneously with **type-specific extraction**:

* Docs → API references, examples
* GitHub → Code patterns, implementations
* StackOverflow → Problems, solutions
* Blogs → Tutorials, explanations

**3. AI Synthesis**

Content combined into **SKILL.md** format:

* Quick Start
* Core Concepts
* Essential Patterns
* Common Pitfalls

## Source Types

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
flowchart TB
    subgraph Sources["8 Sources (2 each)"]
        D["📚 Docs"]
        G["💻 GitHub"]
        S["❓ StackOverflow"]
        B["📝 Blogs"]
    end
    
    D --> E1["API Reference"]
    D --> E2["Official Examples"]
    G --> E3["Code Patterns"]
    G --> E4["Implementations"]
    S --> E5["Common Problems"]
    S --> E6["Best Solutions"]
    B --> E7["Tutorials"]
    B --> E8["Deep Dives"]
    
    style D fill:#8B0000,color:#fff
    style G fill:#8B0000,color:#fff
    style S fill:#8B0000,color:#fff
    style B fill:#8B0000,color:#fff
    style E1 fill:#189AB4,color:#fff
    style E2 fill:#189AB4,color:#fff
    style E3 fill:#189AB4,color:#fff
    style E4 fill:#189AB4,color:#fff
    style E5 fill:#189AB4,color:#fff
    style E6 fill:#189AB4,color:#fff
    style E7 fill:#189AB4,color:#fff
    style E8 fill:#189AB4,color:#fff
```

## Agents

> [card] Source Finder
>
> **Tool**: `identify_sources`
>
> Discovers 8 high-quality URLs

> [card] Scraper
>
> **Tool**: `scrape_source`
>
> Extracts content in parallel

> [card] Synthesizer
>
> **Model**: GPT-4o-mini
>
> Creates SKILL.md output

## Output Format

The generated `SKILL-{topic}.md` follows Anthropic's format:

> [accordion] Quick Start
>
> Get up and running in minutes with installation commands and basic examples.

> [accordion] Core Concepts
>
> Essential knowledge everyone needs to understand the topic.

> [accordion] Essential Patterns
>
> Common usage patterns with working code examples.

> [accordion] Common Pitfalls
>
> Mistakes to avoid and how to fix them.

## Configuration

**topic** `string` *required*

The topic to generate a skill guide for.

**Examples**: `"react hooks"`, `"kubernetes pods"`, `"python decorators"`

**sources\_per\_type** `integer` (default: 2)

Number of sources to find per type (docs, github, stackoverflow, blog).

**max\_workers** `integer` (default: 4)

Maximum parallel scraping workers.

## Requirements

> [accordion] Environment Variables
>
> ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
> export OPENAI_API_KEY="sk-..."
> ```
>
> > [!TIP]
> >
> > For better search results, also set:
> >
> > ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
> > export TAVILY_API_KEY="tvly-..."
> > ```

> [accordion] Dependencies
>
> The recipe uses built-in tools from `praisonaiagents`:
>
> * `search_web` - Multi-provider search
> * `web_crawl` - Content extraction
>
> No additional packages required.

## Example Output

Running with `topic="react hooks"` produces:

````markdown theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# React Hooks

> A comprehensive skill guide for React Hooks

---

## Quick Start

```bash
npm install react
````

```jsx theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
import { useState, useEffect } from 'react';

function Counter() {
  const [count, setCount] = useState(0);
  return <button onClick={() => setCount(count + 1)}>{count}</button>;
}
```

***

## Core Concepts

Hooks let you use state and other React features without writing a class...

***

## Essential Patterns

### useState Pattern

```jsx theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
const [state, setState] = useState(initialValue);
```

### useEffect Pattern

```jsx theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
useEffect(() => {
  // Side effect
  return () => { /* cleanup */ };
}, [dependencies]);
```

***

## Common Pitfalls

❌ **Don't call hooks conditionally**

```jsx theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
// Wrong
if (condition) {
  const [state, setState] = useState();
}
```

✅ **Always call at top level**

```jsx theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
// Correct
const [state, setState] = useState();
if (condition) {
  // use state here
}
```

```

## Pipeline Details

| Stage | Agent | Tool | Output |
|-------|-------|------|--------|
| **Discover** | source_finder | `identify_sources` | 8 URLs |
| **Scrape** | scraper (×8) | `scrape_source` | Content |
| **Synthesize** | synthesizer | — | SKILL.md |

<Info>
The scraping stage runs in **parallel** with up to 4 workers, making it fast even with 8 sources.
</Info>

## Custom Tools

The recipe includes these custom tools in `tools.py`:

| Tool | Signature | Description |
|------|-----------|-------------|
| `identify_sources` | `(topic: str) -> List[Dict]` | Find 8 URLs (2 per source type) |
| `scrape_source` | `(url: str, source_type: str) -> Dict` | Scrape with type-specific extraction |
| `format_skill_md` | `(content: Dict) -> str` | Format as SKILL.md |

## Related Recipes

<CardGroup cols={2}>
  <Card title="Research Pipeline" icon="flask" href="https://praison.ai/docs/guides/recipes/index.md">
    Deep research with parallel keyword generation
  </Card>
  <Card title="URL to Blog" icon="link" href="https://praison.ai/docs/recipes/url-to-blog.md">
    Transform URLs into blog posts
  </Card>
</CardGroup>
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.