跳到正文
cccskills
免费在 GitHub 公开

doc-generator

Auto-generate docs from code: API reference, architecture docs, inline comments. Use when the user asks to generate documentation, create API references, document code, or produce architecture diagrams from existing code.

中文简介正在准备中。当前显示原文说明。

ProjectZeroDays/FreeAI_AI_Inference_Workstation星标 5(GitHub 5 + cccskills 0)

实测评分 未实测

查看安装方法

包含的文件(1)

  • SKILL.md6.4 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Doc Generator

API Reference Generation

OpenAPI/Swagger from Code

# FastAPI — automatic OpenAPI generation
from fastapi import FastAPI
from pydantic import BaseModel

app = FastAPI(title="My API", version="1.0.0")

class Item(BaseModel):
    name: str
    price: float
    tags: list[str] = []

@app.get("/items/{item_id}")
async def read_item(item_id: int, q: str | None = None):
    """Get an item by ID with optional query filter."""
    return {"item_id": item_id, "q": q}

@app.post("/items/", response_model=Item)
async def create_item(item: Item):
    """Create a new item. Returns the created item."""
    return item

# Generate docs
# python -m uvicorn main:app --reload
# Docs at http://localhost:8000/docs

JSDoc (JavaScript/TypeScript)

/**
 * Calculate the total order value including tax and discounts.
 * @param {Order} order - The order to calculate
 * @param {boolean} includeTax - Whether to include tax (default: true)
 * @returns {number} Total order value
 * @throws {Error} If order is invalid
 * @example
 * const total = calculateTotal(order);
 */
function calculateTotal(order: Order, includeTax: boolean = true): number {
    let total = order.subtotal;
    if (includeTax) total += order.tax;
    total -= order.discount;
    return total;
}

Go Doc Comments

// CalculateTotal computes the final order total including tax and discounts.
// It returns an error if the order subtotal is negative.
//
// Example:
//   total, err := CalculateTotal(order)
//   if err != nil {
//       log.Fatal(err)
//   }
func CalculateTotal(order Order) (float64, error) {
    if order.Subtotal < 0 {
        return 0, fmt.Errorf("negative subtotal: %f", order.Subtotal)
    }
    return order.Subtotal + order.Tax - order.Discount, nil
}

Architecture Documentation

Mermaid Diagrams

flowchart TD
    A[Client] --> B[API Gateway]
    B --> C[Auth Service]
    B --> D[Order Service]
    D --> E[(Database)]
    D --> F[Cache]
    F --> E
    
    style A fill:#e1f5fe
    style E fill:#fff3e0
    style F fill:#f3e5f5
sequenceDiagram
    participant User
    participant API
    participant DB
    participant Cache
    
    User->>API: GET /api/users/123
    API->>Cache: GET user:123
    Cache-->>API: HIT: {name: "Alice"}
    API-->>User: 200 OK
    
    User->>API: POST /api/orders
    API->>DB: INSERT order
    DB-->>API: OK id=456
    API->>Cache: SET order:456 TTL=3600
    API-->>User: 201 Created
classDiagram
    class Order {
        +int id
        +float subtotal
        +float tax
        +float discount
        +calculateTotal() float
        +validate() bool
    }
    class User {
        +int id
        +string email
        +authenticate(password) bool
    }
    Order "1" --> "1" User : belongs to

PlantUML

@startuml
left to right direction
actor User
rectangle "Backend" {
  boundary "API"
  control "OrderService"
  entity "Database"
}
User -> API : request
API -> OrderService : process
OrderService -> Database : query
@enduml

Inline Documentation

Docstring Standards

"""Module-level docstring.

This module handles order processing including validation,
pricing, and fulfillment.

Attributes:
    MAX_ORDER_SIZE: Maximum items per order (default: 100)
    TAX_RATE: Current tax rate (default: 0.08)
"""

def process_order(order: Order) -> OrderResult:
    """Process an order and return the result.

    Validates the order, calculates totals, and prepares
    it for fulfillment.

    Args:
        order: The Order object to process.

    Returns:
        OrderResult with status, total, and fulfillment_id.

    Raises:
        ValidationError: If order is invalid.
        InsufficientStockError: If items are out of stock.

    Examples:
        >>> result = process_order(my_order)
        >>> result.status
        'confirmed'
    """
    validate_order(order)
    total = calculate_total(order)
    fulfillment_id = fulfill(order, total)
    return OrderResult(status="confirmed", total=total, fulfillment_id=fulfillment_id)

