profiling
Registry Trigger
Use when
- profile CPU memory IO database network rendering cloud cost unit economics and bottlenecks
Do not use when
- no task-local profiling decision is required
Skill Role
Define the symptom, hypothesis, profiler selection, representative comparison, measured bottleneck, re-profile, resource transfer, overhead, and artifact lifecycle. Exclude performance budgets and implementation.
High-Value Rules
- Select evidence from the symptom and falsifiable hypothesis. The measurement distinguishes compute, wait, allocation or retention, I/O, query, network, rendering, or unit-cost causes; familiarity alone is insufficient evidence.
- Use a representative, comparable workload. Match the request/data distribution, load shape, runtime/topology, dependency and cache/startup state, and relevant configuration before comparing baseline and candidate.
- Optimize only a measured bottleneck. Tie the dominant cost or wait to an owned source/configuration path, change the responsible constraint, and re-profile under matched conditions; report when the dominant constraint moves.
- Account for resource and cost transfer. A local latency/CPU gain can shift memory, I/O, queueing, egress, provider usage, rejected work, or unit cost elsewhere. Measure the affected system boundary and degraded outcomes.
- Bound profiling overhead. Record sampling/instrumentation effect, load and duration boundary, blast radius, stop condition, and cleanup; profiling that perturbs the system can invalidate its own evidence.
- Preserve behavior, security, and durability. Compare outputs, errors, state, required work, and protection boundaries alongside performance; a faster path that drops or changes required behavior is a defect.
- Own sensitive artifact lifecycle. Classify captured fields, minimize and redact collection, control access and storage, set retention/deletion or ephemeral cleanup, and prevent accidental persistence of traces, snapshots, queries, identifiers, or billing data.
Anti-Patterns
- Select a familiar profiler or optimization before the symptom and hypothesis identify what evidence could falsify the suspected cause.
- Compare unmatched workloads or environments, report one improved metric without re-profiling, or ignore a new dominant bottleneck and shifted resource or cost.
- Capture sensitive or high-overhead production artifacts without authority, blast-radius and stop limits, redaction, accountable storage, and deletion or cleanup.
Stop Conditions
Escalate unrepresentative comparison, unknown overhead, unauthorized or unstoppable production capture, unresolved artifact sensitivity/lifecycle, non-dominant bottlenecks, weakened protections, or changes to public contracts, schemas, external boundaries, capacity controls, or restart policy.
Output Contract
- profiling evidence with symptom and hypothesis, representative comparable workload, measured bottleneck and re-profile, resource/cost transfer, overhead boundary, correctness guard, and owned sensitive-artifact lifecycle
Targeted References
| Path |
Type |
Load when |
Do not load when |
Required by |
Required output |
| benchmarks and patterns |
benchmark-pattern |
Competing profiler signal workload or bottleneck patterns remain viable |
One authorized representative method directly tests the hypothesis and root rules resolve the decision |
task-agent, review-agent |
option-comparison, selected-approach |
| checklist |
decision-checklist |
Several comparison overhead transfer correctness or artifact-lifecycle decisions must close together |
One bounded measurement has comparable evidence an owner a stop path and no unresolved artifact lifecycle |
task-agent, review-agent |
checklist-result, residual-risk |
| evidence patterns |
evidence-pattern |
Hypothesis representative comparison bottleneck re-profile transfer overhead correctness or sensitive-artifact freshness claims need proof |
Representative matched final measurements correctness checks and owned artifact cleanup close the claims |
task-agent, review-agent |
evidence-record, proof-limit, residual-risk |
1---2name: profiling3description: `task-agent`/`review-agent`: use when CPU, memory, I/O, database, network, rendering, or cost needs measured bottleneck evidence; skip without a profiling need.4---56# profiling78## Registry Trigger910**Use when**1112- profile CPU memory IO database network rendering cloud cost unit economics and bottlenecks1314**Do not use when**1516- no task-local profiling decision is required1718## Skill Role1920Define the symptom, hypothesis, profiler selection, representative comparison, measured bottleneck, re-profile, resource transfer, overhead, and artifact lifecycle. Exclude performance budgets and implementation.2122## High-Value Rules2324- **Select evidence from the symptom and falsifiable hypothesis.** The measurement distinguishes compute, wait, allocation or retention, I/O, query, network, rendering, or unit-cost causes; familiarity alone is insufficient evidence.25- **Use a representative, comparable workload.** Match the request/data distribution, load shape, runtime/topology, dependency and cache/startup state, and relevant configuration before comparing baseline and candidate.26- **Optimize only a measured bottleneck.** Tie the dominant cost or wait to an owned source/configuration path, change the responsible constraint, and re-profile under matched conditions; report when the dominant constraint moves.27- **Account for resource and cost transfer.** A local latency/CPU gain can shift memory, I/O, queueing, egress, provider usage, rejected work, or unit cost elsewhere. Measure the affected system boundary and degraded outcomes.28- **Bound profiling overhead.** Record sampling/instrumentation effect, load and duration boundary, blast radius, stop condition, and cleanup; profiling that perturbs the system can invalidate its own evidence.29- **Preserve behavior, security, and durability.** Compare outputs, errors, state, required work, and protection boundaries alongside performance; a faster path that drops or changes required behavior is a defect.30- **Own sensitive artifact lifecycle.** Classify captured fields, minimize and redact collection, control access and storage, set retention/deletion or ephemeral cleanup, and prevent accidental persistence of traces, snapshots, queries, identifiers, or billing data.3132## Anti-Patterns3334- Select a familiar profiler or optimization before the symptom and hypothesis identify what evidence could falsify the suspected cause.35- Compare unmatched workloads or environments, report one improved metric without re-profiling, or ignore a new dominant bottleneck and shifted resource or cost.36- Capture sensitive or high-overhead production artifacts without authority, blast-radius and stop limits, redaction, accountable storage, and deletion or cleanup.3738## Stop Conditions3940Escalate unrepresentative comparison, unknown overhead, unauthorized or unstoppable production capture, unresolved artifact sensitivity/lifecycle, non-dominant bottlenecks, weakened protections, or changes to public contracts, schemas, external boundaries, capacity controls, or restart policy.4142## Output Contract4344- profiling evidence with symptom and hypothesis, representative comparable workload, measured bottleneck and re-profile, resource/cost transfer, overhead boundary, correctness guard, and owned sensitive-artifact lifecycle4546## Targeted References4748| Path | Type | Load when | Do not load when | Required by | Required output |49|---|---|---|---|---|---|50| [benchmarks and patterns](references/benchmarks-and-patterns.md) | benchmark-pattern | Competing profiler signal workload or bottleneck patterns remain viable | One authorized representative method directly tests the hypothesis and root rules resolve the decision | task-agent, review-agent | option-comparison, selected-approach |51| [checklist](references/checklist.md) | decision-checklist | Several comparison overhead transfer correctness or artifact-lifecycle decisions must close together | One bounded measurement has comparable evidence an owner a stop path and no unresolved artifact lifecycle | task-agent, review-agent | checklist-result, residual-risk |52| [evidence patterns](references/evidence-patterns.md) | evidence-pattern | Hypothesis representative comparison bottleneck re-profile transfer overhead correctness or sensitive-artifact freshness claims need proof | Representative matched final measurements correctness checks and owned artifact cleanup close the claims | task-agent, review-agent | evidence-record, proof-limit, residual-risk |