Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Workflow Optimizer

ASecurity

Use when Analyzes agent tool-calling patterns and task execution efficiency to suggest process improvements.

5 stars
0 votes
0 copies
1 views
Added 9/27/2026
ai-agentsgobash

Security Analysis

A100/100

Scanned 9/27/2026

$npx -y skills add Harmitx7/tribunal-kit --skill workflow-optimizer --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Workflow Optimizer?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Workflow Optimizer
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/harmitx7-workflow-optimizer-tribunal-kit/badge)](https://www.skillsdirectory.com/skills/harmitx7-workflow-optimizer-tribunal-kit)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: workflow-optimizer
description: "Use when Analyzes agent tool-calling patterns and task execution efficiency to suggest process improvements."
version: 5.0.0
last-updated: 2026-09-13
skills:
  - parallel-agents
  - plan-writing
  - fabel-protocol
tools: Read, Grep, Glob, Bash, Edit, Write
scripts-binding:
  - .agent/scripts/verify_all.js
  - .agent/scripts/checklist.js
  - .agent/scripts/lint_runner.js
---

# Workflow Optimizer Skill

---

## šŸ› ļø Technical Architecture & Reference Recipes

---

## When to Activate

- When a task takes significantly more tool calls than expected.
- When the user asks to "optimize workflow", "reduce steps", or "speed up the agent".
- During retrospective analysis of completed multi-step tasks.
- After a complex `/orchestrate` or `/swarm` dispatch to review efficiency.
- When context window pressure is detected (truncated responses, missed context).

## Analysis Framework

### 1. Tool Call Pattern Analysis

Examine a sequence of tool calls and classify each into:

| Pattern                 | Description                                         | Waste Level | Fix                                       |
| ----------------------- | --------------------------------------------------- | ----------- | ----------------------------------------- |
| **Redundant Read**      | File read multiple times without changes            | šŸ”“ High     | Cache the content; read once              |
| **Blind Search**        | `grep_search` or `find_by_name` when path was known | 🟔 Medium   | Use `view_file` directly                  |
| **Serial Bottleneck**   | Independent calls made sequentially                 | šŸ”“ High     | Parallelize with concurrent calls         |
| **Ping-Pong Edit**      | Multiple `replace_file_content` on same file        | 🟔 Medium   | Combine into `multi_replace_file_content` |
| **Over-Read**           | `view_file` full file when only one function needed | 🟔 Medium   | Use `view_code_item` or line ranges       |
| **Unnecessary Outline** | `view_file_outline` on a file already fully read    | 🟢 Low      | Skip — content already in context         |
| **Search Then Read**    | `grep_search` → `view_file` → `view_code_item`      | 🟔 Medium   | Skip directly to relevant tool            |
| **Repeated Status**     | Multiple `command_status` calls before completion   | 🟢 Low      | Use `WaitDurationSeconds` parameter       |
| **Task Churn**          | `task_boundary` called every single tool call       | 🟔 Medium   | Update every 3-5 tool calls               |
| **Context Dump**        | Reading entire large files into context             | šŸ”“ High     | Targeted reads with line ranges           |

### 2. Parallelism Opportunity Detection

Identify tool calls that have no data dependencies and should run simultaneously:

```
šŸ”“ Serial (Wastes Time):
  Step 1: view_file(A.ts)     → waits
  Step 2: view_file(B.ts)     → waits
  Step 3: view_file(C.ts)     → waits

🟢 Parallel (Optimal):
  Step 1: view_file(A.ts) + view_file(B.ts) + view_file(C.ts)  → all at once
```

**Dependency Rules:**

- Reads are always parallelizable with other reads.
- Writes to different files are parallelizable.
- Writes to the same file must be sequential.
- `run_command` results needed by next step → sequential.
- `task_boundary` should batch with the first tool call of the new phase.

### 3. Task Decomposition Review

Evaluate `task.md` and `task_boundary` usage:

| Issue               | Symptom                                                | Fix                                            |
| ------------------- | ------------------------------------------------------ | ---------------------------------------------- |
| **Too Granular**    | One `task_boundary` per tool call                      | Group into logical phases (3-8 calls per task) |
| **Too Broad**       | One task for entire request                            | Break into Planning → Execution → Verification |
| **Stale Summary**   | `TaskSummary` repeating same text                      | Accumulate new info each update                |
| **Backward Status** | `TaskStatus` describes what was _done_                 | Must describe what _will happen next_          |
| **Missing Mode**    | Never switches between PLANNING/EXECUTION/VERIFICATION | Use mode transitions to signal phase changes   |

### 4. Context Window Budget Analysis

| Metric              | Target               | Action if Exceeded                     |
| ------------------- | -------------------- | -------------------------------------- |
| Total lines read    | < 500 per task phase | Filter to relevant sections            |
| Files in context    | < 10 simultaneously  | Prioritize; drop stale reads           |
| Search results      | < 20 matches         | Narrow filters (`Includes`, `Pattern`) |
| File reads per file | 1 per phase          | Cache mentally; don't re-read          |
| Artifact updates    | < 5 per task         | Batch updates                          |

### 5. Error Recovery Efficiency

Analyze how errors are handled:

| Pattern                               | Efficiency        | Better Approach                      |
| ------------------------------------- | ----------------- | ------------------------------------ |
| Retry same command identically        | šŸ”“ Wasted         | Analyze error first, modify approach |
| Read error → re-read entire file      | 🟔 Inefficient    | Read only the relevant section       |
| Tool error → ask user                 | 🟔 Premature      | Try alternative approach first       |
| Build error → fix one issue → rebuild | 🟢 OK if targeted | Batch multiple fixes before rebuild  |

## Optimization Metrics

### Efficiency Score Formula

```
Raw Score = (Optimal Tool Calls / Actual Tool Calls) Ɨ 100

Adjusted Score = Raw Score Ɨ (1 - Parallelism Penalty)
  where Parallelism Penalty = (Serial Calls That Could Be Parallel / Total Calls) Ɨ 0.2

Grade:
  90-100%  →  A  (Excellent — near-optimal)
  75-89%   →  B  (Good — minor opportunities)
  60-74%   →  C  (Fair — several wasted calls)
  40-59%   →  D  (Poor — significant waste)
  < 40%    →  F  (Rework workflow strategy)
```

## Report Format

```
━━━ Workflow Optimization Report ━━━━━━━━━

Task:         [task name]
Tool Calls:   [actual] / [estimated optimal]
Efficiency:   [grade] ([percentage]%)
Parallelism:  [parallel calls] / [parallelizable opportunities]

━━━ Timeline ━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Phase 1: Planning (calls 1-5)
  1. āœ… view_file_outline(A.ts)          } parallel āœ…
  2. āœ… view_file_outline(B.ts)          }
  3. 🟔 view_file(A.ts) — full file read when only function needed
  4. āœ… grep_search("handleAuth")
  5. šŸ”“ view_file(A.ts) — redundant re-read

Phase 2: Execution (calls 6-12)
  6. āœ… task_boundary(EXECUTION)
  7. āœ… replace_file_content(A.ts)
  8. šŸ”“ replace_file_content(A.ts) — should batch with step 7
  9. āœ… write_to_file(test.ts)
  ...

━━━ Issues Found ━━━━━━━━━━━━━━━━━━━━━━━━

šŸ”“ Critical (wasted >3 calls)
  1. File A.ts read 3 times — Fix: read once, reference from context
  2. 4 serial reads could be 1 parallel batch — Fix: use concurrent calls

🟔 Warning (wasted 1-2 calls)
  1. Two edits to A.ts back-to-back — Fix: use multi_replace_file_content
  2. task_boundary called 8 times for 12 tool calls — Fix: update every 3-5 calls

🟢 Good Patterns Detected
  1. Used view_code_item instead of full file read for functions
  2. Parallelized independent grep_searches

━━━ Recommendations ━━━━━━━━━━━━━━━━━━━━━
  • Save 3 calls by batching file reads
  • Save 2 calls by using multi_replace over sequential replaces
  • Save 1 call by removing redundant re-read
  • Estimated optimal: 9 calls instead of 14 (64% → 100% efficiency)
```

## Quick Win Checklist

Before analyzing, check for these common quick wins:

- [ ] Are multiple `view_file` calls to different files batched in parallel?
- [ ] Is `multi_replace_file_content` used for non-contiguous edits in one file?
- [ ] Is `view_code_item` used instead of `view_file` for individual functions?
- [ ] Are `task_boundary` updates batched with the first tool call of a new phase?
- [ ] Is `command_status` using `WaitDurationSeconds` instead of polling?
- [ ] Are search results filtered with specific `Includes` and `Pattern`?

## Anti-Hallucination Guard

- **Only analyze actual tool call logs** — never invent or assume tool calls that didn't happen.
- **Recommendations must reference real tools** — only suggest tools available in the current environment.
- **Never fabricate efficiency scores** — always calculate from actual vs optimal counts.
- **Acknowledge uncertainty**: "Cannot determine if calls 3-5 had data dependency — may be correctly sequential."

Attribution

Harmitx7Harmitx7
View sourceSee grades on GitHubMore from Harmitx7 →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Terse caveman voice: answer first, fluff gone, every technical fact kept. Use for /caveman, "caveman mode", "talk like caveman", "be brief", "less tokens". Stays on until "stop caveman" or "normal mode".

1100021 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

698431 votes

Writing Skills

Create and manage Claude Code skills in HASH repository following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns), UserPromptSubmit hook, and the 500-line rule. Includes validation and debugging with SKILL_DEBUG. Examples include rust-error-stack, cargo-dep...

3931 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3421 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Amp, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Grok Build, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

741 votes
View all in ai-agents →