perf
Use for dedicated performance profiling — wall time, CPU, memory, allocation, query count, network. Different from /optimize (which assumes a target). Perf measures + reports; optimize fixes.
What this skill does
# perf Dedicated performance measurement. Different from `/optimize` — perf produces a baseline + report; optimize uses that baseline to drive a fix. ## When this differs from /optimize - `/perf` — measure + report; no code changes - `/optimize` — measure + improve + verify (uses perf as input) Use `/perf` first when you don't yet have a baseline. Use `/optimize` after. ## Method 1. **Pick metric.** Wall-time | CPU-time | memory | allocations | query count | network calls | latency p95 — pick the one that matters. 2. **Pick reproducible workload.** Synthetic test, real prod-shaped input, load-test scenario. **Same inputs every run** is non-negotiable. 3. **Pick tool per stack:** - Node: `--prof`, `clinic.js`, `0x`, `autocannon` (HTTP) - Python: `cProfile`, `py-spy`, `scalene`, `locust` - Go: `pprof`, `vegeta`, `hey` - Rust: `cargo flamegraph`, `criterion` - Browser: DevTools Performance, Lighthouse - Salesforce: debug log analysis (`/sf-debug parse`) - SQL: `EXPLAIN ANALYZE` 4. **Run multiple iterations.** Single-run numbers lie. Minimum N=5; report p50, p95, p99. 5. **Identify hotspots.** Top 5 functions / queries / endpoints by self-time or contribution. 6. **Capture baseline to memory** so future perf runs detect regression. ## Output shape ``` Workload: <description, deterministic inputs> Iterations: N=10 Tool: <profiler used> Metrics: Wall p50: 142 ms Wall p95: 310 ms Wall p99: 520 ms CPU avg: 78% RSS peak: 245 MB Allocs/op: 18,400 Hotspots (top 5 by self-time): 1. parseRequest 42% — src/server/parse.ts:88 2. validateSchema 18% — src/schema/validate.ts:120 3. <fn> 12% 4. <fn> 8% 5. <fn> 5% Query count (if applicable): N+1 detected: yes — at src/users/list.ts:34 (200 queries for 1 list endpoint) Recommendations: - Run /siftcoder:optimize on parseRequest (highest hotspot) - Fix N+1 at users/list.ts (cheap win) - Cache schema validation results (validateSchema is pure) Baseline captured: <memory id> ``` ## Rules - **Multiple iterations always.** Single-run = noise. - **Same inputs every run** for comparability. - **Pick the metric that matters** — don't dump all of them. - **Pareto rule** — top 5 hotspots cover usually 80%+ of cost. - **Baseline captured to memory** so trend over time is visible. ## Anti-patterns - "Faster" without numbers - Single-run measurements - Profiling in dev with debug builds (production-shape required) - Mixing profiling with optimisation in the same pass (separate concerns) ## When NOT to use - Already have baseline + target — `/optimize` skill - Pure latency at edge — needs synthetic load testing, not local profiler - Salesforce-specific perf — `/sf-debug parse` is more targeted ## Subagent dispatch - `Bash` for profiler invocation - `general-purpose` for hotspot synthesis - Memory MCP for baseline + trend ## Value over native CC CC will discuss performance. CC won't naturally insist on tool-per-stack, multi-iteration, deterministic-workload, top-N-hotspot-Pareto discipline. The discipline IS the value.
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.