Back to Development & Coding

Documentation Writer

Generate comprehensive technical documentation, README files, and API docs.

80% tokens saved
5hrs per doc saved
90% popularity

Quick Info

Version

2.0

Last Updated

2025-01

Difficulty

beginner

Category

Development & Coding

Use Cases

  • API documentation
  • README files
  • User guides
  • Technical specs

Features

  • Auto-generation
  • Markdown formatting
  • Code examples
  • Diagrams

System Prompt

You are a technical documentation expert with expertise in API documentation, user guides, README files, and developer documentation. You create clear, comprehensive documentation that serves both technical and non-technical audiences effectively.

Main Prompt

Generate comprehensive documentation for the provided code or project. Include API references, usage examples, and deployment guides.

## ๐Ÿ“š Documentation Requirements
### Project/Code:
```[LANGUAGE]
[CODE_OR_PROJECT_DESCRIPTION]
```

### Target Audience: [DEVELOPERS/USERS/ADMINISTRATORS]
### Documentation Type: [API_DOCS/USER_GUIDE/README/TECHNICAL_SPEC]

## ๐Ÿ“– Complete Documentation

### README.md
```markdown
# Project Name

![Build Status](https://img.shields.io/github/workflow/status/org/repo/CI)
![Coverage](https://img.shields.io/codecov/c/github/org/repo)
![License](https://img.shields.io/github/license/org/repo)

## ๐Ÿš€ Features

- **Feature 1**: Brief description of what it does
- **Feature 2**: How it benefits users
- **Feature 3**: Key differentiator

## ๐Ÿ“ฆ Installation

### Prerequisites

- Node.js >= 16.0.0
- npm >= 8.0.0
- PostgreSQL >= 13 (optional)

### Quick Start

1. Clone the repository:
   \`\`\`bash
   git clone https://github.com/org/repo.git
   cd repo
   \`\`\`

2. Install dependencies:
   \`\`\`bash
   npm install
   \`\`\`

3. Configure environment:
   \`\`\`bash
   cp .env.example .env
   # Edit .env with your configuration
   \`\`\`

4. Run the application:
   \`\`\`bash
   npm start
   \`\`\`

## ๐Ÿ”ง Usage

### Basic Example

\`\`\`javascript
const MyLibrary = require('my-library');

const client = new MyLibrary({
  apiKey: 'your-api-key',
  endpoint: 'https://api.example.com'
});

const result = await client.doSomething({
  param1: 'value1',
  param2: 'value2'
});

console.log(result);
\`\`\`

### Advanced Example

\`\`\`javascript
// With error handling and options
try {
  const client = new MyLibrary({
    apiKey: process.env.API_KEY,
    timeout: 5000,
    retries: 3
  });
  
  const result = await client.complexOperation({
    data: largeDataset,
    options: {
      parallel: true,
      batchSize: 100
    }
  });
  
  console.log('Success:', result);
} catch (error) {
  console.error('Error:', error.message);
}
\`\`\`

## ๐Ÿ“š API Reference

### Class: `MyLibrary`

#### Constructor

\`\`\`javascript
new MyLibrary(options)
\`\`\`

**Parameters:**

| Name | Type | Required | Default | Description |
|------|------|----------|---------|-------------|
| options.apiKey | string | Yes | - | API key for authentication |
| options.endpoint | string | No | https://api.example.com | API endpoint URL |
| options.timeout | number | No | 30000 | Request timeout in milliseconds |
| options.retries | number | No | 3 | Number of retry attempts |

#### Methods

##### `doSomething(params)`

Performs the main operation.

**Parameters:**

| Name | Type | Required | Description |
|------|------|----------|-------------|
| params.param1 | string | Yes | First parameter |
| params.param2 | string | No | Optional second parameter |

**Returns:**

`Promise<Result>` - The operation result

**Example:**

\`\`\`javascript
const result = await client.doSomething({
  param1: 'value1',
  param2: 'value2'
});
\`\`\`

**Throws:**

- `ValidationError` - If parameters are invalid
- `ApiError` - If the API request fails

## ๐Ÿงช Testing

\`\`\`bash
# Run all tests
npm test

# Run with coverage
npm run test:coverage

# Run specific test suite
npm test -- --grep "API"

# Watch mode
npm run test:watch
\`\`\`

## ๐Ÿšข Deployment

### Docker

\`\`\`bash
# Build image
docker build -t myapp .

# Run container
docker run -p 3000:3000 myapp
\`\`\`

### Kubernetes

\`\`\`bash
# Apply manifests
kubectl apply -f k8s/

# Check status
kubectl get pods
\`\`\`

### Cloud Platforms

<details>
<summary>AWS Deployment</summary>

\`\`\`bash
# Using AWS CLI
aws ecs update-service --cluster production --service myapp --force-new-deployment
\`\`\`

</details>

<details>
<summary>Google Cloud Deployment</summary>

\`\`\`bash
# Using gcloud
gcloud run deploy myapp --image gcr.io/project/myapp
\`\`\`

</details>

## ๐Ÿค Contributing

We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details.

### Development Setup

1. Fork the repository
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

## ๐Ÿ“„ License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## ๐Ÿ™ Acknowledgments

- Thanks to all contributors
- Inspired by [Project X]
- Built with [Library Y]

## ๐Ÿ“ž Support

- ๐Ÿ“ง Email: support@example.com
- ๐Ÿ’ฌ Discord: [Join our server](https://discord.gg/example)
- ๐Ÿ› Issues: [GitHub Issues](https://github.com/org/repo/issues)
- ๐Ÿ“– Docs: [Documentation](https://docs.example.com)
```

### API Documentation (OpenAPI)

```yaml
openapi: 3.0.0
info:
  title: My API
  description: Comprehensive API for managing resources
  version: 1.0.0
  contact:
    email: api@example.com

servers:
  - url: https://api.example.com/v1
    description: Production server
  - url: https://staging-api.example.com/v1
    description: Staging server

paths:
  /resources:
    get:
      summary: List all resources
      description: Returns a paginated list of resources
      parameters:
        - name: page
          in: query
          schema:
            type: integer
            default: 1
        - name: limit
          in: query
          schema:
            type: integer
            default: 20
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Resource'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
        '401':
          description: Unauthorized
        '429':
          description: Rate limited

components:
  schemas:
    Resource:
      type: object
      required:
        - id
        - name
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
          minLength: 1
          maxLength: 255
        created_at:
          type: string
          format: date-time
```

### User Guide

[Step-by-step tutorials and guides for end users]

### Developer Guide

[Technical documentation for developers extending or contributing to the project]

Variables

CODE_OR_PROJECT_DESCRIPTIONRequired

Code or project to document

Example: API endpoints, library functions, entire project

LANGUAGERequired

Programming language

Example: JavaScript, Python, Java, Go

DEVELOPERS/USERS/ADMINISTRATORSRequired

Target audience for documentation

Example: Developers, End Users, System Administrators

Pro Tips

  • โ€ขProvide clear project context and purpose
  • โ€ขSpecify the technical level of your audience
  • โ€ขInclude specific examples you want documented
  • โ€ขMention any existing documentation to update or replace
  • โ€ขSpecify preferred documentation format and style
More Development & Coding Agents