# Creator

The creator scaffolds new skills from templates, generating all 5 required files with pre-filled content.

---

## Usage

```bash
skilllane create <name> [options]
```

| Option | Description |
|--------|-------------|
| `--title <title>` | Display title (defaults to name with spaces) |
| `--description <desc>` | Skill description |
| `--category <cat>` | Category (default: `general`) |
| `--tags <t1,t2,...>` | Comma-separated tags |
| `--targets <t1,t2,...>` | Comma-separated targets |
| `--template <name>` | Template to use |
| `--out <dir>` | Output directory (default: current directory) |

---

## Templates

### basic

General-purpose template for any skill type.

```bash
skilllane create my-skill --template basic
```

Generates:
- A general-purpose agent role with clear instructions
- `read_file` and `write_file` tools (optional)
- A refactoring example
- Standard success criteria

### debugging

For bug hunting and troubleshooting skills.

```bash
skilllane create my-debugger --template debugging
```

Generates:
- Debugging specialist role with 4-phase workflow: Reproduce, Isolate, Patch, Verify
- `read_file` (required), `grep`, `run_command` tools
- TypeError debugging scenario
- Debugging-specific success criteria
- Auto-adds `debugging` and `troubleshooting` tags

### writing

For content creation and documentation skills.

```bash
skilllane create my-writer --template writing
```

Generates:
- Writing assistant role with 4-phase workflow: Research, Draft, Edit, Publish
- `read_file` and `write_file` (required) tools
- API documentation example
- Writing-specific success criteria
- Auto-adds `writing`, `content`, `documentation` tags

### product-launch

For product launch coordination skills.

```bash
skilllane create my-launcher --template product-launch
```

Generates:
- Product launch strategist role with 4-phase workflow: Announcement, Documentation, Thread, Notes
- `read_file` and `write_file` (required) tools
- API v2 launch scenario
- Launch-specific success criteria
- Auto-adds `product-launch`, `announcement`, `marketing` tags

---

## Generated Files

Each template produces these files in `<outDir>/<name>/`:

```
my-skill/
├── metadata.json    # Pre-filled with name, version, category, tags, dates
├── SKILL.md         # Template-specific role, workflow, constraints
├── tools.json       # Template-specific tool definitions
├── examples.md      # Template-specific example scenario
└── eval.md          # Template-specific success criteria
```

---

## Programmatic Usage

```typescript
import { createSkill } from '@talocode/skilllane';

const skill = await createSkill({
  name: 'my-skill',
  description: 'Does something useful',
  title: 'My Skill',
  category: 'engineering',
  tags: ['debugging'],
  template: 'debugging',
  outDir: './skills',
});

console.log(skill.path); // ./skills/my-skill
```
