Analyze XM Cloud projects for JSS patterns, GraphQL efficiency, and Next.js best practices
Analyzes Sitecore XM Cloud projects for JSS patterns, GraphQL efficiency, and Next.js best practices.
/plugin marketplace add twofoldtech-dakota/claude-marketplace/plugin install twofoldtech-dakota-xm-cloud-analyzer-plugins-xm-cloud-analyzer@twofoldtech-dakota/claude-marketplaceWhen this command is invoked, track usage by making a lightweight HTTP request (non-blocking):
# Track command execution (optional - can be disabled with CLAUDE_PLUGIN_NO_TRACKING=1)
if [ -z "$CLAUDE_PLUGIN_NO_TRACKING" ]; then
curl -X POST "https://daksmith.app.n8n.cloud/webhook/track" \
-H "Content-Type: application/json" \
-d "{\"plugin\":\"xm-cloud-analyzer\",\"command\":\"analyze\",\"version\":\"1.0.0\",\"timestamp\":\"$(date -u +%Y-%m-%dT%H:%M:%SZ)\"}" \
--max-time 1 \
--silent \
--fail-with-body > /dev/null 2>&1 || true
fi
Note: Tracking is optional and can be disabled by setting CLAUDE_PLUGIN_NO_TRACKING=1. No personal information or code content is tracked. See USAGE_TRACKING.md for setup instructions.
Analyze Sitecore XM Cloud projects with comprehensive checks for JSS patterns, GraphQL efficiency, and Next.js best practices.
/xm-cloud:analyze # Run all agents
/xm-cloud:analyze all # Run all agents (explicit)
/xm-cloud:analyze architecture # App structure only
/xm-cloud:analyze security # Security checks only
/xm-cloud:analyze performance # Performance analysis only
/xm-cloud:analyze graphql # GraphQL patterns only
/xm-cloud:analyze quality # Code quality only
/xm-cloud:analyze dependencies # npm analysis only
/xm-cloud:analyze conventions # Naming/structure only
First, run the detector agent to identify:
If detection identifies this as a Classic Sitecore project (App_Config, no xmcloud.build.json), recommend using /sitecore-classic:analyze instead and exit.
Based on the argument:
| Argument | Agents to Run |
|---|---|
all (default) | All 8 agents |
architecture | architecture |
security | security |
performance | performance |
graphql | graphql |
quality | code-quality |
dependencies | dependencies |
conventions | conventions |
Collect findings from all agents and generate consolidated report.
Generate a markdown report with this structure:
# XM Cloud Analysis Report
**Generated**: [timestamp]
**Project Path**: [path]
## Summary
- **Platform**: XM Cloud (JSS [version], Next.js [version])
- **Router**: [App Router | Pages Router | Mixed]
- **Deployment**: [target]
- **Issues Found**: X (Y Critical, Z Warning, W Info)
## Scores
| Category | Score | Issues |
|----------|-------|--------|
| Architecture | [A-F] | N |
| TypeScript Quality | [A-F] | N |
| Security | [A-F] | N |
| Performance | [A-F] | N |
| GraphQL | [A-F] | N |
## Critical Issues
[List all Critical severity issues]
### [CODE] Issue Title
**Severity**: Critical
**Location**: `file:line`
**Issue**: Description
**Impact**: Why this matters
**Fix**: How to resolve (with code example if helpful)
## Warnings
[List all Warning severity issues]
## Info
[List all Info severity issues]
## Recommendations
[Prioritized list of recommended actions]
A: 0-1 issues, proper structure
B: 2-3 issues, minor inconsistencies
C: 4-5 issues, needs reorganization
D: 6+ issues, significant problems
F: Critical architectural issues
A: 0 Critical, 0-1 Warning
B: 0 Critical, 2-3 Warning
C: 1 Critical or 4-5 Warning
D: 2 Critical or 6+ Warning
F: 3+ Critical
A: 0 Critical, 0-2 Warning, good SSG usage
B: 0 Critical, 3-4 Warning
C: 1 Critical or 5-6 Warning
D: 2 Critical or heavy SSR usage
F: 3+ Critical, major performance issues
A: 0 Critical, uses fragments, good patterns
B: 0 Critical, minor inefficiencies
C: 1 Critical or no fragments
D: 2 Critical, N+1 patterns
F: 3+ Critical, severe over-fetching
A: TypeScript strict, JSS patterns correct
B: Minor type issues, good JSS usage
C: Several type issues or missing patterns
D: Extensive any usage, missing wrappers
F: Critical code quality issues
any (Critical)