plugins/plugin-creator/skills/audit-skill-lifecycle/SKILL.md
Audit skill lifecycle by tracing call chains, detecting circular dependencies, finding instruction contradictions, identifying duplicated datasets, analyzing bidirectional coherence, discovering scriptable sequences, and learning patterns. Use when checking skill coherence, validating skill workflow, finding semantic gaps in plugin structure, or auditing plugin before marketplace submission. Generates audit reports to .claude/audits/ with findings by dimension.
npx skillsauth add jamie-bitflight/claude_skills audit-skill-lifecycleInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Deep semantic validation of how skills interconnect, what they load, what they produce, and whether the resulting call graph forms a coherent, non-contradictory workflow.
This audit traces every outbound reference from skills, agents, commands, and data files within a plugin to evaluate whether the resulting graph is coherent, complete, and non-redundant. It performs semantic validation beyond structural checks, answering whether the wiring makes sense given what each component claims to do.
This is NOT structural validation (that's what NamespaceReferenceValidator and /plugin-creator:assessor do). This is semantic validation of the skill lifecycle itself.
Invoke this skill when:
Scan plugin structure to identify all skills, agents, commands, and reference files. Build initial inventory:
Extract all Skill(skill:), Skill(skill=), Agent(command:), and @agent references to build outbound dependency graph.
Execute 7 audit dimensions as defined in references/skill-lifecycle-audit.md. Each dimension analyzes a different aspect of semantic coherence:
| Dimension | Checks | Output Type | |-----------|--------|-------------| | Call Chain Completeness | For each skill: does it load components that actually provide the capabilities it needs? | Call graph with annotations: SUPPORTED / PARTIAL / UNSUPPORTED / MISSING | | Bidirectional Lifecycle Coherence | For skills in same domain: are references bidirectional where expected? Do producers know about consumers? | Bidirectional reference matrix per domain with one-directional reference flags | | Circular Loading Detection | Trace all Skill() references to find direct/indirect cycles and self-references | List of cycles with full chain (A→B→C→A) | | Duplicated Datasets | Scan for identical/near-identical content blocks appearing in multiple skills (>10 lines, >80% similarity) | List of duplicated blocks with source locations and extraction recommendations | | Instruction Contradictions | Compare instructions across skills in same domain, detect opposing guidance, distinguish guarded vs unguarded contradictions | Contradiction pairs with file:line references and guard status | | Scriptable Command Sequences | Identify multi-step shell command patterns that parse output and make decisions | List of scriptable sequences with complexity reduction estimates | | Self-Referential Pattern Learning | Classify discovered issues by detection pattern, re-scan using new patterns until no new patterns emerge | patterns.md catalog with pattern definitions and all instances |
Write audit artifacts to .claude/audits/ directory:
audit-report-{slug}.md — Full findings organized by dimension with severity (error/warning/info)call-graph-{slug}.md — Visual call graph (mermaid format) with annotationspatterns.md — Self-referential pattern catalog updated with newly discovered patterns from this auditrecommendations.md — Prioritized actionable fixesEach finding includes:
For each skill, verify:
Returns call graph per skill with capability match annotations.
For each skill in a domain (e.g., "Python code quality"):
Example: If stinkysnake identifies code smells and delegates remediation, does the remediation agent know to invoke stinkysnake when doing code quality review? If not, lifecycle has a gap.
Returns bidirectional reference matrix per domain with one-directional reference flags.
Trace all Skill(skill:) and Skill(skill=) references to build directed graph. Identify:
Returns list of cycles with full chain notation.
Scan all skill bodies and reference files for:
Threshold: Content blocks greater than 10 lines appearing in 2 or more skills with greater than 80% similarity.
Returns list of duplicated blocks with source locations and recommendation for extraction.
Compare instructions across skills operating in same domain:
Guarded contradictions (acceptable):
List[str] type hints" (within Python 3.9 compatibility section)list[str] type hints" (within Python 3.11+ section)Unguarded contradictions (errors):
Dict[str, Any] for type hints"dict[str, Any] for type hints"Returns contradiction pairs with file:line references and guard status.
Identify patterns where skill instructs AI to:
These multi-step command sequences are candidates for wrapping in Python script that handles argument validation, environment checks (tool availability, correct versions), proper error handling, and structured output.
Returns list of scriptable sequences with steps involved, file:line location, and estimated complexity reduction.
As audit discovers issues:
Returns patterns.md file listing all discovered patterns with: pattern name, description, detection heuristic, and all instances found.
Not all issues require same depth of analysis. The audit uses 3-tier approach:
When Tier 2 identifies potential problem requiring domain expertise:
Each specialist delegation returns verdict: CONFIRMED_ISSUE, FALSE_POSITIVE, or NEEDS_HUMAN_REVIEW.
The audit produces artifacts in .claude/audits/:
# Skill Lifecycle Audit Report
Plugin: {plugin-name}
Date: {timestamp}
Auditor: audit-skill-lifecycle
## Summary
- Total skills audited: {N}
- Total findings: {N} ({errors} errors, {warnings} warnings, {info} info)
- Cycles detected: {N}
- Contradictions found: {N} unguarded, {N} guarded
- Duplicated blocks: {N}
- Scriptable sequences: {N}
- Patterns discovered: {N}
## Findings by Dimension
### 1. Call Chain Completeness
[Findings with file:line, severity, description]
### 2. Bidirectional Lifecycle Coherence
[Findings with file:line, severity, description]
[... remaining dimensions ...]
## Patterns Discovered
[Reference to patterns.md with newly discovered patterns]
## Recommendations
[Prioritized list - see recommendations.md for details]
Visual call graph using mermaid syntax showing skills, agents, commands, and their dependencies with annotations for capability match status.
Self-referential pattern catalog updated with patterns discovered during this audit run. Includes pattern name, description, detection heuristic, and all instances across all audited plugins.
Prioritized actionable fixes:
references/skill-lifecycle-audit.md — detailed audit dimension definitions, detection strategies, tier implementation guidance, and examples of each finding typeNamespaceReferenceValidator in pre-commit hook)skilllint)/plugin-creator:assessor (which does structural assessment for refactoring planning)This audit answers: "Given that all files exist and all references resolve, does the resulting system actually work as a coherent whole?"
development
When an application needs to store config, data, cache, or state files. When designing where user-specific files should live. When code writes to ~/.appname or hardcoded home paths. When implementing cross-platform file storage with platformdirs.
testing
Enforce mandatory pre-action verification checkpoints to prevent pattern-matching from overriding explicit reasoning. Use this skill when about to execute implementation actions (Bash, Write, Edit) to verify hypothesis-action alignment. Blocks execution when hypothesis unverified or action targets different system than hypothesis identified. Critical for preventing cognitive dissonance where correct diagnosis leads to wrong implementation.
tools
Reference guide for the Twelve-Factor App methodology — 15 principles (12 original + 3 modern extensions) for building portable, resilient, cloud-native applications. Use when evaluating application architecture, designing cloud-native services, reviewing codebases for methodology compliance, advising on configuration, scaling, observability, security, and deployment patterns. Incorporates the 2025 open-source community evolution and cloud-native reinterpretations of each factor.
tools
Converts user-facing documentation (how-to guides, tutorials, API references, examples) in any format — Markdown, PDF, DOCX, PPTX, XLSX, AsciiDoc, RST, HTML, Jupyter notebooks, man pages, TOML/YAML/JSON configs, and plain text — into Claude Code skill directories with SKILL.md plus thematically grouped references/*.md files. Use when given a docs directory or mixed-format documentation to transform into an AI skill. Uses MCP file-reader server for binary formats.