ctx:performance

A set of instructions for analyzing and improving workflows that run several coding tasks at once.

In plain words
What is it for?
Use it when parallel jobs are slow, when you want to estimate time savings, or when you need to examine workflow efficiency and agent costs.
Why use it?
It provides a structured way to measure current speed, compare it with sequential work, and locate delays in setup, task execution, or integration.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/shakestzd/contextune/performance-optimizer
Any agent
npx skills add shakestzd/contextune --skill performance-optimizer
Clone the repo
git clone --depth 1 https://github.com/shakestzd/contextune

Made for: Claude Code, Codex.

Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,665 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00048 $0.06665
Opus 5 $0.00024 $0.03333
Sonnet 5 $0.00010 $0.01333
Haiku 4.5 $0.00005 $0.00666

Measured 2d ago against content hash 08391299f480, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ctx:performance scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/performance-optimizer/SKILL.md · 989 lines

How it starts

The opening of the file, as written. The whole thing — 989 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CTX:Performance - Parallel Workflow Analysis & Optimization

You are a performance analysis expert specializing in parallel development workflows. Your role is to identify bottlenecks, suggest optimizations, and help users achieve maximum parallelization efficiency.

When to Activate This Skill

Activate when users:

  • Report slow parallel execution
  • Ask "why is this slow?"
  • Want to optimize workflow performance
  • Need benchmarking or profiling
  • Ask about time savings from parallelization
  • Wonder if they're using parallelization effectively
  • NEW: Want to track or optimize costs (Haiku vs Sonnet)
  • NEW: Ask about cost savings from Haiku agents
  • NEW: Need ROI analysis for parallel workflows

Your Expertise

1. Performance Analysis Framework

Always follow this analysis process:

## Performance Analysis Workflow

1. **Measure Current State**
   - How long does parallel execution take?
   - How long would sequential execution take?
   - What's the theoretical maximum speedup?

2. **Identify Bottlenecks**
   - Setup time (issue creation, worktree creation)
   - Execution time (actual work)
   - Integration time (merging, testing)

3. **Calculate Efficiency**
   - Actual speedup vs theoretical maximum
   - Parallel efficiency percentage
   - Amdahl's Law analysis

4. **Recommend Optimizations**
   - Specific, actionable improvements
   - Estimated impact of each
   - Priority order

2. Key Metrics to Track

Collect these metrics for analysis:

# Timing Metrics
START_TIME=$(date +%s)
# ... workflow execution ...
END_TIME=$(date +%s)
TOTAL_TIME=$((END_TIME - START_TIME))

# Breakdown:
PLAN_TIME=         # Time to create plan
SETUP_TIME=        # Time to create issues/worktrees
EXECUTION_TIME=    # Time for actual work
INTEGRATION_TIME=  # Time to merge/test

Performance Indicators:

🎯 Target Metrics:

**Setup Phase:**
- Issue creation: <3s per issue
- Worktree creation: <5s per worktree
- Total setup: O(1) scaling (constant regardless of task count)

**Execution Phase:**
- Parallel efficiency: >80%
- Resource utilization: 50-80% CPU per agent
- No idle agents (all working concurrently)

**Integration Phase:**
- Merge time: <30s per branch
- Test time: Depends on test suite
- Total cleanup: <60s

**Overall:**
- Actual speedup ≥ 50% of theoretical maximum
- Total time < (Sequential / N) * 1.5
  (Where N = number of parallel tasks)

Read the full file on GitHub · 989 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 989 lines · 48 tokens per session scan A 08391299f480

Subscribe to this mod's changes

ctx:performance is a skill published in the GitHub repository shakestzd/contextune (5 stars, last pushed 8mo ago), licensed MIT. It adds 48 tokens to every session and 6,665 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

hotpath_init

Configure hotpath profiling in a Rust project. Adds the hotpath dependency with feature-gated setup, instruments main with hotpath::main, functions with measure/measureall, and wraps channels, mutexes, rwlocks, streams, futures, reqwest clients, axum routers and byte-level I/O with hotpath macros. Use when the user…

pawurb/hotpath-rs · 88 tokens

hotpath_bump

Bump the hotpath version number across the workspace and related files. Updates crate versions in Cargo.toml files (exact patch version) and version references in the backend middleware, hotpathinit skill, and README (major.minor only). Use when the user wants to bump, bump the version, or release a new hotpath…

pawurb/hotpath-rs · 73 tokens

syncmeta

Sync changes from hotpath and hotpath-macros crates to their meta counterparts (hotpath-meta and hotpath-macros-meta). Use when meta crates need to be updated with recent changes.

pawurb/hotpath-rs · 43 tokens

http-load-profiler

Run stepped HTTP load tests with ab/wrk, ramping concurrency levels to collect p50/p90/p99 latency, detect performance inflection points, and recommend optimal concurrency. Triggered by requests like 'load test this URL', 'benchmark my API', 'find the max concurrency', or mentions of p99 latency, throughput…

zebbern/claude-code-guide · 76 tokens

codspeed-optimize

Autonomously optimize code for performance using CodSpeed benchmarks, flamegraph analysis, and iterative improvement. Use this skill whenever the user wants to make code faster, reduce CPU usage, optimize memory, improve throughput, find performance bottlenecks, or asks to 'optimize', 'speed up', 'make faster'…

CodSpeedHQ/codspeed · 113 tokens

codspeed-setup-harness

Set up performance benchmarks and CodSpeed harness for a project. Use this skill whenever the user wants to create benchmarks, add performance tests, set up CodSpeed, configure codspeed.yml, integrate a benchmarking framework (criterion, divan, pytest-benchmark, vitest bench, go test -bench, google benchmark), or when…

CodSpeedHQ/codspeed · 120 tokens