Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ skilld eject vue # Eject skill (portable, no symlinks)
skilld eject vue --name vue # Eject with custom skill dir name
skilld eject vue --out ./dir/ # Eject to custom path
skilld eject vue --from 2025-07-01 # Only releases/issues since date
skilld author # Generate skill for npm publishing (monorepo-aware)
skilld author -m haiku # Author with specific LLM model
skilld author -o ./custom/ # Author to custom output directory
```

## Architecture
Expand Down
46 changes: 46 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,52 @@ Share via `skilld add owner/repo` - consumers get fully functional skills with n
| `--from` | | | Collect releases/issues/discussions from this date (YYYY-MM-DD, eject only) |
| `--debug` | | `false` | Save raw LLM output to logs/ for each section |

## For Maintainers

Ship skills with your npm package so consumers get them automatically. No LLM needed on their end.

### Generate a skill

From your package root (or monorepo root):

```bash
npx skilld author
```

In a monorepo, skilld auto-detects workspaces and prompts which packages to generate for. Docs are resolved from: package `docs/`, monorepo `docs/content/`, `llms.txt`, or `README.md`.

This creates a `skills/<your-package>/` directory with a `SKILL.md` and ejected reference files. It also adds `"skills"` to your `package.json` `files` array.

### How consumers get it

Once published, consumers run:

```bash
npx skilld prepare
```

Or add it to their `package.json` so it runs on every install:

```json
{
"scripts": {
"prepare": "skilld prepare"
}
}
```

`skilld prepare` auto-detects shipped skills in `node_modules` and symlinks them into the agent's skill directory. Compatible with [skills-npm](https://github.com/antfu/skills-npm).

### Options

| Flag | Alias | Default | Description |
|:----------|:-----:|:-------:|:------------|
| `--model` | `-m` | | LLM model for enhancement |
| `--out` | `-o` | | Output directory (single package only) |
| `--force` | `-f` | `false` | Clear cache and regenerate |
| `--yes` | `-y` | `false` | Skip prompts, use defaults |
| `--debug` | | `false` | Save raw LLM output to logs/ |

## The Landscape

Several approaches exist for steering agent knowledge. Each fills a different niche:
Expand Down
4 changes: 3 additions & 1 deletion src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ async function brandLoader<T>(work: () => Promise<T>, minMs = 1500): Promise<T>

// ── Subcommands (lazy-loaded) ──

const SUBCOMMAND_NAMES = ['add', 'eject', 'update', 'info', 'list', 'config', 'remove', 'install', 'uninstall', 'search', 'cache', 'validate', 'assemble', 'setup', 'prepare']
const SUBCOMMAND_NAMES = ['add', 'eject', 'update', 'info', 'list', 'config', 'remove', 'install', 'uninstall', 'search', 'cache', 'validate', 'assemble', 'setup', 'prepare', 'author', 'publish']

// ── Main command ──

Expand Down Expand Up @@ -179,6 +179,8 @@ const main = defineCommand({
validate: () => import('./commands/validate.ts').then(m => m.validateCommandDef),
assemble: () => import('./commands/assemble.ts').then(m => m.assembleCommandDef),
setup: () => import('./commands/setup.ts').then(m => m.setupCommandDef),
author: () => import('./commands/author.ts').then(m => m.authorCommandDef),
publish: () => import('./commands/author.ts').then(m => m.authorCommandDef),
},
async run({ args }) {
// Guard: citty always calls parent run() after subcommand dispatch.
Expand Down
Loading
Loading