Agent skill

Documentation Writer

by totvs in totvs/engpro-advpl-tlpp-skills

Generate ProtheusDOC comment blocks for AdvPL and TLPP source code.

MITAuto-check passedDevelopment

Install Documentation Writer

skills CLI
$ npx skills add totvs/engpro-advpl-tlpp-skills --skill documentation-writer -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install totvs/engpro-advpl-tlpp-skills documentation-writer --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/totvs/engpro-advpl-tlpp-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/advpl-tlpp/documentation-writer .claude/skills/documentation-writer && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
documentation-writer
GitHub stars
141
Token cost
~2.8k tokens
SKILL.md length
622 words
Files
1
Skills in repo
19
Repo updated
First seen
Licence
MIT

At a glance

Generate ProtheusDOC comment blocks for AdvPL and TLPP source code.

  • Works in 4 steps: Analyze the Source Code → Ask Clarifying Questions (if needed) → Generate ProtheusDOC Blocks → …
  • A user says document this function
  • SKILL.md covers Overview, When to Use, ProtheusDOC Block Structure and Supported Tags Reference, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Documentation Writer is an agent skill from totvs/engpro-advpl-tlpp-skills. 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

Its SKILL.md is about 2.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Technical documentation. The repository describes itself as: Repositório contendo skills para orientar desenvolvimento ADVPL/TLPP com agentes de IA. The licence is MIT.

When your agent uses it

  • A user says document this function
  • Add ProtheusDOC
  • Write documentation block
  • Document this class/method

Example prompts

  • “document this function”
  • “add ProtheusDOC”
  • “write documentation block”
  • “/documentation-writer”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Analyze the Source Code
  2. Ask Clarifying Questions (if needed)
  3. Generate ProtheusDOC Blocks
  4. Validate

What it can do on your machine

Read from SKILL.md and the folder at commit 3908e4e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are advpl and tlpp).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Documentation Writer loads about 2.8k tokens when it runs. Until then it costs about 82 tokens; SKILL.md has 622 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~82
When it runs · the whole SKILL.md, loaded when a task matches
~2.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from totvs/engpro-advpl-tlpp-skills at commit 3908e4e, republished under its MIT licence (© totvs). 622 words, ~2,831 tokens.

