Analyzes Claude Code project structure detecting architectural patterns and anti-patterns by executing detection scripts
Executes detection scripts to analyze Claude Code project structure for architectural patterns and anti-patterns. Used when auditing projects for compliance issues, workflow violations, or optimization opportunities.
/plugin marketplace add fractary/claude-plugins/plugin install fractary-faber-agent@fractaryThis skill inherits all available tools. When active, it can use any tool Claude has access to.
scripts/calculate-context-load.shscripts/detect-direct-skill-commands.shscripts/detect-director-as-agent.shscripts/detect-director-patterns.shscripts/detect-manager-as-skill.shscripts/detect-project-specific-director.shscripts/detect-project-specific-manager.shscripts/detect-response-format-compliance.shscripts/detect-workflow-logging.shscripts/inspect-structure.shscripts/run-all-detections.shAll detection is done by bash scripts in the scripts/ directory. You execute the scripts and return their output.
</CONTEXT>
<CRITICAL_RULES>
Run all detection scripts and return comprehensive audit results.
Input:
project_path: Path to Claude Code project rootExecute:
bash plugins/faber-agent/skills/project-analyzer/scripts/run-all-detections.sh {project_path}
Output: JSON from script containing:
summary.compliance_score: Overall compliance percentagesummary.total_violations: Count of all violationssummary.by_severity: Breakdown by error/warning/infodetections.*: Results from each detection scriptstructure: Project structure infoDetect project-specific director skills - these are anti-patterns and BLOCK workflows.
Input:
project_path: Path to Claude Code project rootExecute:
bash plugins/faber-agent/skills/project-analyzer/scripts/detect-project-specific-director.sh {project_path}
Detection Logic:
*-director/SKILL.md patternfaber-director)-direct suffixOutput: JSON with:
{
"status": "error|clean",
"rule_id": "ARC-006",
"severity": "error",
"message": "Project-specific director detected - use core faber-director instead",
"violations": [
{
"file": "skills/{project}-director/SKILL.md",
"line": null,
"description": "Project-specific director skill",
"migration_proposal": {
"action": "delete",
"replacement": "Use core faber-director with workflow config",
"workflow_config_example": "..."
}
}
]
}
Detect project-specific manager agents - these are anti-patterns and BLOCK workflows.
Input:
project_path: Path to Claude Code project rootExecute:
bash plugins/faber-agent/skills/project-analyzer/scripts/detect-project-specific-manager.sh {project_path}
Detection Logic:
*-manager.md patternfaber-manager)Output: JSON with:
{
"status": "error|clean",
"rule_id": "ARC-007",
"severity": "error",
"message": "Project-specific manager detected - use core faber-manager with workflow config",
"violations": [
{
"file": "agents/{project}-manager.md",
"line": null,
"description": "Project-specific manager agent",
"migration_proposal": {
"action": "delete",
"replacement": "Use core faber-manager with workflow config",
"workflow_config": {
"id": "{project}-workflow",
"phases": "..."
},
"invocation": "/faber run <id> --workflow {project}-workflow"
}
}
]
}
Scan project and collect structural information.
Input:
project_path: Path to Claude Code project rootExecute:
bash plugins/faber-agent/skills/project-analyzer/scripts/inspect-structure.sh {project_path}
Output: JSON with agents, skills, commands counts and locations.
Detect Manager-as-Skill anti-pattern.
Input:
project_path: Path to Claude Code project rootExecute:
bash plugins/faber-agent/skills/project-analyzer/scripts/detect-manager-as-skill.sh {project_path}
Output: JSON with detection results.
Detect Director-as-Agent anti-pattern.
Input:
project_path: Path to Claude Code project rootExecute:
bash plugins/faber-agent/skills/project-analyzer/scripts/detect-director-as-agent.sh {project_path}
Output: JSON with detection results.
Detect missing workflow event logging in manager agents (AGT-005).
Input:
project_path: Path to Claude Code project rootExecute:
bash plugins/faber-agent/skills/project-analyzer/scripts/detect-workflow-logging.sh {project_path}
Output: JSON with detection results.
Detect commands that invoke skills directly instead of routing through manager (CMD-004).
Input:
project_path: Path to Claude Code project rootExecute:
bash plugins/faber-agent/skills/project-analyzer/scripts/detect-direct-skill-commands.sh {project_path}
Output: JSON with detection results.
Detect missing director argument patterns (ARC-004).
Input:
project_path: Path to Claude Code project rootExecute:
bash plugins/faber-agent/skills/project-analyzer/scripts/detect-director-patterns.sh {project_path}
Output: JSON with detection results.
Calculate context token load and optimization opportunities.
Input:
project_path: Path to Claude Code project rootExecute:
bash plugins/faber-agent/skills/project-analyzer/scripts/calculate-context-load.sh {project_path}
Output: JSON with context load analysis.
</OPERATIONS> <DOCUMENTATION> Upon completion, output: ``` ✅ COMPLETED: Project Analyzer Project: {project_path} Results returned to agent ``` </DOCUMENTATION><ERROR_HANDLING> Project not found:
{"status": "error", "error": "project_not_found", "message": "Directory does not exist"}
Not a Claude Code project:
{"status": "error", "error": "invalid_project", "message": ".claude/ directory not found"}
Script failed:
{"status": "error", "error": "script_failed", "message": "Script execution error"}
</ERROR_HANDLING>