---
name: aam-skills/skillify
source: https://app.decimal.ai/s/aam-skills-skillify@1/SKILL.md
source_sha256: 7d519f7b941d
---

# Skillify

Generate a SKILL.md file for an npm package, making it discoverable and usable by AI agents.

## When to Use

- Adding agent documentation to an npm package
- Making a library AI-agent friendly
- Creating a skill from existing CLI tool
- Preparing a package for the Agent Skills ecosystem

## Quick Start

Use the npm CLI tool:

```bash
npx skill-gen .                    # Current directory
npx skill-gen ~/path/to/package    # Local package
npx skill-gen . --stdout           # Preview output
```

Or invoke manually via `/skillify <path>`.

## Process

### Step 1: Gather Package Information

Read these files (in order of importance):

1. **package.json** (required)
   - `name` → skill name (kebab-case)
   - `description` → base for skill description
   - `bin` → CLI commands available
   - `main`/`exports` → API entry points
   - `keywords` → trigger words

2. **README.md** (if exists)
   - Usage examples
   - API documentation
   - Installation instructions

3. **CLI entry point** (if `bin` exists)
   - Parse for `--help` output
   - Extract flags and commands

4. **Main module** (if `main`/`exports` exists)
   - Exported functions
   - JSDoc comments
   - Type definitions

### Step 2: Analyze for Agent Usage

Determine:
- **What it does** - core functionality in one sentence
- **When to use** - specific triggers/contexts
- **How to use** - primary usage pattern (CLI or API)
- **Examples** - concrete input/output pairs

### Step 3: Generate SKILL.md

Follow this template:

```yaml
---
name: <package-name-kebab-case>
description: <What it does>. <When to use - specific triggers>.
---
```

**Description rules:**
- Third person only ("Builds X" not "I build X")
- Under 1024 characters
- Include both WHAT and WHEN
- Use specific keywords for discovery

**Body structure:**

```markdown
# <Package Name>

## When to Use

Invoke when you need to:
- <specific trigger 1>
- <specific trigger 2>
- <specific trigger 3>

## Quick Start

<primary usage pattern - CLI or code>

## Examples

**Example 1: <use case>**

Input:
<concrete input>

Output:
<concrete output>

## CLI Reference (if applicable)

<flags and commands>

## API Reference (if applicable)

<key exported functions>
```

### Step 4: Write the File

Save to: `<package-root>/SKILL.md`

## Quality Checklist

Before finalizing, verify:

- [ ] Description is third person
- [ ] Description includes WHAT and WHEN
- [ ] Description under 1024 characters
- [ ] Name is kebab-case, lowercase
- [ ] Examples are concrete (not abstract)
- [ ] Body under 500 lines
- [ ] No time-sensitive information
- [ ] Consistent terminology

## Description Formula

```
<Verb>s <object> [details]. Use when <trigger1>, <trigger2>, or <trigger3>.
```

**Good examples:**
```yaml
description: Builds Bitcoin Taproot transactions from inputs and outputs. Use when creating P2TR transactions, spending UTXOs, or working with Taproot addresses.
```

```yaml
description: Broadcasts signed Bitcoin transactions to the network. Use when sending transactions to mempool, publishing to testnet4, or checking broadcast status.
```

**Bad examples:**
```yaml
description: Helps with Bitcoin stuff.  # Too vague
description: I can build transactions.  # Wrong POV
description: A library for transactions.  # No "when to use"
```

## Naming Convention

Convert package name to kebab-case:

| package.json name | SKILL.md name |
|-------------------|---------------|
| `btctx` | `btctx` |
| `sendTx` | `send-tx` |
| `BitcoinBuilder` | `bitcoin-builder` |
| `@scope/pkg` | `pkg` (drop scope) |

## Example Output

For a package like `btctx`:

```yaml
---
name: btctx
description: Builds Bitcoin Taproot (P2TR) transactions from UTXOs. Use when creating Bitcoin transactions, spending Taproot outputs, or building raw transaction hex.
---

# btctx

## When to Use

Invoke when you need to:
- Build a Bitcoin transaction from UTXOs
- Create Taproot (P2TR) outputs
- Generate signed transaction hex for broadcasting

## Quick Start

```javascript
import { buildTx } from 'btctx';

const { hex, txid } = await buildTx({
  privateKey: '...',
  publicKey: '...',
  txid: '<input-txid>',
  vout: 0,
  inputAmount: 100000,
  outputs: [{ pubkey: '<recipient>', amount: 99000 }]
});
```

## Examples

**Example: Simple transfer**

Input:
- 100,000 sats from UTXO
- Send to one recipient

Output:
- Signed transaction hex
- Transaction ID (txid)

## API Reference

### `buildTx(options)`

Builds and signs a Taproot transaction.

Options:
- `privateKey` - 64-char hex signing key
- `publicKey` - 64-char hex x-only pubkey
- `txid` - Input transaction ID
- `vout` - Output index to spend
- `inputAmount` - Satoshis in input
- `outputs` - Array of `{ pubkey, amount }`

Returns: `{ hex, txid }`
```

## References

- [Agent Skills Specification](https://agentskills.io/specification)
- [Anthropic Best Practices](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices)
- [GitHub: anthropics/skills](https://github.com/anthropics/skills)