/tckit:tc-build-test-loopfrom tckit
Builds TwinCAT projects, deploys to targets, runs TcUnit tests, and iterates on build/test failures via TcKit. Enforces build-before-deploy ordering, fix limits, and permission gates.
Ships in tckit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Before the first Build of a cycle, call AnalyseProject(projectPath, severity: "warning"). It parses the project files offline, so it needs no XAE and returns in under a second against a build's tens of seconds, and it catches a class of defect a green build cannot rule out: a function block instance on a call stack whose state resets every call, floating-point equality, retention that cannot retain, a global with two writers.
severity: "warning" keeps naming suggestions out of the way. Raise it to suggestion only when the user asked about conventions.skipped and config_warnings. A short finding list next to a long skipped list means coverage was partial, not that the project is clean.This does not replace the build. It is cheaper, so it goes first.
Build(project_path) with an absolute path to the .sln (or .tsproj). For multi-PLC solutions, pass plc_name=<consumer> on the same call; see "Multi-PLC builds with library references" below.success: true:
docs_warning field is present, this is non-fatal — note it for the user but do NOT loop on it.success: false, take the first error in the JSON list. Read the offending file via GetPouItem if needed. Fix that one file only.targetAmsId comes fromDeploy, StartRuntime, and RunTests take a required targetAmsId parameter; there is no env-var or config-file default. If you don't know the target, ask the user rather than guessing or hunting through the filesystem.
Deploy, StartRuntime, and RunTests are execute-class tools, gated server-side by the permission file at ~/.tckit/permissions.json (or $TCKIT_HOME/permissions.json), hot-reloaded on every call. The gate has two axes:
read < write < execute. Build needs write; the three execute-class tools need execute. A call above the current mode returns {"error": "Permission denied: ..."}.blocked_net_ids is a hard "never touch this target" guard (block always wins); a non-empty allowed_net_ids is an allowlist.When a call returns a Permission denied error:
SetPermissions or edit permissions.json to raise the mode or extend the allowlist unless the user explicitly asks for that change in chat. The stance is the user's standing configuration, not an obstacle to route around.blocked_net_ids, that is the hard guard: SetPermissions cannot lift it and you must not edit the file to lift it. Do not retry — surface the error and stop.When the gate clears. A plain success means the current mode allows execute and the target passed the NetId rules. That is the user's standing pre-authorisation for this target — continue the cycle (StartRuntime, RunTests) rather than pausing for a fresh confirmation; there is no per-call confirmed handshake on these tools. (WriteSymbols, InvokeRpc, and DeleteIoDevice do carry a confirmed handshake on top of the gate, but those belong to the tc-hardware skill, not this loop.)
Never call Deploy unless the most recent build returned success: true. If the user asks you to deploy and the last build failed or wasn't run this session, build first.
If the solution holds two or more PLC projects where one (the consumer) holds a compiled library reference to another (the library), the consumer build resolves against the installed library, not the source. Editing the library project's source has no effect on the consumer until the library is saved and reinstalled.
When you've edited the library project (or aren't sure whether you have), call SavePlcAsLibrary(plc_name=<library>, output_path=<path>, install=True) before rebuilding the consumer. Output path can be anywhere writable; the harness writes the .library and installs it to the system repo in one COM call. GetStructure shows the per-PLC libraries list — if a consumer references a sibling PLC project by name, that's the trigger.
If the solution has only one PLC project, or the consumer uses Source-Only references (resolved automatically by TwinCAT's build), this step doesn't apply. When in doubt, run the save-as-library — it's idempotent and adds no real cost.
RunTests(). The response carries summary (totals for the whole run) and failures (one entry per failed test with suite_name, test_name, message) inline by default. Do not call GetTestResults() on the happy path — it is for the full per-test list including passes, which you only need when the inline failure detail is insufficient.summary.failures == 0 you're done.GetPouItem, understand the assertion, fix the code under test (not the test, unless the test is wrong and the user agrees).Report the actual outcome. Once the loop terminates (all green, error escalation, or iteration cap), report the test results from the final RunTests call. Don't stop after editing and assume the harness will validate — if the gate cleared you, you own the cycle through to results.
AnalyseProject reports compiles; that is the entire reason it exists.tc-write-st for the human-review check.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub georgeturneruk/tckit --plugin tckit7 skills in this plugin
/tc-beckhoff-docsUse when researching a Beckhoff TwinCAT library, function block, or function via Beckhoff infosys, OR when looking up a Beckhoff hardware product by order number. Triggers on requests like "what does FB_EcCoESdoRead do", "which TF library has SDO read", "what are the inputs of FB_X", "what are the technical specs of EL3004", "look up EPP6228", "how many channels does the EK1100 have", or as a precondition before writing code that uses an unfamiliar Beckhoff FB. Uses TcKit's FindFb, SearchDocs, FindHardware, and GetDocPage MCP tools. Do NOT use for inspecting the user's local project (that is tc-read-project)./tc-configUse when configuring TcKit's safety stance (the permission gate), including initial setup ("set me up", "configure tckit", "make tckit read-only"), ongoing edits ("raise the mode to execute", "add NetId to allowed", "block this NetId"), or inspecting the stance ("what permissions does tckit have", "why was deploy denied", "tckit not working"). Wraps the GetPermissions / SetPermissions MCP tools and the user-global permission file at `~/.tckit/permissions.json`. Do NOT use for runtime tool calls like building, deploying, reading projects, or researching Beckhoff FBs (those are owned by tc-build-test-loop, tc-read-project, tc-write-st, and tc-beckhoff-docs)./tc-hardwareUse when inspecting or configuring TwinCAT hardware through TcKit — EtherCAT master/slave diagnostics, IPC hardware health, NC axis state, reading/writing live PLC symbols, invoking RPC methods, or authoring the I/O tree (scan the bus topology, scaffold I/O GVLs, add/remove EtherCAT masters and boxes). Triggers on requests like "what's the EtherCAT bus status", "list the EtherCAT masters", "check the IPC CPU/temperature/UPS", "what state is axis 1 in", "read MAIN.nCounter on the target", "set GVL.bEnable to TRUE", "call the Reset method on fbPid", "scan the hardware", "scaffold I/O variables", "add an EK1100 under the master", "delete Box 3". Do NOT use for reading/writing ST code (tc-write-st), build/deploy/test (tc-build-test-loop), or looking up a product's datasheet by order number (tc-beckhoff-docs / FindHardware)./tc-orient-projectUse on the FIRST encounter with a TwinCAT project in a session, or when the user asks for a "structural overview", "subsystem map", "what's in this project", "introduce me to this project", "give me the lay of the land", "tell me about this codebase", "summarise this project", or any first-touch orientation. Triggers BEFORE tc-read-project; tc-read-project takes over for follow-up reads once orientation is done. Do NOT use mid-task on a project already mapped this session./tc-read-projectUse when inspecting, navigating, or searching a TwinCAT 3 PLC project through TcKit's MCP tools (GetStructure, GetPouInterface, GetPouItem, GetGvl, GetDut) AFTER orientation. Triggers on requests like "show me FB_X", "what's the public API of FB_Motor", "list the methods of FB_TestSuite", "summarise the motor controller POU", "what does ST_Config look like", or any task that requires reading specific PLC code before writing it. Do NOT use for first-touch orientation (use tc-orient-project), and do NOT use for researching Beckhoff library FBs (use tc-beckhoff-docs)./tc-write-stUse when writing or modifying Structured Text (ST) code in a TwinCAT 3 project. Triggers on requests like "add a method to FB_Motor", "add a property to FB_Pid", "create FB_PumpControl", "add ST_Config struct", "add E_State enum", "tweak the Execute body", "rename X to Y inside Execute", "add a VAR_INPUT to FB_PumpControl", "change one line in this method", or any other ST edit. Uses TcKit's writer MCP tools (OpenProject, CreateProject, AddPou, AddGvl, AddDut, AddMethod, AddProperty, UpdatePouDeclaration, UpdatePouImplementation, UpdateMethodBody, UpdatePouDeclarationPatch, UpdatePouImplementationPatch, UpdateMethodBodyPatch, AddVariable). Use these tools INSTEAD of Edit/Write on .TcPOU or .plcproj files; the MCP tools go through TcKit's writer backend so GUIDs and project cross-references stay consistent. Enforces comment style, naming conventions, the bError propagation pattern, the rename guard, and the safety-critical naming guard. If the code uses an unfamiliar Beckhoff library FB, hand off to tc-beckhoff-docs first. Do NOT use for read-only inspection or for build/test orchestration.Other plugins' skills for the same job