Repository navigation
Description
Problem
plugins/plugin-quality/skills/audit/SKILL.md (Evidence packet section) asserts:
The
${CLAUDE_PLUGIN_DATA}token does NOT substitute in skill markdown (it is a hook/monitor/MCP
path substitution), so derive the directory deterministically per the plugins reference…
The current plugins reference (https://code.claude.com/docs/en/plugins-reference, fetched
2026-07-26) contradicts that. Its "Environment variables" section carries a per-component
substitution table introduced by "Which fields substitute them inline depends on the plugin
component:", whose first row is:
| Plugin component | Fields where placeholders resolve |
|---|---|
| Skill and agent content | Anywhere the placeholder appears |
${CLAUDE_PLUGIN_DATA} is one of the three variables that table governs, alongside
${CLAUDE_PLUGIN_ROOT} and ${CLAUDE_PROJECT_DIR}.
Why this is not a trivial doc fix
There is a genuine cross-page tension that needs settling before the skill changes:
- plugins-reference says all three substitute in skill and agent content, anywhere they appear.
- The skills page (https://code.claude.com/docs/en/skills, fetched 2026-07-26) lists only
$ARGUMENTS,$ARGUMENTS[N],$N,$name,${CLAUDE_SESSION_ID},${CLAUDE_EFFORT},
${CLAUDE_SKILL_DIR}, and${CLAUDE_PROJECT_DIR}in its own substitutions table — it does not
list${CLAUDE_PLUGIN_ROOT}or${CLAUDE_PLUGIN_DATA}at all.
So this needs an empirical check in an installed plugin skill, not a doc swap on faith.
Also worth evaluating in the same pass: ${CLAUDE_SKILL_DIR} is documented on the skills page as
the plugin-skill-friendly form ("For plugin skills, this is the skill's subdirectory within the
plugin, not the plugin root") and may be the more portable answer regardless of how the tension
resolves.
Current risk: low, but the reasoning is stale
The skill's manual derivation (~/.claude/plugins/data/<plugin-id>/ with non-[A-Za-z0-9_-]
characters replaced by -) is still correct — plugins-reference documents exactly that path and
mangling rule, so packets land in the right place today. What is wrong is the stated reason, and
a wrong reason propagates: this repo's audit skill is the component other audits copy their
doc-grounding posture from.
Suggested resolution
- Empirically verify whether
${CLAUDE_PLUGIN_DATA}expands in an installed plugin skill body. - Update the assertion to match observed behavior, citing the plugins-reference table, and note
the skills-page omission as a documented tension rather than silently picking a side. - Decide whether to keep the deterministic derivation anyway (defensible as belt-and-braces given
the tension) or switch to the substitution.
Related
Found while implementing #1565 / #1566 against the same skill; deliberately not folded into that PR
because it needs its own empirical verification and the two doc pages disagree.
Activity
fix(plugin-quality): unblock the evidence-packet write and give audit…
fix(plugin-quality): resume rule must find the packet findings file u…
kyle-sexton commentedon Jul 26, 2026
Triage: verified → briefed, decision-defaulted
Category: Bug (a correct practice justified by a false stated reason),
plugin-quality.Verification — the contradiction is CONFIRMED STILL LIVE, re-fetched this session. I did not
take the item's citation on trust; this repository's fresh-docs mandate covers documented harness
behavior, so I re-fetched the plugins reference during triage. The per-component substitution table
is still present, still introduced by "Which fields substitute them inline depends on the plugin
component:", and its first row still reads:
The table still governs all three variables,
${CLAUDE_PLUGIN_DATA}among them. So the auditskill's assertion that the token "does NOT substitute in skill markdown (it is a hook/monitor/MCP
path substitution)" is contradicted by current upstream documentation, and the item is not
already-resolved by upstream drift since it was filed.
The cross-page tension is real and is why this is not a doc swap. The skills page's own
substitutions table does not list
${CLAUDE_PLUGIN_DATA}or${CLAUDE_PLUGIN_ROOT}at all. Twoofficial pages therefore disagree about the same surface, which is exactly the situation where
picking a side from documentation alone would repeat the original error in the opposite direction.
Redundancy check. Searched by domain concept — plugin data-directory resolution — across the
plugin surface for an already-corrected statement or an existing empirical determination: none. The
audit skill is the only component asserting the negative claim, and it is, per the item, the
component other audits copy their doc-grounding posture from, which is what makes a wrong stated
reason propagate. No
docs/out-of-scope/ledger in this repo.Current behavior is correct; only the justification is wrong. The manual derivation the skill
performs still lands packets in the right place, because the reference documents that same path and
character-mangling rule. Nothing is broken for users today. The defect is epistemic.
Decision defaulted: keep the deterministic derivation, correct the stated reason — veto before merge
The item leaves one question open: keep the manual derivation as belt-and-braces, or switch to
relying on the substitution.
RECOMMENDED — keep the deterministic derivation, and fix only the reason given for it. Two
official pages disagree about whether the token expands in skill content. A derivation that does not
depend on the answer is correct under either resolution, so it is the choice that survives the
tension being settled either way. Switching to substitution would make the skill's behavior depend
on the very question this item records as unsettled.
Alternative, and why it is merely vetoable: switch to the substitution (or to the
skill-directory variable the item flags as possibly more portable). This is reversible — it is a
one-line change to how one path is computed inside one skill, with no consumer-visible contract and
no data migration, so a maintainer who prefers it can say so before merge at no cost. That
reversibility is what makes this decision-defaulted rather than human-gated.
Brief
Behavioral contract. The audit skill must not justify its data-directory derivation with a claim
that current official documentation contradicts, and must not silently pick a winner between two
disagreeing official pages.
Acceptance:
match observed behavior.
skill body whether the token actually expands, and let the observation govern. This is the step
that distinguishes a real fix from swapping one unverified claim for another.
table versus the skills page's omission — rather than resolved by silently citing whichever page
supports the chosen behavior.
with its rationale restated as "independent of the unsettled substitution question" rather than
as the current false claim.
recorded, so the question is not reopened later.
this comment establishes the contradiction is live as of triage, not that it will still be live at
implementation.
Labels applied:
priority: medium,agent-ready,status: ready; raw marker cleared.kyle-sexton commentedon Jul 26, 2026
This was generated by AI during triage.
Admission gate: carries
agent-readybut nowork-class:label and no body-recorded class trailer — unclassified → fail-closed human-gated per the work-loop lane's admission table (a role label alone is not classification evidence). Routed to human-gated; not dispatched.kyle-sexton commentedon Aug 11, 2026
Evidence from a validation pass over handoff-inbox item
20260811-021645-plugin-audit-four-components-and-guard-deadlock-ownership, verified against repoHEAD
685dd381. Facts only — no disposition recommended for this issue.1. This issue's own subject appears to be corrected in tree already.
plugins/plugin-quality/skills/audit/SKILL.md:123-131now states that the placeholder DOES resolve,cites plugins-reference §Environment variables with a fetch date of 2026-07-31, and keeps the
deterministic derivation as a fallback.
plugins/plugin-quality/CHANGELOG.md:147records thatcorrection, crediting #1808 — which is a CLOSED issue, not a PR.
2.
architectureis the last surviving carrier of the live claim in this repo, and now has itsown issue: #2207. A repo-wide sweep for both phrasings returns exactly three hits:
plugins/architecture/skills/improve/SKILL.md:71— the live false claim ("That token does notsubstitute in skill markdown content (it is a hook/monitor/MCP path substitution only)")
plugins/architecture/CHANGELOG.md:112-115— the same mechanism as the stated reason in the 0.3.6"Fixed" entry, promoted to a permanent Gotcha at
:74in 0.4.1plugins/plugin-quality/CHANGELOG.md:147— the record of the correction, not the claimThe sweep matched two phrasings only; a paraphrase ("only hooks can use it", "not available to
skills") would not have been found, so three is a lower bound, not a census.
3. The contradiction is still live at HEAD. https://code.claude.com/docs/en/plugins-reference,
"Environment variables", re-fetched 2026-08-11: "Which fields substitute them inline depends on
the plugin component:" introduces a table whose first row is
| Skill and agent content | Anywhere the placeholder appears |, withHook and monitor commandsas a separate row and no versionqualifier. The cross-page tension this issue names is also still live — the skills page's own
substitutions table still omits
${CLAUDE_PLUGIN_DATA}and${CLAUDE_PLUGIN_ROOT}.4. A third instance of the family, running in the opposite direction. The same validation pass
found
claude-configasserting that the token's use is undocumented — the inverse error about thesame token, from the same cross-page ambiguity. Recorded in the ledger below as
CC-F9; not thisissue's scope, noted because it shows the ambiguity produces errors in both directions.
5. Adjacent, same failure class, different variable: #1824 (
${CLAUDE_SKILL_DIR}used inpre-compute but not documented as harness-substituted).
6. An open alternative explanation nobody has closed. A
Readof a skill line may return thetoken literal while skill-loading expands it; the
architecturesymptom that started this familyoriginated in a
Read-loadedactions/deepening.md, not aSKILL.mdbody. If true, the historicalsymptoms were real and only the mechanism was wrong. It does not soften the doc contradiction. A
throwaway plugin carrying the token in both a
SKILL.mdbody and anactions/*.mdfile would settleit.
Ledger:
.work/handoff-inbox-batch-4/ledgers/I9-021645-four-components.md§ Lane E —architecture/
improve(rowsA-F1–A-F4).kyle-sexton commentedon Aug 12, 2026
Batch-4 filing note — two adjacent rows deliberately routed here rather than filed separately, so this issue stays the single owner of the substitution-scope question:
The
reference/*.mdextent is the one leg still unconfirmed. Filed as part of fix(claude-config): audit-pass specifies 1,547 lines of runtime mechanism and ships no scripts, so the lease, the partial, and the resume path are prose only #2280 (audit-passF8), but the row explicitly defers to this issue: the plugins reference's row is| Skill and agent content | Anywhere the placeholder appears |, and the docs do not state whether "skill content" extends to bundledreference/*.mdloaded on demand via Read. fix(claude-config): audit-pass specifies 1,547 lines of runtime mechanism and ships no scripts, so the lease, the partial, and the resume path are prose only #2280 does not re-litigate it. For${CLAUDE_PROJECT_DIR}specifically both pages agree it substitutes in skill content, soaudit-pass'sSKILL.md:42-43row stands independently.One member of the false-claim family is closed, not filed.
claude-config:audit-prompting-postureswas reported as using${CLAUDE_PLUGIN_DATA}in a skill body "undocumented-but-working". That is falsified — plugins-reference documents it with no version qualifier, and this repo already states the correct answer atplugins/plugin-quality/skills/audit/SKILL.md:123-131. Recorded in fix(claude-config): audit-prompting-postures' contract disagrees with itself in eight places #2281's "not filed, on purpose" section so nobody hardens a working, documented mechanism. Same family as fix(architecture): improve's Gotcha asserts ${CLAUDE_PLUGIN_DATA} does not substitute in skill content — plugins-reference says it does #2207.fix(architecture): remove false CLAUDE_PLUGIN_DATA substitution claim…
feat(claude-config,claude-memory): key plugin-data reports per projec…
chore(conventions): route unstamped upstream-fact carriers into upstr…
feat(claude-config,claude-memory): key plugin-data reports per projec…
fix(claude-config): stop audit-pass asking the model to test a substi…
kyle-sexton commentedon Aug 12, 2026
Closing as already fixed on main:
plugin-quality:auditSKILL.md now states that${CLAUDE_PLUGIN_DATA}DOES resolve in skill/agent content per the plugins reference (fetched 2026-07-31), with deterministic fallback when unexpanded. No further in-repo change needed.feat(claude-config): give audit-pass an executable for the run state …