Refactor high-complexity React components in Dify frontend. Use when `pnpm analyze-component...
npx skills add aam-skills/skillify
Or install specific skill: npx add-skill https://github.com/aam-skills/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
Use the npm CLI tool:
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):
- package.json (required)
nameβ skill name (kebab-case)descriptionβ base for skill descriptionbinβ CLI commands availablemain/exportsβ API entry points-
keywordsβ trigger words -
README.md (if exists)
- Usage examples
- API documentation
-
Installation instructions
-
CLI entry point (if
binexists) - Parse for
--helpoutput -
Extract flags and commands
-
Main module (if
main/exportsexists) - 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:
---
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
# 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.