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

Returns available skills.

Query Parameters:

ParameterTypeDescription
includeExternalbooleanInclude external skill catalog
categorystringFilter by category
limitnumberMaximum 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/:id

Get full content of a skill.

Parameters:

ParameterTypeDescription
idstringSkill identifier (e.g., auth/clerk)

Query Parameters:

ParameterTypeDescription
summarybooleanReturn summary instead of full content
sectionsstringComma-separated section keywords
maxCharsnumberMaximum 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/search

Search 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/apply

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

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

ParameterTypeDescription
skillNamestringSkill identifier
optionsobjectLoad options

Options:

OptionTypeDefaultDescription
includeExternalbooleanfalseAllow loading external skills
const content = skills.loadSkill('auth/clerk', { includeExternal: true }); // Returns: Markdown content of the skill

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

ParameterTypeDescription
querystringSearch query
optionsobjectSearch options

Options:

OptionTypeDefaultDescription
includeExternalbooleanfalseInclude external catalog
limitnumbernoneMaximum 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:

OptionTypeDescription
summarybooleanReturn concise summary
sectionsstring/arraySection keywords to include
maxCharsnumberMaximum 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:

OptionTypeDescription
manifestUrlstringRemote manifest URL
contentBaseUrlstringBase URL for skill content
tokenstringBearer token for authentication
cacheDirstringLocal cache directory
manifestPublicKeystringPEM public key for signature verification
requireManifestSignaturebooleanRequire 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#

ActionDescriptionRequired Parameters
listList all skillsNone
showShow skill contentname
searchSearch skillsquery
syncSync external catalogmanifestUrl

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.

SkillDescription
auth/clerkClerk authentication setup
auth/nextauthNextAuth.js configuration
auth/jwtJWT token handling
auth/rbacRole-based access control

database#

Database patterns and ORM setup.

SkillDescription
database/prismaPrisma ORM setup
database/migrationsDatabase migration patterns
database/seedingDatabase seeding strategies

api#

API design and implementation.

SkillDescription
api/route-handlerNext.js route handlers
api/server-actionServer actions patterns
api/validationAPI input validation
api/error-handlingAPI error handling

payments#

Payment processing integrations.

SkillDescription
payments/stripeStripe integration
payments/subscriptionsSubscription management
payments/webhooksPayment webhook handling

testing#

Testing patterns and strategies.

SkillDescription
testing/vitestVitest setup and patterns
testing/playwrightE2E testing with Playwright
testing/mockingTest 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#

VariableDescription
BOOTSPRING_SKILL_TOKENBearer token for external catalog
BOOTSPRING_SKILL_MANIFEST_URLRemote manifest URL
BOOTSPRING_SKILL_CONTENT_BASE_URLContent base URL
BOOTSPRING_SKILL_CACHE_DIRLocal cache directory
BOOTSPRING_SKILL_MANIFEST_PUBLIC_KEYPEM public key for signatures
BOOTSPRING_SKILL_MANIFEST_REQUIRE_SIGNATURERequire signature validation
BOOTSPRING_SKILL_CATALOG_SOURCESource priority: auto, local, cache

Constants#

PATTERNS_DIR#

const { PATTERNS_DIR } = require('bootspring/skills'); // Built-in patterns directory

EXTERNAL_SKILLS_DIR#

const { EXTERNAL_SKILLS_DIR } = require('bootspring/skills'); // Local external skills directory

DEFAULT_EXTERNAL_CACHE_ROOT#

const { DEFAULT_EXTERNAL_CACHE_ROOT } = require('bootspring/skills'); // Default: ~/.bootspring/skills-cache

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

Best Practices#

  1. Start with built-in skills: They cover most common use cases
  2. Use search to discover: Find relevant patterns by keyword
  3. Request summaries first: Get overview before full content
  4. Combine skills: Use multiple skills for complex features
  5. Check for updates: Sync external catalog periodically
  6. Verify signatures: Enable signature verification in production