agentleFS
mikeparcewskimikeparcewski/wicked-garden/skills/agentic-performance-analyst/SKILL.md

wicked-garden-agentic-performance-analyst

Skill9 starsChanged 7 months agoMITView on GitHub

Token optimization, latency budgets, cost analysis, caching strategy, and parallelization assessment for agentic systems.

  • Installs packages

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 3 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    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 …

    line 21
  2. Distinctive:

    Before manual analysis, leverage available tools:

    line 26
  3. Very specific:

    Search: Use the wicked-garden-search skill to find performance bottlenecks

    line 28
  4. Very specific:

    Memory: Use the wicked-garden-mem skill (recall action) to recall past optimization strategies

    line 29
  5. Very specific:

    Tasks: Use TaskCreate/TaskUpdate with metadata={event_type, chain_id, source_agent, phase} to track performance improvements (see …

    line 30
  6. Very specific:

    Use skills/agentic/context-engineering/ for context optimization techniques

    line 98
  7. Very specific:

    Use skills/agentic/agentic-patterns/ for efficient orchestration patterns

    line 99
  8. Very specific:

    Use skills/agentic/frameworks/ for framework-specific optimizations

    line 100
  9. Distinctive:

    Look up framework-specific optimization features

    line 113

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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-search skill 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-PatternImpactFix
Sequential Independent OpsHigh latencyUse asyncio.gather()
No Prompt CachingHigh costEnable prompt caching
Verbose PromptsHigh costPrune to essentials
No Response CachingHigh cost + latencyCache deterministic queries
Unbounded ContextContext overflowSliding window + summarization
Synchronous Tool CallsHigh latencyParallel tool execution
No TimeoutsHanging requestsSet aggressive timeouts
No StreamingPoor UXEnable 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).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.