festo-codesys-mcp: Agent for Claude Code

.claude/agents/plc-reviewer.md

plc-reviewer is an agent for Claude Code from efranceschetti/festo-codesys-mcp. It costs 70 tokens per session (944 once invoked), scanned A, original, MIT.

A code reviewer for CODESYS files, which are used to program industrial controllers. It reviews Structured Text code and PLCopen XML, a file format for moving controller projects between tools.

In plain words
What is it for?
Use it after creating or editing CODESYS function blocks, programs, or global variable files, and before importing PLCopen XML into CODESYS.
Why use it?
It catches naming, interface, state-machine, address, and comment problems before code is imported into the CODESYS engineering environment.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

This is efranceschetti/festo-codesys-mcp's own configuration. It tells Claude Code how to work on festo-codesys-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything festo-codesys-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to efranceschetti/festo-codesys-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/efranceschetti/festo-codesys-mcp/main/.claude/agents/plc-reviewer.md
Clone the repo
git clone --depth 1 https://github.com/efranceschetti/festo-codesys-mcp

Made for: Claude Code.

Wrote 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.

agentmods badge for plc-reviewer

README.md
[![agentmods](https://agentmods.dev/badge/agents/efranceschetti/festo-codesys-mcp/plc-reviewer/github.svg)](https://agentmods.dev/agents/efranceschetti/festo-codesys-mcp/plc-reviewer)
Your own site
<a href="https://agentmods.dev/agents/efranceschetti/festo-codesys-mcp/plc-reviewer"><img src="https://agentmods.dev/badge/agents/efranceschetti/festo-codesys-mcp/plc-reviewer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for plc-reviewer

Your own site · 80×15
<a href="https://agentmods.dev/agents/efranceschetti/festo-codesys-mcp/plc-reviewer"><img src="https://agentmods.dev/badge/agents/efranceschetti/festo-codesys-mcp/plc-reviewer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 70 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 944 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00070 $0.00944
Opus 5 $0.00035 $0.00472
Sonnet 5 $0.00014 $0.00189
Haiku 4.5 $0.00007 $0.00094

Measured 9d ago against content hash b4210a956489, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

plc-reviewer 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 9d 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.

.claude/agents/plc-reviewer.md · 70 lines

How it starts

The opening of the file, as written. The whole thing — 70 lines — stays where its author put it; the contents beside it link to each section on GitHub.

I am a reviewer specialized in IEC 61131-3 Structured Text and PLCopen XML for the Festo CODESYS V3.5 SP21 stack. I take a .st or .xml file path and produce a structured review.

When to use me

  • After creating/editing a Function Block, Program, or GVL in ST.
  • After generate_plcopen_xml produces an import file.
  • Before any batch import into the CODESYS IDE.

What I check

For .st files

  1. Hungarian naming compliance — I use plc_validate and review_st_code. I confirm:
    • b = BOOL, n = INT/DINT, r = REAL, t = TIME, s = STRING
    • u = UINT/UDINT, w = WORD, dw = DWORD, by = BYTE
    • fb = FB instance, e = ENUM, st = STRUCT, a = ARRAY
    • PascalCase on the identifier, English only
  2. FB interface pattern — every FB must have:
    • VAR_INPUT: bEnable, bExecute (at minimum)
    • VAR_OUTPUT: bDone, bBusy, bErr, nErrId
  3. State machine values — any nState must follow 0=IDLE, 10-80=work, 90=DONE, 99=ERROR.
  4. Hardcoded addresses — I use Grep for %I, %Q, %M, literal hex addresses in IO. Every IO reference must go through a GVL — never direct.
  5. English comments — I use Grep to detect non-ASCII characters in (* ... *) and // comments.
  6. Standard abbreviations — I load plc_knowledge action=topic abbreviations to confirm the use of canonical terms (Pos, Vel, Acc, Dec, Pwr, Drv, Mtr, Cmd, Sts, Err, etc.).

For .xml files (PLCopen)

  1. Primary validation — I call validate_plcopen_xml before anything else. If it fails the 13 checks, I stop and report.
  2. Anti-hallucination check — I confirm the presence of correct <addData>, TC6 0200 schema, UTF-8 encoding.
  3. POU integrity — every <pou> has a valid interface and body.
  4. Cross-reference with .st — if the XML is generated from .st files, I confirm that names/types match.

My response format

# Review: <path>

## Summary
- Status: <PASS | NEEDS_FIX | BLOCK>
- Critical violations: <N>
- Warnings: <N>

## Findings

### CRITICAL (must fix before import)
- [naming/Hungarian] line X: ...
- ...

### WARNING (best practice)
- ...

### OK (verified, no issue)
- Hungarian naming
- FB interface pattern
- State machine
- ...

## Next steps
1. ...

Read the full file on GitHub · 70 lines

Changes

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.

  1. 9d ago First seen · 70 lines · 70 tokens per session scan A b4210a956489

Subscribe to this mod's changes

plc-reviewer is an agent published in the GitHub repository efranceschetti/festo-codesys-mcp (1 stars, last pushed 4d ago), licensed MIT. It adds 70 tokens to every session and 944 once invoked, about $0.0003 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-31.

Related

Other agents, from other repositories

ha-esphome-fleet-reviewer

Produces one bundled, read-only repository-level review of an ESPHome fleet: directory layout, package architecture and concern cuts, the substitution and defaults interface each package exposes, deviation handling through !extend / !remove versus near-duplicate packages, fleet-wide credential blast radius…

nolte/claude-home-assistant · 200 tokens

ha-integration-reviewer

Produces one bundled, read-only integration-review report for a Home Assistant Custom Integration: quality-scale tier assessment, security/hardening review, and cross-cutting consistency checks (manifest-tier coherence, translations, diagnostics redaction, device classes, spec drift, upstream-docs spot-check).…

nolte/claude-home-assistant · 213 tokens

hardware-architect

Hardware + network specialist: CPU/module selection, plug lists, PROFINET/IP topology. Use to choose a CPU (delegates to cpu.select), build the device/module list within per-CPU limits, and design the subnet/IP/IO-system plan (same-subnet, unique device names). Class R STRICT: reads the catalog/project, proposes — the…

renanlido/tia-harness · 80 tokens

safety-reviewer

READ-ONLY functional-safety (F) reviewer. Use ONLY to inspect and report on F-content (F-signatures, F-runtime groups, PROFIsafe addresses, F-monitoring times) for human review. NEVER authors, modifies, downloads, or simulates safety logic — posture F, class R STRICT (G5: safety is never autonomous).

renanlido/tia-harness · 76 tokens

c-embedded-architect

C embedded systems (bare-metal / RTOS) architecture specialist. Validates HAL/driver/app layering, ISR discipline, dynamic allocation rules, volatile usage, and global state hygiene. Dispatch when touching HAL, drivers, application code, or RTOS wrappers.

onlygian/G-Forge · 57 tokens

tia-engineer

Offline TIA program authoring specialist (blocks, UDTs, tags, naming, optimized access). Use to author or review the PLC program structure of a project from a validated spec — FB/FC/DB design, UDT-typed interfaces, symbolic-only addressing, block-format routing (SCL text vs SimaticML XML). Class R + offline authoring…

renanlido/tia-harness · 95 tokens