Skip to content

fix(plugins): a skill links only inside itself - #772

Merged
blafourcade merged 1 commit into
nextfrom
fix/a-skill-links-only-inside-itself
Sep 4, 2026
Merged

blafourcade merged 1 commit into
nextfrom
fix/a-skill-links-only-inside-itself

Conversation

@blafourcade

Copy link
Copy Markdown
Contributor

What

architecture.md has stated the rule since the per-tool distributions landed:

A skill never links outside itself: the tree ships both flat and as a marketplace, so no relative path survives both.

Nothing enforced it, and the one checker that looks at links cannot: check-markdown-links.js resolves every path against this repository, where the target does exist. A link reaching out of a skill is green there and dead in every installed copy.

Five had accumulated:

File Link
aidd-dev/skills/01-plan/SKILL.md ../../../../aidd_docs/runs/README.md
aidd-telemetry/skills/01-cost/actions/03-report.md ../../../../../aidd_docs/product/cost-report-contract.md × 3
aidd-telemetry/skills/01-cost/actions/03-report.md ../../../README.md

Three point at aidd_docs/product/cost-report-contract.md, which no plugin ships at all — a reader of an installed aidd-telemetry was sent to a file that was never in the package.

The boundary is the skill, not the plugin. ../../../README.md stays inside plugins/aidd-telemetry/ and is still wrong: a tool installs a skill somewhere of its own choosing, and the plugin's README is no more reachable from there than the repository is.

Change

Every one of the five becomes a name in prose. A reader can search for a name; a name cannot rot into a broken link.

The guard

scripts/__tests__/a-skill-links-only-inside-itself.test.js reads every markdown under plugins/<plugin>/skills/<skill>/, resolves each relative link, and fails on one landing outside that skill's own directory.

It ships with a second test that puts an escaping link in front of it and requires it to be seen. Without that, a boundary check that never trips reads exactly like a clean tree — which is the state check-markdown-links.js was already reporting.

Guard Mutation that killed it
no link leaves its own skill make the boundary check never trip — 1
the boundary is the skill, not the plugin widen it to plugins/<plugin> — 1

Both were killed by the probe test, which is the point of it.

CI runs it: cli CI filters on scripts/__tests__/** and executes node --test "scripts/__tests__/*.test.js", as does lefthook's pre-commit.

Gates: 371 repository script tests (369 + the two new), 0 broken links, check-markdown-links.js clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VWNxk63AGKkqE8HRqHLjGp

`architecture.md` has stated the rule since the per-tool distributions landed —
a skill never links outside itself, because the tree ships both flat and as a
marketplace and no relative path survives both — and nothing enforced it.

The one checker that looks at links cannot: `check-markdown-links.js` resolves
every path against this repository, where the target does exist. A link reaching
out of a skill is green there and dead in every installed copy.

Five had accumulated. Three point at `aidd_docs/product/cost-report-contract.md`,
which no plugin ships at all, so a reader of an installed `aidd-telemetry` was
sent to a file that was never in the package. A fourth pointed at the plugin's
own README, which is no more reachable than the repository once a tool has
installed the skill somewhere of its own choosing — the boundary is the skill,
not the plugin.

Each becomes a name in prose: a reader can search for a name, and a name cannot
rot into a broken link.

The guard reads every markdown under `plugins/<plugin>/skills/<skill>/`,
resolves each relative link, and fails on one landing outside that directory. It
ships with a second test that puts an escaping link in front of it and requires
it to be seen — a boundary check that never trips reads exactly like a clean
tree, which is the state the existing checker was already reporting.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01VWNxk63AGKkqE8HRqHLjGp
@blafourcade
blafourcade requested a review from a team as a code owner September 4, 2026 23:12
@blafourcade
blafourcade merged commit 1efb3d9 into next Sep 4, 2026
17 checks passed
@blafourcade
blafourcade deleted the fix/a-skill-links-only-inside-itself branch September 6, 2026 06:22
@aidd-bot aidd-bot Bot mentioned this pull request Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant