tia-init
Skill12 starsChanged 28 days agoMITView on GitHub
Initialize 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).
In this repository10 other files it gives its agents.
- codex/AGENTS.mdAGENTS.md
- .claude-plugin/CLAUDE.mdCLAUDE.md
- cpu-selectSkill
- spec-planSkill
- spec-validateSkill
- tia-backupSkill
- tia-handoffSkill
- tia-reviewSkill
- tia-scaffoldSkill
- tia-verifySkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 0 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 34
Write the harness guide into ./CLAUDE.md (the project at the cwd) inside idempotent markers, so the harness section is self-contained and …
- Very specific: line 47
Fallback (the
tiaMCP is not available): read the guide at - Very specific: line 66
Locate / create the target: If ./CLAUDE.md does not exist in the current project, create it.
- Very specific: line 76
If both markers already exist in ./CLAUDE.md, replace only the text between them with the current guide.
- Very specific: line 78
If the markers are absent, append a fresh block (the two markers wrapping the guide) to the end of ./CLAUDE.md, separated by a blank line.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
tia-init — bootstrap the harness guidance into the project CLAUDE.md (class R)
Inject (or refresh) the TIA harness operating guide into the current project's
./CLAUDE.md, so that future sessions in this repo automatically know how to drive the tia
MCP, where the gates/guards are, and the hard-won gotchas. This is class R: deterministic,
file-only, never opens TIA Portal and never touches
the serve — the only MCP call it may make is the pure, offline tia_guide.
Errors and reporting
- Needs no
serveand no TIA Portal: thetia_*tools named here are pure and offline, so do not calltia_ping. If they are not in the tool list, say so and use the fallback this skill names, or stop. - Report the tool's answer as returned (violations,
error,kind,hint) and state what was done and what was not. Never fix the input silently, never retry with changed input to get past a failure, and never report success after an error.
When to use
- The user asks to initialize / bootstrap / set up the TIA harness in this project.
- The user asks to add or update the harness guidance in
CLAUDE.md(e.g. after a plugin upgrade ships a newer guide).
Goal
Write the harness guide into ./CLAUDE.md (the project at the cwd) inside idempotent
markers, so the harness section is self-contained and updatable without disturbing anything
the project authored.
Procedure (in order)
Read the guide — prefer the MCP, fall back to the plugin file.
- If the
tiaMCP is available in this session, call thetia_guidetool with{"topic":"full"}and use the returned markdown as the exact content to inject. This is the preferred source: it always matches the INSTALLED MCP version (thetia_*tools the user actually has), and it is pure/offline — it does NOT need the serve running and never opens TIA Portal. - Fallback (the
tiaMCP is not available): read the guide at${CLAUDE_PLUGIN_ROOT}/.claude-plugin/CLAUDE.md— a GENERATED copy of the same content (source:mcp/content/in the harness repo). Drop the file's first line — the<!-- GENERATED from mcp/content/ ... -->comment — before injecting; its "runcd mcp && npm run sync" instruction is meaningless in a downstream project, and dropping it keeps the injected block identical to whattia_guide {"topic":"full"}returns.
In either case inject the guide verbatim — do not paraphrase or trim it.
⚠️ The fallback is NOT
${CLAUDE_PLUGIN_ROOT}/CLAUDE.md.${CLAUDE_PLUGIN_ROOT}is the plugin root (the directory containing.claude-plugin/), so that path is the plugin repo's own development guide — a different document, not meant to ship. Injecting it would dump the repo's internal notes into the user's project.If the MCP is unavailable AND the fallback file is not found: stop and tell the user. Do not fall back to any other
CLAUDE.md, do not search the filesystem for one, and do not reconstruct the guide from memory — an approximate guide is worse than none, because the gates and gotchas in it are safety-relevant.- If the
- Locate / create the target. If
./CLAUDE.mddoes not exist in the current project, create it. If it exists, read it. Inject between idempotent markers. The guide block is delimited by:
<!-- tia-harness:start --> ... the guide from ${CLAUDE_PLUGIN_ROOT}/.claude-plugin/CLAUDE.md ... <!-- tia-harness:end -->- If both markers already exist in
./CLAUDE.md, replace only the text between them with the current guide. Leave everything outside the markers exactly as-is. - If the markers are absent, append a fresh block (the two markers wrapping the guide)
to the end of
./CLAUDE.md, separated by a blank line. Do not move or rewrite existing content. - Never duplicate the block, and never delete or edit any project content outside the markers.
- If both markers already exist in
- Confirm. Tell the user whether the block was created, inserted (appended), or
updated (replaced), the path written (
./CLAUDE.md), and a one-line summary of what the guide covers (driving thetiaMCP, gates vs guards, the GUI-gate handoffs, the runtime-validated gotchas and recipes).
Hard guarantees
- Idempotent. Re-running only refreshes the text between
<!-- tia-harness:start -->and<!-- tia-harness:end -->. It never appends a second block and never touches project content outside the markers. - No serve / no TIA. This skill only reads the guide (via the pure
tia_guidetool or the bundled fallback file) and edits a local Markdown file. - Non-destructive. The project's own
CLAUDE.mdcontent is preserved verbatim; the only region this skill owns is the marked block.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

