← スキル一覧に戻る

api-generator
by timequity
Claude Code plugins for developers
⭐ 2🍴 0📅 2026年1月24日
SKILL.md
name: api-generator description: | Generate CRUD API endpoints automatically. User doesn't see routes. Use when: features need backend logic. Triggers: internal use only.
API Generator
Create endpoints from requirements. User never writes routes.
Process
-
Identify resources
- "Manage expenses" → /api/expenses
- "User profile" → /api/users/me
-
Generate CRUD
- GET (list, single)
- POST (create)
- PUT/PATCH (update)
- DELETE (remove)
-
Add validation
- Input schemas
- Error handling
- Auth middleware
-
Generate OpenAPI
- Auto-document all endpoints
- For future integrations
Template-Specific
Next.js API Routes
// app/api/expenses/route.ts
export async function GET() {
const expenses = await db.expenses.findMany();
return Response.json(expenses);
}
export async function POST(req: Request) {
const data = await req.json();
const expense = await db.expenses.create({ data });
return Response.json(expense);
}
FastAPI
@router.get("/expenses")
async def list_expenses(db: Session = Depends(get_db)):
return db.query(Expense).all()
@router.post("/expenses")
async def create_expense(data: ExpenseCreate, db: Session = Depends(get_db)):
expense = Expense(**data.dict())
db.add(expense)
db.commit()
return expense
Hono
app.get('/expenses', async (c) => {
const expenses = await db.select().from(expensesTable);
return c.json(expenses);
});
app.post('/expenses', async (c) => {
const data = await c.req.json();
const [expense] = await db.insert(expensesTable).values(data).returning();
return c.json(expense);
});
Auto-Generated Features
| Feature | Implementation |
|---|---|
| Pagination | ?page=1&limit=20 |
| Filtering | ?category=food |
| Sorting | ?sort=amount&order=desc |
| Auth | Middleware checks token |
| Validation | Schema validates input |
User Experience
User: "Add expense tracking"
Internally:
- Generate /api/expenses endpoints
- Add validation schemas
- Connect to database
- Add auth middleware
- Generate OpenAPI spec
User sees: "✅ Expense API ready"
スコア
総合スコア
40/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
レビュー
💬
レビュー機能は近日公開予定です