/tl:optimize <component or area to optimize>from tl
Measures baselines, profiles bottlenecks, and iterates on fixes to meet performance targets for latency, throughput, or memory.
Ships in tl. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are running the Optimize workflow. The goal is to make $ARGUMENTS faster, lighter, or more efficient — without breaking correctness. Every decision is grounded in measured data, not intuition.
/tracer)Optimize works in 5 phases. Each phase produces a committed checkpoint before the next begins.
Baseline (measure current state)
-> Profile (locate hot paths)
-> Identify bottleneck (single highest-leverage target)
-> Implement fix (one change at a time)
-> Measure delta (confirm improvement, no regression)
-> Iterate (repeat until target reached or returns diminish)
If $ARGUMENTS is vague or no performance target was stated, ask one clarifying question:
Do not proceed without a concrete, measurable target. Optimization without a target is refactoring in disguise.
Choose the measurement method appropriate for the project:
npm run bench, cargo bench, pytest --benchmark, etc.)time or equivalentRecord the baseline numbers precisely:
## Baseline: [component/area]
**Date**: [date]
**Target**: [measurable target]
**Current state**:
- p50 latency: Xms
- p99 latency: Xms
- Throughput: X req/s
- Memory: XMB RSS
- [other metrics relevant to target]
**Measurement method**: [benchmark/load-test/profiler/time]
**Commit**: [git hash of measured commit]
git add [benchmark or measurement files]
git commit -m "$(cat <<'EOF'
optimize: establish baseline for [component]
Measured current performance before any changes.
Target: [measurable target]
Baseline: [key metric and value]
Co-Authored-By: Claude Opus 4.6 <[email protected]>
EOF
)"
Select the appropriate profiler for the language and environment:
| Language | CPU profiling | Memory profiling |
|---|---|---|
| Node.js | --cpu-prof, clinic flame | --heap-prof, clinic heap |
| Python | cProfile, py-spy, memray | tracemalloc, memray |
| Rust | perf, cargo flamegraph | heaptrack, valgrind --massif |
| Go | pprof (cpu + mem) | pprof |
| JVM | async-profiler, JFR | JVM heap dump + MAT |
| C/C++ | perf, gprof, Instruments | valgrind --massif, Instruments |
If none of the above apply or no profiler is available, proceed to manual code analysis (Phase 3) using Grep and Read.
Run the profiler against a representative workload — the same workload used for the baseline if possible. Avoid synthetic microbenchmarks unless the target is a specific function in isolation.
Extract the top consumers from the profiler output:
## Profile Results: [component]
**Profiler**: [name and version]
**Workload**: [what was profiled]
**Top CPU consumers:**
1. `[function/module]` — X% of samples — [file:line]
2. `[function/module]` — X% of samples — [file:line]
3. `[function/module]` — X% of samples — [file:line]
**Top memory allocators (if applicable):**
1. `[allocation site]` — XMB — [file:line]
2. `[allocation site]` — XMB — [file:line]
**Observations:**
- [Any non-obvious finding: e.g., "98% of CPU is in JSON parsing, not the DB query"]
From the profile results, select one bottleneck to address in this iteration. Criteria:
State the bottleneck explicitly:
## Bottleneck: [iteration N]
**Target**: [function/module/pattern]
**Rationale**: [why this is the highest-leverage target — cite profiler numbers]
**Hypothesis**: [what change is expected to help and why]
**Risk**: [what could break or regress]
**Not targeting**: [other hot paths deferred and why]
Before implementing, read the hot path code to confirm the hypothesis:
Do not proceed with a fix until the root cause is confirmed in code — not just in profiler output.
Implement one targeted change per iteration. Do not bundle multiple optimizations — each change must be independently measurable. Common patterns:
After implementing, run the existing test suite. If tests fail, fix the implementation — not the tests. The optimization is invalid if it changes observable behavior.
[project test command]
git add [modified files]
git commit -m "$(cat <<'EOF'
optimize: [brief description of change] in [component]
Bottleneck: [what was identified in Phase 3]
Fix: [what was changed and why it should help]
Hypothesis: [expected improvement]
Tests: passing
No behavior change.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
EOF
)"
Run the same measurement method used in Phase 1 against the same workload. Record results in the same format:
## Delta: Iteration N
**Commit**: [git hash of fix]
**Fix applied**: [description]
**Before**: [key metric and value from baseline or prior iteration]
**After**: [key metric and value]
**Delta**: [improvement as absolute value and percentage]
**Regression check**: [any other metric that got worse]
**Tests**: [passing / failing — if failing, revert the fix]
# If reverting:
git revert HEAD --no-edit
Produce a final report covering all iterations:
## Optimization Report: [component/area]
**Target**: [measurable target stated in Phase 1]
**Outcome**: [target reached / partially reached / not reached — explain]
### Iterations
| # | Bottleneck | Fix | Before | After | Delta |
|---|-----------|-----|--------|-------|-------|
| 1 | [target] | [change] | [metric] | [metric] | [%] |
| 2 | [target] | [change] | [metric] | [metric] | [%] |
| N | ... | ... | ... | ... | ... |
### Final State vs Baseline
| Metric | Baseline | Final | Change |
|--------|---------|-------|--------|
| [metric 1] | X | Y | +/-Z% |
| [metric 2] | X | Y | +/-Z% |
### What Was Not Addressed
- [Deferred bottleneck]: [why it was not worth addressing]
- [Deferred concern]: [why it was out of scope]
### Known Risks
- [Risk introduced by the optimization]
- [Workload assumptions that may not hold in production]
If follow-up work was identified:
Create follow-up tasks using your preferred task tracking approach. Each task should include the title, priority, and context from the optimization work. If no tracker is configured, write follow-up tasks to TODO.md in the project root.
/tracer — iterative correctness-first implementation (use before /optimize if the feature is incomplete)/test-strategy — ensure tests exist before optimizing (correctness is a precondition)/review — code review of optimization changes (useful after a complex fix)/spec — formalize performance requirements before starting if the target is unclearWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub tyevans/tackline --plugin tackline55 skills in this plugin
/active-learnUse when an agent's performance is uneven and you want systematic improvement. Runs diagnose -> challenge-gen -> challenge-run -> update learnings in a loop. Works with or without a team. Keywords: active-learn, training, adversarial, improve, agent, loop, capability, tuning, solo./adviseUse when you're unsure what to work on next. Reads git state, session history, and task tracker to recommend next actions. Works with just git, richer with more context. Keywords: advise, suggest, next, what now, recommend, orient./assembleUse when starting a project, forming a team for long-horizon work, or upgrading from ad-hoc agent dispatch. Creates persistent roles with ownership and learnings that improve across sessions. Keywords: team, project, setup, roles, persistent, agents, staff, learning./assessUse when items need categorical triage (critical/warning/ok), not numeric scoring. Groups items by verdict against a rubric. Unlike rank (scores) or filter (binary). Keywords: evaluate, judge, categorize, triage, verdict, rubric, severity, classify./blossomUse when a goal is vague and you need to explore before planning. Runs spikes to discover what work exists, then produces a prioritized backlog. Keywords: explore, discover, spike, plan, epic, backlog, investigate./bootstrapUse when starting a new project or adding Claude Code support to an existing one. Sets up CLAUDE.md, hooks, rules, and generates tailored agents. Keywords: bootstrap, scaffold, setup, new project, init, kickstart.Other plugins' skills for the same job