Use when checking cross-file consistency: tools vs frontmatter, agent references, duplicate rules, contradictions.
View on GitHubFebruary 5, 2026
Select agents to install to:
npx add-skill https://github.com/avifenesh/awesome-slash/blob/main/plugins/enhance/skills/enhance-cross-file/SKILL.md -a claude-code --skill enhance-cross-fileInstallation paths:
.claude/skills/enhance-cross-file/# enhance-cross-file
Analyze cross-file semantic consistency across agents, skills, and workflows.
## Purpose
Detects issues that span multiple files - things single-file analysis misses:
- Tools used in prompt body but not declared in frontmatter
- Agent references that don't exist
- Duplicate instructions across files (maintenance burden)
- Contradictory rules (ALWAYS vs NEVER conflicts)
- Orphaned agents not referenced by any workflow
- Skill tool mismatches (allowed-tools vs actual usage)
## Workflow
1. **Run Analyzer** - Execute the JavaScript analyzer to get findings:
```bash
node -e "const a = require('./lib/enhance/cross-file-analyzer.js'); console.log(JSON.stringify(a.analyze('.'), null, 2));"
```
For a specific path: `a.analyze('./plugins/enhance')`
2. **Parse Results** - The analyzer returns JSON with `summary` and `findings`
3. **Report** - Return findings grouped by category
The JavaScript analyzer (`lib/enhance/cross-file-analyzer.js`) implements all cross-file detection. The patterns below are reference documentation.
## Detection Patterns
### 1. Tool Consistency (MEDIUM Certainty)
**tool_not_in_allowed_list**: Tool used in prompt body but not in frontmatter `tools:` list
```yaml
# Frontmatter declares:
tools: Read, Grep
# But body uses:
Use Write({ file_path: "/out" }) # <- Not declared!
```
**skill_tool_mismatch**: Skill's `allowed-tools` doesn't match actual tool usage in skill body
### 2. Workflow Consistency (MEDIUM Certainty)
**missing_workflow_agent**: `subagent_type: "plugin:agent-name"` references non-existent agent
**orphaned_prompt**: Agent file exists but no workflow references it (may be entry point - check manually)
**incomplete_phase_transition**: Workflow phase mentions "Phase N" but no corresponding section
### 3. Instruction Consistency (MEDIUM Certainty)
**duplicate_instructions**: Same MUST/NEVER instruction in 3+ files (extract to shared location)
**contradictory_rules**: One file says "ALWAYS X" w