Skip to main content
Documentation

SkillDB API & Integration Guide

Everything you need to integrate agent skills into your workflow. Designed for agents first, developers always.

Quick Setup

The fastest way to get started is with the CLI. Search for skills, get exactly the one you need, and your agent reads it instantly.

bash
# Install and initialize
npm install -g skilldb
skilldb init

# Search for the skill you need
skilldb search react hooks

# Get exactly the skill you need
skilldb get react-patterns-skills/custom-hooks

# Your agent reads it from .skilldb/skills/ — zero latency

You can also reference the library directly in your project's CLAUDE.md file.

markdown
# CLAUDE.md

## Skills
This project uses SkillDB skills cached in .skilldb/skills/.
Read skill files from that directory before starting tasks.

To add more skills: skilldb search <query> && skilldb get <pack>/<skill>
Full index: https://skilldb.dev/api/v1/skills

How Agents Discover Skills

Agents discover SkillDB skills through a simple chain:

  1. Agent reads CLAUDE.md (or equivalent config) at session start.
  2. Config points to the /api/v1/skills API -- the index of all skills, packs, and categories.
  3. Agent selects a relevant skill by name or category and fetches its markdown file.
  4. Agent applies the skill's instructions as behavioral guidance for the current task.

File Structure

text
skilldb/
  skills-data.json          # Full index (categories, packs, skill metadata)
  packs/
    author-styles/
      hemingway.md           # Individual skill file
      orwell.md
    software-skills/
      react-architect.md
      api-design.md
    ...
  web/                       # This Next.js app
    src/app/
      api/skills/route.ts    # REST API
      api/stats/route.ts

API Reference

GET/api/v1/skills

Returns the full list of skills. Supports filtering by category, pack, and free-text search.

Query Parameters
categorystringFilter by category name, e.g. "Writing & Literature"
packstringFilter by pack slug, e.g. "author-styles"
searchstringFree-text search across skill name, title, and description
sortstringSort results: name, -name (desc), lines, -lines, pack, -pack, category, -category
idsstringComma-separated skill IDs for batch retrieval (max 50). Example: ?ids=software-skills/code-review.md,devops-skills/docker.md
Request
bash
curl https://skilldb.dev/api/v1/skills?category=Writing
Response
json
{
  "skills": [
    {
      "pack": "author-styles",
      "name": "hemingway",
      "title": "Ernest Hemingway",
      "category": "Writing & Literature"
    }
  ],
  "total": 67,
  "categories": ["Writing & Literature", ...],
  "packs": ["author-styles", "poet-styles", ...]
}
GET/api/v1/skills/:id

Returns a single skill by its pack and name. The :id parameter is formatted as pack/skill-name.

Request
bash
curl https://skilldb.dev/api/v1/skills/author-styles/hemingway
Response
json
{
  "pack": "author-styles",
  "name": "hemingway",
  "title": "Ernest Hemingway",
  "category": "Writing & Literature",
  "content": "---\ntitle: Ernest Hemingway\n---\n\n# Hemingway Style Guide\n..."
}
GET/api/v1/skills/suggest

Returns search autocomplete suggestions for typeahead interfaces. Lightweight and fast.

Query Parameters
qstringSearch query for autocomplete suggestions
Request
bash
curl https://skilldb.dev/api/v1/skills/suggest?q=react
Response
json
{
  "suggestions": [
    {
      "title": "React Architect",
      "pack": "software-skills",
      "category": "Technology & Engineering",
      "id": "software-skills/react-architect.md"
    }
  ]
}
GET/api/posts

Returns the list of blog posts with metadata. Used by the blog page and RSS feed.

Request
bash
curl https://skilldb.dev/api/posts
Response
json
{
  "posts": [
    {
      "slug": "launch-announcement",
      "title": "Introducing SkillDB",
      "date": "2026-03-13",
      "excerpt": "The agent-first skills platform..."
    }
  ],
  "total": 12
}
GET/api/stats

Returns platform-level statistics. Useful for dashboards and status pages.

