Borrowing it
Nothing to install: this file belongs to thalysjuvenal/advpl-specialist. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/thalysjuvenal/advpl-specialist/main/.cursor/commands/document.mdgit clone --depth 1 https://github.com/thalysjuvenal/advpl-specialistWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/thalysjuvenal/advpl-specialist/document)<a href="https://agentmods.dev/commands/thalysjuvenal/advpl-specialist/document"><img src="https://agentmods.dev/badge/commands/thalysjuvenal/advpl-specialist/document.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.00499 |
| Opus 5 | $0.00000 | $0.00249 |
| Sonnet 5 | $0.00000 | $0.00100 |
| Haiku 4.5 | $0.00000 | $0.00050 |
Grade A, and why
document scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 33 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/document — Generate technical documentation from ADVPL/TLPP source code, including Protheus.doc headers and API docs
You are an expert ADVPL/TLPP assistant for TOTVS Protheus. This command generates technical documentation from existing source code.
Knowledge to load first
Locate the advpl-specialist skills (installed via npx skills add thalysjuvenal/advpl-specialist; in this repository they live under skills/) and read, in order:
skills/documentation-patterns/reference.mdskills/protheus-reference/reference.md(to enrich detected native functions)skills/protheus-business/reference.md(for module/business context, as needed)skills/embedded-sql/reference.md(if the target contains SQL queries)
Workflow
- Parse the target file and options (
--type, defaultfull;--output). - Read the target file completely.
- Analyze the code: identify functions, parameters, return types, variables, database operations (
DBSelectArea,RecLock,BeginSQL/%table%), MV_* usage (GetMV,SuperGetMV,GetNewPar), and function-call dependencies. - Cross-reference detected tables and functions with the native-function and business references.
- Generate the documentation using the template matching
--type(see below), filling every field with data actually extracted from the code — never guess undocumented behavior. - Deliver: display it, or write it to
--outputif provided.
Documentation types
| Type | What it generates |
|---|---|
header |
Protheus.doc comment block, ready to insert into the source |
full |
Complete routine doc: objective, tables, MV_*, entry points, flow, dependencies, history |
api |
REST API doc: endpoint, HTTP method, parameters, request/response examples, authentication |
Output rules
- Only document what the code actually does — never invent behavior or fields.
- Match the language of the source code's existing comments and docblocks (Protheus projects typically use Brazilian Portuguese).
- Follow the exact template structure from
skills/documentation-patterns/reference.mdfor the requested type. - Compilation must be validated in TDS / VS Code TOTVS extension — never claim the code compiles.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 6d ago First seen · 33 lines · 0 tokens per session scan A 78b53911c717
document is a command published in the GitHub repository thalysjuvenal/advpl-specialist (186 stars, last pushed 16d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 499 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
adversarial-review
Run an adversarial code review with Kimi CLI.
review
Run a read-only code review with Kimi CLI.
result
Get result of a finished Kimi job.
code
Plan with Claude Code and delegate implementation to Kimi Code.
kimi-code
Plan with Antigravity and delegate implementation to Kimi Code.
implement
Use this command as an alias for /kimi:code.