Review and validate a Claude Agent SDK application against best practices
Validates Claude Agent SDK applications against best practices and provides fixes.
/plugin marketplace add basher83/lunar-claude/plugin install python-tools@lunar-claudepath-to-appYou are tasked with reviewing a Claude Agent SDK (Python) application to ensure it follows SDK best practices and official documentation patterns. Follow these steps carefully:
Before starting, load the claude-agent-sdk skill to access patterns, examples, and the validation checklist:
# Load the skill for comprehensive SDK knowledge
/skill claude-agent-sdk
The skill provides:
assets/sdk-validation-checklist.md (comprehensive review guide)SKILL.md and references/ (official best practices)examples/ (reference implementations)assets/sdk-template.py (ideal structure)You have TWO options for reviewing SDK applications:
Launch the agent-sdk-verifier-py subagent for comprehensive automated review:
# The subagent will:
# - Read all application files
# - Check SDK patterns and configuration
# - Validate against official documentation
# - Provide detailed report with specific issues and recommendations
Best for:
Follow the validation checklist step-by-step with guided assistance.
Best for:
Ask the user (if not provided via $ARGUMENTS):
Application path: "What is the path to your SDK application?"
Review type: "Would you like:
If user chooses automated validation:
Launch verifier agent:
agent-sdk-verifier subagentReview the report:
Address issues:
Re-validate if changes made:
If user chooses manual review, systematically work through the validation
checklist (assets/sdk-validation-checklist.md):
Read the application files and check:
Ask user: "Found any issues with imports? (Y/N)"
If yes, explain the issue and show correct pattern from skill examples.
Check:
anyio.run() or asyncio.run())Ask user: "Found any issues with async patterns? (Y/N)"
Check:
Ask user: "Is the query()/ClaudeSDKClient choice appropriate? (Y/N)"
If no, explain when to use each approach (reference SKILL.md lines 29-44).
Check:
"claude_code" for orchestratorsAsk user: "Found any orchestrator configuration issues? (Y/N)"
Check:
Ask user: "Found any agent definition issues? (Y/N)"
Check:
Ask user: "Found any permission issues? (Y/N)"
Check:
Ask user: "Found any hook issues? (Y/N)"
Check:
Ask user: "Found any ClaudeSDKClient usage issues? (Y/N)"
Check:
Ask user: "Found any message handling issues? (Y/N)"
Check:
Ask user: "Found any error handling issues? (Y/N)"
Check:
Ask user: "Found any configuration issues? (Y/N)"
Check:
Ask user: "Found any best practice violations? (Y/N)"
After completing all sections, provide:
## Validation Summary
### ✅ Passed Checks:
- [List of passed checks]
### ❌ Issues Found:
- [List of issues with severity: CRITICAL | WARNING | INFO]
### 🔧 Fixes Required:
1. [Specific fix with file:line reference and code example]
2. [Specific fix with file:line reference and code example]
### 📊 Overall Assessment:
- **SDK Pattern Adherence**: [High/Medium/Low]
- **Production Ready**: [Yes/No/With Fixes]
- **Recommended Next Steps**: [Specific actions]
For each issue identified:
Explain the problem:
Show the correct pattern:
Provide specific fix:
After review:
Offer to implement fixes:
Suggest re-validation:
Recommend next steps:
assets/sdk-validation-checklist.md is your comprehensive guideexamples/ directoryAlways check these common issues:
"claude_code"agents={} parameteranyio.run() or asyncio.run()async with.get() for optional fieldsBegin by asking about the application path (if not provided) and review type preference.