From claude-ecosystem
Audits skills and memory files for docs-management delegation compliance in Claude Code projects. Detects hardcoded data like hook events and verifies delegation patterns with smart filtering.
npx claudepluginhub melodic-software/claude-code-plugins --plugin claude-ecosystemThis skill is limited to using the following tools:
Audit skills and memory files for docs-management delegation compliance.
Audits Claude Code skills for quality, compliance, delegation patterns, and maintainability. Run after creating skills, before releases, or for periodic checks.
Audits Claude Code project configuration for drift and collaboration issues across six layers (CLAUDE.md, rules, skills, hooks, subagents, verifiers), tiered by project complexity.
Performs read-only static security audits of Claude Code skills, commands, and plugins. Analyzes SKILL.md frontmatter, content, scripts, hooks for risks. Supports GitHub/URL fetches via WebFetch. Use for 'audit a skill' or safety reviews.
Share bugs, ideas, or general feedback.
Audit skills and memory files for docs-management delegation compliance.
Before auditing, initialize the environment:
.claude/temp/) exists.The ecosystem-health skill provides authoritative validation guidance (auto-loaded when this command runs).
| Argument | Description |
|---|---|
| (none) | Smart mode: audit modified, never-audited, or stale (>90 days) files |
--force | Audit ALL files regardless of status |
--plugin-only | Only audit local plugin skills |
--project-only | Only audit project files (.claude/skills/, .claude/memory/) |
skill-name | Audit specific skill(s) by name |
Search for files that may contain Claude Code references:
Skills:
plugins/*/skills/*/SKILL.md (local plugins).claude/skills/*/SKILL.md (project skills)Memory Files:
.claude/memory/*.md (project memory)plugins/*/skills/*/references/*.md (skill references)Audit Framework Files:
plugins/*/skills/*/references/audit-framework.md (audit validation rules)plugins/*/skills/*/references/*-criteria.md (validation criteria files)Exclusions (auto-exempt):
hooks.json files (configuration specification)hooks/*.py, hooks/*.sh (hook implementations)canonical/ directories (scraped documentation cache)plugins/tac/lessons/ (educational content)Build a list of discovered files with their scope (plugin, project) and full path.
Check for --force, --plugin-only, --project-only flags or specific skill names.
Build the audit queue based on discovered files and arguments:
Display audit mode (SMART or FORCE), targets discovered, and list each with scope and last modified date.
## Audit Plan
**Mode**: SMART
**Files discovered**: 15
1. [plugin:claude-ecosystem] skills/hook-management/SKILL.md
2. [plugin:claude-ecosystem] skills/skill-development/SKILL.md
3. [project] .claude/memory/workflows.md
...
**Will audit**: 8 files (7 skipped - recently audited)
For each file, spawn the docs-delegation-auditor subagent with the following context:
Run subagents in parallel batches of 3-5.
Subagents write findings to .claude/temp/ as both JSON (for recovery/aggregation) and markdown (for human review). The main conversation thread collects results and updates audit logs using its Write/Edit tools.
CRITICAL: After ALL audits complete, sync results to the audit log at .claude/audit/docs-delegation.md.
Report total files audited, results by scope, and details table. List any compliance issues with remediation steps.
## Audit Complete
### Summary
- **Total audited**: 8 files
- **COMPLIANT**: 5 (62%)
- **PARTIALLY COMPLIANT**: 2 (25%)
- **NON-COMPLIANT**: 1 (13%)
### Results
| Scope | File | Classification | Score |
| --- | --- | --- | --- |
| plugin | hook-management/SKILL.md | ✅ COMPLIANT | 95/100 |
| plugin | skill-development/SKILL.md | ✅ COMPLIANT | 100/100 |
| project | workflows.md | ⚠️ PARTIAL | 78/100 |
| plugin | lesson-014-analysis.md | ❌ NON-COMPLIANT | 65/100 |
### Issues Found
1. **lesson-014-analysis.md** (Score: 65)
- HIGH: Hardcoded `PreToolUse`, `PostToolUse` without delegation note
- Missing MANDATORY section
- **Action**: Add verification note pointing to docs-management
Files are scored out of 100 points with deductions for hardcoded patterns:
| Deduction | Amount | Condition |
|---|---|---|
| HIGH risk pattern | -15 each | Hardcoded without delegation note |
| MEDIUM risk pattern | -8 each | Hardcoded without delegation note |
| Missing MANDATORY section | -20 | File has hardcoded data but no delegation section |
| Missing verification notes | -15 | Hardcoded data without verification blockquote |
Thresholds:
These indicate hardcoded Claude Code information that should delegate to docs-management:
| Pattern | Example |
|---|---|
| Hook event types | PreToolUse, PostToolUse, SessionStart |
| YAML frontmatter fields (in prose) | allowed-tools, permissionMode, color |
| Settings keys | CLAUDE_HOOK_*, apiChoice, sandboxMode |
| Pattern | Example |
|---|---|
| GitHub issue references | #10437, #15326 |
| Model names with versions | Opus 4.5, claude-opus-4-5 |
| Token limits | 25K tokens, context window |
| Pattern | Description |
|---|---|
| Verification note | > **Documentation Verification:** blockquote |
| MANDATORY section | ## MANDATORY: or ## 🚨.*MANDATORY |
| Query pattern table | Table with docs-management query patterns |
| Skill reference | invoke the X-management skill |
| Pattern | Reason |
|---|---|
hooks.json event names | Configuration specification |
allowed-tools in YAML frontmatter | Self-specification |
tools in agent YAML frontmatter | Agent definition |
| Educational content | Instructional, not authoritative |
canonical/ directories | Scraped docs cache |
All audit results are written to .claude/audit/docs-delegation.md.
Use /audit-log docs-delegation to view current audit status.
User: /audit-docs-delegation
Claude: Discovering audit targets...
## Audit Plan
**Mode**: SMART
**Files discovered**: 25
1. [plugin:claude-ecosystem] skills/hook-management/SKILL.md
2. [plugin:claude-ecosystem] skills/skill-development/SKILL.md
3. [plugin:tac] analysis/lesson-014-analysis.md
...
**Will audit**: 12 files (13 skipped - recently audited)
[Spawns docs-delegation-auditor subagents]
## Audit Complete
| Scope | File | Classification | Score |
| --- | --- | --- | --- |
| plugin | hook-management/SKILL.md | ✅ COMPLIANT | 95/100 |
User: /audit-docs-delegation --force
Claude: Auditing all files (force mode)...
User: /audit-docs-delegation hook-management
Claude: Auditing hook-management skill...
User: /audit-docs-delegation --plugin-only
Claude: Auditing plugin skills only...