en un clic
skill-audit
// Audit all Claude Code skills for stale references, broken paths, and deprecated tool names
// Audit all Claude Code skills for stale references, broken paths, and deprecated tool names
Generate React Testing Library tests following OCP Console best practices
Comprehensive local code review using both Claude AI and CodeRabbit AI before pushing changes to GitHub. This command analyzes your local changes and provides actionable feedback without posting anything to GitHub.
Expert package update assistant for OpenShift Console. Update packages safely with automated testing, building, and fixing.
Automated QA verification for OpenShift Console PRs. Builds and runs the console on both main and the PR branch, captures before/after screenshots and GIFs via Playwright MCP, then posts a side-by-side comparison as a GitHub PR comment. Use when the user asks to verify a PR, QA changes, capture visual proof, or show before/after evidence.
Debug and fix failing Playwright e2e tests with MCP-assisted diagnosis. Use when user says "playwright test failing", "fix e2e test", "debug spec", or provides a failing .spec.ts file, e2e directory, or Playwright tag.
Migrate a Cypress test file to Playwright following Console's architecture. Use when user says "migrate", "convert cypress", "port to playwright", or provides a .cy.ts or .feature file path.
| name | skill-audit |
| description | Audit all Claude Code skills for stale references, broken paths, and deprecated tool names |
| argument-hint | [skill-name] (optional - audits all skills if omitted) |
Audit .claude/skills/ for drift: broken file paths, missing scripts, and deprecated tool names.
Find all markdown files under .claude/skills/:
SKILL.md filesDOSSIER-TEMPLATE.md, REPORT-TEMPLATE.md, and any other .md filesIf $ARGUMENTS names a specific skill (e.g., test), only audit .claude/skills/$ARGUMENTS/.
For each skill file, find references to files/directories. Look for:
/ or ending in known extensions (.md, .sh, .ts, .tsx, .json, .js, .yaml, .yml)AGENTS.md, CLAUDE.md, STYLEGUIDE.md, TESTING.md, INTERNATIONALIZATION.mdFor each path found:
frontend/Skip:
*path/to/Component.tsx, test-file.spec.tsx, <file>, src/feature.tsx)$ARGUMENTS, <package>)@console/* Import PathsSkills contain example import statements that reference real packages. Extract all @console/* import paths from import statements.
For each path:
@console/internal → verify the subpath exists under frontend/public/ (e.g., @console/internal/module/k8s → frontend/public/module/k8s)@console/shared → verify the subpath exists under frontend/packages/console-shared/ (e.g., @console/shared/src/test-utils/unit-test-utils → frontend/packages/console-shared/src/test-utils/unit-test-utils)@console/dynamic-plugin-sdk → verify under frontend/packages/console-dynamic-plugin-sdk/@console/* packages → verify a matching package exists in frontend/packages/Report any import paths that don't resolve to real files.
Note on @console/internal: Some subpaths resolve through webpack aliases rather than direct filesystem paths. If a path under @console/internal does not resolve directly under frontend/public/, also check frontend/public/module/ and frontend/public/components/ as common alias targets. When a path cannot be verified through either method, report it as a warning rather than an error — it may be alias-resolved at build time.
Skip: Relative imports (../, ./) — these are example-specific and not verifiable without context.
Skills may reference PatternFly components in example code. Extract all @patternfly/* import paths.
For each path:
/deprecated subpath (e.g., @patternfly/react-core/deprecated) — report as a warning since these are slated for removal in future PF versionsfrontend/node_modules/@patternfly/ (or check frontend/package.json dependencies)@patternfly/react-core/dist/esm/components/Button), verify the path resolvesSkip: Generic PatternFly references in prose (e.g., "use PatternFly components") — only validate actual import statements.
$codeRef and Exposed Module ReferencesSkills may contain examples of console-extensions.json entries with $codeRef values, or reference exposed module patterns. For each $codeRef found:
moduleName.exportName (e.g., exampleFlag.handler)package.json for a matching exposed module name under consolePlugin.exposedModulesReport unresolvable $codeRef examples as info — they may be intentionally generic illustrations rather than references to real code.
Extract all yarn <script> and npm run <script> references from each skill file.
Compare each script name against the scripts object in frontend/package.json. Report any that do not exist.
Skip: yarn built-in commands (install, add, up, npm info, why, --version).
Extract references matching ./something.sh patterns. Verify each .sh file exists at the repo root. Report missing scripts with skill name and line number.
Skills may reference Claude Code tools by name (e.g., in instructions like "use the Read tool" or "call Grep"). Extract all words that appear to be tool references — look for capitalized names matching the pattern of Claude Code tool names, especially when preceded by words like "use", "call", "run", "the … tool", or appearing in backtick-quoted form.
Canonical tool names — self-maintaining approach:
Do NOT rely on a hardcoded list. Instead, introspect the tools available in the current session (they are listed in the system prompt as function definitions). Build the canonical set from those names at runtime. This ensures the audit stays current as Claude Code adds, renames, or removes tools.
As a fallback for known renames, maintain only the deprecated names table:
| Deprecated Name | Current Replacement |
|---|---|
TodoWrite | TaskCreate |
TodoRead | TaskGet / TaskList |
TodoUpdate | TaskUpdate |
For each tool name found in a skill file:
Skip:
mcp__).claude/settings.json and .claude/settings.local.json may contain hook definitions with shell commands that reference file paths (e.g., cat .claude/skills/..., bash .claude/scripts/...).
For each hook command:
.claude/, frontend/, ./, or other repo-relative prefixes)Skip: Commands that don't reference local file paths (e.g., echo, date, inline scripts with no file references).
Skills are referenced by name in CLAUDE.md, AGENTS.md (if present), STYLEGUIDE.md, TESTING.md, and .claude/settings.json / .claude/settings.local.json. Verify that every skill name mentioned in those files actually exists as a directory under .claude/skills/.
How to find skill references:
`gen-rtl-test` skill)/skill-name slash-command invocations (e.g., /plugin-api-review)ls .claude/skills/.claude/skills/Also check the reverse direction:
.claude/skills/, check whether it is referenced in any of the config files listed aboveSkip:
Output a summary grouped by skill, using severity levels to help prioritize fixes:
| Severity | Meaning | Examples |
|---|---|---|
| ERROR | Broken reference that will cause the skill to malfunction or give wrong guidance | Deprecated tool name in executable instructions, missing file that the skill tells Claude to read, invalid script reference |
| WARN | Likely stale but not immediately breaking | /deprecated PatternFly import, @console/internal path that may be alias-resolved, orphaned skill not referenced in config |
| INFO | Worth noting but low priority | Unresolvable $codeRef in a generic example, self-referencing skill name |
## Skill Audit Report
### skill-name (SKILL.md)
- [PASS] File path references: all 5 verified
- [ERROR] Missing file: `path/to/missing.md` (line 42)
- [PASS] Script references: all 3 verified
- [ERROR] Deprecated tool: `TodoWrite` -> use `TaskCreate` (line 7)
- [WARN] PatternFly deprecated import: `@patternfly/react-core/deprecated` (line 23)
- [PASS] Tool name references: all verified
### another-skill (SKILL.md, DOSSIER-TEMPLATE.md)
- [PASS] All checks passed
### Hook Commands (.claude/settings.json)
- [ERROR] Hook `pre-submit`: path `.claude/scripts/validate.sh` not found
- [PASS] Hook `post-submit`: all paths verified
### Cross-Reference: Config → Skills
- [PASS] `gen-rtl-test` referenced in CLAUDE.md line 11 → exists
- [ERROR] `old-skill` referenced in STYLEGUIDE.md line 85 → missing from .claude/skills/
### Cross-Reference: Skills → Config
- [WARN] `microcopy-review` exists but is not referenced in any config file
---
Summary: N skills audited | N errors, N warnings, N info | N skills clean
frontend/ directory