Skip to content

fix(skill-management): remove broken agent refs and widen audit recall - #570

Merged
wkoutre merged 3 commits into
nextfrom
nickkoutrelakos/opus5-skill-management-fixes
Aug 5, 2026
Merged

fix(skill-management): remove broken agent refs and widen audit recall#570
wkoutre merged 3 commits into
nextfrom
nickkoutrelakos/opus5-skill-management-fixes

Conversation

@wkoutre

@wkoutre wkoutre commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Applies the Opus 5 migration audit to packages/plugins/skill-management/. Every .md under the plugin was read in full; only files with an actual migration defect were touched.

Deltas addressed

Broken references (dispatch names verified against disk)

skills/skill-doctor/SKILL.md routed deep work to four names, three of which do not exist:

Name Status Action
agent-capability-analyst No name: frontmatter anywhere in the marketplace or ~/.claude Bullet removed
claude-agent-discovery Same — does not exist Bullet removed
agent-optimizer Same — does not exist Dropped from the pair
prompt-engineer Real agent is prompt-engineer-agent (development-productivity) Corrected to development-productivity:prompt-engineer-agent

Verification — the only hits anywhere on disk for the three phantom names are copies of this same plugin:

$ /usr/bin/grep -rn 'agent-optimizer\|agent-capability-analyst\|claude-agent-discovery' \
    ~/.claude/plugins ~/.claude/agents
~/.claude/plugins/cache/uniswap-ai-toolkit/skill-management/1.0.1/skills/skill-doctor/SKILL.md:29,30,31,159
~/.claude/plugins/cache/uniswap-ai-toolkit/skill-management/1.0.2/skills/skill-doctor/SKILL.md:29,30,31,159
~/.claude/plugins/cache/uniswap-ai-toolkit/skill-management/1.0.{1,2}/README.md:46

Also corrected: update-claude-md was described as a skill; it is a command (development-productivity/commands/update-claude-md.md). Now referenced as /update-claude-md.

The same prompt-engineer correction was applied in README.md.

Delta 2 — delegation

skill-doctor Step 3 mandated deep-read them **via a subagent** for what its own sentence called "the handful of writable items you'll actually propose changing". Now conditional: read directly when there are only a few, delegate to a single subagent only when the set is large enough that inline reading would crowd out main context. An explicit when-NOT-to-delegate clause is stated inline ("a handful of reads is cheaper inline than a dispatch").

Delta 3 — recall filter at discovery time

skill-doctor Step 3 told the analysis pass to Use the duplicate_names / near_duplicate_descriptions / weak_or_missing_description / no_trigger_language flags, which reads as a discovery-time boundary: an overlap the script's heuristics did not flag gets silently dropped. Reshaped coverage-first — the flags are now a starting point, the whole map gets read, ranking happens at the end rather than during discovery. Bullet verbs changed from "Use" to "Start from".

No emphasis stripping was needed. CRITICAL|MUST|NEVER|ALWAYS|ABSOLUTE counts across the plugin: 2 in audit-patterns.md, 1 in migrate-config-to-opus-5/SKILL.md, 0 everywhere else — all load-bearing.

Delta 4 — output length

  • skills/migrate-config-to-opus-5/SKILL.md ## Output had no deliverable-length line, while its own references/audit-patterns.md:54 is the text instructing other configs to add one. The skill now follows its own advice.
  • skill-doctor Step 5's consolidated menu now caps each entry at a line or two, with detail deferred to the items the user actually picks.

