cycle-test

cycle-test is a command for Claude Code from efranceschetti/festo-codesys-mcp. It costs 35 tokens per session (521 once invoked), scanned C, original, MIT.

A command that runs an offline smoke test for six parts of an industrial-control development pipeline. It checks naming conventions, lists reusable function blocks, creates a Structured Text test block, and generates and validates PLCopen XML.

In plain words
What is it for?
Use it to verify conventions, confirm the function-block library is available, create a cylinder test block with a five-second timeout, and validate its Structured Text and XML output.
Why use it?
It checks whether the main pipeline works from input through validation, helping catch broken tools or generated files before a larger task. PLCopen XML is a standard file format for exchanging programmable-logic-controller projects.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Install

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.

agentmods
npx agentmods add commands/efranceschetti/festo-codesys-mcp/cycle-test
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 cycle-test

README.md
[![agentmods](https://agentmods.dev/badge/commands/efranceschetti/festo-codesys-mcp/cycle-test.svg)](https://agentmods.dev/commands/efranceschetti/festo-codesys-mcp/cycle-test)
Your own site
<a href="https://agentmods.dev/commands/efranceschetti/festo-codesys-mcp/cycle-test"><img src="https://agentmods.dev/badge/commands/efranceschetti/festo-codesys-mcp/cycle-test.svg" alt="Measured on agentmods" height="20"></a>
Per session 35 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 521 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. Scan, not verified.
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.00035 $0.00521
Opus 5 $0.00017 $0.00260
Sonnet 5 $0.00007 $0.00104
Haiku 4.5 $0.00003 $0.00052

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

Security

Grade C, and why

cycle-test scanned grade C with 1 finding 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

7. **Cleanup** — `Bash` run `rm -rf tmp-cycle-test` (Linux/Mac) or `Remove-Item -Recurse -Force tmp-cycle-test` (Windows).
.claude/commands/cycle-test.md · 25 lines

What it actually says

Run an MCP cycle-test exercising the main offline pipeline (6 of the 18 core tools). Do NOT commit anything at the end.

Sequential steps:

  1. Base conventions — call plc_lookup with action=list_standard to list Hungarian prefixes + state machine ranges. Summarize in 3 lines.
  2. Library inventory — call plc_library with action=list to confirm the 38 FBs are accessible. Report the count per category.
  3. Create a test FB — call create_function_block with:
    • name: FB_CycleTestCylinder
    • description: "Pneumatic cylinder with 5s timeout — generated by /cycle-test"
    • inputs: bExtend BOOL, tTimeout TIME
    • outputs: bExtended BOOL, bDone BOOL, bErr BOOL, nErrId DINT
    • write to tmp-cycle-test/FB_CycleTestCylinder.st
  4. Validate STRead the generated .st file and call plc_validate action=naming with its code. Expect zero naming violations.
  5. Generate PLCopen XML — call generate_plcopen_xml on tmp-cycle-test/ producing tmp-cycle-test/cycle-test.xml.
  6. Validate XML — call validate_plcopen_xml on the generated file. Expect all 13 checks to pass.
  7. CleanupBash run rm -rf tmp-cycle-test (Linux/Mac) or Remove-Item -Recurse -Force tmp-cycle-test (Windows).
  8. Final report — a markdown table: tool, status, note.

If any step fails, stop immediately, show the full error, and suggest a root cause.

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. 5d ago First seen · 25 lines · 35 tokens per session scan C 051c4b010e27

Subscribe to this mod's changes

cycle-test is a command published in the GitHub repository efranceschetti/festo-codesys-mcp (1 stars, last pushed 10d ago), licensed MIT. It adds 35 tokens to every session and 521 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.