Request
bash
curl https://skilldb.dev/api/stats
Response
json
{
  "totalSkills": 4960,
  "totalPacks": 327,
  "totalCategories": 37,
  "generated": "2026-03-20T...",
  "topCategories": [
    { "name": "Film & Television", "packs": 15 },
    { "name": "Technology & Engineering", "packs": 13 },
    { "name": "Writing & Literature", "packs": 12 }
  ]
}
GET/api/v1/profile

Returns the authenticated user's profile. Requires a Bearer token in the Authorization header.

Request
bash
curl https://skilldb.dev/api/v1/profile \
  -H "Authorization: Bearer <token>"
Response
json
{
  "uid": "abc123",
  "email": "user@example.com",
  "displayName": "Jane Dev",
  "plan": "pro"
}
PUT/api/v1/profile

Updates the authenticated user's profile. Requires a Bearer token in the Authorization header.

Request
bash
curl -X PUT https://skilldb.dev/api/v1/profile \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"displayName": "Jane Dev"}'
Response
json
{
  "success": true,
  "displayName": "Jane Dev"
}
GET/api/v1/bookmarks

Returns the authenticated user's bookmarked skills. Requires a Bearer token.

Request
bash
curl https://skilldb.dev/api/v1/bookmarks \
  -H "Authorization: Bearer <token>"
Response
json
{
  "bookmarks": [
    {
      "skillId": "software-skills/code-review.md",
      "addedAt": "2026-03-20T12:00:00Z"
    }
  ]
}
POST/api/v1/bookmarks

Adds a skill to the authenticated user's bookmarks. Requires a Bearer token.

Request
bash
curl -X POST https://skilldb.dev/api/v1/bookmarks \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"skillId": "software-skills/code-review.md"}'
Response
json
{
  "success": true,
  "skillId": "software-skills/code-review.md"
}
DELETE/api/v1/bookmarks

Removes a skill from the authenticated user's bookmarks. Requires a Bearer token.

Request
bash
curl -X DELETE https://skilldb.dev/api/v1/bookmarks \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"skillId": "software-skills/code-review.md"}'
Response
json
{
  "success": true,
  "removed": "software-skills/code-review.md"
}

Skill File Format

Every skill is a plain Markdown file with YAML frontmatter. This makes skills portable, version-controllable, and readable by any agent or tool.

YAML Frontmatter

yaml
---
title: "React Architect"
description: "Senior React architect specializing in scalable component design"
category: "Technology & Engineering"
pack: "software-skills"
type: "functional"           # functional | person-style | critic-style
version: "1.0"
tags: ["react", "architecture", "frontend"]
---

Markdown Body

The body contains the actual skill instructions. Structure varies by skill type but typically includes:

  • Identity -- who the agent becomes when this skill is active
  • Principles -- core rules and guidelines
  • Patterns -- specific techniques or approaches
  • Examples -- sample outputs demonstrating the skill
  • Anti-patterns -- what to avoid

Skill Types

Functional

Task-oriented skills like API design, testing, or deployment. Agent gains a capability.

e.g. react-architect, api-design

Person Style

Emulates a specific person's style, voice, or approach. Agent writes/thinks like them.

e.g. hemingway, kubrick

Critic Style

Evaluative skills that review and critique work using specific frameworks.

e.g. film-critic, code-reviewer

Example Skill File

markdown
---
title: "Ernest Hemingway"
description: "Write with Hemingway's iconic minimalist prose style"
category: "Writing & Literature"
pack: "author-styles"
type: "person-style"
version: "1.0"
tags: ["writing", "fiction", "minimalism"]
---

# Ernest Hemingway

## Identity
You write in the style of Ernest Hemingway. Your prose is
spare, direct, and emotionally resonant through what is
left unsaid.

## Principles
- Use short, declarative sentences
- Prefer concrete nouns and active verbs
- Omit needless words — apply the Iceberg Theory
- Let dialogue carry the emotional weight
- Avoid adverbs and adjectives where the verb suffices

## Anti-patterns
- Do NOT use flowery or ornate language
- Do NOT explain emotions — show them through action
- Do NOT use passive voice unless deliberately

Integration Guides

Claude Code

Claude Code reads CLAUDE.md at the start of every session. Add the skill index reference there.