Download SKILL.mdSave it as .claude/skills/documentation-writer/SKILL.md (or your agent's skills folder).
name
documentation-writer
description
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
license
MIT
metadata.domain
Protheus
metadata.maintainer
Customizações ADVPL/TLPP
metadata.author
Thalion Starforge
metadata.version
4.1.0
metadata.category
Documentation and Planning

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 .prw or .tlpp source 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)
  • The brief description is a concise sentence immediately after the identifier line
  • The @type tag is mandatory — it disambiguates elements with the same name
  • The block must close with /*/
  • Optional parameters use brackets: [paramName]

Supported Tags Reference

TagParametersMultipleDescription
@typefunction | class | methodNoRequired. Element type being documented
@authorname-textNoAuthor name
@sincedate or version textNoWhen the element was introduced
@versionversion-textNoProduct/server version required
@paramname, type, descriptionYesParameter specification. Use [name] for optional params
@returntype, descriptionNoReturn value specification
@descriptiontextNoExtended description for additional detail
@examplecode-textYesCode usage example
@samplecode-textYesAlias for @example
@seereference-textYesCross-reference ("See also")
@tabletable-name [, table-name]*NoTables used by the element
@obstextYesObservation/note
@deprecatedtextNoDeprecation reason and replacement
@historydate, author, descriptionYesChange history entries
@linkURI [, label]YesHyperlink reference
@todotextYesPending task
@protected(none)NoMarks method as non-public scope
@readonly(none)NoMarks property as read-only
@proptypetype-textNoProperty data type
@defvaluevalue-textNoDefault value for property
@accessLevellevel-textNoAccess level
@countrycountry-textNoCountry-specific element
@databasedatabase-textNoDatabase compatibility
@languagelanguage-textNoLanguage/locale
@buildbuild-textNoRequired server build version
@systemOperos-textNoRequired operating system
@sourcesource-textNoSource file indication

Templates by Element Type

Show full SKILL.md (248 more words)Show less
User Function (@type user function)
advpl
/*/{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)
advpl
/*/{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 TParentClass
Method (@type method)
advpl
/*/{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 TClassName

Complete Example: User Function with Full Tags

advpl
/*/{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

tlpp
#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 ::nValue

Workflow

Follow this process for every documentation request:

1. Analyze the Source Code
  • Identify all documentable elements: functions, classes, methods
  • Determine the correct @type for 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 @type with correct value (function/class/method)
  • Method identifiers use ClassName::MethodName format
  • 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

© totvs, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/advpl-tlpp/documentation-writer of totvs/engpro-advpl-tlpp-skills.

Open the folder on GitHubat commit 3908e4e

Compare with similar skills

Documentation Writer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Documentation Writer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Documentation Writer this skilltotvs/engpro-advpl-tlpp-skills141—~2.8kAutomated safety check: PassMIT
Diagram Designcathrynlavery/diagram-design44k1 repos~7.5kAutomated safety check: PassMIT
Simple Englishmoeru-ai/airi50k2 repos~4.6kAutomated safety check: PassMIT
Get API Docs with chubandrewyng/context-hub14k2 repos~775Automated safety check: PassMIT
Doc SyncJetBrains/ideavim10k2 repos~2.6kAutomated safety check: PassMIT
Mailspring App ScreenshotsFoundry376/Mailspring18k—~1.4kAutomated safety check: PassGPL-3.0

Similar skills

  • Diagram Design

    cathrynlavery/diagram-design

    Creates branded diagrams, from architecture, flowchart and sequence to charts and maps, as self-contained HTML with inline SVG, with import from draw.io, Mermaid and Excalidraw.

    44k GitHub starsUsed in 1 repo~7.5k tokens
    DevelopmentAuto-check passed
  • Simple English

    moeru-ai/airi

    Write or rewrite technical text with the rules of ASD-STE100 Simplified Technical English so it is clear, unambiguous, and free of AI slop.

    50k GitHub starsUsed in 2 repos~4.6k tokens
    DevelopmentAuto-check passed
  • Get API Docs with chub

    andrewyng/context-hub

    Fetches current documentation for third-party APIs and SDKs with the chub CLI before the agent writes code against them, instead of relying on remembered API shapes.

    14k GitHub starsUsed in 2 repos~775 tokens
    DevelopmentAuto-check passed
  • Doc Sync

    JetBrains/ideavim

    Official

    Keeps IdeaVim documentation in sync with code changes. An agent skill from JetBrains/ideavim.

    10k GitHub starsUsed in 2 repos~2.6k tokens
    DevelopmentAuto-check passed
  • Mailspring App Screenshots

    Foundry376/Mailspring

    Captures screenshots of the running Mailspring dev app for docs, PRs or visual checks by launching it with a debugging port, driving the UI and clipping to an element.

    18k GitHub stars~1.4k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Draw.io Diagram Studio

    Agents365-ai/drawio-skill

    Creates and edits editable draw.io diagrams from descriptions, code, infrastructure files, SQL and API schemas, with sync, review, test and export tools.

    10k GitHub stars~2.4k tokensUpdated 5 days ago
    DevelopmentAuto-check: notes

More from totvs/engpro-advpl-tlpp-skills

All 19 skills in this repo
  • AdvPL UTF-8 to CP1252 Converter

    totvs/engpro-advpl-tlpp-skills

    Converts AdvPL and TLPP source files from UTF-8 to Windows-1252 in place after code generation, because the Protheus compiler accepts only CP1252 files.

    141 GitHub stars~2.6k tokensUpdated 2 days ago
    Auto-check passed
  • AdvPL/TLPP Compile in VS Code

    totvs/engpro-advpl-tlpp-skills

    Compiles AdvPL and TLPP sources from VS Code with the TOTVS Developer Studio extension, handling server setup, connection and compile result reporting.

    141 GitHub stars~3.7k tokensUpdated 2 days ago
    Auto-check passed
  • Protheus Spec-Driven Development

    totvs/engpro-advpl-tlpp-skills

    Plans and builds Protheus AdvPL/TLPP features through Specify, Design, Tasks and Execute phases whose depth scales with the size of the change.

    141 GitHub stars~3.6k tokensUpdated 2 days ago
    Auto-check passed
  • AdvPL and TLPP Code Review

    totvs/engpro-advpl-tlpp-skills

    Reviews AdvPL and TLPP source against SonarQube rules, ProtheusDOC requirements, security, performance and Protheus conventions, and reports findings by severity.

    141 GitHub stars~2.5k tokensUpdated 2 days ago
    Auto-check passed
  • Protheus Data Dictionary Lookup

    totvs/engpro-advpl-tlpp-skills

    Queries the TOTVS Protheus ERP data dictionary for tables, fields, indexes, parameters, triggers and lookups, including impact checks during refactoring.

    141 GitHub stars~1.5k tokensUpdated 2 days ago
    Auto-check passed
  • Protheus MVC Generator

    totvs/engpro-advpl-tlpp-skills

    Generates Protheus MVC screens in ADVPL/TLPP, with ModelDef, ViewDef, MenuDef and Browse functions for single-entity and master-detail layouts.

    141 GitHub stars~2.2k tokensUpdated 2 days ago
    Auto-check passed

Categories

Questions about Documentation Writer

What does Documentation Writer do?

Generate ProtheusDOC comment blocks for AdvPL and TLPP source code. Documentation Writer is an agent skill from totvs/engpro-advpl-tlpp-skills. Generate ProtheusDOC comment blocks for AdvPL and TLPP source code.

When should I use Documentation Writer?

Documentation Writer fits situations like: A user says document this function; add ProtheusDOC; write documentation block; document this class/method.

How do I install Documentation Writer in Claude Code?

Run `npx skills add totvs/engpro-advpl-tlpp-skills --skill documentation-writer -a claude-code`. Or copy the skill folder (skills/advpl-tlpp/documentation-writer in totvs/engpro-advpl-tlpp-skills) into .claude/skills/documentation-writer in your project. Claude Code loads it when a task matches its description.

How do I install Documentation Writer in Codex?

Run `npx skills add totvs/engpro-advpl-tlpp-skills --skill documentation-writer -a codex`. Or copy the skill folder (skills/advpl-tlpp/documentation-writer in totvs/engpro-advpl-tlpp-skills) into .agents/skills/documentation-writer in your project. Codex loads it when a task matches its description.

Can I use Documentation Writer in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add totvs/engpro-advpl-tlpp-skills --skill documentation-writer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/documentation-writer, .gemini/skills/documentation-writer, .github/skills/documentation-writer and .opencode/skills/documentation-writer in your project.

What does Documentation Writer need to run?

SKILL.md names no scripts, command-line tools or credentials: Documentation Writer is instructions for the agent only.

Does Documentation Writer access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Documentation Writer safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Documentation Writer use?

Documentation Writer is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Documentation Writer use?

About 2.8k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Documentation Writer?

Skills that share tags, products or a category with Documentation Writer: Diagram Design (cathrynlavery/diagram-design, 44k stars), Simple English (moeru-ai/airi, 50k stars), Get API Docs with chub (andrewyng/context-hub, 14k stars) and Doc Sync (JetBrains/ideavim, 10k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Documentation Writer?

totvs (a GitHub organization) maintains it in totvs/engpro-advpl-tlpp-skills, which has 141 GitHub stars. The repository holds 19 skills in this directory. The repository was last updated on October 5, 2026.

Source: totvs/engpro-advpl-tlpp-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.