Skip to content
Skills Library
AI & agents · Analysis

agent-workflow-bottleneck-optimization

/agent-workflow-bottleneck-optimization

Use this skill when analyzing agent execution timelines, tool latency, and token overhead to streamline and accelerate workflows.

Licence
MIT
Last repository change
28.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 28.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Use this skill when analyzing agent execution timelines, tool latency, and token overhead to streamline and accelerate workflows.

Original author description

Use this skill when analyzing agent execution timelines, tool latency, and token overhead to streamline and accelerate workflows.

How it works

  1. When to use
  2. Core principles
  3. Step-by-step workflow
  4. Behavioral guidelines & dialogue examples
  5. Common mistakes & pitfalls
  6. Verification checklist
  7. Related skills
Original SKILL.md headings · 43 lines, 411 words
SKILL.md preview
---
name: agent-workflow-bottleneck-optimization
description: Use this skill when analyzing agent execution timelines, tool latency, and token overhead to streamline and accelerate workflows.
---
# Agent Workflow Bottleneck Optimization

## When to use
Use this skill when multi-step agent workflows are sluggish, CI pipeline triage takes excessive time, token budgets are consistently exceeded, or tool calls experience high latency.

## Core principles
- **Amdahl's Law in Agent Workflows**: Optimizing a fast step yields negligible gains; real speedups come from eliminating the single slowest serial bottleneck (e.g., redundant shell spins, huge file reads).
- **Parallelism vs. Sequential Chains**: Independent verification checks, static analyses, and search queries should execute concurrently rather than sequentially.
- **Caching Immutable Context**: Re-reading identical configuration files or documentation pages across multiple turns is pure waste; cache once in working memory.
- **Surgical Tool Selection**: Using a heavyweight browser automation tool when a lightweight `fetch` or `curl` call suffices introduces 10x latency and memory overhead.

## Step-by-step workflow
1. **Instrument workflow timing**: Measure elapsed duration and token consumption for each step in the pipeline.
2. **Identify the critical path bottleneck**: Find the step accounting for > 50% of total execution time or context usage.
3. **Analyze root cause of delay**: Determine if the bottleneck stems from network latency, serial execution, oversized payloads, or redundant tool calls.
4. **Apply optimization pattern**:
   - Batch independent tool calls.
   - Replace bulk file reads with targeted grep searches.
   - Substitute lightweight tools for heavyweight runtimes.
5. **Benchmark optimized workflow**: Re-run the task and verify latency and token reductions without sacrificing accuracy.

## Behavioral guidelines & dialogue examples
- **Optimization Case Study**:
  - *Before (Unoptimized)*: Agent sequentially called `view_file` on 20 individual files to check for an imported symbol. Total elapsed time: 42 seconds; token consumption: 38,000 tokens.
  - *After (Optimized)*: Agent called `grep_search(Query="import { AuthToken }", SearchPath="./src")` in a single tool call. Total elapsed time: 1.2 seconds; token consumption: 450 tokens (97% latency reduction, 98% token savings).

## Common mistakes & pitfalls
- Optimizing for speed at the expense of safety, skipping mandatory verification tests.
- Launching massive unconstrained parallel tool calls that exhaust rate limits or trigger API throttles.
- Guessing what is slow instead of measuring tool call durations.

## Verification checklist
- [ ] Execution bottlenecks are identified through concrete timing and token measurements.
- [ ] Serial steps with no data dependencies are converted to concurrent executions.
- [ ] Heavyweight tool calls are replaced with lightweight alternatives where feasible.
- [ ] Optimization preserves 100% of safety invariants and output accuracy.

## Related skills
- agent-context-budget-management-strategies
- agent-task-decomposition-hierarchical-planning
- performance-and-observability
- dev-workflow-git-and-tooling

Versions

The database has no other skills named agent-workflow-bottleneck-optimization.

Database snapshot: 13.11.2026 · package version b292c3ad48f2 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100agent-evaluation
    Evaluate LLM agents and tool-using workflows—task success, tool accuracy, latency/cost, safety, and regression suites. Use when shipping agent features, comparing prompts/models, or debugging agent failures. Triggers: "agent eval", "benchmark agent", "tool accuracy", "agent regression".
  • 100prompt-optimizer
    Optimize prompts for token efficiency, latency, and output quality while preserving task behavior. Use when working on prompt engineering, AI workflows, agents, context design, or LLM optimization.
  • 100accelerate
    Use when the workflow is too slow, too expensive, or both and needs latency, cost, or token usage optimization.
  • 100instrument-llm-observability
    Use this when adding tracing/observability to an LLM or AI-agent application - capturing prompts, tool calls, token usage, latency, and cost per step. Trigger whenever someone wants to "add tracing", "instrument", "monitor", "see what my agent is doing", or debug an LLM app in…
  • 100agent-designer
    Designs multi-agent system architectures with orchestration patterns, tool schemas, and performance evaluation. Use when building AI agent systems, designing agent workflows, creating tool schemas, or evaluating agent performance.
  • 100cost-latency-optimization-prompt-caching
    Use this skill when reducing LLM token costs and inference latency using provider prompt caching, model cascades, and batch APIs.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.