Verified, deliberately unchanged

  • Delta 1 (verification ceremony) — no defect found. migrate-config Step 5's claude -p probe and Step 2's "spot-check each proposed edit against the actual file" both check work against external reality, which is grounding, not self-review. skill-doctor's "suggest re-running inventory.py to confirm the flag cleared" is likewise a tool re-run, not a re-read of just-written output.
  • Stale facts in audit-patterns.md — re-verified and correct, left untouched: Opus 5 $5/$25 vs Sonnet 5 $3/$15 → ~1.7x (with the ~2.5x intro-pricing caveat through 2026-08-31), Haiku $1/$5 → ~5x under Opus; model IDs claude-opus-5 / claude-sonnet-5 / claude-haiku-4-5 / claude-fable-5 with the alias preference; budget_tokens 400s on the Claude 5 family.
  • Invented numbers — none found. The one numeric instruction (count CRITICAL|MUST|NEVER|ALWAYS per file) is arithmetic over real grep output.
  • MultiEdit / Task(subagent_type:) — no occurrences in this plugin.
  • memory-doctor — referenced but does not exist on disk. Left as-is because the reference is explicitly hedged ("the memory-doctor skill if installed"), so it cannot fail at dispatch.

DECISION (not resolved here — needs a call)

references/audit-patterns.md:24 lists "PROACTIVELY" in agent descriptions as a Delta 2 smell to flag. Its sibling skills/skill-doctor/SKILL.md:11 says "Also use PROACTIVELY after finishing a multi-step workflow that the user is likely to repeat".

  • Case for changing skill-doctor: the plugin should not ship the pattern its own reference tells users to flag. Under Opus 5's stronger literal-following, a PROACTIVELY in a description is exactly the over-trigger nudge Delta 2 warns about.
  • Case for leaving it: the audit-patterns line targets agent descriptions driving delegation fan-outs. skill-doctor is a skill, and its PROACTIVELY drives an ask, not a dispatch — it prompts the user with a question after a PR, which is policy rather than compensation. Deleting it would silently kill the PR-time nudge that hooks/pr-skill-doctor-prompt.cjs exists to reinforce.

Either resolution is defensible; picking one is a judgment call, so nothing was changed.

Version

.claude-plugin/plugin.json 1.2.0 → 1.3.0 (MINOR: dispatch targets removed, delegation and discovery behavior changed), and the matching row in the root CLAUDE.md table. plugin.json and the root table agreed at 1.2.0 before this change — no drift.

Test plan

$ node scripts/validate-plugin.cjs packages/plugins/skill-management
$ bunx nx format:write --uncommitted
$ bunx markdownlint-cli2 --fix "packages/plugins/skill-management/**/*.md"

Output pasted in a follow-up comment. Pre-commit (lefthook) ran clean on the commit:

✔️ format  ✔️ lint  ✔️ lint-markdown  ✔️ test  ✔️ typecheck  ✔️ update-lockfile

🤖 Generated with Claude Code

AI-Generated Description

Summary

