一键导入
enhance-cross-file
Use when checking cross-file consistency: tools vs frontmatter, agent references, duplicate rules, contradictions.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when checking cross-file consistency: tools vs frontmatter, agent references, duplicate rules, contradictions.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when user asks to "discover tasks", "find next task", "prioritize issues", "what should I work on", or "list open issues". Discovers and ranks tasks from GitHub, GitLab, local files, and custom sources.
Use when preparing releases, validating cross-platform compatibility, or updating installation infrastructure. Meta-skill for maintaining AgentSys's 3-platform architecture.
Use when user asks to "run repo intel", "generate repo map", "analyze repo", "query hotspots", "check ownership", or "bus factor". Unified static analysis - git history, AST symbols, project metadata.
Use when mapping code paths, entrypoints, and likely hot files before profiling.
Use when generating performance hypotheses backed by git history and code evidence.
Cross-tool AI consultation. Use when user asks to 'consult gemini', 'ask codex', 'get second opinion', 'cross-check with claude', 'consult another AI', 'ask opencode', 'copilot opinion', or wants a second opinion from a different AI tool.
| name | enhance-cross-file |
| description | Use when checking cross-file consistency: tools vs frontmatter, agent references, duplicate rules, contradictions. |
| version | 5.1.0 |
| argument-hint | [path] |
Analyze cross-file semantic consistency across agents, skills, and workflows.
const args = '$ARGUMENTS'.split(' ').filter(Boolean);
const targetPath = args.find(a => !a.startsWith('--')) || '.';
Detects issues that span multiple files - things single-file analysis misses:
Run Analyzer - Execute the JavaScript analyzer to get findings:
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')
Parse Results - The analyzer returns JSON with summary and findings
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.
tool_not_in_allowed_list: Tool used in prompt body but not in frontmatter tools: list
# 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
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
duplicate_instructions: Same MUST/NEVER instruction in 3+ files (extract to shared location)
contradictory_rules: One file says "ALWAYS X" while another says "NEVER X"
## Cross-File Analysis
**Files Analyzed**: {agents} agents, {skills} skills, {commands} commands
### Tool Consistency ({n})
| Agent | Issue | Fix |
|-------|-------|-----|
| exploration-agent | Uses Write but not in tools list | Add Write to frontmatter |
### Workflow Issues ({n})
| Source | Issue | Fix |
|--------|-------|-----|
| workflow.md | References nonexistent agent | Check spelling or create agent |
### Instruction Consistency ({n})
| Instruction | Files | Fix |
|-------------|-------|-----|
| "NEVER push --force" | 4 files | Extract to CLAUDE.md |
<bad-example>, <bad_example>, <badexample> tags| Category | Patterns | Auto-Fixable |
|---|---|---|
| Tool Consistency | 2 | 0 |
| Workflow | 3 | 0 |
| Consistency | 3 | 0 |
| Total | 8 | 0 |