[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6F474N4AAP645CKSQNAV0EC":3,"skill-same:01M6F474N4AAP645CKSQNAV0EC":61},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":33,"linkOnly":34,"markdownContent":35,"markdownBody":36,"frontMatter":37,"refName":38,"commitSha":39,"skillDirectory":40,"forksCount":41,"repositoryHtmlUrl":42,"repositoryHomepageUrl":43,"ownerHtmlUrl":44,"ownerBlogUrl":6,"ownerDescription":45,"updatedAt":46,"install":47,"resources":60},"01M6F474N4AAP645CKSQNAV0EC","skill-learning",null,"Extracts actionable knowledge from external sources and enhances existing skills using a 4-tier novelty framework. Use when learning from URLs, documentation, or codebases. Proactively use when the user asks to extract patterns from a reference repository or skill marketplace.","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fgaryblankenship\u002FSKILL.md\u002Fskill-learning\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32],"learning","skill learning","documentation","framework","repository","marketplace","knowledge","user","extract","use","reference","patterns","sources","actionable","2026-11-10 10:12:30",false,"---\nname: skill-learning\ndescription: Extracts actionable knowledge from external sources and enhances existing skills using a 4-tier novelty framework. Use when learning from URLs, documentation, or codebases. Proactively use when the user asks to extract patterns from a reference repository or skill marketplace.\n---\n\n# INSTRUCTIONS FOR CLAUDE: Skill Learning Methodology\n\n## Quick Reference\n\n| Intent | Action |\n|--------|--------|\n| Extract patterns from a URL | Use `WebFetch` and Phase 1a |\n| Extract patterns from a codebase | Use `Glob`\u002F`Read` and Phase 1b |\n| Match an extracted insight to a skill | Execute Phase 3 Scoring Algorithm |\n| Propose an enhancement to the user | Follow the format in Phase 5 |\n| Apply an approved enhancement | Immediately `Edit` the target `SKILL.md` |\n\n## When to Use\n\n- User provides a URL to documentation or an article and asks to learn from it.\n- User points to a local directory or repository to extract design patterns.\n- User provides a path to another agent's skill directory or a marketplace.\n- Proactively when a user pastes a large block of reference code and asks to \"save this pattern.\"\n\n## System Prompt\n\nYou are executing a rigid 7-phase knowledge extraction protocol. Your primary objective is to extract **only novel** technical patterns from external sources and inject them into the user's local `skills\u002F` directory. \n\n**CRITICAL DIRECTIVE:** You have a natural tendency to summarize everything you read. **DO NOT DO THIS.** The user's context window is precious. You must aggressively filter out \"Tier 1\" knowledge (things you already know from your pre-training data) and only retain Tier 2, 3, or 4 insights.\n\n**Core Execution Loop**: 1. Source → 2. Extract → 3. Match → 4. Preview → 5. Approve → 6. Apply → 7. Loop\n\n## Anti-Patterns\n\n| Anti-Pattern | Problem | Fix |\n|--------------|---------|-----|\n| **Summarizing Training Data** | Bloats the context window with useless Tier 1 facts (e.g. \"React uses a Virtual DOM\"). | Ruthlessly apply the Novelty Test. Exclude Tier 1. |\n| **Sequential File Reading** | Calling `Read()` 100 times in a loop will cause the model to time out. | Use **Parallel Tool Calls** inside a single block. |\n| **Asking before Editing** | If the user already said \"Apply\" in Phase 5, pausing to ask permission to use the `Edit` tool is maddening. | Execute the `Edit` tool immediately upon user approval. |\n| **Missing Source Links** | Future agents won't know where the pattern came from. | Always append `\u003C!-- Source: {url\u002Ffile} -->`. |\n\n---\n\n## Phase 1: Source Processing (Execution Steps)\n\n### 1a. URL Sources\n**ACTION:** You must attempt to fetch the URL using the `WebFetch` tool.\n*   **OPTIMIZATION:** Check for `llms.txt` first. Attempt `{base_url}\u002Fllms-full.txt` → `llms.txt` → `llms-small.txt`. If found, use it directly to avoid scraping HTML.\n*   **Primary:** `WebFetch(url, format=\"markdown\")`\n*   **Fallback:** If blocked by bot-protection, use `WebFetch(\"https:\u002F\u002Fr.jina.ai\u002F{url}\")`.\n\n### 1b. File Sources & Batch Processing\n**ACTION:** If the source is a local directory or repository, use `Glob` and `Read`.\n*   **Strategy:** When analyzing multiple files (e.g., discovering existing skills), you MUST use **Parallel Tool Calls**. Output all your `Read` tool calls in a single response block. \n*   **Anti-pattern:** Never use sequential `Read` calls for a large list of files. You will time out.\n\n### 1c. Local Directory Discovery (Plugin\u002FMarketplace Structures)\n**ACTION:** Use `Glob` and `Read` tools to find existing `SKILL.md` files or `AGENTS.md` manifests.\n\n*   **Structure A: AGENTS.md manifest (preferred)**\n    Read `{dir}\u002FAGENTS.md`. Parse `\u003Cavailable_skills>` section and extract relative paths.\n*   **Structure B: Plugin directories with nested skills**\n    Use `Glob` with pattern `*\u002Fskills\u002F*\u002FSKILL.md` or `*\u002Fskills\u002F*\u002F*.md`.\n*   **Structure C: Flat skill collection**\n    Use `Glob` with pattern `skills\u002F*\u002FSKILL.md`.\n*   **Structure D: Mixed\u002Funknown structure**\n    Use `Glob` with pattern `**\u002FSKILL.md` to find all skills recursively.\n\nOnce discovered, execute **Parallel Read** on all discovered skills.\n\n### 1d. Repository Documentation Discovery\nWhen learning from a code repository (not a skills\u002Fplugin directory):\n\n1.  **Identify repo type:** Look for `package.json`, `go.mod`, `Cargo.toml`, `pyproject.toml`.\n2.  **Find docs:** `README.md`, `CONTRIBUTING.md`, `docs\u002F*.md`.\n3.  **Find schemas\u002Ftypes:** `**\u002F*.d.ts`, `**\u002F*_types.go`, `**\u002F*.schema.json`.\n4.  **Find examples:** `**\u002Fexamples\u002F*`, `**\u002Fpresets\u002F*`.\n\n**Use Repo Learning when:** Extracting schemas\u002Fformats, learning from reference implementations, or building NEW skills FROM a repo's patterns.\n**Use Skill\u002FURL Learning when:** Enhancing EXISTING skills with insights from documentation\u002Farticles or copying skills from marketplaces.\n\n### 1e. Content Cleaning\nBefore processing, mentally strip navigation, ads, and boilerplate. Preserve code blocks verbatim.\n\n## Phase 2: Knowledge Extraction\n\n**MANDATORY:** You must apply the novelty-detection framework to filter the extracted content.\n\n### Tier Classification\nYou must classify every extracted insight into one of four tiers:\n| Tier | Include? | Signal |\n|------|----------|--------|\n| 1 | EXCLUDE | Could write without source (training data) |\n| 2 | Include | Shows HOW (implementation-specific) |\n| 3 | High value | Explains WHY (architectural trade-offs) |\n| 4 | Highest | Contradicts assumptions (counter-intuitive) |\n\n### The Novelty Test\nFor every insight, ask yourself: *\"Could I have written this WITHOUT reading the source?\"*\n*   **If YES** → It is Tier 1. You MUST EXCLUDE IT.\n*   **If NO** → Continue to Tier 2-4 classification.\n\n### Calibration Examples\n\n**API Documentation Analysis:**\n```\nClaim: \"OpenAI provides an API for generating text\"\n→ Tier 1 ❌ — Generic, could write from training data\n\nClaim: \"Responses API uses max_output_tokens instead of max_tokens\"\n→ Tier 2 ✅ — Specific parameter name (HOW)\n\nClaim: \"Reasoning models put chain-of-thought in reasoning_content array,\n        not content — must sum both for billing\"\n→ Tier 4 ✅✅✅ — Counter-intuitive, prevents billing surprise\n```\n\n**Database Performance:**\n```\nClaim: \"Create indexes on foreign key columns for faster joins\"\n→ Tier 1 ❌ — Generic DBA advice\n\nClaim: \"PostgreSQL partial indexes reduce size 60%, improve write perf 40%\"\n→ Tier 2 ✅ — Specific feature with quantified benefit\n\nClaim: \"Covering indexes avoid heap lookups (3x faster reads, 15% slower writes)\"\n→ Tier 3 ✅✅ — Quantified trade-off, explains WHY\n\nClaim: \"JSONB GIN indexes do NOT support ORDER BY on JSON fields\"\n→ Tier 4 ✅✅✅ — Contradicts expectation, prevents bug\n```\n\n**Framework Patterns:**\n```\nClaim: \"React uses a virtual DOM for efficient updates\"\n→ Tier 1 ❌ — Training data, everyone knows this\n\nClaim: \"Next.js App Router requires 'use client' directive for useState\"\n→ Tier 2 ✅ — Specific requirement (HOW)\n\nClaim: \"Server Components reduce JS bundle by 60% but can't use client state\"\n→ Tier 3 ✅✅ — Trade-off with quantification (WHY)\n\nClaim: \"generateStaticParams runs at BUILD time, not request time —\n        dynamic data causes 404s\"\n→ Tier 4 ✅✅✅ — Contradicts mental model, prevents production bug\n```\n\n### Insight Structure Requirements\nYou must structure each extracted insight logically before scoring it:\n```json\n{\n  \"tier\": 2,\n  \"domain\": \"sveltekit\",\n  \"pattern\": \"Server-only load with +page.server.ts\",\n  \"insight\": \"Data fetching in +page.server.ts runs only on server, +page.ts runs on both\",\n  \"keywords\": [\"sveltekit\", \"load\", \"server\", \"ssr\"],\n  \"source_context\": \"Line 45-52 of routing docs\"\n}\n```\n\n### Quality Filter\n- Zero Tier 1 leakage (absolute).\n- Minimum 3 Tier 2-4 insights per source (or skip the source).\n- Each insight must have a `domain` + `keywords`.\n\n## Phase 3: Skill Matching\n\n### 3a. Discovery\n**ACTION:** Find all existing skills using the `Glob` tool with the pattern `skills\u002F*\u002FSKILL.md`. \nIf you already discovered them in Phase 1, you can skip this step.\n\n### 3b. Matching Algorithm\nYou must score each extracted insight against the user's existing skills to find the best home for it.\n1. **Exact domain match**: Insight domain === skill name (score: 100)\n2. **Keyword overlap**: Insight keywords ∩ skill description (score: 60-90)\n3. **Technology alignment**: Same framework\u002Flibrary family (score: 40-60)\n4. **No match**: Score \u003C40 → Skip enhancement and propose a new skill instead.\n\n## Phase 4: Enhancement Proposal\n\n### For Each Match (score >= 40)\n\n**1. Read current skill**\n**ACTION:** Use the `Read` tool to read the contents of `skills\u002F{skill-name}\u002FSKILL.md`.\n\n**2. Identify target section**\nDetermine where the insight fits inside the existing skill file:\n| Insight Type | Target Section |\n|--------------|----------------|\n| Quick fact | Quick Reference table |\n| Pattern + example | Patterns \u002F Examples |\n| Gotcha \u002F warning | Anti-Patterns \u002F Common Mistakes |\n| Workflow step | Process \u002F Workflow |\n| Validation rule | Checklist |\n\n**3. Draft the enhancement**\n- Preserve the existing structure exactly.\n- Add the insight in the appropriate format for that section.\n- You MUST include source attribution: `\u003C!-- Source: {url\u002Ffile} -->`\n\n**4. CLEAR Validation**\nMentally apply the CLEAR framework to your proposed addition:\n- **C**ompact: Will the word count stay under 5000?\n- **L**abeled: Are keywords in the right places?\n- **E**xample: Does the example show a clear transformation?\n- **A**ctionable: Is the actionable pattern named?\n- **R**eferences: Is there no duplication, and does it use references?\n\n## Phase 5: User Approval\n\n### The Proposal Format\nFor each valid enhancement, you must present the proposal to the user exactly like the examples shown in the **Examples** section at the bottom of this document.\n\nPresent the:\n1. Target Skill name\n2. Insight summary and Tier\n3. Diff preview of what you are going to add\n4. Source attribution\n\n**ACTION:** Use the `AskUserQuestion` tool to ask: `\"Apply this enhancement?\"` with the options: `Apply`, `Skip`, or `Edit`.\n\n### Response Handling\n- **Apply**: Proceed to Phase 6.\n- **Skip**: Skip to the next candidate.\n- **Edit**: User modifies the text, then you proceed to Phase 6.\n\n## Phase 6: Apply & New Skill Proposal\n\n### 6a. Apply Enhancement\n**ACTION:** If the user selected 'Apply', you MUST immediately use the `Edit` tool on `skills\u002F{skill-name}\u002FSKILL.md` to insert the drafted block into the target section. **Do not just say you will do it, execute the tool.**\n\n### 6b. When No Match Found (New Skills)\nFor insights with no match (score \u003C40), present the user with a summary of the domain and keywords.\nAsk: `\"Propose new skill for {domain}?\" [y\u002Fn]`\nIf approved, generate the new skill directory and `SKILL.md` file using the `Write` tool.\n\n## Phase 7: Loop Control\n\n### After Each Source\nSummary:\n- Insights extracted: X (Tier 2: Y, Tier 3: Z, Tier 4: W)\n- Skills enhanced: [list]\n- New skills created: [list]\n- Rejected: [count]\n\nNext source? (file path, URL, or 'done')\n\n## Quality Gates\n\n### Absolute Rules\n- [ ] Zero Tier 1 insights in skills\n- [ ] User approves each change (no auto-apply)\n- [ ] Diff preview shown before any edit\n- [ ] Source attribution in comments\n\n### Warning Triggers\n- Skill exceeds 5000 words → suggest splitting\n- Large source (10K+ pages) → create router skill\n- Insight duplicates existing content → skip\n- CLEAR validation fails → revise before applying\n\n## Examples\n\n### Example 1: Extracting from Documentation\n**Source**: User runs `\u002Flearn https:\u002F\u002Fsvelte.dev\u002Fdocs\u002Fkit\u002Fstate-management`\n**Insight (Tier 3)**: SvelteKit 5 replaces store subscriptions with runes (`$state`, `$derived`) for reactivity.\n**Target Skill**: `sveltekit-patterns`\n**Agent Output Preview**:\n```markdown\n## Enhancement Proposal (Score: 85, Tier: 3)\n\n**Insight**: SvelteKit 5 relies on runes ($state, $derived) instead of store subscriptions for reactive UI state.\n**Target Skill**: skills\u002Fsveltekit-patterns\u002FSKILL.md\n**Section**: Patterns\n\n**Proposed Addition**:\n### Runes vs Stores (Svelte 5)\n\u003C!-- Source: https:\u002F\u002Fsvelte.dev\u002Fdocs\u002Fkit\u002Fstate-management -->\nReplace old `writable` stores with `$state()` runes for component-level reactivity. Do not use `$:` for derived state; use `$derived()` instead.\n\nApply this enhancement? [y\u002Fn\u002Fedit]\n```\n\n### Example 2: Extracting from Codebase\n**Source**: User runs `\u002Flearn ~\u002Fprojects\u002Fapi-gateway`\n**Insight (Tier 2)**: The codebase uses a specific Zod schema wrapper (`validateRequest(schema)`) for all incoming request validation.\n**Target Skill**: `api-middleware`\n**Agent Output Preview**:\n```markdown\n## Enhancement Proposal (Score: 70, Tier: 2)\n\n**Insight**: Local convention uses `validateRequest(schema)` middleware pattern for all Zod validation.\n**Target Skill**: skills\u002Fapi-middleware\u002FSKILL.md\n**Section**: Anti-Patterns \u002F Common Mistakes\n\n**Proposed Addition**:\n### Zod Validation Convention\n\u003C!-- Source: ~\u002Fprojects\u002Fapi-gateway\u002Fsrc\u002Fmiddleware\u002F -->\n**Do NOT** validate Zod schemas inline inside the route handler. \n**DO** use the `validateRequest(schema)` middleware exported from `src\u002Fmiddleware\u002Fvalidator.ts`.\n\nApply this enhancement? [y\u002Fn\u002Fedit]\n```\n\n","# INSTRUCTIONS FOR CLAUDE: Skill Learning Methodology\n\n## Quick Reference\n\n| Intent | Action |\n|--------|--------|\n| Extract patterns from a URL | Use `WebFetch` and Phase 1a |\n| Extract patterns from a codebase | Use `Glob`\u002F`Read` and Phase 1b |\n| Match an extracted insight to a skill | Execute Phase 3 Scoring Algorithm |\n| Propose an enhancement to the user | Follow the format in Phase 5 |\n| Apply an approved enhancement | Immediately `Edit` the target `SKILL.md` |\n\n## When to Use\n\n- User provides a URL to documentation or an article and asks to learn from it.\n- User points to a local directory or repository to extract design patterns.\n- User provides a path to another agent's skill directory or a marketplace.\n- Proactively when a user pastes a large block of reference code and asks to \"save this pattern.\"\n\n## System Prompt\n\nYou are executing a rigid 7-phase knowledge extraction protocol. Your primary objective is to extract **only novel** technical patterns from external sources and inject them into the user's local `skills\u002F` directory. \n\n**CRITICAL DIRECTIVE:** You have a natural tendency to summarize everything you read. **DO NOT DO THIS.** The user's context window is precious. You must aggressively filter out \"Tier 1\" knowledge (things you already know from your pre-training data) and only retain Tier 2, 3, or 4 insights.\n\n**Core Execution Loop**: 1. Source → 2. Extract → 3. Match → 4. Preview → 5. Approve → 6. Apply → 7. Loop\n\n## Anti-Patterns\n\n| Anti-Pattern | Problem | Fix |\n|--------------|---------|-----|\n| **Summarizing Training Data** | Bloats the context window with useless Tier 1 facts (e.g. \"React uses a Virtual DOM\"). | Ruthlessly apply the Novelty Test. Exclude Tier 1. |\n| **Sequential File Reading** | Calling `Read()` 100 times in a loop will cause the model to time out. | Use **Parallel Tool Calls** inside a single block. |\n| **Asking before Editing** | If the user already said \"Apply\" in Phase 5, pausing to ask permission to use the `Edit` tool is maddening. | Execute the `Edit` tool immediately upon user approval. |\n| **Missing Source Links** | Future agents won't know where the pattern came from. | Always append `\u003C!-- Source: {url\u002Ffile} -->`. |\n\n---\n\n## Phase 1: Source Processing (Execution Steps)\n\n### 1a. URL Sources\n**ACTION:** You must attempt to fetch the URL using the `WebFetch` tool.\n*   **OPTIMIZATION:** Check for `llms.txt` first. Attempt `{base_url}\u002Fllms-full.txt` → `llms.txt` → `llms-small.txt`. If found, use it directly to avoid scraping HTML.\n*   **Primary:** `WebFetch(url, format=\"markdown\")`\n*   **Fallback:** If blocked by bot-protection, use `WebFetch(\"https:\u002F\u002Fr.jina.ai\u002F{url}\")`.\n\n### 1b. File Sources & Batch Processing\n**ACTION:** If the source is a local directory or repository, use `Glob` and `Read`.\n*   **Strategy:** When analyzing multiple files (e.g., discovering existing skills), you MUST use **Parallel Tool Calls**. Output all your `Read` tool calls in a single response block. \n*   **Anti-pattern:** Never use sequential `Read` calls for a large list of files. You will time out.\n\n### 1c. Local Directory Discovery (Plugin\u002FMarketplace Structures)\n**ACTION:** Use `Glob` and `Read` tools to find existing `SKILL.md` files or `AGENTS.md` manifests.\n\n*   **Structure A: AGENTS.md manifest (preferred)**\n    Read `{dir}\u002FAGENTS.md`. Parse `\u003Cavailable_skills>` section and extract relative paths.\n*   **Structure B: Plugin directories with nested skills**\n    Use `Glob` with pattern `*\u002Fskills\u002F*\u002FSKILL.md` or `*\u002Fskills\u002F*\u002F*.md`.\n*   **Structure C: Flat skill collection**\n    Use `Glob` with pattern `skills\u002F*\u002FSKILL.md`.\n*   **Structure D: Mixed\u002Funknown structure**\n    Use `Glob` with pattern `**\u002FSKILL.md` to find all skills recursively.\n\nOnce discovered, execute **Parallel Read** on all discovered skills.\n\n### 1d. Repository Documentation Discovery\nWhen learning from a code repository (not a skills\u002Fplugin directory):\n\n1.  **Identify repo type:** Look for `package.json`, `go.mod`, `Cargo.toml`, `pyproject.toml`.\n2.  **Find docs:** `README.md`, `CONTRIBUTING.md`, `docs\u002F*.md`.\n3.  **Find schemas\u002Ftypes:** `**\u002F*.d.ts`, `**\u002F*_types.go`, `**\u002F*.schema.json`.\n4.  **Find examples:** `**\u002Fexamples\u002F*`, `**\u002Fpresets\u002F*`.\n\n**Use Repo Learning when:** Extracting schemas\u002Fformats, learning from reference implementations, or building NEW skills FROM a repo's patterns.\n**Use Skill\u002FURL Learning when:** Enhancing EXISTING skills with insights from documentation\u002Farticles or copying skills from marketplaces.\n\n### 1e. Content Cleaning\nBefore processing, mentally strip navigation, ads, and boilerplate. Preserve code blocks verbatim.\n\n## Phase 2: Knowledge Extraction\n\n**MANDATORY:** You must apply the novelty-detection framework to filter the extracted content.\n\n### Tier Classification\nYou must classify every extracted insight into one of four tiers:\n| Tier | Include? | Signal |\n|------|----------|--------|\n| 1 | EXCLUDE | Could write without source (training data) |\n| 2 | Include | Shows HOW (implementation-specific) |\n| 3 | High value | Explains WHY (architectural trade-offs) |\n| 4 | Highest | Contradicts assumptions (counter-intuitive) |\n\n### The Novelty Test\nFor every insight, ask yourself: *\"Could I have written this WITHOUT reading the source?\"*\n*   **If YES** → It is Tier 1. You MUST EXCLUDE IT.\n*   **If NO** → Continue to Tier 2-4 classification.\n\n### Calibration Examples\n\n**API Documentation Analysis:**\n```\nClaim: \"OpenAI provides an API for generating text\"\n→ Tier 1 ❌ — Generic, could write from training data\n\nClaim: \"Responses API uses max_output_tokens instead of max_tokens\"\n→ Tier 2 ✅ — Specific parameter name (HOW)\n\nClaim: \"Reasoning models put chain-of-thought in reasoning_content array,\n        not content — must sum both for billing\"\n→ Tier 4 ✅✅✅ — Counter-intuitive, prevents billing surprise\n```\n\n**Database Performance:**\n```\nClaim: \"Create indexes on foreign key columns for faster joins\"\n→ Tier 1 ❌ — Generic DBA advice\n\nClaim: \"PostgreSQL partial indexes reduce size 60%, improve write perf 40%\"\n→ Tier 2 ✅ — Specific feature with quantified benefit\n\nClaim: \"Covering indexes avoid heap lookups (3x faster reads, 15% slower writes)\"\n→ Tier 3 ✅✅ — Quantified trade-off, explains WHY\n\nClaim: \"JSONB GIN indexes do NOT support ORDER BY on JSON fields\"\n→ Tier 4 ✅✅✅ — Contradicts expectation, prevents bug\n```\n\n**Framework Patterns:**\n```\nClaim: \"React uses a virtual DOM for efficient updates\"\n→ Tier 1 ❌ — Training data, everyone knows this\n\nClaim: \"Next.js App Router requires 'use client' directive for useState\"\n→ Tier 2 ✅ — Specific requirement (HOW)\n\nClaim: \"Server Components reduce JS bundle by 60% but can't use client state\"\n→ Tier 3 ✅✅ — Trade-off with quantification (WHY)\n\nClaim: \"generateStaticParams runs at BUILD time, not request time —\n        dynamic data causes 404s\"\n→ Tier 4 ✅✅✅ — Contradicts mental model, prevents production bug\n```\n\n### Insight Structure Requirements\nYou must structure each extracted insight logically before scoring it:\n```json\n{\n  \"tier\": 2,\n  \"domain\": \"sveltekit\",\n  \"pattern\": \"Server-only load with +page.server.ts\",\n  \"insight\": \"Data fetching in +page.server.ts runs only on server, +page.ts runs on both\",\n  \"keywords\": [\"sveltekit\", \"load\", \"server\", \"ssr\"],\n  \"source_context\": \"Line 45-52 of routing docs\"\n}\n```\n\n### Quality Filter\n- Zero Tier 1 leakage (absolute).\n- Minimum 3 Tier 2-4 insights per source (or skip the source).\n- Each insight must have a `domain` + `keywords`.\n\n## Phase 3: Skill Matching\n\n### 3a. Discovery\n**ACTION:** Find all existing skills using the `Glob` tool with the pattern `skills\u002F*\u002FSKILL.md`. \nIf you already discovered them in Phase 1, you can skip this step.\n\n### 3b. Matching Algorithm\nYou must score each extracted insight against the user's existing skills to find the best home for it.\n1. **Exact domain match**: Insight domain === skill name (score: 100)\n2. **Keyword overlap**: Insight keywords ∩ skill description (score: 60-90)\n3. **Technology alignment**: Same framework\u002Flibrary family (score: 40-60)\n4. **No match**: Score \u003C40 → Skip enhancement and propose a new skill instead.\n\n## Phase 4: Enhancement Proposal\n\n### For Each Match (score >= 40)\n\n**1. Read current skill**\n**ACTION:** Use the `Read` tool to read the contents of `skills\u002F{skill-name}\u002FSKILL.md`.\n\n**2. Identify target section**\nDetermine where the insight fits inside the existing skill file:\n| Insight Type | Target Section |\n|--------------|----------------|\n| Quick fact | Quick Reference table |\n| Pattern + example | Patterns \u002F Examples |\n| Gotcha \u002F warning | Anti-Patterns \u002F Common Mistakes |\n| Workflow step | Process \u002F Workflow |\n| Validation rule | Checklist |\n\n**3. Draft the enhancement**\n- Preserve the existing structure exactly.\n- Add the insight in the appropriate format for that section.\n- You MUST include source attribution: `\u003C!-- Source: {url\u002Ffile} -->`\n\n**4. CLEAR Validation**\nMentally apply the CLEAR framework to your proposed addition:\n- **C**ompact: Will the word count stay under 5000?\n- **L**abeled: Are keywords in the right places?\n- **E**xample: Does the example show a clear transformation?\n- **A**ctionable: Is the actionable pattern named?\n- **R**eferences: Is there no duplication, and does it use references?\n\n## Phase 5: User Approval\n\n### The Proposal Format\nFor each valid enhancement, you must present the proposal to the user exactly like the examples shown in the **Examples** section at the bottom of this document.\n\nPresent the:\n1. Target Skill name\n2. Insight summary and Tier\n3. Diff preview of what you are going to add\n4. Source attribution\n\n**ACTION:** Use the `AskUserQuestion` tool to ask: `\"Apply this enhancement?\"` with the options: `Apply`, `Skip`, or `Edit`.\n\n### Response Handling\n- **Apply**: Proceed to Phase 6.\n- **Skip**: Skip to the next candidate.\n- **Edit**: User modifies the text, then you proceed to Phase 6.\n\n## Phase 6: Apply & New Skill Proposal\n\n### 6a. Apply Enhancement\n**ACTION:** If the user selected 'Apply', you MUST immediately use the `Edit` tool on `skills\u002F{skill-name}\u002FSKILL.md` to insert the drafted block into the target section. **Do not just say you will do it, execute the tool.**\n\n### 6b. When No Match Found (New Skills)\nFor insights with no match (score \u003C40), present the user with a summary of the domain and keywords.\nAsk: `\"Propose new skill for {domain}?\" [y\u002Fn]`\nIf approved, generate the new skill directory and `SKILL.md` file using the `Write` tool.\n\n## Phase 7: Loop Control\n\n### After Each Source\nSummary:\n- Insights extracted: X (Tier 2: Y, Tier 3: Z, Tier 4: W)\n- Skills enhanced: [list]\n- New skills created: [list]\n- Rejected: [count]\n\nNext source? (file path, URL, or 'done')\n\n## Quality Gates\n\n### Absolute Rules\n- [ ] Zero Tier 1 insights in skills\n- [ ] User approves each change (no auto-apply)\n- [ ] Diff preview shown before any edit\n- [ ] Source attribution in comments\n\n### Warning Triggers\n- Skill exceeds 5000 words → suggest splitting\n- Large source (10K+ pages) → create router skill\n- Insight duplicates existing content → skip\n- CLEAR validation fails → revise before applying\n\n## Examples\n\n### Example 1: Extracting from Documentation\n**Source**: User runs `\u002Flearn https:\u002F\u002Fsvelte.dev\u002Fdocs\u002Fkit\u002Fstate-management`\n**Insight (Tier 3)**: SvelteKit 5 replaces store subscriptions with runes (`$state`, `$derived`) for reactivity.\n**Target Skill**: `sveltekit-patterns`\n**Agent Output Preview**:\n```markdown\n## Enhancement Proposal (Score: 85, Tier: 3)\n\n**Insight**: SvelteKit 5 relies on runes ($state, $derived) instead of store subscriptions for reactive UI state.\n**Target Skill**: skills\u002Fsveltekit-patterns\u002FSKILL.md\n**Section**: Patterns\n\n**Proposed Addition**:\n### Runes vs Stores (Svelte 5)\n\u003C!-- Source: https:\u002F\u002Fsvelte.dev\u002Fdocs\u002Fkit\u002Fstate-management -->\nReplace old `writable` stores with `$state()` runes for component-level reactivity. Do not use `$:` for derived state; use `$derived()` instead.\n\nApply this enhancement? [y\u002Fn\u002Fedit]\n```\n\n### Example 2: Extracting from Codebase\n**Source**: User runs `\u002Flearn ~\u002Fprojects\u002Fapi-gateway`\n**Insight (Tier 2)**: The codebase uses a specific Zod schema wrapper (`validateRequest(schema)`) for all incoming request validation.\n**Target Skill**: `api-middleware`\n**Agent Output Preview**:\n```markdown\n## Enhancement Proposal (Score: 70, Tier: 2)\n\n**Insight**: Local convention uses `validateRequest(schema)` middleware pattern for all Zod validation.\n**Target Skill**: skills\u002Fapi-middleware\u002FSKILL.md\n**Section**: Anti-Patterns \u002F Common Mistakes\n\n**Proposed Addition**:\n### Zod Validation Convention\n\u003C!-- Source: ~\u002Fprojects\u002Fapi-gateway\u002Fsrc\u002Fmiddleware\u002F -->\n**Do NOT** validate Zod schemas inline inside the route handler. \n**DO** use the `validateRequest(schema)` middleware exported from `src\u002Fmiddleware\u002Fvalidator.ts`.\n\nApply this enhancement? [y\u002Fn\u002Fedit]\n```\n\n",{"name":5,"description":7},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Fgaryblankenship\u002FSKILL.md\u002Fskill-learning",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":8,"skillName":5,"commands":48,"prompt":58,"zipAvailable":59},[49,52,55],{"tool":50,"command":51},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill skill-learning",{"tool":53,"command":54},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill skill-learning",{"tool":56,"command":57},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill skill-learning","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fgaryblankenship\u002FSKILL.md\u002Fskill-learning\u002FSKILL.md",true,[],[62,71,80,89,95,101],{"skillNo":63,"name":64,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":33},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[],[68,69,70],"model","model hierarchy","model hierarchy skill",{"skillNo":72,"name":73,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":33},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[],[77,78,79],"MCP","zoom","zoom mcp",{"skillNo":81,"name":82,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":33},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[86,87,88,78],"sdk","zoom apps sdk","apps",{"skillNo":90,"name":91,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":33},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[91],{"skillNo":96,"name":97,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":33},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[],[97],{"skillNo":102,"name":103,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":33},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[103]]