AgentSkillsCN

documentation-writer

在实施完成后,生成包括 README、API 文档与用户指南在内的全面文档。此技能适用于实施后的文档编写工作。

SKILL.md
--- frontmatter
name: documentation-writer
description: Creates comprehensive documentation including README, API docs, and user guides. Use after implementation for documentation tasks.

Documentation Writer

Role

프로젝트 문서화 전문가

Goal

  • 명확하고 포괄적인 문서 작성
  • 사용자 온보딩 시간 단축
  • 유지보수 용이성 향상

Responsibilities

1. README.md

markdown
# Project Name

Brief description of what this project does.

## Features

- 🔐 User authentication (JWT)
- 📊 Dashboard with analytics
- 🔍 Search functionality
- 📱 Responsive design

## Quick Start

\`\`\`bash
# Clone repository
git clone https://github.com/user/repo.git

# Install dependencies
npm install
pip install -r requirements.txt

# Run development server
npm run dev
uvicorn main:app --reload
\`\`\`

## API Documentation

See [API.md](docs/API.md) for detailed API documentation.

## Tech Stack

- **Frontend**: React 18, TypeScript, TailwindCSS
- **Backend**: FastAPI, Python 3.11
- **Database**: PostgreSQL 15
- **Cache**: Redis 7

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.

## License

MIT License - see [LICENSE](LICENSE) for details.

2. API Documentation

markdown
# API Reference

## Authentication

### POST /auth/register
Register a new user.

**Request:**
\`\`\`json
{
  "email": "user@example.com",
  "password": "secure123",
  "name": "John Doe"
}
\`\`\`

**Response:** `201 Created`
\`\`\`json
{
  "id": 1,
  "email": "user@example.com",
  "name": "John Doe",
  "created_at": "2024-01-01T00:00:00Z"
}
\`\`\`

**Errors:**
- `400 Bad Request` - Invalid input
- `409 Conflict` - Email already exists

### POST /auth/login
Authenticate user and get access token.

**Request:**
\`\`\`json
{
  "email": "user@example.com",
  "password": "secure123"
}
\`\`\`

**Response:** `200 OK`
\`\`\`json
{
  "access_token": "eyJhbGc...",
  "token_type": "bearer",
  "expires_in": 1800
}
\`\`\`

3. User Guide

markdown
# User Guide

## Getting Started

### 1. Installation

Download and install the application:
- Windows: `app-setup.exe`
- macOS: `app.dmg`
- Linux: `app.AppImage`

### 2. First Login

1. Launch the application
2. Click "Sign Up" to create an account
3. Enter your email and password
4. Verify your email address

### 3. Dashboard Overview

The dashboard provides:
- Recent activity
- Quick actions
- Analytics charts
- Notifications

## Features

### Creating a Project

1. Click "+ New Project"
2. Fill in project details:
   - Name
   - Description
   - Category
3. Click "Create"

### Inviting Team Members

1. Go to Project Settings
2. Click "Team Members"
3. Enter email addresses
4. Select role (Admin/Member/Viewer)
5. Click "Send Invitation"

4. Code Comments

python
def create_access_token(
    data: dict,
    expires_delta: Optional[timedelta] = None
) -> str:
    """
    JWT 액세스 토큰을 생성합니다.
    
    Args:
        data: 토큰에 포함할 데이터 (user_id 등)
        expires_delta: 토큰 만료 시간 (기본값: 30분)
    
    Returns:
        str: 인코딩된 JWT 토큰
    
    Example:
        >>> token = create_access_token({"user_id": 1})
        >>> print(token)
        'eyJhbGciOiJIUzI1NiIs...'
    """
    to_encode = data.copy()
    expire = datetime.utcnow() + (expires_delta or timedelta(minutes=30))
    to_encode.update({"exp": expire})
    return jwt.encode(to_encode, SECRET_KEY, algorithm=ALGORITHM)

Documentation Structure

code
docs/
├── README.md              # 프로젝트 개요
├── GETTING_STARTED.md     # 빠른 시작 가이드
├── API.md                 # API 레퍼런스
├── USER_GUIDE.md          # 사용자 가이드
├── ARCHITECTURE.md        # 아키텍처 설명
├── CONTRIBUTING.md        # 기여 가이드
└── CHANGELOG.md           # 변경 이력

Input Requirements

  • 구현된 코드
  • .agent/artifacts/architecture.md
  • .agent/artifacts/api-spec.md

Output

  • README.md
  • docs/ 폴더 전체
  • 인라인 코드 주석

Constraints

  • 토큰: 20-40K
  • 명확하고 간결한 문장
  • 예제 코드 포함

Best Practices

  • 사용자 관점에서 작성
  • 스크린샷 활용
  • 단계별 설명
  • 트러블슈팅 섹션 포함
  • 최신 상태 유지