external-tools
Skill246 starsChanged 22 days agoMITView on GitHub
Work on Panache's delegation of embedded code blocks to third-party
1 other project uses a version of this.
Adopted by
Most recently taken up by
- dsifry/metaswarmtheir own version, first seen Nov 8, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- dsifry/metaswarm★ 426same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository11 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- add-lint-ruleSkill
- add-syntax-constructSkill
- commonmark-conformanceSkill
- html-conformanceSkill
- linter-investigationSkill
- math-parser-formatterSkill
- pandoc-ir-migrateSkill
- perf-investigationSkill
- smoke-test-triageSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
Use this skill when adding a tool preset, changing how an external tool is invoked, or debugging wrong spans on diagnostics that came from …
- Very specific: line 35
Add an entry to the PRESETS table:
- Very specific: line 60
Verify the preset resolves and the tool actually runs before committing — a wrong cmd or arg order fails silently into "tool not found" …
- Distinctive: line 77
When a diagnostic points at the wrong line, suspect the mapping before suspecting the tool.
≈ “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
Use this skill when adding a tool preset, changing how an external tool is invoked, or debugging wrong spans on diagnostics that came from one.
Key architectural fact: this is entirely a host concern.
crates/panache-formatter never spawns a process. If a change wants to run a
subprocess from the formatter crate, the design is wrong — the formatter crate
is dependency-lean by intent and is consumed as a published crate by
jolars/dprint-plugin-panache.
Where things live
| Path | Role |
src/config/formatter_presets.rs | PRESETS table of FormatterPresetMetadata |
src/linter/external_linters.rs | Linter preset table + tool output parsing |
src/external_tools_common.rs | Shared process plumbing, invocation budget, warning de-dup |
src/external_formatters_sync.rs | Synchronous formatter execution (CLI + LSP) |
src/linter/external_linters_sync.rs | Synchronous linter execution |
src/external_formatters_common.rs | Reindentation and fence-boundary handling of tool output |
src/linter/code_block_collector.rs | Gathers the code blocks to dispatch |
src/linter/offsets.rs | Maps tool line/column back onto document offsets |
Adding a preset
Add an entry to the PRESETS table:
FormatterPresetMetadata {
name: "air",
url: "https://github.com/posit-dev/air",
description: "R formatter for reproducible style conventions.",
cmd: "air",
args: &["format", "{}"],
stdin: false,
supported_languages: &["r"],
},{}inargsis the filename placeholder.stdin: falsemeans the tool rewrites a temp file in place rather than reading stdin;stdin: truemeans it reads stdin and writes stdout.supported_languagesis matched against the code block's language token, so include every alias users actually write (sh/bash,r/R).
build.rs reruns on src/config/formatter_presets.rs and
src/linter/external_linters.rs, so adding an entry regenerates
docs/reference/_formatter-presets-details.qmd and
_linter-presets-details.qmd. Never hand-edit those.
Verify the preset resolves and the tool actually runs before committing —
a wrong cmd or arg order fails silently into "tool not found" warnings.
Offset mapping — the part that actually breaks
The external tool sees dedented code with no fence and no container prefix.
Its reported line and column numbers are relative to that stripped view, so
they must be translated back onto the original document
(src/linter/offsets.rs).
Anything that changes the stripped view changes the mapping:
- code blocks inside list items or blockquotes (container prefix)
- indented code blocks
- hashpipe option lines preceding the body
- CRLF input
When a diagnostic points at the wrong line, suspect the mapping before suspecting the tool. Write the failing case as a fixture with the block nested in a list item — that is where the prefix arithmetic goes wrong.
The invocation budget
init_external_tool_budget in src/external_tools_common.rs bounds how many
external processes a single run may spawn, so a large document or a directory
walk cannot fork thousands of subprocesses. If a tool appears to stop being
applied partway through a big run, check the budget before assuming a
detection bug. external-max-parallel is the related config key.
Missing-tool warnings are de-duplicated per run, so a tool absent from PATH
warns once, not once per code block.
Testing
cargo test --test external_formatters
cargo test --test external_lintersThese require the real binaries on PATH and skip when a tool is absent —
which means they can pass locally for the wrong reason. Run them inside the
devenv shell, which installs shfmt, ruff, shellcheck, stylua, eslint,
and the rest.
Debugging a tool that seems not to run
- Is the language token in
supported_languages? - Is the tool on
PATHas the CLI sees it? - Is the on-disk lint cache serving a stale result? Run
cargo run -- clean --allor pass--no-cache. The cache key is onlypanache@<version>, so it does not invalidate on code changes under a fixed in-development version. - Has the invocation budget been exhausted?
RUST_LOG=debug cargo run -- format document.qmdto see the dispatch decisions.
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.

