Documentation Skill
When to Use
Use this skill when:
- •Creating or updating project documentation (README.md, API docs)
- •Documenting functions and modules in the codebase
- •Updating documentation in
.context/docs/directory - •Creating user guides and technical specifications
Documentation Standards
README Structure
The project uses a clear README structure following this pattern:
- •Title & Description - Clear project purpose
- •Funcionalidades - Feature list with checkmarks
- •Instalação - Installation steps including dependencies
- •Uso - Usage examples with code blocks
- •Estrutura do Banco de Dados - Database schema documentation
- •Exemplos - Practical examples
- •Notas - Important notes and limitations
Code Documentation
- •
Function Docstrings: Use triple-quoted strings with Portuguese descriptions
pythondef extract_text_from_pdf(filepath): """Extrai texto de um arquivo PDF.""" - •
Inline Comments: Portuguese comments for complex logic
- •
Module Docstrings: Document purpose at module level
File Organization
- •Main documentation:
contrato/README.md - •Context documentation:
.context/docs/ - •Agent playbooks:
.context/agents/ - •Skills:
.context/skills/
Documentation Guidelines
README.md
Structure:
- •Funcionalidades: List key features with ✅ checkmarks
- •Instalação: Step-by-step installation with code blocks
- •Uso: CLI examples with proper formatting
- •Estrutura do Banco de Dados: Document database schema
- •Notas: Important limitations and notes
Example format from project:
markdown
## Funcionalidades - ✅ Indexação automática de PDFs - ✅ Extração completa de texto - ✅ Indicadores de sucesso
API Documentation
For CLI scripts, document:
- •Command syntax
- •Options and flags
- •Example usage
- •Output format
Database Documentation
Document:
- •Table schemas
- •Indexes and triggers
- •Relationships
- •Query patterns
Examples from Codebase
Good Documentation Example
From contrato/README.md:
markdown
### 1. Indexar Documentos Primeiro, indexe todos os documentos PDF da pasta: ```bash python indexer.py
O script irá:
- •Percorrer todos os subdiretórios procurando arquivos PDF
- •Extrair o texto de cada PDF (método direto primeiro)
- •Se necessário, usar OCR para PDFs escaneados (imagens)
code
### Function Documentation Pattern
```python
def extract_text_from_pdf(filepath):
"""Extrai texto de um arquivo PDF usando pdfplumber e OCR como fallback."""
# Implementation...
Best Practices
- •Always in Portuguese - Project documentation is in Portuguese
- •Code Examples - Include practical CLI examples
- •Clear Structure - Use headers and lists for readability
- •Keep Updated - Update docs when adding features
- •Cross-Reference - Link related documentation files
Checklist
When creating/updating documentation:
- • Portuguese language used
- • Code examples included and tested
- • Installation steps verified
- • Usage examples match actual CLI
- • Database schema documented
- • Cross-references to related docs added
- • README.md updated if adding new features