API Reference
Integrate SaltSkills with your AI pipelines. Fetch skill definitions as raw Markdown for direct use as system prompts, or query the full catalog programmatically.
Quick Start
Fetch a skill as raw Markdown and use it as a system prompt in your AI pipeline.
// Fetch a skill and use it as a system prompt
const response = await fetch('/api/skills/react-component-generator', {
headers: { 'Accept': 'text/markdown' }
})
const skillPrompt = await response.text()
// Use with AI SDK
import { generateText } from 'ai'
const result = await generateText({
model: 'openai/gpt-4o',
system: skillPrompt,
prompt: 'Create a SearchInput component with debounce',
})
console.log(result.text)Content Negotiation
Request JSON or raw Markdown via Accept headers or format parameter.
Filterable Catalog
Query skills by category, tags, and visibility level.
Visibility Controls
Skills can be public, team-only, or private to control access.
Endpoints
GET
/api/skillsList all skills with optional filters
Query Parameters
| Name | Type | Description |
|---|---|---|
| category | string | Filter by category name |
| tag | string | Filter by tag |
| visibility | string | Filter by visibility (public, team, private) |
| format | string | Response format: json (default) or markdown |
POST
/api/skillsCreate a new skill
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| title | string | Yes | Skill title |
| content | string | Yes | Markdown content |
| description | string | No | Short description |
| category | string | No | Category name |
| tags | string[] | No | Array of tags |
| visibility | string | No | public, team, or private |
GET
/api/skills/:slugGet a specific skill by slug
Query Parameters
| Name | Type | Description |
|---|---|---|
| format | string | Set to "markdown" or "raw" for raw content |
Accept Headers
text/markdownReturns raw Markdown content for AI consumptionapplication/jsonReturns full JSON object (default)SDK Examples
Python
import requests
# Fetch all skills as Markdown
response = requests.get(
'https://your-domain.com/api/skills',
params={'format': 'markdown', 'category': 'Code Generation'}
)
skills_md = response.text
# Fetch a specific skill for AI consumption
skill = requests.get(
'https://your-domain.com/api/skills/react-component-generator',
headers={'Accept': 'text/markdown'}
)
system_prompt = skill.textTypeScript / Node.js
// List all skills filtered by tag
const res = await fetch('/api/skills?tag=typescript&format=json')
const { skills, total } = await res.json()
// Use a skill as system prompt with AI SDK
import { generateText } from 'ai'
const skillRes = await fetch('/api/skills/sql-query-optimizer', {
headers: { 'Accept': 'text/markdown' }
})
const systemPrompt = await skillRes.text()
const result = await generateText({
model: 'openai/gpt-4o',
system: systemPrompt,
prompt: 'Optimize this query: SELECT * FROM users WHERE ...',
})