enhance-cross-file
FeaturedUse when checking cross-file consistency: tools vs frontmatter, agent references, duplicate rules, contradictions.
AI & Automation 967 stars
111 forks Updated 4 days ago MIT
Install
Quality Score: 96/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# enhance-cross-file
Analyze cross-file semantic consistency across agents, skills, and workflows.
## Parse Arguments
```javascript
const args = '$ARGUMENTS'.split(' ').filter(Boolean);
const targetPath = args.find(a => !a.startsWith('--')) || '.';
```
## 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 decl...
Details
- Author
- agent-sh
- Repository
- agent-sh/agentsys
- Created
- 7 months ago
- Last Updated
- 4 days ago
- Language
- JavaScript
- License
- MIT
Integrates with
Bundled in these plugins
Similar Skills
Semantically similar based on skill content — not just same category
AI & Automation Featured
enhance-agent-prompts
Use when improving agent prompts, frontmatter, and tool restrictions.
967 Updated 4 days ago
agent-sh AI & Automation Featured
enhance-plugins
Use when analyzing plugin structures, MCP tools, and plugin security patterns.
967 Updated 4 days ago
agent-sh AI & Automation Featured
enhance-prompts
Use when improving general prompts for structure, examples, and constraints.
967 Updated 4 days ago
agent-sh