Applies the Opus 5 migration audit (from the migrate-config-to-opus-5 skill added in #562) to
packages/plugins/skill-management/ itself. Every .md under the plugin was read in full; only files
with an actual defect were touched. 6 files, +42/-22, docs only — no code, hooks, or CI.
Three commits, four defect classes: broken dispatch targets, recall filters applied at discovery time,
unconditional delegation, and missing output-length instructions.

1. Broken dispatch references

skills/skill-doctor/SKILL.md routed deep work to four agent names. Three do not exist, so those
bullets could only ever fail at dispatch:

Name Status Action
agent-capability-analyst Not defined by any agent in the marketplace Bullet removed
claude-agent-discovery Not defined anywhere Bullet removed
agent-optimizer Not defined anywhere Dropped from the pair
prompt-engineer Real agent is prompt-engineer-agent development-productivity:prompt-engineer-agent
Verified — the first three have no defining frontmatter, the corrected name does:
$ grep -rn '^name: \(agent-optimizer\|agent-capability-analyst\|claude-agent-discovery\)$' \
    --include=*.md packages/plugins/
# (no output)
$ grep -rn '^name: prompt-engineer-agent$' --include=*.md packages/plugins/
packages/plugins/development-productivity/agents/prompt-engineer.md:2

The filename is prompt-engineer.md but the dispatch name in frontmatter is prompt-engineer-agent
the path was the likely source of the original error. The surviving reference now carries an explicit
"verify the name resolves before dispatching; if that plugin isn't installed, do the tuning inline"
fallback, so a missing plugin degrades instead of failing.
Also corrected: update-claude-md was described as a skill. It is a command
(packages/plugins/development-productivity/commands/update-claude-md.md), now referenced as
/update-claude-md. The same prompt-engineer correction was applied in README.md.

2. Recall filters applied at discovery time (two sites)

skill-doctor/SKILL.md Step 3 told the analysis pass to Use the duplicate_names / near_duplicate_descriptions / weak_or_missing_description / no_trigger_language flags. Read as a
discovery-time boundary, an overlap the script's keyword/threshold heuristics did not flag gets
silently dropped. Reshaped coverage-first: the flags are a starting point, the whole map gets read,
ranking happens at the end rather than during discovery. Bullet verbs changed from "Use" to "Start
from".
skill-doctor/references/analysis-rubric.md opened with "don't invent problems" and nothing on the
other side. The intent is right, but an unbalanced precision instruction in an auditing prompt reads to
Opus 5 as license to drop anything it is uncertain about — the same recall filter, one level down. Added
the counterweight: the guard constrains what you assert, not what you look at; report the finding
and mark the uncertainty rather than dropping it. A silently omitted real issue fails the same way a
fabricated one does, and is harder to notice.

3. Delegation made conditional

skill-doctor Step 3 mandated deep-reading via a subagent for what its own sentence called "the
handful of writable items you'll actually propose changing" — a dispatch costing more than the reads it
replaces. Now conditional: read directly when there are only a few, delegate to a single subagent only
when the set is large enough that inline reading would crowd out main context. The when-NOT-to-delegate
case is stated inline ("a handful of reads is cheaper inline than a dispatch") rather than left implicit.

4. Output length

  • skills/migrate-config-to-opus-5/SKILL.md ## Output had no deliverable-length line, while its own
    references/audit-patterns.md:54 is the text instructing other configs to add one. The skill now
    follows its own advice.
  • skill-doctor Step 5's consolidated menu now caps each entry at a line or two, with detail deferred
    to the items the user actually picks.

5. PROACTIVELY self-inconsistency (resolved in 48a0f0f)

references/audit-patterns.md:24 lists "PROACTIVELY" in agent descriptions as a Delta 2 smell to
flag, and skill-doctor's own description used it. Shipping the pattern the plugin tells users to flag
undercuts the guidance, so the word is gone.
The trigger is kept — skill-doctor still applies after a repeatable multi-step workflow, especially
right after opening a PR. Only the nudge word was removed, and the PR-time prompt is delivered by
hooks/pr-skill-doctor-prompt.cjs, not by this description, so no behavior is lost. The plugin's only
remaining PROACTIVELY is now the audit-patterns.md line that defines the smell.

Verified, deliberately unchanged

  • Verification ceremony — no defect. migrate-config Step 5's claude -p probe and Step 2's
    "spot-check each proposed edit against the actual file" both check work against external reality,
    which is grounding, not self-review. skill-doctor's "re-run inventory.py to confirm the flag
    cleared" is a tool re-run, not a re-read of just-written output.
  • Emphasis stripping — not needed. CRITICAL|MUST|NEVER|ALWAYS|ABSOLUTE appears on 2 lines in
    audit-patterns.md, 1 in migrate-config-to-opus-5/SKILL.md, and 1 in analysis-rubric.md — the
    last being heavy-handed ALL-CAPS MUSTs, prose about emphasis rather than emphasis itself. All
    load-bearing.
  • Stale facts in audit-patterns.md — re-verified correct: Opus 5 $5/$25 vs Sonnet 5 $3/$15 →
    ~1.7x (with the intro-pricing caveat through 2026-08-31), Haiku $1/$5 → ~5x under Opus; model IDs and
    the alias preference; budget_tokens on the Claude 5 family.
  • Invented numbers — none. The one numeric instruction (count emphasis words per file) is
    arithmetic over real grep output.
  • MultiEdit / Task(subagent_type:) — no occurrences in this plugin.
  • memory-doctor — referenced but not on disk. Left as-is: the reference is explicitly hedged
    ("the memory-doctor skill if installed"), so unlike the three names above it cannot fail at
    dispatch.

Out of scope — pre-existing broken refs elsewhere

Two of the phantom names are also referenced outside this plugin. They are equally broken, but they
belong to another plugin and to docs/, so they would need their own version bump and are not
touched here:

packages/plugins/development-codebase-tools/agents/agent-orchestrator.md:35,160  agent-capability-analyst
docs/examples/orchestration-workflows.md:447                                     agent-optimizer
docs/guides/creating-agents.md:23                                                agent-optimizer

Worth a follow-up. Note that spec-workflow/skills/implement-spec/SKILL.md no longer appears in this
sweep — that reference was already removed by #567.

Version

.claude-plugin/plugin.json 1.2.0 → 1.3.0 (minor: dispatch targets removed, delegation and
discovery behavior changed), with the matching row in the root CLAUDE.md table updated in the same
commit. The two agreed at 1.2.0 beforehand — no pre-existing drift.

Test plan

  • node scripts/validate-plugin.cjs packages/plugins/skill-managementValidation PASSED
    (skill-management v1.3.0, 2 skills, 3 commands, 2 hooks)
  • Every removed dispatch name confirmed undefined, and every replacement name confirmed defined, by
    the greps above
  • PROACTIVELY sweep across the plugin returns only the audit-patterns.md line that defines the
    smell
  • bunx markdownlint-cli2 --fix → 0 issues; bunx nx format:write --uncommitted applied
  • Lefthook pre-commit green on all three commits (format, lint, lint-markdown, test, typecheck,
    update-lockfile)

@wkoutre
wkoutre requested a review from a team as a code owner August 5, 2026 20:12
@vercel

vercel Bot commented Aug 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ai-toolkit-slack-oauth-backend Ready Ready Preview Aug 5, 2026 11:41pm

Request Review

@wkoutre

wkoutre commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Test plan output

$ node scripts/validate-plugin.cjs packages/plugins/skill-management
Validating plugin: packages/plugins/skill-management

  ✓ plugin.json: skill-management v1.3.0
  ✓ package.json: @uniswap/skill-management
  ✓ project.json: skill-management
  ✓ skills/: 2 item(s)
  ✓ commands/: 3 item(s)
  ✓ hooks/: 2 item(s)

--- Validation Results ---

Validation PASSED
EXIT=0
$ bunx markdownlint-cli2 --fix "packages/plugins/skill-management/**/*.md"
markdownlint-cli2 v0.20.0 (markdownlint v0.40.0)
Linting: 200 file(s)
Summary: 0 error(s)
EXIT=0
$ bunx nx format:write --uncommitted
EXIT=0

$ git status --porcelain
(empty — nothing reformatted, working tree clean)

Pre-commit hooks (lefthook) on commit 9231a76:

✔️ format (7.26s)  ✔️ lint (0.15s)  ✔️ lint-markdown (1.16s)
✔️ test (0.59s)    ✔️ typecheck (0.57s)  ✔️ update-lockfile (0.84s)

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

📚 Documentation Check ✅

Verdict: Passed

Plugin version was bumped correctly (1.2.0 to 1.3.0) in plugin.json and mirrored in the root CLAUDE.md table. No new skills/agents/commands were added, so no other doc updates are required.


PR #570 refines skill-management plugin content only: fixes dangling agent references in SKILL.md/README, drops stale PROACTIVELY wording, and tightens the analysis rubric and output-length guidance. The required version bump was made and is consistent between plugin.json and the root CLAUDE.md table. No new components were added, so Notion marketplace and plugin CLAUDE.md updates are not required. Changelog is auto-generated via nx release, not a manual file. Minor non-blocking note: given these are corrective fixes rather than new features, a patch bump would have matched the repo's own semver guidance slightly better than the minor bump used.

Suggestions (1)

💡 Inline suggestions have been posted as review comments. Click "Commit suggestion" to apply each fix directly.

  • ℹ️ packages/plugins/skill-management/.claude-plugin/plugin.json: Changes are bug fixes/corrections to existing content (broken agent references, stale wording) rather than new features, so a patch bump would align more precisely with the repo's semver guidance than the minor bump used. Non-blocking since a bump was made.

🤖 Generated by Claude Documentation Validator | Mode: suggest

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

● Reviewed · 2026-08-05 23:41 UTC · 3 reviews · view run ↗

Approved — one thread still open on skill-doctor/SKILL.md, leaving it open.

Removes three dead subagent dispatch targets from skill-doctor, corrects the surviving one to development-productivity:prompt-engineer-agent, reclassifies /update-claude-md as a command, loosens the mandatory-delegation and flags-as-boundary language, and now also drops PROACTIVELY from the skill description — version bumped 1.2.0 → 1.3.0 in both plugin.json and the root table.

Assessment

The latest push settles the DECISION the description left open: PROACTIVELY is gone from the frontmatter, and the PR-time nudge survives because hooks/pr-skill-doctor-prompt.cjs injects it independently of the description, which still carries trigger language the plugin's own heuristic recognizes. Every corrected reference resolves on disk and the manifest matches the skill and command directories in both directions. The open thread on truncated descriptions still applies — Step 3 broadened what the audit judges without changing which artifact it reads — but that degrades one audit path rather than blocking these migration fixes.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9231a76e03

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +125 to +127
- **Trigger-quality.** Start from `weak_or_missing_description` and
`no_trigger_language`, and flag any other description that reads weak on the
rubric. Deep-read the **writable** items you'll actually propose changing. Read

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Read full descriptions before auditing weak triggers

When map/full mode tries to find weak descriptions that the script did not flag, the skill has only been told to read inventory.md; that file renders each entry as desc (truncated) with only the first ~16 words, so an unflagged description can look fine in the table while failing the rubric later in the full text. This makes the new coverage-first audit miss precisely the unflagged trigger-quality issues it now promises to catch; have this path read inventory.json or otherwise include full descriptions before judging unflagged rows.

Useful? React with 👍 / 👎.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tip

💬 Commented — see full review in the sticky comment ↑

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

Approved — see full review in the sticky comment ↑

@wkoutre
wkoutre force-pushed the nickkoutrelakos/opus5-skill-management-fixes branch from 5576008 to 4b3ce0f Compare August 5, 2026 23:24
@github-actions github-actions Bot changed the title fix(skill-management): Opus 5 migration fixes fix(skill-management): remove broken agent refs and widen audit recall Aug 5, 2026
wkoutre and others added 3 commits August 5, 2026 16:39
…grate-config-to-opus-5

Remove three phantom agent references, make the trigger-quality subagent
dispatch conditional, make the analysis pass coverage-first, and add
deliverable-length lines to both output sections.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
analysis-rubric.md opened with "don't invent problems" and nothing on the
other side. The intent is right, but in an auditing prompt an unbalanced
precision instruction reads to Opus 5 as license to drop anything it is
uncertain about -- which is a recall filter applied at discovery time.

Added the coverage counterweight: the guard constrains what you assert,
not what you look at. Report every issue found, mark the uncertainty,
and let the reader filter. A silently omitted real finding fails the same
way a fabricated one does, and is harder to notice.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
audit-patterns.md lists "PROACTIVELY in agent descriptions" as a Delta 2
smell to search for, and skill-doctor's own description used it. Shipping
the pattern the plugin tells users to flag undercuts the guidance.

The trigger itself is kept -- skill-doctor still applies after a repeatable
multi-step workflow, especially right after a PR. Only the nudge word is
gone. The PR-time prompt is delivered by hooks/pr-skill-doctor-prompt.cjs,
not by this description, so nothing is lost by removing it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@wkoutre
wkoutre force-pushed the nickkoutrelakos/opus5-skill-management-fixes branch from 4b3ce0f to 48a0f0f Compare August 5, 2026 23:40
@wkoutre
wkoutre merged commit 96c3e42 into next Aug 5, 2026
18 checks passed
@wkoutre
wkoutre deleted the nickkoutrelakos/opus5-skill-management-fixes branch August 5, 2026 23:43
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