markdown
# CLAUDE.md

## Skills
Use SkillDB skills from https://skilldb.dev/api/v1/skills
When a task matches a skill category, fetch and apply the relevant skill.

## Active Skills
- author-styles/hemingway — for blog posts
- software-skills/react-architect — for component work

Cursor

Cursor uses .cursorrules for project-level instructions. Add skill references the same way.

text
# .cursorrules

You have access to SkillDB skills.
Skills index: https://skilldb.dev/api/v1/skills

When writing React code, apply the react-architect skill.
When writing API routes, apply the api-design skill.
Fetch the skill markdown and follow its instructions.

Codex CLI

For OpenAI Codex CLI, include the skills index URL in your system prompt or project instructions file.

bash
# Initialize and get a skill for offline use
skilldb init
skilldb get author-styles/hemingway

# Skills are cached in .skilldb/skills/ for zero-latency reads
# Reference in codex instructions
echo "Apply the skill in .skilldb/skills/author-styles/hemingway.md" >> instructions.md

Custom Agents

For custom agent implementations, use the JSON index to programmatically discover and load skills.

javascript
// Fetch the skills index
const res = await fetch("https://skilldb.dev/api/v1/skills");
const { skills } = await res.json();

// Find skills matching a task
const writingSkills = skills.filter(
  s => s.category === "Writing & Literature"
);

// Load a specific skill's content
const skill = await fetch(
  "https://skilldb.dev/api/v1/skills/author-styles/hemingway"
);
const { content } = await skill.json();

// Inject into your agent's system prompt
const systemPrompt = `${basePrompt}\n\n## Active Skill\n${content}`;

Installation

The skilldb npm package gives you a CLI and TypeScript SDK for discovering, installing, and managing skills from the terminal. No API key required for browsing — just install and go.

bash
# Use directly with npx (no install needed)
npx skilldb search react hooks
npx skilldb get react-patterns-skills/custom-hooks

# Or install globally for the full workflow
npm install -g skilldb

# Initialize SkillDB in your project
skilldb init

# Search → Get → Done
skilldb search code review
skilldb get software-skills/code-review

skilldb init auto-detects your IDE (Claude Code, Cursor, or Codex CLI), creates a local .skilldb/ cache directory, and adds an integration snippet to your config file.

CLI Commands

bash
# Search skills by keyword (multi-word search supported)
skilldb search react hooks
skilldb search code review
skilldb search api design --category "Technology & Engineering"

# Get exactly the skill you need (recommended)
skilldb get react-patterns-skills/custom-hooks
skilldb get software-skills/code-review
skilldb get autonomous-agent-skills/self-correction

# Download an entire pack (when you want everything)
skilldb add software-skills
skilldb add autonomous-agent-skills

# List available categories and skills
skilldb list
skilldb list --category "Autonomous Agents"
skilldb list --pack software-skills

# Show skill details and preview
skilldb info software-skills/code-review

# Save your API key (for full content access)
skilldb login

# Remove inactive cached skills to free disk space
skilldb purge
skilldb purge --all          # remove everything including active
skilldb purge --inactive     # only remove unused skills
skilldb purge --dry-run      # preview what would be removed

Recommended workflow: Use skilldb search to find what you need, then skilldb get <pack>/<skill> to download individual skills. Use skilldb add <pack> when you want an entire pack. Both commands cache skills locally in .skilldb/skills/ for zero-latency reads and are idempotent — running them again skips already-cached skills.

TypeScript SDK

Import createClient from the skilldb package for programmatic access. The client auto-loads your API key from environment variables or config files.

typescript
import { createClient } from 'skilldb';

const db = createClient(); // auto-loads key from env/config

// Search for skills
const results = await db.search('code review');
console.log(results.skills);

// Get a single skill with full content
const skill = await db.get('software-skills/code-review.md');
console.log(skill.title, skill.content);

// List with filters
const listing = await db.list({
  category: 'Autonomous Agents',
  limit: 10,
});

The SDK also exports cache utilities for local skill management:

typescript
import { createClient, initCache, cacheSkill } from 'skilldb';

