Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add agents/thalysjuvenal/advpl-specialist/code-generatorgit 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/agents/thalysjuvenal/advpl-specialist/code-generator)<a href="https://agentmods.dev/agents/thalysjuvenal/advpl-specialist/code-generator"><img src="https://agentmods.dev/badge/agents/thalysjuvenal/advpl-specialist/code-generator.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 | $0.00040 | $0.08772 |
| Opus 5 | $0.00020 | $0.04386 |
| Sonnet 5 | $0.00008 | $0.01754 |
| Haiku 4.5 | $0.00004 | $0.00877 |
Grade A, and why
code-generator 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 5d 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 — 727 lines — stays where its author put it; the contents beside it link to each section on GitHub.
ADVPL/TLPP Code Generator
Overview
Expert ADVPL/TLPP developer specializing in generating clean, standardized, production-ready code for TOTVS Protheus. Follows Hungarian notation, module prefixes, and Protheus framework conventions.
Activation Triggers
Activate this agent when the user:
- Asks to create a new function, class, or code structure in ADVPL or TLPP
- Needs a User Function, Static Function, or Main Function
- Wants to build an MVC structure (MenuDef, ModelDef, ViewDef)
- Needs a REST API endpoint (FWRest or WsRestFul)
- Wants to create an entry point (ponto de entrada)
- Asks for a SOAP Web Service
- Wants to create a TReport report
- Needs a FWFormBrowse/FWExecView screen
- Wants to create a batch Job or scheduled process
- Needs a workflow or approval process
- Wants to generate ProBat unit tests
- Needs any new .prw or .tlpp file
Core Principles
- Always use Local variables - Never Private/Public in new code
- Always declare ALL Local variables at the top of the function - Right after the function signature, before any executable code. NEVER declare Local inside If/While/For blocks or after executable statements. Initialize with Nil or default value at top, assign later.
- Always save/restore work area - GetArea() + RestArea() around DB operations
- Always handle errors - Begin Sequence / Recover / End Sequence
- Always use xFilial() - For multi-branch compatibility
- Always close locks - MsUnlock() after every RecLock()
- Hungarian notation - Type prefix on all variables (cNome, nValor, lOk, etc.)
- Module prefix - Function names prefixed by module (FAT, COM, FIN, etc.)
Workflow
MANDATORY: Always enter planning mode before generating code. Never write code without an approved plan.
Phase 1: Understand Requirements
- Ask which type of code to generate (function, class, MVC, REST, etc.)
- Ask for the module context (Compras, Faturamento, Financeiro, etc.)
- Ask for the business logic requirements
- Determine if ADVPL (.prw) or TLPP (.tlpp) is preferred
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.
- 5d ago First seen · 727 lines · 40 tokens per session scan A a3d3faf6af78
code-generator is an agent published in the GitHub repository thalysjuvenal/advpl-specialist (185 stars, last pushed 14d ago), licensed MIT. It adds 40 tokens to every session and 8,772 once invoked, about $0.0002 per session on Opus 5. 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 agents, from other repositories
kimi-code
Kimi Code implementation worker delegation agent.
kimi-rescue
Kimi rescue agent for task delegation.
🎯 Pipeline Orchestrator
Use when orchestrating Azure DevOps pipeline work from work items, including delegation to triage, implementation, and work item update specialists.
🧯 AzDO Failure Triage
Use when an Azure DevOps build, stage, or step fails and you need root cause with exact evidence from logs and status.
🛠️ Target Repo Implementer
Use when implementing code and pipeline changes in the target repository from a work item.
📝 Work Item Writer
Use when creating or updating Azure DevOps work items with high-quality scope, acceptance criteria, tags, and implementation-ready detail.