Skip to content

marketingjuliancongdanh79-pixel/skill-generator

skill-creator-ultra

Verified

Tạo AI Skill mới từ ý tưởng hoặc quy trình công việc. Kết hợp phỏng vấn thông minh, pattern detection, và quantitative evaluation để tạo skill chất lượng production. Dùng khi user nói "tạo skill", "biến quy trình thành skill", "make a new skill", "tự động hóa công việc này", hoặc mô tả quy trình lặp lại mà họ muốn AI tự làm. Cũng dùng khi user muốn cải thiện, test, hoặc optimize skill hiện có.

examples/example_api_docs.md

View on GitHub
# Example: api-docs-writer (🟡 Trung bình — Complexity 9)

> **Nguồn cảm hứng:** Tổng hợp từ Stripe API docs style + OpenAPI spec.
> **Mức độ:** Trung bình — SKILL.md + resources/ + examples/ (không cần scripts).
> **Tham khảo:** Anthropic's `doc-coauthoring` skill — tách templates ra resources.

## 📂 Cấu trúc

```
skills/api-docs-writer/
├── SKILL.md
├── README.md
├── resources/
│   └── api_template.md         ← Template cho output
└── examples/
    └── example_rest_api.md     ← Ví dụ chi tiết Input → Output
```

---

## 📄 File 1: SKILL.md

```markdown
---
name: api-docs-writer
description: |
  Sinh tài liệu API chuyên nghiệp từ source code hoặc mô tả endpoint.
  Hỗ trợ REST, GraphQL, gRPC. Output theo format Stripe-style hoặc OpenAPI.
  Dùng khi user nói "viết API docs", "document API", "tạo tài liệu endpoint",
  "swagger docs", "describe API", hoặc khi thấy code có route/controller.
  KHÔNG dùng cho: viết code API mới, testing API, deploy.
---

# Goal

Sinh API documentation chuyên nghiệp (Stripe-quality) từ source code hoặc
mô tả, giúp developer onboard nhanh hơn 80%.

# Instructions

1. Nhận input từ user — 1 trong 3 dạng:
   - **Source code** (route file, controller) → parse endpoints
   - **Mô tả text** ("API có 3 endpoint: GET /users, POST /users, ...")
   - **OpenAPI/Swagger JSON** → parse và format lại
2. Với MỖI endpoint, trích xuất:
   - Method (GET/POST/PUT/DELETE/PATCH)
   - Path + Path params
   - Query params + Body params (type, required, default)
   - Response (success + error codes)
   - Authentication (bearer, API key, none)
3. Hỏi bổ sung: "Có authentication không? Rate limit? Pagination?"
   - Nếu user không biết → bỏ qua, ghi "TBD"
4. Sinh docs theo template `resources/api_template.md`
5. ✅ VERIFY: Mọi endpoint có ≥1 example request + response?
   - Nếu thiếu → bổ sung example realistic

📚 **Template chi tiết:** `resources/api_template.md`

# Examples

## Ví dụ 1: REST API đơn giản

**Input:** "API quản lý user, có GET /users, POST /users, GET /users/:id"

**Output:** (xem chi tiết trong `examples/example_rest_api.md`)

```markdown
## GET /users

Lấy danh sách users.

### Parameters

| Param  | Type   | Required | Default | Description          |
|--------|--------|----------|---------|----------------------|
| page   | int    | No       | 1       | Trang hiện tại       |
| limit  | int    | No       | 20      | Số records mỗi trang |

### Example Request

GET /users?page=1&limit=10

### Example Response (200 OK)

{
  "data": [{"id": 1, "name": "Nguyễn Văn A", "email": "a@example.com"}],
  "pagination": {"page": 1, "limit": 10, "total": 42}
}

### Error Responses

| Code | Description            |
|------|------------------------|
| 401  | Unauthorized — missing token |
| 500  | Internal Server Error  |
```

# Constraints

- Mọi endpoint PHẢI có example request + response — dev đọc example trước doc
- Ghi rõ field types (string, int, boolean) — tránh đoán sai
- Luôn có error responses (≥ 401, 404, 500) — dev cần biết lỗi gì có thể xảy ra
- Dùng realistic data trong examples — "John Doe" tốt hơn "string"

<!-- Generated by Skill Creator Ultra v1.0 -->
```

---

## 📄 File 2: resources/api_template.md

```markdown
# API Documentation Template

## {API Name} API

### Base URL
{base_url}

### Authentication
{auth_type}: {description}

---

### {METHOD} {path}

{description}

#### Parameters

| Param | Type | Required | Default | Description |
|-------|------|----------|---------|-------------|

#### Headers

| Header        | Value             | Required |
|---------------|-------------------|----------|

#### Example Request
{method} {path}
{headers}
{body}

#### Example Response ({status_code})
{response_json}

#### Error Responses

| Code | Message | Description |
|------|---------|-------------|
```

---

## 📄 File 3: examples/example_rest_api.md

```markdown
# Ví dụ: REST API quản lý Users

## Tình huống
Developer mới join team, cần document 3 endpoint user management.

## Input
"API có 3 endpoint: GET /users (list, có pagination), POST /users (tạo mới,
cần name + email), GET /users/:id (chi tiết 1 user)"

## Output
[Full API docs theo template — ~50 dòng cho 3 endpoints]
(Xem SKILL.md Examples section cho shortform)

## Tại sao output như vậy?
- Có pagination params cho GET /users — vì GET list luôn cần paginate
- POST body có validation rules — dev cần biết format
- Error 404 cho GET /users/:id — user có thể không tồn tại
```

---

## 🔍 Phân tích: Tại sao skill này tốt?

| Tiêu chí | Đánh giá | Ghi chú |
|---|---|---|
| **Progressive Disclosure** | ✅ | SKILL.md có tóm tắt, template tách ra resources/ |
| **Description "pushy"** | ✅ | 6 trigger + 3 anti-trigger + cover cả "swagger" |
| **Template-based output** | ✅ | Consistent format qua resources/api_template.md |
| **Explain The Why** | ✅ | "dev đọc example trước doc" |
| **Verification Step** | ✅ | Step 5: "mọi endpoint có ≥1 example?" |
| **Realistic examples** | ✅ | Vietnamese names, real pagination |
| **SKILL.md < 500 dòng** | ✅ | ~80 dòng, template tách riêng |
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 322kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 322kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 322kUpdated Claude CodeCodexVerifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 198kUpdated Claude CodeCodexVerifiedInstall