url-to-skill
Skill0 starsChanged 8 months agoMITView on GitHub
Convert any GitHub repository URL or documentation website URL into a structured Claude Code skill file. Automatically fetches, analyzes, and packages the content into a reusable skill saved to ~/.claude/skills/. Use this skill whenever the user wants to turn a URL into a skill, create a skill from a GitHub repo, generate a skill from documentation, or says things like "make a skill from this link", "convert this repo to a skill", or "I want a skill for [framework/library]". Also trigger when users paste a GitHub URL or docs URL and ask to "learn" it, "remember" it, or "create context" from it.
In this repository6 other files it gives its agents.
- context-switch-v1.0.0Skill
- github_ops-v1.0.0Skill
- skill-creatorSkill
- Skill Evolution ManagerSkill
- skill-managerSkill
- wechat-article-reader-v1.0.0Skill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 9 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 35
Run these commands to gather repo data.
- Distinctive: line 57
If CLAUDE.md or AGENTS.md exists, fetch it — it contains project conventions
- Very specific: line 67
Use WebFetch on the main URL to get the landing page content
- Very specific: line 95
Write a SKILL.md with YAML frontmatter and structured markdown body.
- Distinctive: line 170
Every code example must come from the actual source, not invented
- Distinctive: line 171
Use the project's real API signatures, types, and naming conventions
- Distinctive: line 172
If information is missing or couldn't be fetched, note it briefly and move on
- Distinctive: line 177
Create the output directory if needed:
- Very specific: line 182
Write the skill file to ~/.claude/skills/{project-name}/SKILL.md
- Very specific: line 192
If gh CLI is not authenticated or available, tell the user to run gh auth login first
- Distinctive: line 193
If WebFetch fails on a URL, skip it and note what was missed — don't abort the whole process
- Distinctive: line 194
If the repo is empty or the docs site has no useful content, explain what happened and suggest alternatives (e.g., "Try pointing to the …
- Distinctive: line 195
If a file is too large to fetch via the API (>1MB), skip it and pick a smaller alternative
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
URL to Skill
Turn any GitHub repository or documentation website into a structured Claude Code skill file.
How It Works
This skill follows a 5-step pipeline: detect URL type → fetch content → analyze → generate skill → save.
Step 1: Detect URL Type
Classify the input URL:
- GitHub repo: matches
github.com/{owner}/{repo}or shorthand{owner}/{repo} - Documentation site: everything else (any HTTP/HTTPS URL)
Extract owner and repo from GitHub URLs by parsing the path. Strip trailing slashes, .git suffixes, and extra path segments (like /tree/main/...).
Step 2: Fetch Content
For GitHub Repositories
Run these commands to gather repo data. Launch independent calls in parallel where possible.
Metadata + README + file tree (parallel):
# Repo metadata (description, language, topics, default branch)
gh api repos/{owner}/{repo} --jq '{description, language, default_branch, stargazers_count, topics}'
# README content (base64-encoded)
gh api repos/{owner}/{repo}/readme --jq '.content' | base64 -d
# Full file tree
gh api repos/{owner}/{repo}/git/trees/{default_branch}?recursive=1 --jq '.tree[] | select(.type=="blob") | .path'Then identify and fetch key files:
- From the file tree, pick 3-5 core source files based on:
- Entry points:
main.*,index.*,app.*,cli.* - Source directories:
src/,lib/,pkg/,internal/ - Config files:
package.json,pyproject.toml,Cargo.toml,go.mod - The repo's primary language
- Entry points:
- If
CLAUDE.mdorAGENTS.mdexists, fetch it — it contains project conventions - Fetch each file:
gh api repos/{owner}/{repo}/contents/{path} --jq '.content' | base64 -d
Priority order: README > project config > source entry points > other source files
For Documentation Websites
- Use
WebFetchon the main URL to get the landing page content - From the page, identify navigation links pointing to key sections:
- Getting started / quickstart / installation
- API reference / reference docs
- Core concepts / guides / tutorials
- Fetch 3-5 of the most important pages using
WebFetch - Extract: code examples, API signatures, configuration patterns, best practices
Priority order: Getting started > API reference > Guides > Tutorials
Step 3: Analyze Content
From all fetched content, extract and organize:
| Category | What to look for |
| Identity | Project name, one-line purpose, version, license |
| Core concepts | Key terminology, mental models, architecture overview |
| API surface | Functions, classes, methods — with signatures and brief descriptions |
| Patterns | Common usage patterns with real code examples from the source |
| Best practices | Do's and don'ts, anti-patterns, performance tips |
| Structure | Typical project layout, file conventions, naming conventions |
| Dependencies | Prerequisites, required tools, compatible versions |
Focus on what a developer would need to be productive with this project. Skip marketing content, contributor guidelines, and changelog details.
Step 4: Generate the Skill File
Write a SKILL.md with YAML frontmatter and structured markdown body.
Frontmatter template:
---
name: {project-name-lowercase}
description: >
Provides expertise on {Project Name} — {one-line description}.
Use this skill when working with {project name}, its APIs, patterns,
or when the user asks about {key topics}. Also trigger for related
terms like {aliases, abbreviations, related concepts}.
---The description is the trigger mechanism — make it specific and slightly "pushy" so it activates when relevant. Include concrete keywords and phrases users might say.
Body structure:
# {Project Name}
{2-3 sentence overview: what it is, what it's for, key differentiator}
## Core Concepts
{Key terminology and mental models, explained concisely}
## API Reference
{Most important APIs with signatures and one-line descriptions}
{Use actual signatures from the source, not placeholders}
### {Category 1}
- `functionName(param: Type): ReturnType` — what it does
- `ClassName` — what it represents
- `.method(args)` — what the method does
## Common Patterns
{3-5 real-world usage patterns with code examples}
{Use code blocks with language tags}
### {Pattern Name}
```{language}
// Real code example extracted from the sourceBest Practices
- Do: {positive practice with brief reason}
- Don't: {anti-pattern with brief reason}
Project Structure
typical-project/
├── src/ — {what goes here}
├── tests/ — {what goes here}
└── config.file — {what this configures}Quick Reference
{Cheat sheet: most common operations as a compact list}
| Task | How |
| {common task} | {command or code} |
**Guidelines for the generated content:**
- Aim for 200-500 lines total — enough to be useful, short enough to fit in context
- Every code example must come from the actual source, not invented
- Use the project's real API signatures, types, and naming conventions
- If information is missing or couldn't be fetched, note it briefly and move on
- Organize API reference by logical category, not alphabetically
## Step 5: Save the Skill
1. Create the output directory if needed:
```bash
mkdir -p ~/.claude/skills/{project-name}- Write the skill file to
~/.claude/skills/{project-name}/SKILL.md - Report to the user:
- File path where the skill was saved
- Brief summary: what the skill covers, how many APIs/patterns were captured
- Any content that couldn't be fetched (with reason)
- Suggest: "You can now use this skill by asking questions about {project name}. To update it later, just run
/url-to-skill {url}again."
Error Handling
- If
ghCLI is not authenticated or available, tell the user to rungh auth loginfirst - If WebFetch fails on a URL, skip it and note what was missed — don't abort the whole process
- If the repo is empty or the docs site has no useful content, explain what happened and suggest alternatives (e.g., "Try pointing to the docs site instead" or "This repo has minimal documentation")
- If a file is too large to fetch via the API (>1MB), skip it and pick a smaller alternative
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

