agentleFS
renanlidorenanlido/tia-harness/skills/tia-init/SKILL.md

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).

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
  1. Very specific:

    Write the harness guide into ./CLAUDE.md (the project at the cwd) inside idempotent markers, so the harness section is self-contained and …

    line 34
  2. Very specific:

    Fallback (the tia MCP is not available): read the guide at

    line 47
  3. Very specific:

    Locate / create the target: If ./CLAUDE.md does not exist in the current project, create it.

    line 66
  4. Very specific:

    If both markers already exist in ./CLAUDE.md, replace only the text between them with the current guide.

    line 76
  5. Very specific:

    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.

    line 78

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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 serve and no TIA Portal: the tia_* tools named here are pure and offline, so do not call tia_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)

  1. Read the guide — prefer the MCP, fall back to the plugin file.

    1. If the tia MCP is available in this session, call the tia_guide tool 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 (the tia_* tools the user actually has), and it is pure/offline — it does NOT need the serve running and never opens TIA Portal.
    2. Fallback (the tia MCP 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 "run cd mcp && npm run sync" instruction is meaningless in a downstream project, and dropping it keeps the injected block identical to what tia_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.

  2. Locate / create the target. If ./CLAUDE.md does not exist in the current project, create it. If it exists, read it.
  3. 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.
  4. 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 the tia MCP, 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_guide tool or the bundled fallback file) and edits a local Markdown file.
  • Non-destructive. The project's own CLAUDE.md content is preserved verbatim; the only region this skill owns is the marked block.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.