skilo 0.7.3

CLI tool for Agent Skills development
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
# skilo

[![CI](https://github.com/manuelmauro/skilo/actions/workflows/ci.yml/badge.svg)](https://github.com/manuelmauro/skilo/actions/workflows/ci.yml)
[![Crates.io](https://img.shields.io/crates/v/skilo.svg)](https://crates.io/crates/skilo)

A CLI tool for [Agent Skills](https://agentskills.io/specification) development.

## Installation

### Quick install (recommended)

```bash
curl -sSfL https://raw.githubusercontent.com/manuelmauro/skilo/main/install.sh | sh
```

### From crates.io

```bash
cargo install skilo
```

### From source

```bash
# Clone the repository
git clone https://github.com/manuelmauro/skilo.git
cd skilo

# Install using make
make install

# Or directly with cargo
cargo install --path .
```

## Using the Skilo Skill

Skilo includes a skill that teaches AI coding assistants how to use the CLI. Add it to your project to enable your assistant to create and validate skills:

```bash
# Install using skilo add
skilo add manuelmauro/skilo --skill use-skilo
```

Or manually with curl:

```bash
mkdir -p .claude/skills
curl -fsSL https://raw.githubusercontent.com/manuelmauro/skilo/main/.claude/skills/use-skilo/SKILL.md \
  -o .claude/skills/use-skilo/SKILL.md --create-dirs
```

Once installed, your AI assistant will be able to:
- Install skills from repositories using `skilo add`
- Create new skills using `skilo new`
- List installed skills with `skilo list`
- Detect installed agents with `skilo agents`
- Manage git cache with `skilo cache`
- Validate skills with `skilo lint`
- Format SKILL.md files with `skilo fmt`
- Extract skill metadata with `skilo read-properties`
- Generate agent prompts with `skilo to-prompt`
- Set up CI workflows for skill validation

### Requirements

- Rust 1.92.0 (pinned in `rust-toolchain.toml`)

## Usage

### Install skills from repositories

```bash
# Install all skills from a GitHub repository
skilo add anthropics/skills

# Install a specific skill by name
skilo add vercel-labs/agent-skills --skill code-review

# Install multiple specific skills
skilo add owner/repo --skill lint-fix --skill test-runner

# List available skills without installing
skilo add anthropics/skills --list

# Install from a specific branch
skilo add owner/repo --branch develop

# Install from a specific tag
skilo add owner/repo --tag v1.0.0

# Non-interactive installation (for CI)
skilo add anthropics/skills --skill lint-fix --yes

# Install from a full URL
skilo add https://github.com/owner/repo

# Install from a direct skill path
skilo add https://github.com/owner/repo/tree/main/skills/my-skill

# Install from SSH URL
skilo add git@github.com:owner/repo.git

# Install from local path
skilo add ./path/to/skills

# Install to global skills directory
skilo add anthropics/skills --global

# Install to multiple agents
skilo add anthropics/skills --agent claude --agent cursor

# Install to all detected agents
skilo add anthropics/skills --agent all
```

Skills are installed to `.claude/skills/<skill-name>/` by default (project-level).
Use `--global` to install to `~/.claude/skills/` (user-level).

### Create a new skill

```bash
# Create a skill with the default template (hello-world)
skilo new my-skill

# Use a specific template
skilo new my-skill --template minimal

# Specify the script language
skilo new my-skill --lang python

# Add a description and license
skilo new my-skill --description "My awesome skill" --license MIT

# Create a global skill
skilo new my-skill --global

# Create a skill for a specific agent
skilo new my-skill --agent cursor
```

**Available templates:**
- `hello-world` (default) - A minimal working skill with a greeting script
- `minimal` - Bare-bones skill with only SKILL.md
- `full` - Complete skill with all optional directories
- `script-based` - Skill focused on script execution

**Supported languages:** `python`, `bash`, `javascript`, `typescript`

### Validate skills

```bash
# Lint a skill directory
skilo lint path/to/skill

# Lint all skills in current directory
skilo lint .

# Strict mode (treat warnings as errors)
skilo lint --strict .

# Auto-fix simple issues
skilo lint --fix .
```

### Format skills

```bash
# Format SKILL.md files (includes table alignment)
skilo fmt path/to/skill

# Check formatting without modifying
skilo fmt --check .

# Show diff of changes
skilo fmt --diff .
```

Formatting includes:
- YAML frontmatter normalization
- Markdown table column alignment

### Run all checks

```bash
# Run lint + format check (ideal for CI)
skilo check .
```

### List installed skills

```bash
# List project skills
skilo list

# List skills from a specific project
skilo list /path/to/project

# List global skills only
skilo list --global

# List both project and global skills
skilo list --all

# List skills for a specific agent
skilo list --agent cursor
```

### List detected agents

```bash
# Show detected agents with skill counts
skilo agents

# Show feature support matrix
skilo agents --verbose
```

Example output:

```
Project agents:
  Claude Code    .claude/skills/  (3 skills)
  Cursor         .cursor/skills/  (1 skill)

Global agents:
  Claude Code    ~/.claude/skills/  (2 skills)
```

### Manage git cache

Skilo caches git repositories for faster repeated installs and offline usage:

```bash
# Show cache status and disk usage
skilo cache

# Show cache directory path
skilo cache path

# Clean checkouts older than 30 days (keeps bare repos for fast re-checkout)
skilo cache clean

# Clean checkouts older than 7 days
skilo cache clean --max-age 7

# Remove entire cache (bare repos + checkouts)
skilo cache clean --all
```

Example output:

```
Cache directory: /home/user/.skilo/git

  db/: 2 repositories, 1.2 MB
    anthropics-skills
    manuelmauro-moonbeam-skills

  checkouts/: 3 checkouts, 4.5 MB
    anthropics-skills-a1b2c3d (2 days ago)
    manuelmauro-moonbeam-skills-0c331b1 (just now)

Total: 5.7 MB
```

### Read skill properties

Extract skill metadata as JSON for programmatic use:

```bash
# Read properties from a single skill (outputs JSON object)
skilo read-properties path/to/skill

# Read properties from multiple skills (outputs JSON array)
skilo read-properties path/to/skills/

# Read from multiple paths
skilo read-properties skill-a skill-b
```

Output includes: `name`, `description`, `license`, `compatibility`, `metadata`, `allowed_tools`, and `path`.

### Generate agent prompts

Generate XML for use in agent system prompts:

```bash
# Generate XML for a single skill
skilo to-prompt path/to/skill

# Generate XML for all skills in a directory
skilo to-prompt path/to/skills/
```

Example output:

```xml
<available_skills>
  <skill>
    <name>my-skill</name>
    <description>A brief description of what the skill does.</description>
    <location>path/to/my-skill/SKILL.md</location>
  </skill>
</available_skills>
```

### Output formats

All commands support multiple output formats:

```bash
skilo lint --format text .   # Human-readable (default)
skilo lint --format json .   # JSON output
skilo lint --format sarif .  # SARIF for code scanning integrations
```

## Skill Structure

A valid skill follows this structure:

```
my-skill/
├── SKILL.md           # Required: manifest with YAML frontmatter
├── scripts/           # Optional: executable scripts
├── references/        # Optional: additional documentation
└── assets/            # Optional: static resources
```

### SKILL.md Format

```markdown
---
name: my-skill
description: A brief description of what the skill does.
license: MIT
---

# My Skill

Detailed documentation goes here.
```

## Configuration

Create a `.skilorc.toml` file for project-specific settings:

```toml
[lint]
strict = true

[lint.rules]
name_format = true           # E001: Name format validation
name_length = 64             # E002: Name max length (false to disable)
name_directory = true        # E003: Name matches directory
description_required = true  # E004: Description not empty
description_length = 1024    # E005: Description max length (false to disable)
compatibility_length = 500   # E006: Compatibility max length (false to disable)
references_exist = true      # E009: Referenced files exist
body_length = 500            # W001: Max body lines (false to disable)
script_executable = true     # W002: Scripts are executable
script_shebang = true        # W003: Scripts have shebang

[fmt]
sort_frontmatter = true
indent_size = 2
format_tables = true

[new]
default_license = "MIT"
default_template = "hello-world"
default_lang = "python"

[add]
default_agent = "claude"  # See supported agents below
confirm = true            # Prompt before installing (false for CI)
validate = true           # Validate skills before installing
```

### Configuring Rules

Rules with thresholds accept `true` (default), `false` (disabled), or a number:

```toml
[lint.rules]
name_directory = false       # Disable for monorepos
script_executable = false    # Disable for Windows
name_length = 128            # Custom max name length
description_length = false   # Disable description length check
body_length = 1000           # Custom max body lines
```

### Supported Agents

The `default_agent` option supports the following AI coding assistants:

| Agent          | Config Value  | Project Path        | Global Path                     |
| -------------- | ------------- | ------------------- | ------------------------------- |
| Claude Code    | `claude`      | `.claude/skills/`   | `~/.claude/skills/`             |
| OpenCode       | `open-code`   | `.opencode/skill/`  | `~/.config/opencode/skill/`     |
| Codex          | `codex`       | `.codex/skills/`    | `~/.codex/skills/`              |
| Cursor         | `cursor`      | `.cursor/skills/`   | `~/.cursor/skills/`             |
| Amp            | `amp`         | `.agents/skills/`   | `~/.config/agents/skills/`      |
| Kilo Code      | `kilo-code`   | `.kilocode/skills/` | `~/.kilocode/skills/`           |
| Roo Code       | `roo-code`    | `.roo/skills/`      | `~/.roo/skills/`                |
| Goose          | `goose`       | `.goose/skills/`    | `~/.config/goose/skills/`       |
| Gemini CLI     | `gemini`      | `.gemini/skills/`   | `~/.gemini/skills/`             |
| Antigravity    | `antigravity` | `.agent/skills/`    | `~/.gemini/antigravity/skills/` |
| GitHub Copilot | `copilot`     | `.github/skills/`   | `~/.copilot/skills/`            |
| Clawdbot       | `clawdbot`    | `skills/`           | `~/.clawdbot/skills/`           |
| Droid          | `droid`       | `.factory/skills/`  | `~/.factory/skills/`            |
| Windsurf       | `windsurf`    | `.windsurf/skills/` | `~/.codeium/windsurf/skills/`   |

## Environment Variables

| Variable       | Description                                      |
| -------------- | ------------------------------------------------ |
| `SKILO_CONFIG` | Path to configuration file                       |
| `SKILO_HOME`   | Override skilo home directory (default: `~/.skilo/`) |
| `SKILO_CACHE`  | Override git cache directory (default: `~/.skilo/git/`) |
| `SKILO_OFFLINE`| Set to `1` to use cached repositories only (no network) |

## CI Integration

Add skilo validation to your GitHub Actions workflow:

```yaml
# .github/workflows/skills.yml
name: Validate Skills

on:
  push:
    branches: [main]
  pull_request:

jobs:
  validate:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Install Rust
        uses: dtolnay/rust-toolchain@stable

      - name: Install skilo
        run: cargo install skilo@0.7.3

      - name: Lint skills
        run: skilo lint . --strict

      - name: Check formatting
        run: skilo fmt . --check
```

To upload results to GitHub's Security tab, use SARIF output:

```yaml
      - name: Run skilo check
        run: skilo lint . --format sarif > results.sarif
        continue-on-error: true

      - name: Upload SARIF
        uses: github/codeql-action/upload-sarif@v3
        with:
          sarif_file: results.sarif
```

## Exit Codes

| Code | Meaning                            |
| ---- | ---------------------------------- |
| 0    | Success                            |
| 1    | Validation errors found            |
| 2    | Invalid arguments or configuration |
| 3    | I/O error                          |

## License

MIT OR Apache-2.0