Skip to content

Commit 622826b

Browse files
committed
add ability to browse and install top 5000 skills
1 parent 542eb9d commit 622826b

File tree

5 files changed

+977
-3
lines changed

5 files changed

+977
-3
lines changed

llms/extensions/skills/README.md

Lines changed: 275 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,275 @@
1+
# Skills
2+
3+
Skills extend Claude's capabilities with specialized knowledge, workflows, and tools. Think of them as modular packages that transform Claude from a general-purpose assistant into a domain expert for specific tasks.
4+
5+
## What Are Skills?
6+
7+
A skill is a self-contained package containing:
8+
9+
- **Instructions** - Step-by-step guidance for specific workflows
10+
- **Scripts** - Executable code for complex or repetitive tasks
11+
- **References** - Documentation loaded on demand when needed
12+
- **Assets** - Templates, images, and files used in output
13+
14+
When a skill is active, Claude automatically reads its instructions before starting relevant tasks, ensuring consistent, high-quality results.
15+
16+
## When to Use Skills
17+
18+
Skills are valuable when you need Claude to:
19+
20+
- **Follow consistent workflows** - Code reviews, planning, documentation writing
21+
- **Work with specific technologies** - Frameworks, APIs, or proprietary systems
22+
- **Apply domain expertise** - Legal analysis, medical terminology, company policies
23+
- **Produce standardized outputs** - Reports, designs, formatted documents
24+
- **Use specialized tools** - Custom scripts, validation tools, generators
25+
26+
## Managing Skills
27+
28+
### The Skills Panel
29+
30+
Access the skills panel by clicking the **Skills** icon in the top toolbar. The panel displays all available skills organized by source.
31+
32+
![Skills Panel Overview](https://docs.servicestack.net/assets/img/llms/skills-panel-overview.png)
33+
34+
### Skill Groups
35+
36+
Skills are organized into groups based on their source:
37+
38+
| Group | Description | Editable |
39+
|-------|-------------|----------|
40+
| `~/.llms/.agents` | Your personal skills collection | ✓ Yes |
41+
| Built-in | Skills bundled with the extension | ✗ No |
42+
43+
Your personal skills (`~/.llms/.agents`) are fully editable. Built-in skills provide reference implementations you can learn from.
44+
45+
### Selecting Skills for a Conversation
46+
47+
The skills panel provides three modes for controlling which skills are active:
48+
49+
#### All Skills (Green)
50+
All available skills are available for Claude to use. Claude decides which skills are relevant based on your request.
51+
52+
**Best for:** General conversations where you want Claude to have access to all capabilities.
53+
54+
#### No Skills (Purple)
55+
No skills are loaded. Claude operates with base capabilities only.
56+
57+
**Best for:** Simple tasks or when you want to ensure skills don't influence the response.
58+
59+
#### Custom Selection (Blue)
60+
Select specific skills to include. Click individual skills to toggle them on/off.
61+
62+
**Best for:** Focusing Claude on specific domains or troubleshooting skill interactions.
63+
64+
### Group Controls
65+
66+
Each skill group has **all** and **none** buttons for quick selection:
67+
68+
- **all** - Include every skill in the group
69+
- **none** - Exclude every skill in the group
70+
71+
### Collapsing Groups
72+
73+
Click the chevron (▼) next to a group name to collapse or expand it. This helps manage screen space when you have many skills.
74+
75+
## Browsing and Installing Skills
76+
77+
The skills extension includes a community registry with thousands of pre-built skills you can browse and install.
78+
79+
### Accessing the Skill Browser
80+
81+
1. Navigate to the **Manage Skills** page (click the Skills icon in the left sidebar)
82+
2. Click the **Browse** tab to open the skill browser
83+
3. Use the search box to find skills by name or source repository
84+
85+
### Searching for Skills
86+
87+
The search feature queries the community registry, which indexes skills from popular GitHub repositories. Results show:
88+
89+
- **Skill name** - The identifier used for installation
90+
- **Install count** - How many times the skill has been installed
91+
- **Source repository** - The GitHub repo containing the skill
92+
93+
### Installing a Skill
94+
95+
1. Find a skill you want to install
96+
2. Click the **Install** button next to the skill
97+
3. Wait for the installation to complete (the skill is cloned from GitHub)
98+
4. The skill appears in your personal collection (`~/.llms/.agents`)
99+
100+
**What happens during installation:**
101+
102+
1. The source repository is cloned from GitHub (shallow clone for speed)
103+
2. The skill's SKILL.md and associated files are discovered
104+
3. Files are copied to `~/.llms/.agents/skills/<skill-name>`
105+
4. The skill is immediately available for use
106+
107+
Example:
108+
```bash
109+
# Search for React-related skills
110+
curl "http://localhost:8000/ext/skills/search?q=react"
111+
112+
# Install a specific skill
113+
curl -X POST "http://localhost:8000/ext/skills/install/vercel-react-best-practices"
114+
```
115+
116+
## Creating and Editing Skills
117+
118+
### Creating a New Skill
119+
120+
1. Navigate to the **Manage Skills** page (click the Skills icon in the left sidebar)
121+
2. Click the **Create Skill** button
122+
3. Enter a skill name (lowercase letters, numbers, and hyphens only)
123+
4. The skill is created with a template SKILL.md file
124+
125+
### Skill Structure
126+
127+
A skill consists of at least one file:
128+
129+
```
130+
my-skill/
131+
└── SKILL.md # Required: Instructions and metadata
132+
```
133+
134+
Skills can also include additional resources:
135+
136+
```
137+
my-skill/
138+
├── SKILL.md # Required: Instructions and metadata
139+
├── scripts/ # Optional: Executable code
140+
│ └── helper.py
141+
├── references/ # Optional: Documentation
142+
│ └── guide.md
143+
└── assets/ # Optional: Templates and files
144+
└── template.html
145+
```
146+
147+
### Editing Skills
148+
149+
1. In the Manage Skills page, select a skill from your personal collection (`~/.llms/.agents`)
150+
2. Click on a file in the file tree to view it
151+
3. Click **Edit** to modify the file
152+
4. Make your changes in the editor
153+
5. Click **Save** to persist changes
154+
155+
**Note:** Only skills in `~/.llms/.agents` are editable. Built-in skills are read-only.
156+
157+
### Adding Files to a Skill
158+
159+
1. Select an editable skill
160+
2. Click **+ file** next to the skill name
161+
3. Enter the file path (e.g., `scripts/my-script.py`)
162+
4. The file is created and opened for editing
163+
164+
### Deleting Skills and Files
165+
166+
- **Delete a skill:** Select the skill, then click the **delete** button next to the skill name
167+
- **Delete a file:** Hover over the file in the tree, then click the **×** icon
168+
169+
**Note:** The `SKILL.md` file cannot be deleted as it's required for every skill.
170+
171+
## Skill Metadata (SKILL.md)
172+
173+
Every skill requires a `SKILL.md` file with YAML frontmatter:
174+
175+
```yaml
176+
---
177+
name: my-skill
178+
description: Clear description of what this skill does and when to use it
179+
---
180+
181+
# Skill Instructions
182+
183+
Write clear, actionable guidance here...
184+
```
185+
186+
### Required Fields
187+
188+
| Field | Description |
189+
|-------|-------------|
190+
| `name` | Unique identifier for the skill (kebab-case) |
191+
| `description` | What the skill does and when Claude should use it |
192+
193+
### Optional Fields
194+
195+
| Field | Description |
196+
|-------|-------------|
197+
| `license` | License information for the skill |
198+
| `compatibility` | Version or system compatibility notes |
199+
| `metadata` | Key-value pairs for client-specific properties |
200+
201+
## How Skills Work
202+
203+
When you send a message with skills enabled:
204+
205+
1. **Selection** - Claude reads the name and description of active skills
206+
2. **Triggering** - Claude determines which skills are relevant to your request
207+
3. **Loading** - For triggered skills, Claude loads the full SKILL.md instructions
208+
4. **Execution** - Claude follows the skill's guidance to complete your task
209+
5. **References** - Claude loads additional files from `references/` only when needed
210+
6. **Scripts** - Claude may execute scripts from `scripts/` directly
211+
212+
This progressive loading ensures efficient use of context window while providing comprehensive guidance when needed.
213+
214+
## Example Use Cases
215+
216+
### Documentation Writing
217+
218+
**Skill:** `doc-coauthoring`
219+
220+
Guides you through creating structured documentation with a three-stage workflow: context gathering, refinement, and reader testing.
221+
222+
**Trigger:** "Help me write a design doc for..."
223+
224+
### Code Planning
225+
226+
**Skill:** `create-plan`
227+
228+
Creates actionable implementation plans with scope definition, checklists, and risk assessment.
229+
230+
**Trigger:** "Create a plan for adding authentication..."
231+
232+
### Creating New Skills
233+
234+
**Skill:** `skill-creator`
235+
236+
Guides you through creating effective skills with proper structure, bundled resources, and best practices.
237+
238+
**Trigger:** "I want to create a skill for..."
239+
240+
## Tips for Effective Skill Usage
241+
242+
1. **Start broad, then narrow** - Begin with "All Skills" and switch to custom selection if Claude uses irrelevant skills
243+
244+
2. **Check the skill description** - Hover over a skill name in the panel to see its full description
245+
246+
3. **Enable the skill tool** - The `skill` tool must be enabled for skills to work. A warning appears if it's disabled.
247+
248+
4. **Iterate on personal skills** - As you use your custom skills, refine them based on what works
249+
250+
5. **Use references for large content** - Keep SKILL.md focused; move detailed docs to `references/`
251+
252+
6. **Test scripts** - Always verify scripts work before relying on them
253+
254+
## Troubleshooting
255+
256+
| Issue | Solution |
257+
|-------|----------|
258+
| Skills not appearing | Check that the `skill` tool is enabled in preferences |
259+
| Claude not using a skill | Verify the skill is selected (not in "No Skills" mode) |
260+
| Can't edit a skill | Only skills in `~/.llms/.agents` are editable; built-in skills are read-only |
261+
| Skill not triggering | Review the description in SKILL.md - it determines when Claude uses the skill |
262+
| Changes not saving | Ensure you click **Save** after editing; unsaved changes show an orange dot |
263+
264+
## Keyboard Shortcuts
265+
266+
| Action | Shortcut |
267+
|--------|----------|
268+
| Open Skills panel | Click Skills icon in top toolbar |
269+
| Navigate to Manage Skills | Click Skills icon in left sidebar |
270+
| Save file | Ctrl+S (when editing) |
271+
272+
## See Also
273+
274+
- [Skill Creator Guide](./ui/skills/skill-creator/SKILL.md) - Learn to build effective skills
275+
- [Create Plan Skill](./ui/skills/create-plan/SKILL.md) - Example of a workflow skill

llms/extensions/skills/__init__.py

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@
1212
g_skills = {}
1313
g_home_skills = None
1414

15+
# Example of what's returned from https://skills.sh/api/skills?limit=5000&offset=0 > ui/data/skills-top-5000.json
16+
# {
17+
# "id": "vercel-react-best-practices",
18+
# "name": "vercel-react-best-practices",
19+
# "installs": 68580,
20+
# "topSource": "vercel-labs/agent-skills"
21+
# }
22+
g_available_skills = []
23+
1524

1625
def is_safe_path(base_path: str, requested_path: str) -> bool:
1726
"""Check if the requested path is safely within the base path."""
@@ -163,11 +172,82 @@ def install(ctx):
163172
except OSError:
164173
pass
165174

175+
g_available_skills = []
176+
try:
177+
with open(os.path.join(ctx.path, "ui", "data", "skills-top-5000.json")) as f:
178+
top_skills = json.load(f)
179+
g_available_skills = top_skills["skills"]
180+
except Exception:
181+
pass
182+
166183
async def get_skills(request):
167184
return aiohttp.web.json_response(g_skills)
168185

169186
ctx.add_get("", get_skills)
170187

188+
async def search_available_skills(request):
189+
q = request.query.get("q", "")
190+
limit = int(request.query.get("limit", 50))
191+
offset = int(request.query.get("offset", 0))
192+
q_lower = q.lower()
193+
filtered_results = [
194+
s for s in g_available_skills if q_lower in s.get("name", "") or q_lower in s.get("topSource", "")
195+
]
196+
sorted_by_installs = sorted(filtered_results, key=lambda x: x.get("installs", 0), reverse=True)
197+
results = sorted_by_installs[offset : offset + limit]
198+
return aiohttp.web.json_response(
199+
{
200+
"results": results,
201+
"total": len(sorted_by_installs),
202+
}
203+
)
204+
205+
ctx.add_get("search", search_available_skills)
206+
207+
async def install_skill(request):
208+
id = request.match_info.get("id")
209+
skill = next((s for s in g_available_skills if s.get("id") == id), None)
210+
if not skill:
211+
raise Exception(f"Skill '{id}' not found")
212+
213+
# Get the source repo (e.g., "vercel-labs/agent-skills")
214+
source = skill.get("topSource")
215+
if not source:
216+
raise Exception(f"Skill '{id}' has no source repository")
217+
218+
# Install from GitHub
219+
from .installer import install_from_github
220+
221+
result = await install_from_github(
222+
repo_url=f"https://github.com/{source}.git",
223+
skill_names=[id],
224+
target_dir=home_skills,
225+
)
226+
227+
if not result.get("success"):
228+
raise Exception(result.get("error", "Installation failed"))
229+
230+
# Reload the installed skills into the registry
231+
for installed in result.get("installed", []):
232+
skill_path = installed.get("path")
233+
if skill_path and os.path.exists(skill_path):
234+
skill_dir = Path(skill_path).resolve()
235+
props = read_properties(skill_dir)
236+
files = get_skill_files(skill_dir)
237+
skill_props = props.to_dict()
238+
skill_props.update(
239+
{
240+
"group": "~/.llms/.agents",
241+
"location": str(skill_dir),
242+
"files": files,
243+
}
244+
)
245+
g_skills[props.name] = skill_props
246+
247+
return aiohttp.web.json_response(result)
248+
249+
ctx.add_post("install/{id}", install_skill)
250+
171251
async def get_skill(request):
172252
name = request.match_info.get("name")
173253
file = request.query.get("file")

0 commit comments

Comments
 (0)