From tckit
Use when building a TwinCAT project, deploying to a target, running TcUnit tests, or iterating on build/test failures through TcKit (build, deploy, start_runtime, run_tests, get_test_results). Triggers on requests like "build it", "run the tests", "fix the build errors", "deploy to <NetId>", "make the tests pass". Enforces the build-before-deploy ordering, the 2-attempt-per-error build fix limit, the 5-iteration test loop limit, the awaiting_confirmation handshake for deploy and start_runtime, and the save+install rule for multi-PLC solutions with library references. Do NOT use for the initial code write itself (that is tc-write-st).
How this skill is triggered — by the user, by Claude, or both
Slash command
/tckit:tc-build-test-loopThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
1. Call `build(project_path)`.
build(project_path).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 get_pou_item if needed. Fix that one file only.deploy(target_ams_id, confirmed=False) and start_runtime(target_ams_id, confirmed=False) are gated server-side. The first call without confirmed=True returns an awaiting_confirmation JSON payload describing the action and target.
When you receive awaiting_confirmation:
warning text and the target_ams_id to the user verbatim, including the override hint about ALLOWED_NETIDS / SAFETY_CONFIRMATIONS so the user knows their options.confirmed=True..env to bypass the gate.If the response is error mentioning BLOCKED_NETIDS, the target is permanently blacklisted. Do not retry — surface the error to the user.
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 save_plc_as_library(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. get_structure 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.
run_tests(), then get_test_results().get_pou_item, understand the assertion, fix the code under test (not the test, unless the test is wrong and the user agrees).tc-write-st for the human-review check.npx claudepluginhub georgeturneruk/tckit --plugin tckitGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.