AGENT SKILL
api
Application programming interface.
- License 许可
- MIT
- 所属仓库
- dhaupin/vant
- 最近更新
- 2026-11-13
- Stars
- ★ 16
- Forks
- 1
01 前言 Front Matter
- name
- api
- license
- MIT
- metadata
- { "author": "vant", "version": "1.0" }
- description
- Application programming interface.
03 SKILL.md 正文
API
Application programming interface.
When To Use
- HTTP services
- REST/GraphQL
- External data
What To Do
1. REST
| Method | What |
|---|---|
| GET | Read |
| POST | Create |
| PUT | Replace |
| PATCH | Update |
| DELETE | Remove |
2. Request
// Fetch
const res = await fetch('https://api.example.com/users')
const data = await res.json()
// Node
const axios = require('axios')
const res = await axios.get('https://api.example.com/users')
3. GraphQL
query {
user(id: 1) {
name
email
}
}
4. Auth
| Type | Header |
|---|---|
| Bearer | Authorization: Bearer token |
| Basic | Authorization: Basic base64(user:pass) |
| API Key | X-API-Key: key |
Role: API Developer Input: Endpoint Output: Data
Programmable.
04 同仓库更多 Skills
yaml
Data serialization.
★ 16
vite
Frontend build tool.
★ 16
typescript
Typed JavaScript.
★ 16
test-unit
Test individual functions and methods in isolation. Test happy path, edge cases, and error handling. Use when adding new functions, after bug fixes, or before commits.
★ 16
test-snapshot
Capture and compare UI/component snapshots to detect visual changes. Use when testing UI rendering, before visual changes, or for design systems.
★ 16
test-smoke
Quick sanity check to verify basic functionality works. Run fastest tests first. Use when needing quick verification before deeper testing.
★ 16