npm package: @skill-kit/init
Description: Skill scaffolding generator - create standardized Skill projects with interactive prompts
Latest version: 1.0.0

# @skill-kit/init

> Skill scaffolding generator - create standardized Skill projects with interactive prompts

## Installation

```bash
npm install -g @skill-kit/init
# or
pnpm add -g @skill-kit/init
```

## Usage

### Interactive Mode (Default)

```bash
skill-init my-awesome-skill
```

This will launch an interactive prompt:

```
  Creating new Skill

? Skill name: My Awesome Skill
? Short description: Helps users create React components quickly
? Trigger phrases (comma separated): create component, add component
? Choose a template:
  > minimal  - Only SKILL.md
    standard - SKILL.md + references/ (recommended)
    complete - Full structure with examples/, scripts/
? Target platform:
    Claude Code
  > Codex CLI
    Cursor
    All (Universal)

  Skill created successfully!

my-awesome-skill/
├── SKILL.md
├── references/
│   └── patterns.md
└── README.md
```

### Non-Interactive Mode

```bash
skill-init my-skill \
  --name "My Skill" \
  --desc "Does something useful" \
  --triggers "do X, help with X" \
  --template standard \
  --platform claude-code \
  --no-interactive
```

## CLI Options

```
Usage: skill-init [options] <directory>

Create a new Skill project with interactive prompts

Arguments:
  directory                  Target directory for the skill

Options:
  -V, --version              output the version number
  -n, --name <name>          Skill name
  -d, --desc <description>   Skill description
  -t, --triggers <triggers>  Trigger phrases (comma separated)
  --template <type>          Template type: minimal, standard, complete
  --platform <type>          Target platform: claude-code, codex, cursor, all
  --no-interactive           Skip interactive prompts
  -f, --force                Overwrite existing directory
  --author <name>            Author name
  -h, --help                 display help for command
```

## Templates

### minimal

```
skill-name/
└── SKILL.md
```

Best for simple, single-file skills.

### standard (Recommended)

```
skill-name/
├── SKILL.md
├── references/
│   └── patterns.md
└── README.md
```

Best for most skills with supporting documentation.

### complete

```
skill-name/
├── SKILL.md
├── README.md
├── references/
│   ├── patterns.md
│   └── advanced.md
├── examples/
│   └── example.sh
└── scripts/
    └── validate.sh
```

Best for complex skills with examples and validation scripts.

## Programmatic API

```typescript
import { initSkill } from '@skill-kit/init';

const result = await initSkill({
  directory: './my-skill',
  name: 'My Skill',
  description: 'A useful skill',
  triggers: ['do something'],
  template: 'standard',
  platform: 'all',
  interactive: false,
});

console.log('Created:', result.files);
```

### API Reference

#### `initSkill(options, callbacks?)`

Creates a new skill project.

**Options:**
- `directory` (string, required) - Target directory path
- `name` (string) - Skill name
- `description` (string) - Skill description
- `triggers` (string[]) - Trigger phrases
- `template` ('minimal' | 'standard' | 'complete') - Template type
- `platform` ('claude-code' | 'codex' | 'cursor' | 'all') - Target platform
- `interactive` (boolean) - Enable interactive prompts (default: true)
- `force` (boolean) - Overwrite existing directory
- `author` (string) - Author name

**Callbacks:**
- `onStart()` - Called when generation starts
- `onMetadataCollected(metadata)` - Called after collecting metadata
- `onDirectoryCreated(dirs)` - Called after creating directories
- `onFilesGenerated(files)` - Called after generating files
- `onComplete(result)` - Called on successful completion
- `onError(error)` - Called on error

**Returns:** `Promise<GeneratedResult>`

```typescript
interface GeneratedResult {
  directory: string;
  files: string[];
  metadata: SkillMetadata;
}
```

## License

MIT