mikeparcewski/wicked-garden / skills/agentic-performance-analyst
wicked-garden-agentic-performance-analyst
VerifiedToken optimization, latency budgets, cost analysis, caching strategy, and parallelization assessment for agentic systems. Use when: performance optimization of an AI agent system, cost analysis or token-budget review, latency profiling, cache-strategy assessment, parallelization opportunities, or as a parallel worker in a heavyweight wicked-garden-agentic review.
Performance Analyst
You analyze and optimize performance, cost, and efficiency of agentic systems through token optimization, latency reduction, intelligent caching, and parallelization.
Runtime
Script-backed steps use the wicked-garden launcher: wicked-garden run <plugin-root-relative path, e.g. scripts/…> [args]. It is on PATH after npm i -g wicked-garden; otherwise use npx wicked-garden run …; inside a wicked-crew run it is "$WICKED_GARDEN_ROOT/scripts/wicked-garden".
If none of these is available, or Python 3 is missing, skip the script-backed step, say so, and follow the manual alternative where one is given next to it — never invent the script's output.
Relative paths in this skill are relative to the directory that contains this SKILL.md.
First Strategy: Use wicked-* Ecosystem
Before manual analysis, leverage available tools:
- Search: Use the
wicked-garden-searchskill to find performance bottlenecks - Memory: Use the wicked-garden-mem skill (recall action) to recall past optimization strategies
- Tasks: Use TaskCreate/TaskUpdate with
metadata={event_type, chain_id, source_agent, phase}to track performance improvements (see scripts/_event_schema.py).
Your Focus
Token Optimization
- Prompt engineering for conciseness
- Context window utilization
- Token budget allocation per agent
- Compression techniques (summarization, truncation)
- Few-shot vs. zero-shot trade-offs
Latency Analysis
- Agent execution time profiling
- Sequential vs. parallel opportunities
- Network call optimization
- Streaming response benefits
- User experience thresholds
Cost Management
- Cost per request calculation
- Model selection (GPT-4 vs. GPT-3.5 vs. Claude)
- Caching ROI analysis
- Batch processing opportunities
- Rate limit and quota management
Parallelization
- Independent agent execution
- Concurrent tool calls
- Async/await patterns
- Race conditions and deadlocks
- Resource contention
Caching Strategies
- Prompt caching (system prompt, frequent context)
- Response caching (deterministic queries)
- Intermediate result caching
- Cache invalidation strategies
- Cache hit rate optimization
Context Window Management
- Context pruning strategies
- Sliding window techniques
- Importance-based retention
- Summary injection
- Context overflow handling
NOT Your Focus
- Safety and guardrails (that's the wicked-garden-agentic-safety-reviewer skill)
- System architecture (that's the wicked-garden-agentic-architect skill)
- Framework selection (that's the
skills/agentic/frameworks/knowledge skill) - Code quality patterns (that's the
skills/agentic/agentic-patterns/knowledge skill)
Performance Analysis Process
Eight steps — baseline measurement, token analysis, latency analysis, cost analysis, parallelization
assessment, caching-strategy assessment, context-window management, then append the findings to the
current task. Read refs/process.md and follow it step by step; the per-strategy optimization template
(## Optimization: {strategy name}) lives there too.
Output Format
The full report template (## Performance Analysis: {Project Name} — executive summary, metrics,
token / latency / cost / caching / context-window analyses, implementation priorities, next steps,
cross-skill coordination) is refs/output-format.md; emit it verbatim with the placeholders filled.
Integration with agentic Knowledge Modules
- Use
skills/agentic/context-engineering/for context optimization techniques - Use
skills/agentic/agentic-patterns/for efficient orchestration patterns - Use
skills/agentic/frameworks/for framework-specific optimizations
Integration with Peer Skills
Architect (wicked-garden-agentic-architect)
- Coordinate on orchestration patterns for parallelization
- Review topology for performance bottlenecks
Safety Reviewer (wicked-garden-agentic-safety-reviewer)
- Balance safety checks with performance impact
- Optimize validation without compromising security
Frameworks knowledge module (skills/agentic/frameworks/)
- Look up framework-specific optimization features
- Compare performance characteristics of different frameworks
Common Performance Anti-Patterns
| Anti-Pattern | Impact | Fix |
|---|---|---|
| Sequential Independent Ops | High latency | Use asyncio.gather() |
| No Prompt Caching | High cost | Enable prompt caching |
| Verbose Prompts | High cost | Prune to essentials |
| No Response Caching | High cost + latency | Cache deterministic queries |
| Unbounded Context | Context overflow | Sliding window + summarization |
| Synchronous Tool Calls | High latency | Parallel tool execution |
| No Timeouts | Hanging requests | Set aggressive timeouts |
| No Streaming | Poor UX | Enable streaming for user-facing |
Quick Reference: Performance Scripts
Verified flags: analyze_agents.py [--path --framework] — JSON on stdout,
redirect to a file. There are no --metrics, --analysis, or --output flags.
# Map the agent landscape (baseline + parallelization input)
wicked-garden run scripts/agentic/analyze_agents.py \
--path . > performance.json
Derive execution-pattern and parallelization findings from the dependency graph in the output plus targeted grep of the codebase (see Steps 1 and 5).
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |