← スキル一覧に戻る

api-patterns
by 40docs
⭐ 0🍴 0📅 2025年12月10日
SKILL.md
name: api-patterns description: Use when creating or modifying API endpoints. Provides REST conventions and error handling patterns for this project.
API Patterns for Pet Adoption Center
Endpoint Conventions
- GET /pets - List all pets
- GET /pets/{id} - Get single pet
- POST /pets - Create pet
- PUT /pets/{id} - Update pet
- DELETE /pets/{id} - Delete pet
Response Format
Always return JSON with this structure:
{
"success": True,
"data": {...},
"error": None
}
Error Handling
Use HTTP status codes:
- 200: Success
- 201: Created
- 400: Bad request
- 404: Not found
- 500: Server error
Example Endpoint
@app.route('/pets', methods=['GET'])
def list_pets():
try:
pets = Pet.query.all()
return jsonify(success=True, data=[p.to_dict() for p in pets])
except Exception as e:
return jsonify(success=False, error=str(e)), 500
スコア
総合スコア
50/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です