A skill for using Copilot to generate API documentation, README files, inline comments, and architecture decision records.
## Copilot Documentation Writer Skill
### Overview
Use Copilot to generate and maintain project documentation efficiently, from inline comments to full API reference docs.
### Inline Documentation
Place your cursor above a function and type `/**` to trigger JSDoc/docstring generation:
```typescript
/**
* Copilot generates: parameter descriptions, return type,
* throws clause, and example usage based on the function signature
*/
async function createUser(data: CreateUserRequest): Promise<UserResponse> {
```
For Python, type `"""` below the function definition:
```python
def process_payment(amount: Decimal, currency: str, method: PaymentMethod) -> Receipt:
"""
Copilot generates: Args, Returns, Raises sections
with accurate descriptions based on type hints and function body
"""
```
### API Documentation
Use Copilot Chat to generate API docs from code:
```
@workspace Generate OpenAPI documentation for all endpoints
in src/controllers/. Include:
- Summary and description for each endpoint
- Request body schemas with examples
- All possible response codes with schemas
- Authentication requirements
```
### README Generation
```
@workspace Generate a README.md for this project that includes:
- Project description and purpose
- Tech stack overview
- Prerequisites and installation steps
- Environment variable documentation
- Available scripts and commands
- API endpoint summary
- Contributing guidelines
- License information
```
### Architecture Decision Records (ADR)
```
Generate an ADR for choosing PostgreSQL over MongoDB:
- Context: what problem we are solving
- Decision: what we chose and why
- Alternatives considered with pros and cons
- Consequences: positive, negative, and risks
- Follow the MADR template format
```
### Changelog Generation
Use Copilot with git history:
```
@workspace Generate a changelog entry for the changes
in the last 5 commits. Group by: Features, Bug Fixes,
Breaking Changes. Follow Keep a Changelog format.
```
### Documentation Maintenance
- Ask Copilot to update docs when code changes: "Update the README to reflect the new authentication flow"
- Use Copilot to find outdated documentation: "Check if the API docs in docs/ match the current controller implementations"
- Generate migration guides: "Create a migration guide for users upgrading from v2 to v3"
### Tips for Better Documentation
- Keep open related code files for context when generating docs
- Review generated docs for accuracy; Copilot may hallucinate endpoints or params
- Use `@workspace` for project-wide documentation tasks
- Generate docs incrementally: module by module, not the entire project at onceFree to copy and use. Compatible with GitHub Copilot, GPT-5.
Use these patterns to generate documentation with Copilot. Type /** above functions for inline docs, or use Copilot Chat with @workspace for larger documentation tasks.
Initial release
gh copilot skill install copilot-documentation-writer-skillSign in and download this prompt to leave a review.