{"slug":"tool","title":"tool","summary":"This skill should be used when a tool has to be installed or run in the AIDA project that owns this directory, for example PHPUnit, PHPStan, Playwright or that project's own test runner, or when a stage needs a tool before it can do its work. It follows that tool's recipe for thi","platform":"Claude","tags":[],"authorName":"LLM Mart","authorSlug":"llm-mart","score":0,"source":"github","price":null,"verified":false,"createdAt":"2026-11-10T18:22:12.337088Z","repo":{"url":"https://github.com/camoa/claude-skills","stars":32,"forks":6,"license":"MIT","updatedAt":"2026-11-10T03:29:18Z"},"bodyHtml":"<hr>\n<h2>name: tool\ndescription: This skill should be used when a tool has to be installed or run in the AIDA project that owns this directory, for example PHPUnit, PHPStan, Playwright or that project's own test runner, or when a stage needs a tool before it can do its work. It follows that tool's recipe for this project's framework, and it does nothing outside a project.\nargument-hint: \"&lt;install | run | show&gt; </h2>\n<h1>Tool</h1>\n<p>Install or run one tool. The framework decides how, and that answer lives in a recipe outside this\nplugin. This skill knows no tool's name and no framework's habits.</p>\n<p>Read the arguments. The first is <code>install</code>, <code>run</code>, <code>show</code> or <code>require</code>. For the first three, the\nsecond is the tool, in lowercase, as the recipe names it: <code>phpunit</code>, <code>phpstan</code>, <code>playwright</code>,\n<code>pytest</code>. <code>run</code> takes more after <code>--</code>, described below; <code>install</code> and <code>show</code> take none and refuse\nthem. <code>require</code> takes a process recipe's path in place of a tool, described under \"Tools a recipe\nnames.\"</p>\n<p>Every call below runs <code>tool-actions.sh</code>, named in this skill's own grant, so it runs without asking.\nAny other Bash command still asks for approval.</p>\n<h2>Determine the run mode</h2>\n<p>Read the active task's run mode. A task that states none is interactive, and so is a call with no\ntask active. Pass <code>--run-mode autonomous</code> on every call only when the task states it, or states <code>light</code>. Decide this\nonce, at the start. A mode that names stages in brackets covers this call only when it names the\nstage this call runs inside.</p>\n<p><code>install</code> is the one action that needs a person. The script refuses it at exit 70 on an\nautonomous run, and runs no step. <code>run</code> and <code>show</code> do the same thing in both modes. <code>show</code> runs\nnothing. <code>run</code> runs the one command the recipe holds, and writes that command, with its output,\nunder the project's own <code>records/</code> folder.</p>\n<h2>Run a tool</h2>\n<p>This is the common case, and it is also how you find out whether the tool is there.</p>\n<pre><code>\"${CLAUDE_PLUGIN_ROOT}\"/skills/tool/scripts/tool-actions.sh --run-mode &lt;interactive|autonomous&gt; run &lt;tool&gt; [-- &lt;arguments&gt;]\n</code></pre>\n<p>The recipe holds the command. Anything the person asked for on top of it goes after <code>--</code>, one\nword per argument, such as a path to test or a filter. Those words reach the command as arguments,\nnever through a shell, so quoting and expanding do nothing. Pass nothing after <code>--</code> when the person\nasked for nothing; the recipe's own command is the default.</p>\n<p>Read the exit code first, never the text alone. The file named on the <code>output:</code> line sits under\nthe project's <code>records/</code> folder. It opens with the command as it ran, with the <code>--</code> arguments,\nand holds that command's own output under it. So the record says what produced the output, and a\nlater reader needs no part of this conversation. The <code>status:</code> and <code>lines:</code> lines say how it\nended and how many lines the file now holds.</p>\n<table>\n<thead>\n<tr>\n<th>Exit code</th>\n<th>Meaning</th>\n<th>What to do</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>0</td>\n<td>The tool ran.</td>\n<td>Its output is in the file at <code>output:</code>. You are done.</td>\n</tr>\n<tr>\n<td>1</td>\n<td>No project owns this directory.</td>\n<td>Say so in one line and name the project skill. Stop.</td>\n</tr>\n<tr>\n<td>2</td>\n<td>No recipe for this tool.</td>\n<td>Go to \"No recipe,\" below.</td>\n</tr>\n<tr>\n<td>3</td>\n<td>The script could not do its job, or the project records no framework.</td>\n<td>Show the error text and stop. For no framework, name the project skill's <code>set-frameworks</code>.</td>\n</tr>\n<tr>\n<td>4</td>\n<td>The command ran and failed.</td>\n<td>Go to \"The command failed,\" below.</td>\n</tr>\n</tbody>\n</table>\n<h2>The command failed</h2>\n<p>Exit 4 means the tool's own command returned an error. Read the <code>first:</code> line, and the file at\n<code>output:</code> when that line is not enough. Two cases, and they look different.</p>\n<p>The tool is missing, which reads as a command that was not found. Install it, below, then run it\nagain. One exception: a test runner, for a task with no automated tests. See \"A task with no\nautomated tests\" below.</p>\n<p>The tool ran and reported a real failure, such as a failing test or an analysis finding. That is an\nanswer, not a fault. Report what it said. Do not install anything and do not run it again.</p>\n<h2>A task with no automated tests</h2>\n<p>A task can say it has no automated tests. Its contract, <code>alignment.json</code> in the task folder,\nthen holds <code>automatedTests: false</code>. Read it for the active task before any install. When it is\nfalse and the tool runs tests, such as <code>phpunit</code>, <code>pytest</code> or <code>playwright</code>, do not offer the\ninstall. Say that the task has no automated tests, and name <code>/aida:scope</code> as the place to change\nthat. A person who asks for the install still gets it, as below.</p>\n<h2>Install a tool</h2>\n<pre><code>\"${CLAUDE_PLUGIN_ROOT}\"/skills/tool/scripts/tool-actions.sh --run-mode &lt;interactive|autonomous&gt; install &lt;tool&gt;\n</code></pre>\n<p>The install writes the files under the recipe's <code>## Files</code> heading before its first command, and\nthe files stay after the install. The install commits nothing, so those files and its other\nchanges, such as a changed <code>composer.json</code>, stay uncommitted. The person commits them before the\nnext build step, or the clean-tree check refuses.</p>\n<p><code>install</code> and <code>show</code> take no <code>--</code> arguments. They read every command from the recipe, so there is\nnowhere to put one. Passing any refuses at 3, rather than dropping what the person typed. Only\n<code>run</code> takes them.</p>\n<p>Interactive: run <code>show &lt;tool&gt;</code> first, print its commands and the files it ships, and wait for a\nplain yes before you run <code>install</code>. Autonomous: halt here and say the install needs a person,\nbecause an install changes the project and nobody is there to approve it. Before you ask, name\nthe files the recipe ships and the files its commands change. Check both against the active\norder's untouched list.</p>\n<table>\n<thead>\n<tr>\n<th>Exit code</th>\n<th>Meaning</th>\n<th>What to do</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>0</td>\n<td>Every step ran.</td>\n<td>Run the tool once to confirm it works.</td>\n</tr>\n<tr>\n<td>70</td>\n<td>The run is autonomous, and an install needs a person.</td>\n<td>Say the install waits for a person. Stop.</td>\n</tr>\n<tr>\n<td>2</td>\n<td>No recipe for this tool.</td>\n<td>Go to \"No recipe,\" below.</td>\n</tr>\n<tr>\n<td>3</td>\n<td>A command was refused, or the recipe has no install steps. A file on disk matches neither the recipe's file nor any earlier version this machine holds. Arguments were given after <code>--</code>.</td>\n<td>Show the error text and stop. The first two name the recipe, which is where the fix belongs. A file that holds an earlier version is replaced, with a <code>file:</code> line, and a matching file is kept; neither refuses. A file that matches no version may be a person's edit or a stale recipe, so name the file and ask the person which. The last is a call to correct: run the tool, do not install it, when the person wants arguments passed.</td>\n</tr>\n<tr>\n<td>4</td>\n<td>A step failed.</td>\n<td>The <code>first:</code> line quotes the step's first line of output, and the file at <code>output:</code> holds the rest. Show what it said; it says what is missing better than a guess would.</td>\n</tr>\n</tbody>\n</table>\n<p>Do not install by hand when a step fails. A missing package manager or a wrong version is the\nrecipe's problem or the machine's, and doing it by hand hides which.</p>\n<h2>No recipe</h2>\n<p>Exit 2 means no folder source holds a recipe for this tool. The script says which frameworks it\ntried, and which sources it did not search. It reads folder sources itself, and the navigator\nfetches the hosted catalog.</p>\n<p>Ask the catalog before you stop. Dispatch <code>catalog-identifier</code>, naming the role, with the lines\n<code>tooling: &lt;tool&gt;</code>, the framework, and the project folder. A path in its answer goes back to the\nscript as <code>--tooling &lt;tool&gt;=&lt;path&gt;</code>, before the action, and you run the same call again. A folder\nsource ranked before the catalog still wins.</p>\n<p>The role can answer with a word in place of a path. <code>no-recipe</code> means the catalog holds none. A\nproject can then declare its own folder with the project skill's <code>add-source &lt;name-or-path&gt; toolingRecipes &lt;folder&gt;</code>, where the folder holds <code>tooling-recipes/&lt;framework&gt;/&lt;tool&gt;.md</code>.\n<code>listing-unreachable</code> and <code>fetch-failed</code> mean nobody could look.</p>\n<p>With a word, say all three things in one line: the tool, the frameworks tried, and the word. Then\nstop. Do not improvise an install from memory. Installing a tool the wrong way for a framework is\nworse than not installing it, and the recipe is where that knowledge belongs.</p>\n<p>In autonomous mode, record the same three things and stop this step. Do not treat a missing recipe\nas permission to guess.</p>\n<h2>Show what a recipe holds</h2>\n<pre><code>\"${CLAUDE_PLUGIN_ROOT}\"/skills/tool/scripts/tool-actions.sh show &lt;tool&gt;\n</code></pre>\n<p>Prints the recipe's path, the framework it matched, the commands it holds, and the files it ships.\nRuns nothing. Use it when someone asks what would happen, or when an install failed and you want\nto show the steps. Exit 2 means no folder holds a recipe for the tool. Go to \"No recipe,\" above,\nbecause the catalog can hold one.</p>\n<h2>Tools a recipe names</h2>\n<p>A process recipe can name the tools its lines need, in a <code>requires_tooling:</code> list in its\nfrontmatter. A stage that resolved such a recipe runs this before the recipe's lines run, once\nper recipe path:</p>\n<pre><code>\"${CLAUDE_PLUGIN_ROOT}\"/skills/tool/scripts/tool-actions.sh --run-mode &lt;interactive|autonomous&gt; [--tooling &lt;tool&gt;=&lt;path&gt;]... require [--task &lt;task folder&gt;] [--only &lt;tool&gt;]... &lt;recipe path&gt;\n</code></pre>\n<p>A recipe can also name a tool that it needs only on a task with automated tests. That tool goes\nin a second list, <code>requires_tooling_with_tests:</code>, beside the first:</p>\n<pre><code>requires_tooling:\n  - phpcs\nrequires_tooling_with_tests:\n  - phpunit\n</code></pre>\n<p>A name under <code>requires_tooling:</code> is always needed. A name under <code>requires_tooling_with_tests:</code> is\nneeded unless the task's contract says it has no automated tests. The script finds the task whose\nworktree is this window's folder. <code>--task</code> names another task folder instead. The second list is\na key of its own because the catalog accepts only tool names under <code>requires_tooling:</code>.</p>\n<p>It runs each named tool as \"Run a tool\" does, because a tooling recipe's Run command is also its\npresence check. It prints one <code>TOOLING:</code> line per tool, or <code>REQUIRES: none</code>. It installs nothing.\nA tool is absent only when its check exits 127, command not found. Any other exit means the tool\nran, so it reads present. A site that fails to start therefore reads present, and the later run\nfails where a person sees it.</p>\n<p>A line that reads unknown with \"no recipe\" goes to the catalog first, as \"No recipe\" says. Pass\neach path it returns as <code>--tooling</code>, and run <code>require</code> again.</p>\n<p><code>--only &lt;tool&gt;</code> checks only that tool of the two lists, once per tool. Preconditions passes it for\nthe tools that the build's own checks run.</p>\n<p><code>require</code> exits 0 whatever the lines say: an absent or unknown tool is a warning the stage names,\nnever a stop. Read every <code>TOOLING:</code> line. A tool that reads absent needs its install, as \"Install\na tool\" says, and then <code>require</code> runs again. A tool that reads unknown goes to the catalog as\nabove. Still unknown: name the tool and the reason. Never read it as present. On an autonomous run\nthe install refuses at 70, so the tool stays absent and the stage names it.</p>\n<table>\n<thead>\n<tr>\n<th>Exit code</th>\n<th>Meaning</th>\n<th>What to do</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>0</td>\n<td>The lines are printed.</td>\n<td>Read each <code>TOOLING:</code> line, as above.</td>\n</tr>\n<tr>\n<td>1</td>\n<td>No project owns this directory, or the task folder is missing or holds no <code>task.json</code>.</td>\n<td>Name which in one line. For a task folder, check the path given to <code>--task</code>. Otherwise name the project skill. Stop.</td>\n</tr>\n<tr>\n<td>3</td>\n<td>The path is not a readable file, or one of its two lists is not a list.</td>\n<td>Show the error text and stop.</td>\n</tr>\n<tr>\n<td>79</td>\n<td>The task builds in its worktree and this window is elsewhere, or git no longer lists the worktree the task records.</td>\n<td>Show the error text. For the first, run the call again from that worktree. For the second, follow the repair the text names.</td>\n</tr>\n</tbody>\n</table>\n<h2>Reading a process recipe</h2>\n<p>The stage skills read a process recipe; this one does not. The rules the catalog publishes for\nits blocks, and what a missing heading means, are in <code>references/reading-a-recipe.md</code>.</p>\n<h2>What this skill never does</h2>\n<p>It never writes down that a tool is installed. Running the tool answers that every time. A stored\nanswer goes wrong the moment someone removes the package.</p>\n<p>It never edits a recipe. A recipe that is wrong gets fixed where it lives.</p>\n<p>It never runs a command a recipe supplied through a shell. The script runs each one as arguments\nand refuses any that carries a shell character, so a recipe cannot chain a second command.</p>\n","files":[{"path":"references/reading-a-recipe.md","sizeBytes":3831,"isText":true},{"path":"scripts/tool-actions.sh","sizeBytes":21152,"isText":true},{"path":"SKILL.md","sizeBytes":12337,"isText":true}],"reviewScore":null,"reviewSummary":null,"trust":{"provenance":"trusted-source-unreviewed","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow.","bodySource":null},"bodyLocked":false,"purchaseUrl":null,"sourceUrl":null,"report":{"provenance":"trusted-source-unreviewed","screen":{"ran":true,"outcome":"clean","suspicious":0,"notes":0,"hiddenCharacters":false},"virusScan":{"engine":"clamav","status":"clean","scannedAt":"2026-11-10T18:22:43.803472Z","sha256":"FF7413E771BAD0D4BC8A45993DA151C00C7C4D761FB61B438AB7AF224F167078","sizeBytes":13711},"review":null,"source":{"repositoryUrl":"https://github.com/camoa/claude-skills","path":"aida/skills/tool","license":"MIT","commit":"c73ba2a2a322813b7fb9d6e4a08285bf5c87dea4","subtreeSha":"6E6375DA7A4E097FE95938427C56A3BB8ACE3B794E31364286935FCA2A59018F","lastSyncedAt":"2026-11-10T18:22:06.443791Z"},"reviewedAt":"2026-11-10T18:23:16.492747Z","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow."},"install":[{"target":"skills-cli","command":"npx skills add https://github.com/camoa/claude-skills/tree/main/aida/skills/tool"},{"target":"claude-code","command":"claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install camoa-claude-skills@llmmart"},{"target":"git","command":"git clone https://github.com/camoa/claude-skills.git"}]}