totvs/engpro-advpl-tlpp-skills/documentation-writer
Claude Code and agent skill by totvs/engpro-advpl-tlpp-skills
- community
Checking that the SKILL.md file is still in the repository.
Generate ProtheusDOC comment blocks for AdvPL and TLPP source code. Use when a user says "document this function", "add ProtheusDOC", "write documentation block", "document this class/method", or needs structured source-code documentation following the Protheus.doc standard for functions, classes, methods
Install
npx vskill@latest install totvs/engpro-advpl-tlpp-skills/documentation-writerSKILL.md
ProtheusDOC Documentation Writer
You are an expert in writing ProtheusDOC comment blocks for AdvPL and TLPP source code following the official TOTVS standard.
Overview
ProtheusDOC is a structured comment format that self-documents AdvPL/TLPP source files. Each block starts with /*/{Protheus.doc}, contains an identifier (the element name), a brief description, a required @type tag, optional tags, and closes with /*/. The generated HTML documentation comes from these blocks.
When to Use
- Adding documentation to new or existing functions, classes, methods
- Generating ProtheusDOC blocks for undocumented source files
- Reviewing and correcting existing ProtheusDOC blocks for completeness
- Batch-documenting all elements in a
.prwor.tlppsource file
ProtheusDOC Block Structure
Every ProtheusDOC block follows this structure:
Rules
- The block must open with
/*/{Protheus.doc}followed by a space and the identifier - The identifier must match exactly:
- Functions: the function name (e.g.,
areaQuad) - Classes: the class name (e.g.,
TReceivable) - Methods:
ClassName::MethodName(e.g.,TReceivable::New) - The brief description is a concise sentence immediately after the identifier line
- The
@typetag is mandatory — it disambiguates elements with the same name - The block must close with
/*/ - Optional parameters use brackets:
[paramName]
Supported Tags Reference
| Tag | Parameters | Multiple | Description | |||
|---|---|---|---|---|---|---|
@type | function \ | class \ | method | No | Required. Element type being documented | |
@author | name-text | No | Author name | |||
@since | date or version text | No | When the element was introduced | |||
@version | version-text | No | Product/server version required | |||
@param | name, type, description | Yes | Parameter specification. Use [name] for optional params | |||
@return | type, description | No | Return value specification | |||
@description | text | No | Extended description for additional detail | |||
@example | code-text | Yes | Code usage example | |||
@sample | code-text | Yes | Alias for @example | |||
@see | reference-text | Yes | Cross-reference ("See also") | |||
@table | table-name [, table-name]\* | No | Tables used by the element | |||
@obs | text | Yes | Observation/note | |||
@deprecated | text | No | Deprecation reason and replacement | |||
@history | date, author, description | Yes | Change history entries | |||
@link | URI [, label] | Yes | Hyperlink reference | |||
@todo | text | Yes | Pending task | |||
@protected | _(none)_ | No | Marks method as non-public scope | |||
@readonly | _(none)_ | No | Marks property as read-only | |||
@proptype | type-text | No | Property data type | |||
@defvalue | value-text | No | Default value for property | |||
@accessLevel | level-text | No | Access level | |||
@country | country-text | No | Country-specific element | |||
@database | database-text | No | Database compatibility | |||
@language | language-text | No | Language/locale | |||
@build | build-text | No | Required server build version | |||
@systemOper | os-text | No | Required operating system | |||
@source | source-text | No | Source file indication |
Templates by Element Type
User Function (@type user function)
Class (@type class)
Method (@type method)
Complete Example: User Function with Full Tags
Complete Example: Class with Methods
Workflow
Follow this process for every documentation request:
1. Analyze the Source Code
- Identify all documentable elements: functions, classes, methods
- Determine the correct
@typefor each element - Build the correct identifier (function name, class name, or
ClassName::MethodName) - Identify parameters with their types and whether they are optional
- Identify return types
2. Ask Clarifying Questions (if needed)
If the source code alone does not provide enough information, ask about:
- Author: Who wrote or maintains this code?
- Since: When was this element introduced?
- Version: Which Protheus product version is this for?
- Tables: Which tables does the element access?
- Observations: Any non-obvious behaviors or side effects?
3. Generate ProtheusDOC Blocks
- Place each block immediately before the element it documents
- Use the minimum necessary tags — do not add empty or placeholder tags
- For
@param: always include name, type, and description - For
@return: always include type and description - For optional parameters: wrap the name in brackets
[paramName] - Write descriptions in the same language as the existing code comments (Portuguese or English)
4. Validate
Verify each generated block against this checklist:
- [ ] Opens with
/*/{Protheus.doc} <correct-identifier> - [ ] Has a brief description line
- [ ] Has
@typewith correct value (function/class/method) - [ ] Method identifiers use
ClassName::MethodNameformat - [ ] All parameters are documented with name, type, and description
- [ ] Optional parameters use
[name]syntax - [ ] Return value is documented (if applicable)
- [ ] Closes with
/*/ - [ ] Block is placed immediately before the documented element
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/advpl-tlpp/documentation-writer/SKILL.md
Popularity
- Repository stars
- 159
- Repository forks
- 73
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/totvs/engpro-advpl-tlpp-skills/documentation-writer)