Skills API
The Skills API provides access to Bootspring's library of battle-tested code patterns, implementation guides, and best practices.
Overview#
Skills are reusable code patterns organized by category:
- Built-in Skills: Included with Bootspring (auth, database, API patterns)
- External Skills: Premium skills from the external catalog (Pro tier)
Each skill includes:
- Detailed implementation guide
- Code examples
- Best practices
- Common pitfalls to avoid
REST API Endpoints#
List Skills#
GET /api/v1/skillsReturns available skills.
Query Parameters:
| Parameter | Type | Description |
|---|---|---|
includeExternal | boolean | Include external skill catalog |
category | string | Filter by category |
limit | number | Maximum results (default: 50) |
Response:
1{
2 "data": [
3 {
4 "id": "auth/clerk",
5 "name": "Clerk Authentication",
6 "description": "Complete authentication setup with Clerk",
7 "category": "auth",
8 "source": "built-in"
9 },
10 {
11 "id": "database/prisma",
12 "name": "Prisma ORM Setup",
13 "description": "Database integration with Prisma",
14 "category": "database",
15 "source": "built-in"
16 }
17 ],
18 "meta": {
19 "total": 45,
20 "page": 1
21 }
22}Get Skill Details#
GET /api/v1/skills/:idGet full content of a skill.
Parameters:
| Parameter | Type | Description |
|---|---|---|
id | string | Skill identifier (e.g., auth/clerk) |
Query Parameters:
| Parameter | Type | Description |
|---|---|---|
summary | boolean | Return summary instead of full content |
sections | string | Comma-separated section keywords |
maxChars | number | Maximum content length |
Response:
1{
2 "data": {
3 "id": "auth/clerk",
4 "name": "Clerk Authentication",
5 "description": "Complete authentication setup with Clerk",
6 "category": "auth",
7 "source": "built-in",
8 "content": "# Clerk Authentication\n\n..."
9 }
10}Search Skills#
POST /api/v1/skills/searchSearch skills by query.
Request Body:
{
"query": "authentication OAuth",
"includeExternal": true,
"limit": 10
}Response:
1{
2 "data": [
3 {
4 "id": "auth/clerk",
5 "name": "Clerk Authentication",
6 "description": "Complete authentication setup with Clerk",
7 "source": "built-in"
8 },
9 {
10 "id": "auth/nextauth",
11 "name": "NextAuth.js",
12 "description": "Authentication with NextAuth.js",
13 "source": "built-in"
14 }
15 ]
16}Apply Skill#
POST /api/v1/skills/:id/applyApply a skill pattern to your project.
Request Body:
1{
2 "options": {
3 "provider": "google",
4 "database": "prisma"
5 }
6}JavaScript/Node.js API#
Module Import#
const skills = require('bootspring/skills');Listing Skills#
listSkills(options)#
List all available skills.
Options:
| Option | Type | Default | Description |
|---|---|---|---|
includeExternal | boolean | false | Include external catalog |
const skillIds = skills.listSkills({ includeExternal: true });
// Returns: ['auth/clerk', 'auth/nextauth', 'database/prisma', ...]listExternalSkills(options)#
List only external skills.
const externalSkills = skills.listExternalSkills({ limit: 10 });
// Returns: ['external/advanced-caching', 'external/multi-tenant', ...]getCategories()#
Get all skill categories.
const categories = skills.getCategories();
// Returns: ['auth', 'database', 'api', 'payments', 'testing', ...]getPatternsByCategory(category)#
Get skills in a specific category.
const authSkills = skills.getPatternsByCategory('auth');
// Returns: ['clerk', 'nextauth', 'jwt', ...]Loading Skills#
loadSkill(skillName, options)#
Load the full content of a skill.
Parameters:
| Parameter | Type | Description |
|---|---|---|
skillName | string | Skill identifier |
options | object | Load options |
Options:
| Option | Type | Default | Description |
|---|---|---|---|
includeExternal | boolean | false | Allow loading external skills |
const content = skills.loadSkill('auth/clerk', { includeExternal: true });
// Returns: Markdown content of the skillgetSkillPath(skillName)#
Get the file path of a built-in skill.
const path = skills.getSkillPath('database/prisma');
// Returns: '/path/to/bootspring/skills/patterns/database/prisma.md'getSkillMetadata(skillName)#
Get metadata about a skill.
1const metadata = skills.getSkillMetadata('auth/clerk');
2// Returns:
3// {
4// id: 'auth/clerk',
5// source: 'built-in',
6// category: 'auth',
7// name: 'Clerk Authentication',
8// description: 'Complete authentication setup with Clerk',
9// title: 'Clerk Authentication',
10// codeBlocks: 8,
11// lines: 245,
12// path: '/path/to/skill.md'
13// }Searching Skills#
searchSkills(query, options)#
Search skills by keyword.
Parameters:
| Parameter | Type | Description |
|---|---|---|
query | string | Search query |
options | object | Search options |
Options:
| Option | Type | Default | Description |
|---|---|---|---|
includeExternal | boolean | false | Include external catalog |
limit | number | none | Maximum results |
const matches = skills.searchSkills('authentication OAuth', {
includeExternal: true,
limit: 10
});
// Returns: ['auth/clerk', 'auth/nextauth', ...]Content Formatting#
formatSkillContent(content, options)#
Format skill content with options.
Options:
| Option | Type | Description |
|---|---|---|
summary | boolean | Return concise summary |
sections | string/array | Section keywords to include |
maxChars | number | Maximum content length |
1const content = skills.loadSkill('database/prisma');
2
3// Get summary
4const summary = skills.formatSkillContent(content, { summary: true });
5
6// Get specific sections
7const setup = skills.formatSkillContent(content, {
8 sections: 'setup,configuration'
9});
10
11// Limit length
12const truncated = skills.formatSkillContent(content, { maxChars: 5000 });External Catalog#
hasExternalSkillLibrary()#
Check if external skills are available.
if (skills.hasExternalSkillLibrary()) {
console.log('External skills available');
}syncExternalCatalog(options)#
Sync external skills from remote catalog.
Options:
| Option | Type | Description |
|---|---|---|
manifestUrl | string | Remote manifest URL |
contentBaseUrl | string | Base URL for skill content |
token | string | Bearer token for authentication |
cacheDir | string | Local cache directory |
manifestPublicKey | string | PEM public key for signature verification |
requireManifestSignature | boolean | Require signature validation |
1const result = await skills.syncExternalCatalog({
2 manifestUrl: 'https://api.bootspring.com/skills/manifest.json',
3 token: process.env.BOOTSPRING_SKILL_TOKEN
4});
5
6// Returns:
7// {
8// fetched: 25,
9// skipped: [],
10// cacheRoot: '/Users/user/.bootspring/skills-cache',
11// manifestPath: '/path/to/manifest.json',
12// signatureVerified: true
13// }resetExternalCache()#
Reset the external skills cache.
skills.resetExternalCache();Security#
verifyManifestSignature(manifest, options)#
Verify a manifest's cryptographic signature.
1const verification = skills.verifyManifestSignature(manifest, {
2 manifestPublicKey: process.env.BOOTSPRING_SKILL_MANIFEST_PUBLIC_KEY,
3 requireManifestSignature: true
4});
5
6// Returns:
7// { verified: true, required: true, algorithm: 'sha256' }MCP Tool#
The bootspring_skill MCP tool provides skill functionality.
Tool Definition#
1{
2 "name": "bootspring_skill",
3 "description": "Search and retrieve code patterns/skills",
4 "inputSchema": {
5 "properties": {
6 "action": {
7 "enum": ["list", "show", "search", "sync"]
8 },
9 "name": { "type": "string" },
10 "query": { "type": "string" },
11 "includeExternal": { "type": "boolean" },
12 "summary": { "type": "boolean" },
13 "sections": { "type": "string" },
14 "maxChars": { "type": "number" },
15 "limit": { "type": "number" }
16 },
17 "required": ["action"]
18 }
19}Actions#
| Action | Description | Required Parameters |
|---|---|---|
list | List all skills | None |
show | Show skill content | name |
search | Search skills | query |
sync | Sync external catalog | manifestUrl |
Examples#
List skills:
{
"action": "list",
"includeExternal": true,
"limit": 20
}Show skill:
{
"action": "show",
"name": "auth/clerk",
"summary": true
}Show specific sections:
{
"action": "show",
"name": "database/prisma",
"sections": "setup,migrations"
}Search skills:
{
"action": "search",
"query": "stripe payments",
"includeExternal": true
}Sync external catalog:
{
"action": "sync",
"manifestUrl": "https://api.bootspring.com/skills/manifest.json"
}Available Skill Categories#
auth#
Authentication and authorization patterns.
| Skill | Description |
|---|---|
auth/clerk | Clerk authentication setup |
auth/nextauth | NextAuth.js configuration |
auth/jwt | JWT token handling |
auth/rbac | Role-based access control |
database#
Database patterns and ORM setup.
| Skill | Description |
|---|---|
database/prisma | Prisma ORM setup |
database/migrations | Database migration patterns |
database/seeding | Database seeding strategies |
api#
API design and implementation.
| Skill | Description |
|---|---|
api/route-handler | Next.js route handlers |
api/server-action | Server actions patterns |
api/validation | API input validation |
api/error-handling | API error handling |
payments#
Payment processing integrations.
| Skill | Description |
|---|---|
payments/stripe | Stripe integration |
payments/subscriptions | Subscription management |
payments/webhooks | Payment webhook handling |
testing#
Testing patterns and strategies.
| Skill | Description |
|---|---|
testing/vitest | Vitest setup and patterns |
testing/playwright | E2E testing with Playwright |
testing/mocking | Test mocking strategies |
External Skills (Pro Tier)#
External skills require a Pro subscription and include:
- Advanced caching strategies
- Multi-tenant architecture
- Enterprise authentication
- Advanced performance patterns
- Real-time features
Environment Variables#
| Variable | Description |
|---|---|
BOOTSPRING_SKILL_TOKEN | Bearer token for external catalog |
BOOTSPRING_SKILL_MANIFEST_URL | Remote manifest URL |
BOOTSPRING_SKILL_CONTENT_BASE_URL | Content base URL |
BOOTSPRING_SKILL_CACHE_DIR | Local cache directory |
BOOTSPRING_SKILL_MANIFEST_PUBLIC_KEY | PEM public key for signatures |
BOOTSPRING_SKILL_MANIFEST_REQUIRE_SIGNATURE | Require signature validation |
BOOTSPRING_SKILL_CATALOG_SOURCE | Source priority: auto, local, cache |
Constants#
PATTERNS_DIR#
const { PATTERNS_DIR } = require('bootspring/skills');
// Built-in patterns directoryEXTERNAL_SKILLS_DIR#
const { EXTERNAL_SKILLS_DIR } = require('bootspring/skills');
// Local external skills directoryDEFAULT_EXTERNAL_CACHE_ROOT#
const { DEFAULT_EXTERNAL_CACHE_ROOT } = require('bootspring/skills');
// Default: ~/.bootspring/skills-cacheError Handling#
Skill Not Found#
1{
2 "error": {
3 "code": "NOT_FOUND",
4 "message": "Skill not found: invalid/skill"
5 }
6}External Skill Access Denied#
1{
2 "error": {
3 "code": "FORBIDDEN",
4 "message": "External skills require Pro tier subscription"
5 }
6}Signature Verification Failed#
1{
2 "error": {
3 "code": "SECURITY_ERROR",
4 "message": "Manifest signature verification failed"
5 }
6}CLI Commands#
1# List all skills
2bootspring skill list
3
4# List including external
5bootspring skill list --external
6
7# Search skills
8bootspring skill search "authentication"
9
10# Show a skill
11bootspring skill show auth/clerk
12
13# Show summary only
14bootspring skill show database/prisma --summary
15
16# Sync external catalog
17bootspring skill syncBest Practices#
- Start with built-in skills: They cover most common use cases
- Use search to discover: Find relevant patterns by keyword
- Request summaries first: Get overview before full content
- Combine skills: Use multiple skills for complex features
- Check for updates: Sync external catalog periodically
- Verify signatures: Enable signature verification in production