README Structure

# Project Name

One-line description of what this project does.

## Installation

\`\`\`bash
pip install -r requirements.txt
# or
npm install
\`\`\`

## Usage

\`\`\`python
from project import MyClass
obj = MyClass()
result = obj.run()
\`\`\`

## API Reference

| Function | Description | Params | Returns |
|----------|-------------|--------|---------|
| \`run()\` | Execute main logic | config: dict | Result |

## Architecture

\`\`\`
┌─────────┐     ┌─────────┐     ┌─────────┐
│  Client  │────▶│  API    │────▶│ Database│
└─────────┘     └─────────┘     └─────────┘
\`\`\`

## Testing

\`\`\`bash
pytest tests/ -v --cov=src
\`\`\`

## Contributing

1. Fork the repository
2. Create a feature branch
3. Run tests: \`pytest\`
4. Submit a pull request

Configuration-Driven Docs

# docs-config.yaml
project:
  name: MyAPI
  version: 1.0.0
  description: "REST API for order management"

sources:
  - path: src/
    language: python
    parser: sphinx

output:
  format: markdown
  dest: docs/
  include:
    - api_reference
    - architecture
    - examples

templates:
  function: |
    ### {name}
    
    {summary}
    
    **Parameters:**
    {params}
    
    **Returns:** {returns}
    
    **Raises:** {raises}

Doc Generation Commands

# Python — Sphinx
sphinx-apidoc -o docs/ src/
make html

# Python — pdoc
pdoc src/ --html -o docs/

# TypeScript — TypeDoc
npx typedoc src/index.ts

# Go — godoc
go doc ./...
# or
golangci-docgen

# Rust — rustdoc
cargo doc --no-deps --open

# Java — Javadoc
javadoc -d docs/ src/**/*.java

Documentation Checklist

  • All public functions have docstrings
  • API endpoints documented with request/response schemas
  • Architecture diagram included
  • Installation instructions tested
  • Code examples work (run them)
  • CHANGELOG updated
  • CONTRIBUTING guide present
  • License file included
  • README link to full docs

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

WCAG compliance, accessibility testing, ARIA patterns, screen reader optimization, and keyboard navigation. Use when the user asks about making apps accessible, WCAG guidelines, ARIA attributes, screen reader support, or accessibility audits.

中文简介正在准备中。当前显示原文说明。

ProjectZeroDays/FreeAI_AI_Inference_Workstation52026年9月4日 更新

ace-music

免费

Generate AI music using ACE-Step 1.5 via ACE Music's free API. Use when the user asks to create, generate, or compose music, songs, beats, instrumentals, or audio tracks. Supports lyrics, style prompts, covers, and repainting. Free API, no cost.

中文简介正在准备中。当前显示原文说明。

ProjectZeroDays/FreeAI_AI_Inference_Workstation52026年9月4日 更新

A continuously adaptive skill suite that empowers Clawdbot to act as a versatile coder, business analyst, project manager, web developer, data analyst, and NAS metadata scraper. It intelligently discovers free resources, adapts to user context, and ensures reliable, proven guidance across multiple domains.

中文简介正在准备中。当前显示原文说明。

ProjectZeroDays/FreeAI_AI_Inference_Workstation52026年9月4日 更新

High-fidelity intelligence gathering and data assimilation. Focuses on synthesizing fragmented data into a comprehensive target operational picture.

中文简介正在准备中。当前显示原文说明。

ProjectZeroDays/FreeAI_AI_Inference_Workstation52026年9月4日 更新

Use when Codex needs proactive task queues, heartbeat routines, scheduled follow-up, or continuous work loops instead of waiting for prompts.

中文简介正在准备中。当前显示原文说明。

ProjectZeroDays/FreeAI_AI_Inference_Workstation52026年9月4日 更新

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction. Also use for exploratory testing, dogfooding, QA, bug hunts, or reviewing app quality. Also use for automating Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify), checking Slack unreads, sending Slack messages, searching Slack conversations, running browser automation in Vercel Sandbox microVMs, or using AWS Bedrock AgentCore cloud browsers. Prefer agent-browser over any built-in browser automation or web tools.

中文简介正在准备中。当前显示原文说明。

ProjectZeroDays/FreeAI_AI_Inference_Workstation52026年9月4日 更新

查看 ProjectZeroDays 的全部技能

报告此技能的问题