melvincarvalho

skillify

0
0
# Install this skill:
npx skills add melvincarvalho/skillify

Or install specific skill: npx add-skill https://github.com/melvincarvalho/skillify

# Description

Generates SKILL.md files for npm packages following Anthropic's Agent Skills specification. Use when adding agent documentation to an npm package, making a package AI-agent friendly, or creating skills from existing code.

# SKILL.md


name: skillify
description: Generates SKILL.md files for npm packages following Anthropic's Agent Skills specification. Use when adding agent documentation to an npm package, making a package AI-agent friendly, or creating skills from existing code.


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

/skillify .                    # Current directory
/skillify ~/path/to/package    # Local package
/skillify btctx                # npm package name

Process

Step 1: Gather Package Information

Read these files (in order of importance):

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

  7. README.md (if exists)

  8. Usage examples
  9. API documentation
  10. Installation instructions

  11. CLI entry point (if bin exists)

  12. Parse for --help output
  13. Extract flags and commands

  14. Main module (if main/exports exists)

  15. Exported functions
  16. JSDoc comments
  17. 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:

---
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:

# <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:

description: Builds Bitcoin Taproot transactions from inputs and outputs. Use when creating P2TR transactions, spending UTXOs, or working with Taproot addresses.
description: Broadcasts signed Bitcoin transactions to the network. Use when sending transactions to mempool, publishing to testnet4, or checking broadcast status.

Bad examples:

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:

---
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

# README.md

skillify

Generate SKILL.md files for npm packages following Anthropic's Agent Skills specification.

Install

npm install -g skillify

Or use directly:

npx skill-gen .

Usage

# Current directory
npx skill-gen .

# Specific path
npx skill-gen ~/projects/my-package

# Print to stdout
npx skill-gen . --stdout

# Dry run (preview only)
npx skill-gen . --dry-run

# Custom output path
npx skill-gen . -o ./docs/SKILL.md

What it Does

  1. Reads package.json for name, description, keywords, bin, exports
  2. Analyzes CLI entry point for flags/commands
  3. Extracts exported functions from main module
  4. Generates SKILL.md with:
  5. Proper YAML frontmatter (name, description)
  6. "When to Use" triggers
  7. Quick Start examples
  8. CLI Reference (if applicable)
  9. API Reference (if applicable)

Output Format

---
name: my-package
description: Does X and Y. Use when working with Z.
---

# my-package

## When to Use
...

## Quick Start
...

Why SKILL.md?

SKILL.md is the Agent Skills standard for AI agent documentation:

  • Discoverable: Agents find skills by name + description
  • Progressive disclosure: Metadata loads first, details on-demand
  • Portable: Works with Claude Code, Cursor, Copilot, Codex

Best Practices Applied

Based on Anthropic's guidelines:

  • Third person descriptions ("Builds X" not "I build X")
  • Includes "when to use" triggers
  • Concrete examples over abstract descriptions
  • Under 500 lines for optimal performance

License

MIT

# Supported AI Coding Agents

This skill is compatible with the SKILL.md standard and works with all major AI coding agents:

Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.