const db = createClient();
initCache(); // creates .skilldb/ directory

// Download and cache a skill locally
const skill = await db.get('software-skills/code-review.md');
const path = cacheSkill(skill);
console.log('Cached to:', path);

Authentication

Browsing and searching works without authentication. Full skill content requires a Pro or Studio API key. The SDK resolves your key in this order:

bash
# 1. Environment variable (CI-friendly)
export SKILLDB_API_KEY=sk_live_xxx

# 2. Project-level config
echo '{"apiKey":"sk_live_xxx"}' > .skilldbrc

# 3. User-wide config (set via skilldb login)
# Saved to ~/.skilldbrc

Run skilldb login to save your API key interactively, or set the SKILLDB_API_KEY environment variable for CI/CD pipelines. Get your key at Get Started.

MCP Server — Overview

SkillDB includes an MCP (Model Context Protocol) server that exposes 5,000+ skills directly to any MCP-compatible AI coding tool — Claude Code, Cursor, Windsurf, VS Code Copilot, and 30+ others. No copy-pasting, no manual configuration. Your agent can search, retrieve, and use skills natively.

What is MCP?

The Model Context Protocol is an open standard that lets AI tools connect to external data sources. When you add the SkillDB MCP server, your AI assistant can search and load skills on demand — like giving it access to a library of expert knowledge.

Installation

The MCP server ships with the skilldb npm package:

bash
# Step 1: Install globally (one time)
npm install -g skilldb

# Step 2: Add to Claude Code
claude mcp add skilldb -- skilldb-mcp

# With API key (for full skill content)
claude mcp add skilldb -- skilldb-mcp --api-key sk_live_xxx

# Cursor — add to .cursor/mcp.json
{
  "mcpServers": {
    "skilldb": {
      "command": "skilldb-mcp"
    }
  }
}

# Windsurf — add to mcp_config.json
{
  "mcpServers": {
    "skilldb": {
      "command": "npx",
      "args": ["skilldb-mcp", "--api-key", "sk_live_xxx"]
    }
  }
}

# Any MCP client
skilldb-mcp

Available Tools

The MCP server exposes 6 tools that your AI assistant can call:

TOOLskilldb_search

Search 5,000+ skills by keyword. Filter by category or pack. Returns skill metadata, descriptions, and optionally full content.

Parameters: query (required), category, pack, limit

TOOLskilldb_get

Retrieve the full content of a specific skill by ID. Returns the complete markdown with instructions, patterns, and best practices.

Parameters: id (required, e.g. "software-skills/code-review.md")

TOOLskilldb_list

Browse all available skills with filtering and sorting. Great for exploring what's available.

Parameters: category, pack, sort, limit, offset

TOOLskilldb_suggest

Fast autocomplete suggestions. Useful for quick lookups when you know part of a skill name.

Parameters: query (min 2 chars)

TOOLskilldb_recommend

Recommend skill packs based on your tech stack. Tell it your technologies and role, get tailored pack suggestions.

Parameters: technologies (array), role (optional)

TOOLskilldb_purge

Remove cached skills from the local .skilldb/ directory to free disk space. Supports dry-run preview and multiple purge modes.

Parameters: mode (default/all/inactive/slim), dryRun (boolean)

Usage Examples

Once installed, your AI assistant can use SkillDB tools naturally in conversation:

markdown
# In Claude Code or Cursor, just ask:

"Search SkillDB for React performance patterns"
→ Agent calls skilldb_search("react performance")
→ Returns matching skills with descriptions

"Load the code review skill"
→ Agent calls skilldb_get("software-skills/code-review.md")
→ Full skill content loaded into context

"What skills should I use for this project?"
→ Agent calls skilldb_recommend with your tech stack
→ Returns tailored pack recommendations

"Show me all security skills"
→ Agent calls skilldb_list(category: "Security")
→ Lists all available security skill packs

"Clean up unused skills from my project"
→ Agent calls skilldb_purge(mode: "inactive")
→ Removes cached skills not in active profile

The MCP server runs locally on your machine and calls the SkillDB API. Metadata browsing works without authentication. Full skill content requires a Pro or Studio API key.