documentation-writer
Skill166 starsChanged 5 months agoMITView on GitHub
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
We split this skill into the rules it gives an agent
8 rules. 0 are common, 8 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 37 edited versions we read keep these.
8
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 32
Every ProtheusDOC block follows this structure:
- Distinctive: line 248
Follow this process for every documentation request:
- Distinctive: line 260
If the source code alone does not provide enough information, ask about:
- Distinctive: line 263
Since: When was this element introduced?
- Distinctive: line 270
Place each block immediately before the element it documents
- Distinctive: line 271
Use the minimum necessary tags — do not add empty or placeholder tags
- Distinctive: line 275
Write descriptions in the same language as the existing code comments (Portuguese or English)
- Distinctive: line 279
Verify each generated block against this checklist:
“Common” is measured: kept by at least 6 in 10 of the 37 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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:
/*/{Protheus.doc} <Identifier>
<Brief description of the element>
@type <element-type>
[optional tags...]
/*/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)
- Functions: the function name (e.g.,
- 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)
/*/{Protheus.doc} FunctionName
Brief description of what the function does.
@type user function
@author Author Name
@since dd/mm/yyyy
@version Product Version
@param cParam1, character, Description of first parameter
@param nParam2, numeric, Description of second parameter
@param [cOptional], character, Description of optional parameter
@return logical, Description of the return value
@example
lResult := FunctionName("value", 10)
@see RelatedFunction
@obs Any relevant observation
/*/
User Function FunctionName(cParam1, nParam2, cOptional)Class (@type class)
/*/{Protheus.doc} TClassName
Brief description of the class purpose.
@type class
@author Author Name
@since dd/mm/yyyy
@version Product Version
@see TParentClass
@obs Inherits from TParentClass via From keyword
/*/
Class TClassName From TParentClassMethod (@type method)
/*/{Protheus.doc} TClassName::MethodName
Brief description of what the method does.
@type method
@author Author Name
@since dd/mm/yyyy
@param oParam, object, Description of parameter
@return numeric, Description of return value
@example
nResult := oObj:MethodName(oParam)
/*/
Method MethodName(oParam) Class TClassNameComplete Example: User Function with Full Tags
/*/{Protheus.doc} areaQuad
Efetua o cálculo da área de alguns quadriláteros.
@type user function
@author José Silva
@since 20/11/2012
@version P10 R4
@param nBase, numérico, Medida do lado ou da base
@param [nAltura], numérico, Medida da altura
@param [nBaseMenor], numérico, Medida da base menor (trapézios)
@return numérico, Área calculada
@example
nArea := areaQuad(10, 5)
nAreaTrapezio := areaQuad(10, 5, 6)
@see areaCirc
@table
@obs Quando nAltura não informada, calcula área do quadrado (nBase^2)
/*/
User Function areaQuad(nBase, nAltura, nBaseMenor)Complete Example: Class with Methods
#include "tlpp-core.th"
Namespace finance.receivable
/*/{Protheus.doc} TReceivable
Classe para gestão de títulos a receber.
@type class
@author Dev Team
@since 01/03/2025
@version 12.1.2410
@see TBaseEntity
/*/
Class TReceivable From TBaseEntity
Private Data cDocNumber as Character
Private Data nValue as Numeric
Private Data dDueDate as Date
Private Data lPaid as Logical
Public Method New(cDoc as Character, nVal as Numeric, dDue as Date) as Object
Public Method Pay(nAmount as Numeric) as Logical
Public Method GetBalance() as Numeric
EndClass
/*/{Protheus.doc} TReceivable::New
Construtor da classe TReceivable. Inicializa as propriedades do título.
@type method
@author Dev Team
@since 01/03/2025
@param cDoc, character, Número do documento
@param nVal, numeric, Valor do título
@param dDue, date, Data de vencimento
@return object, Instância de TReceivable (Self)
@example
Local oRec := TReceivable():New("NF001", 1500.00, CtoD("31/12/2025"))
/*/
Method New(cDoc, nVal, dDue) Class TReceivable
_Super:New()
::cDocNumber := cDoc
::nValue := nVal
::dDueDate := dDue
::lPaid := .F.
Return Self
/*/{Protheus.doc} TReceivable::Pay
Registra o pagamento do título se o valor for suficiente.
@type method
@author Dev Team
@since 01/03/2025
@param nAmount, numeric, Valor do pagamento
@return logical, .T. se pagamento realizado com sucesso
/*/
Method Pay(nAmount) Class TReceivable
If nAmount >= ::GetBalance()
::lPaid := .T.
Return .T.
EndIf
Return .F.
/*/{Protheus.doc} TReceivable::GetBalance
Retorna o saldo devedor do título.
@type method
@author Dev Team
@since 01/03/2025
@return numeric, Saldo restante (0 se já pago)
/*/
Method GetBalance() Class TReceivable
If ::lPaid
Return 0
EndIf
Return ::nValueWorkflow
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
Other versions38 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 38
- github/awesome-copilot★ 41ksame name
- QuivrHQ/quivr★ 40ksame name
- rajnandan1/kener★ 5.2ksame name
- compozy/compozy★ 2.8ksame name
- javierbrea/eslint-plugin-boundaries★ 997same name
- cboard-org/cboard★ 760same name
- mohebifar/tooscut★ 716same name
- pedronauck/skills★ 641same name
- mzmine/mzmine★ 306same name
- Karanjot786/TermUI★ 237same name
28 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use tailwindcss, test-engineer and 7 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
azlekovSkilltailwindcss
This skill should be used when the user asks to "style with Tailwind", "add CSS", "configure theme", "use @theme", "add custom colors", "implement dark mode", "use container queries", "add responsive design", "use OKLCH colors", or discusses styling, theming, or visual design. Always use the latest Tailwind CSS version and modern patterns.
Also in 3 projects that use this
JohnJBorenSkilltest-engineer
Testing strategy, test patterns, and coverage optimization for unit, integration, and E2E tests
Also in 4 projects that use this
JohnJBorenSkilldebugger
Systematic debugging workflows, root cause analysis, and troubleshooting patterns
Also in 3 projects that use this
VercelSkilltechnical-writer
Write, review, and edit developer documentation for SDKs, libraries, and frameworks, including sites such as ai-sdk.dev and chat-sdk.dev. Use for getting-started guides, tutorials, API references, conceptual explanations, integration guides, migration guides, troubleshooting, and code examples.
Also in 3 projects that use this
VercelSkillreact
React renderer for json-render that turns JSON specs into React components. Use when working with @json-render/react, building React UIs from JSON, creating component catalogs, or rendering AI-generated specs.
Also in 3 projects that use this
GoogleSkillcode-reviewer
Also in 5 projects that use this
- +1 more from vercel-labs
In this repository35 other files it gives its agents.
- instructions/AGENTS.mdAGENTS.md
- instructions/CLAUDE.mdCLAUDE.md
- advpl-tlpp-compileSkill
- advpl-tlpp-sddSkill
- advpl-to-tlpp-migrationSkill
- code-reviewSkill
- context-mapSkill
- create-implementation-planSkill
- data-dictionary-lookupSkill
- entry-point-designerSkill
- fwmsexcelxlsx-generatorSkill
- fwrest-client-generatorSkill
- mvc-generatorSkill
- query-builderSkill
- refactor-method-complexity-reduceSkill
- refactorSkill
- sql-code-reviewSkill
- sql-optimizationSkill
- tir-test-generatorSkill
- tlpp-rest-endpoint-generatorSkill
- utf8-to-cp1252-conversionSkill
- brainstormingSkill
- dispatching-parallel-agentsSkill
- executing-plansSkill
- finishing-a-development-branchSkill
- receiving-code-reviewSkill
- requesting-code-reviewSkill
- subagent-driven-developmentSkill
- systematic-debuggingSkill
- test-driven-developmentSkill
- using-git-worktreesSkill
- using-superpowersSkill
- verification-before-completionSkill
- writing-plansSkill
- writing-skillsSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

