llms-py 3.0.21__py3-none-any.whl → 3.0.23__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- llms/extensions/computer/__init__.py +16 -8
- llms/extensions/gallery/ui/index.mjs +2 -1
- llms/extensions/skills/README.md +275 -0
- llms/extensions/skills/__init__.py +362 -3
- llms/extensions/skills/installer.py +415 -0
- llms/extensions/skills/ui/data/skills-top-5000.json +1 -0
- llms/extensions/skills/ui/index.mjs +572 -4
- llms/extensions/skills/ui/skills/create-plan/SKILL.md +6 -6
- llms/extensions/skills/ui/skills/skill-creator/LICENSE.txt +202 -0
- llms/extensions/skills/ui/skills/skill-creator/SKILL.md +356 -0
- llms/extensions/skills/ui/skills/skill-creator/references/output-patterns.md +82 -0
- llms/extensions/skills/ui/skills/skill-creator/references/workflows.md +28 -0
- llms/extensions/skills/ui/skills/skill-creator/scripts/init_skill.py +299 -0
- llms/extensions/skills/ui/skills/skill-creator/scripts/package_skill.py +111 -0
- llms/extensions/skills/ui/skills/skill-creator/scripts/quick_validate.py +98 -0
- llms/llms.json +31 -19
- llms/main.py +20 -7
- llms/providers.json +1 -1
- llms/ui/ai.mjs +1 -1
- llms/ui/app.css +67 -0
- llms/ui/ctx.mjs +6 -7
- {llms_py-3.0.21.dist-info → llms_py-3.0.23.dist-info}/METADATA +1 -1
- {llms_py-3.0.21.dist-info → llms_py-3.0.23.dist-info}/RECORD +27 -17
- {llms_py-3.0.21.dist-info → llms_py-3.0.23.dist-info}/WHEEL +0 -0
- {llms_py-3.0.21.dist-info → llms_py-3.0.23.dist-info}/entry_points.txt +0 -0
- {llms_py-3.0.21.dist-info → llms_py-3.0.23.dist-info}/licenses/LICENSE +0 -0
- {llms_py-3.0.21.dist-info → llms_py-3.0.23.dist-info}/top_level.txt +0 -0
|
@@ -6,7 +6,6 @@ https://github.com/anthropics/claude-quickstarts/tree/main/computer-use-demo
|
|
|
6
6
|
import os
|
|
7
7
|
|
|
8
8
|
from .bash import open, run_bash
|
|
9
|
-
from .computer import computer
|
|
10
9
|
from .edit import edit
|
|
11
10
|
from .filesystem import (
|
|
12
11
|
create_directory,
|
|
@@ -24,13 +23,21 @@ from .filesystem import (
|
|
|
24
23
|
search_files,
|
|
25
24
|
write_file,
|
|
26
25
|
)
|
|
27
|
-
from .platform import get_display_num, get_screen_resolution
|
|
28
26
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
27
|
+
# Try to detect screen resolution - may fail in headless environments (Docker, etc.)
|
|
28
|
+
_has_display = False
|
|
29
|
+
try:
|
|
30
|
+
from .platform import get_display_num, get_screen_resolution
|
|
31
|
+
width, height = get_screen_resolution()
|
|
32
|
+
# set environment variables
|
|
33
|
+
os.environ["WIDTH"] = str(width)
|
|
34
|
+
os.environ["HEIGHT"] = str(height)
|
|
35
|
+
os.environ["DISPLAY_NUM"] = str(get_display_num())
|
|
36
|
+
_has_display = True
|
|
37
|
+
from .computer import computer
|
|
38
|
+
except RuntimeError:
|
|
39
|
+
# No display server available - computer tool will not be registered
|
|
40
|
+
computer = None
|
|
34
41
|
|
|
35
42
|
|
|
36
43
|
def install(ctx):
|
|
@@ -39,7 +46,8 @@ def install(ctx):
|
|
|
39
46
|
ctx.register_tool(run_bash, group="computer")
|
|
40
47
|
ctx.register_tool(open, group="computer")
|
|
41
48
|
ctx.register_tool(edit, group="computer")
|
|
42
|
-
|
|
49
|
+
if _has_display and computer is not None:
|
|
50
|
+
ctx.register_tool(computer, group="computer")
|
|
43
51
|
|
|
44
52
|
ctx.register_tool(read_text_file, group="filesystem")
|
|
45
53
|
ctx.register_tool(read_media_file, group="filesystem")
|
|
@@ -222,7 +222,7 @@ const GalleryPage = {
|
|
|
222
222
|
|
|
223
223
|
<!-- Footer Actions -->
|
|
224
224
|
<div class="p-6 border-t border-gray-200 dark:border-white/5 bg-gray-50 dark:bg-[#161616] flex gap-2">
|
|
225
|
-
<button type="button" @click="deleteMedia" class="flex items-center justify-center p-3 bg-red-100 dark:bg-red-900/20 text-red-600 dark:text-red-400 font-bold rounded-xl hover:bg-red-200 dark:hover:bg-red-900/40 transition-colors" title="Delete">
|
|
225
|
+
<button type="button" @click="deleteMedia(item)" class="flex items-center justify-center p-3 bg-red-100 dark:bg-red-900/20 text-red-600 dark:text-red-400 font-bold rounded-xl hover:bg-red-200 dark:hover:bg-red-900/40 transition-colors" title="Delete">
|
|
226
226
|
<svg class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" /></svg>
|
|
227
227
|
</button>
|
|
228
228
|
<a :href="lightboxItem.url" download class="flex-1 flex items-center justify-center gap-2 bg-gray-900 dark:bg-white text-white dark:text-black font-bold py-3 px-6 rounded-xl hover:bg-gray-800 dark:hover:bg-gray-200 transition-colors shadow-lg shadow-black/5 dark:shadow-white/5">
|
|
@@ -408,6 +408,7 @@ const GalleryPage = {
|
|
|
408
408
|
|
|
409
409
|
async function deleteMedia(item) {
|
|
410
410
|
const target = item && item.hash ? item : lightboxItem.value
|
|
411
|
+
console.log('deleteMedia', item, target)
|
|
411
412
|
if (!target) return
|
|
412
413
|
|
|
413
414
|
if (!confirm('Are you sure you want to delete this media?')) return
|
|
@@ -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
|
+

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