AI Skills Integration
Let AI tools understand your API endpoints precisely
An AI Skill is a structured API description that worma generates for AI coding tools. It lets Cursor, Copilot, Continue, and similar AIs understand each of your endpoints precisely.
Core idea
Humans and AI share the same API context.
Without a Skill doc, the AI knows nothing about your endpoints:
You: Help me call the "get user info" endpoint
AI:
import axios from 'axios'
axios.get('/user?id=1')
// Wrong parameter shape, wrong import path, missing response typesWith a Skill doc:
You: Help me call the "get user info" endpoint
AI (reads the Skill):
Knows the function name getUserInfo, its parameter shape, and the import path
import { getUserInfo } from './api/user'
getUserInfo({ pathParams: { id: 'U001' } })
// Correct on the first try, runs as-isEnable AI Skills
Add the aiDoc plugin to worma.config. See the plugin docs for detailed configuration.
Generated output
After running worma gen, the aidocs/ directory contains:
aidocs/
├── SKILL.md # Main doc: API index + usage conventions + file locations
└── references/ # One doc per endpoint
├── user.info.md
├── user.login.md
├── admin.permissions.md
└── ...Usage examples
Single endpoint call
After generating the Skill docs, describe your need directly in the AI chat — the AI matches the endpoint and generates code automatically.
Describe your need
Tell the AI what you want to do in the chat:
You: Get the user list, paginated, 20 per pageAI reads the skill doc
The AI loads SKILL.md and the endpoint docs under references/, and matches the listUsers endpoint with its page and pageSize parameters.
Generates the call code
The AI outputs runnable code:
import { listUsers } from './api/user';
const res = await listUsers({
params: { page: 1, pageSize: 20 },
});Combining multiple endpoints
When multiple endpoints need to work together, the AI chains the steps automatically.
Describe a composite need
You: First create an article, then add a comment to itCall the first endpoint
The AI calls the create-article endpoint and keeps the articleId from the response:
import { createArticle } from './api/article';
const article = await createArticle({
data: { title: 'Hello', content: '...' },
});
// article.data.id will be used in the next stepChain the second endpoint
The AI uses the ID returned from the previous step and calls the comment endpoint:
import { createComment } from './api/comment';
await createComment({
data: {
articleId: article.data.id,
content: 'Great article!',
},
});Usage conventions
Before generating code, the AI recites the usage conventions to ensure it follows the rules. The Skill doc's usage conventions include:
- Import on demand — import each API function from its tag file
- Correct request client — use alova / axios / fetch / ky (depending on the template)
- Correct parameter passing —
pathParams/params/datago in the right place