基于 SOC 职业分类
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/ffsshhttiikk/opencode-agents-skills --skill rest-api命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | rest-api |
| description | REST API design best practices and patterns |
| license | MIT |
| compatibility | opencode |
| metadata | {"audience":"developers","category":"api-design"} |
When designing or implementing REST APIs.
Resources: /users, /users/{id}, /users/{id}/posts
Collections: /posts, /posts?status=published
Actions as sub-resources: /users/{id}/activate, /users/{id}/deactivate
HTTP Methods:
GET - Retrieve resource(s)
POST - Create resource(s)
PUT - Replace resource
PATCH - Partial update
DELETE - Remove resource
Status Codes:
200 OK - Success
201 Created - Resource created
204 No Content - Success, no body
400 Bad Request - Invalid input
401 Unauthorized - Authentication required
403 Forbidden - Authenticated but not authorized
404 Not Found - Resource doesn't exist
409 Conflict - Resource state conflict
422 Unprocessable Entity - Validation errors
429 Too Many Requests - Rate limiting
500 Internal Server Error - Server error
{
"data": {
"id": "123",
"type": "user",
"attributes": {
"email": "user@example.com",
"name": "John Doe",
"createdAt": "2024-01-15T10:30:00Z"
},
"relationships": {
"posts": {
"links": {
"related": "/users/123/posts"
}
}
},
"links": {
"self": "/users/123"
}
},
"meta": {
"copyright"
{
"errors": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"status": 422,
"code": "VALIDATION_ERROR",
"title": "Validation failed",
"detail": "The 'email' field must be a valid email address",
"source": {
"pointer": "/data/attributes/email"
},
"meta": {
"field": "email",
"value": "invalid-email"
}
}
]
}
{
"data": [
{
"id": "1",
"type": "user",
"attributes": { "name": "User 1" }
},
{
"id": "2",
"type": "user",
"attributes": { "name": "User 2" }
}
],
"links": {
"self": "/api/v1/users?page[number]=1&page[size]=10",
"first": "/api/v1/users?page[number]=1&page[size]=10",
"last": "/api/v1/users?page[number]=10&page[size]=10",
"next"
Filtering: ?status=published&author=123
Sorting: ?sort=-createdAt,title
Pagination: ?page[number]=2&page[size]=20
Fields: ?fields[user]=email,name
Including: ?include=posts,posts.comments
Sparse Fields: ?fields[user]=id,name&fields[post]=id,title
Search: ?search=keyword
URL: /api/v1/users
Header: Accept: application/vnd.api+json; version=1
/users not /user