/tia-harness:tia-scaffoldfrom TIA Portal Automation Harness
Builds a TIA project from a validated project-spec using the tia MCP offline mutation pipeline. Runs subnets, devices, modules, network/IP, tag tables, block shells, protection setup, then compiles. Requires an open project and stops before download.
Ships in TIA Portal Automation Harness. 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.
Read when SKILL.md points to them.
Execute the offline build pipeline that turns a validated project-spec into real TIA
objects, compliant-by-construction (optimized access, symbolic, UDTs, naming) and ending
compile-clean. It is class M-off: it mutates the project offline through the tia
MCP, but it never touches the physical controller — it stops before download (G3).
tia_ping: continue only if it reports reachable:true and activated:true. activated:null with a busy detail means serve is occupied, not necessarily by an MCP job: poll tia_job_status only for a running job whose jobId is known. Without one, wait/recheck with tia_status; for connect_incomplete, follow the host-inspection handoff in tia_guide {"topic":"gui-gates"}, never retry connect. Otherwise stop, quote its detail and hint verbatim and say that nothing was changed (prerequisites: tia_guide {"topic":"gotchas"}).tia_* tool is available, the tia MCP is not connected: say so and stop. Never continue from memory and never work around it with hand-made HTTP calls (they bypass the MCP's gate checks).isError:true), quote its error and kind verbatim, relay its hint, and state what was done and what was not. Apply only the remedy the hint or this skill names, at most once; otherwise stop and ask.requires_human_action answer verbatim and wait for the human.status:"running" + jobId identifies a running job: poll tia_job_status {jobId} without repeating the original call. On kind:"busy", poll only for a running job whose jobId is known (e.g. details.jobId); without one, wait/recheck with tia_status. For connect_incomplete, follow the host-inspection handoff in tia_guide {"topic":"gui-gates"}, never retry connect. After a timeout, check the state before repeating anything.tia_status → hasProject:true. Opening/creating one
is a GATE (G1, trust dialog) — use tia_project_create (new) or tia_connect
(existing); if the first connect blocks on the trust dialog, that is the human handoff
(tia_start headless → tia_show_ui → human confirms → tia_connect). Do not loop/retry.spec-validate / tia_spec_validate first; never build
an invalid spec. Then spec-plan to review the ordered steps.typeIdentifier should be confirmed against
tia_catalog (OrderNumber:<MLFB>/V<fw>, slash not :V) — cpu-select proposes,
catalog confirms.tia_guide {"topic":"recipes"}, 'TIA version evidence and SimaticML', before choosing APIs or generating LAD/FBD/UDT XML. App 1.8.0 ships the V21 baseline only; observed API minima are not legacy runtime acceptance. Use a real export for the selected host/API as the template, preserve version/schema markers, never down-convert by rewriting them, and never infer compatibility from matching markers. V21 import behavior stays unchanged; relay a legacy feature_unsupported_in_version refusal without generic-object or destructive workarounds.tia_spec_apply — the orchestrator: validate → G5 → subnets → devices → modules →
network → tag tables → tags → block shells → compile, stopping at the first error
(dryRun:true returns the plan; continueOnError to push through). Preferred path.tia_subnet_create,
tia_device_create, tia_device_plug, tia_network_connect, tia_tagtable_create,
tia_tag_create, tia_fb_create, tia_instancedb_create, tia_type_group_create;
code via tia_source_put (SCL) / tia_import_xml (LAD/FBD/GRAPH) / tia_types_import
(UDTs before the blocks that use them).tia_obj_roots/tia_obj_items → CPU handle →
tia_obj_service (PlcMasterSecretConfigurator) → tia_obj_invoke Protect, then the
access-control variant for the CPU family/firmware via tia_obj_set_attributes (S7-1500 V2.9:
PlcProtectionAccessLevel=FullAccess on the CPU item; S7-1200 V4.7: PlcAccessControlConfiguration=Disabled
on its provider service). The wrong variant fails: pick it from RECIPES.md.tia_compile (verifier), tia_project_save.tia_spec_apply, tia_compile, tia_source_put, tia_project_save) may answer
status:"running" + jobId: poll tia_job_status {jobId} until the final result — never
repeat the original call.tia_spec_apply { dryRun:true } (or spec-plan). Present the steps; get
human go-ahead for the offline build.tia_spec_apply { dryRun:false }. It runs serially and stops at the first
error. On status:"stopped" or "applied_with_errors", report applied (done) and
stoppedAt / the failed steps (not done) as returned. Do NOT re-run the whole apply on the
same project: it restarts at step 0 and create steps are not idempotent. Apply the remaining
steps one by one with the M-off tools (check first with the read tools what already exists),
or start over on a fresh project; continueOnError:true only when the human asks for it.
Note: M-off ops can be slow on a cold portal — the MCP allows for that (long timeout).RECIPES.md → Protect(<password>) + the access-control variant for the
CPU family/firmware so rung 1 passes. Ask the human for the Protect password (the
project-spec has no field for it, see RECIPES.md "Policy"); never invent it and never
write it into the spec or a log. When you ask for the password, tell the human what the recipe changes: the
access level goes to Full access (S7-1500) or access control is disabled (S7-1200,
FW V4.5+), and the CPU keeps that after the next download; name the change in the report.tia_compile each CLP; only Error blocks (warnings are fine). If errors
remain, hand to tia-verify to interpret/repair. Then tia_project_save.tia-handoff → G3
(human approval, plan hash). Report what was built + the compile result + next step.tia_connect /
tia_project_create is allowed, but the trust dialog it may raise (G1) and tia_download
(G3) are human gates — relay the handoff, never auto-cross them.safety.required && autonomous it is REJECTED at validate;
F-logic is never authored/modified here regardless. Selecting an F-CPU is fine.See RECIPES.md for the verified bare-CPU protection recipe, the pipeline order, and the
S7-connection precondition (≥2 consistent CPUs).
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub renanlido/tia-harness --plugin tia-harness9 skills in this plugin
/cpu-selectRecommend a Siemens S7-1500/S7-1200 CPU family + variant + order number (MLFB) from an engineering need (I/O count, scan/performance, memory, communication ports, safety, redundancy, motion). Use when the user asks "which CPU / PLC should I use", gives selection criteria instead of a model, or needs a typeIdentifier for a project-spec. Deterministic heuristic over the bundled CPU reference — NO MCP. Output: recommended CPU + justification + the OrderNumber:{MLFB}/V{fw} TypeIdentifier (flagged: confirm/resolve the concrete MLFB+firmware with tia_catalog before building). Not for validating a spec (spec-validate) or when the user already named a model./spec-planTurn a VALIDATED TIA project-spec into the ordered, named sequence of offline build operations WITHOUT mutating anything (a dry plan). Use after spec-validate passes and before tia-scaffold — when the user asks to "plan / preview / dry-run the build", or wants to see exactly what scaffolding a spec would do and in what order. Class R: runs tia_spec_validate then tia_spec_plan, both PURE (no serve, no TIA Portal); with a project open it can add a read-only impact check (tia_crossrefs) for the existing objects the plan would write to. Output: the ordered M-off steps + assumptions + warnings (+ that impact); nothing is applied and no gate is crossed. Not for validating (spec-validate) or applying the build (tia-scaffold)./spec-validateValidate a TIA project-spec against the JSON Schema AND the deterministic cross-field engineering rules (same-subnet, unique names, OrderNumber:{MLFB}/V{fw} format, module limits, language-by-family, and the G5 safety rule). Use when the user provides or edits a project-spec, asks to "validate / check / lint my spec", or before scaffolding a project from a spec. Class R (deterministic, read-only, no serve or TIA Portal; its only tool is the pure tia_spec_validate) — rung 0 of the verification ladder, fully offline. Not for recommending a CPU (cpu-select) or planning the build (spec-plan)./tia-backupBack up a PHYSICAL CPU into a dedicated EMPTY project — save+archive the working project, create a dated backup project, station-upload (GATE G4) with human approval, verify, archive to .zap21. Use when the user asks to "back up / upload / read out the CPU" or before risky work on a live controller. Class M-off up to the gate; the upload itself is GATE G4 (+G6 if a read password is requested) and NEVER runs without an explicit human yes. Never uploads into the working project. Not for downloads to the CPU (tia-handoff)./tia-handoffPrepare a human-approval envelope for a GATED operation — download / CPU-STOP (G3), go-online (G4), network scan (G7), credentials (G6: master secret, UMAC, upload / block / certificate passwords, password policy), safety/F (G5). Use when the user wants to "download / deploy / go online / commission", or after tia-verify is clean and the next step touches the physical controller. Class GATE: this skill NEVER performs the gated action — it produces the plan + planHash + exactly what the human must approve, and the precise resume call. The AI never approves, never invents a secret, never deploys F autonomously. Not for building (tia-scaffold) or compiling (tia-verify)./tia-initInitialize or update the current project's CLAUDE.md with the TIA harness operating guide. Use when the user asks to "init / bootstrap / set up the TIA harness", "add the harness guidance to CLAUDE.md", or "update the TIA harness section / refresh the harness guide in this project". Idempotent: injects the guide between stable markers and re-running only refreshes that block, never touching the project's own content. Class R (deterministic, file-only, no serve/TIA — the only MCP call it may make is the pure, offline tia_guide). Not for building, verifying or deploying a project (tia-scaffold / tia-verify / tia-handoff).Other plugins' skills for the same job