christopherkarani/wax/wax-performance-audit
Claude Code and agent skill by christopherkarani/wax
- community
Checking that the SKILL.md file is still in the repository.
Benchmarking and performance auditing for the Wax repo. Use when running or interpreting Wax benchmarks, diagnosing CPU, memory, or I/O bottlenecks, or investigating Swift 6.2 concurrency issues such as Sendable, actor isolation, `@unchecked Sendable`, task-group fan-out, and data races.
Install
npx vskill@latest install christopherkarani/wax/wax-performance-auditSKILL.md
Wax Performance Audit
Overview
Use this skill to benchmark Wax changes, isolate the hottest code path, and separate real regressions from noisy samples.
The repo builds with Swift 6.1 and StrictConcurrency enabled, so audit for Swift 6.2 concurrency risks without assuming 6.2-only language mode.
Workflow
- Name the symptom precisely: latency regression, memory growth, file bloat, or Swift concurrency diagnostics.
- Pick the narrowest benchmark or test file that exercises the path.
- Run a baseline and candidate with the same environment and scale.
- Collect wall time plus memory or file-growth metrics when the issue is not purely CPU-bound.
- Inspect the smallest relevant actor boundary, task group, cache, or I/O path.
- Report the evidence, the bottleneck, and the smallest safe fix.
Benchmark Selection
Use `references/benchmark-workflow.md` for the command matrix, environment flags, and benchmark map.
Prefer these repo entry points when they match the symptom:
Tests/WaxIntegrationTests/RAGBenchmarkSupport.swiftTests/WaxIntegrationTests/RememberDedupBenchmarks.swiftTests/WaxIntegrationTests/StoreBloatBenchmarks.swiftTests/WaxIntegrationTests/RAGBenchmarks.swiftTests/WaxIntegrationTests/RAGBenchmarksMiniLM.swiftTests/WaxIntegrationTests/BatchEmbeddingBenchmark.swiftTests/WaxIntegrationTests/SessionRuntimeStatsBenchmarks.swiftTests/WaxIntegrationTests/WALCompactionBenchmarks.swiftTests/WaxIntegrationTests/HandoffLookupBenchmarks.swiftTests/WaxIntegrationTests/PayloadLivenessBenchmarks.swiftTests/WaxIntegrationTests/SurrogateSourceBenchmarks.swiftTests/WaxIntegrationTests/AccessStatsBootstrapBenchmarks.swiftTests/WaxIntegrationTests/ConcurrencyStressTests.swiftTests/WaxIntegrationTests/MemoryOrchestratorTests.swiftTests/WaxArcticTests/ArcticPerformanceBenchmark.swiftTests/WaxCoreTests/ReadWriteLockTests.swiftTests/WaxCoreTests/AsyncMutexTests.swift
Bottleneck Triage
- CPU: look for repeated serialization, unnecessary sorting, extra actor hops, and oversized batch work.
- Memory: compare RSS, allocated bytes, dead payload bytes, TOC growth, and frame count.
- I/O: inspect WAL compaction, reopen cost, and close-time rewrite work.
- Embeddings: check compute unit selection, batch sizing, and warmup or prewarm behavior.
- Noise: rerun if caches are cold, an external compiler/service is active, or the benchmark has low sample counts.
- Gated skips: confirm the env flag actually enabled the lane before treating a skip or pass as evidence.
- Harness plumbing:
measureAsyncinRAGBenchmarkSupport.swiftusesDispatchSemaphoreplusTaskbecause XCTest measurement is synchronous; do not confuse that with production concurrency. - ANE/GPU: CPU-only benchmark paths are intentional in some suites, and warm p95/p99 values can be noisy when
ANECompilerServiceor similar background work is active.
Swift 6.2 Concurrency
Use `references/concurrency-checklist.md` when the change touches actors, task groups, Sendable, or @unchecked Sendable.
Default checks:
- Trace every value that crosses an actor boundary.
- Prefer
@Sendableclosures that capture immutable values. - Treat
@unchecked Sendableas a deliberate exception, not a default. - Watch task groups for hidden fan-out that increases memory pressure.
- Keep blocking I/O off actor executors.
- Verify
@MainActorcrossings in UI-adjacent or Photos code. - Treat
@preconcurrencyinterop and@unchecked Sendablearound CoreML, GRDB, Photos, and tokenizer internals as review hotspots, not automatic bugs.
Reporting
When you finish, state:
- the benchmark or test you ran,
- the before/after evidence,
- whether the regression was CPU, memory, I/O, or concurrency-related,
- and the exact file or subsystem that caused it.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingResources/skills/public/wax-performance-audit/SKILL.md
Popularity
- Repository stars
- 773
- Repository forks
- 46
- 7-day trend score
- 33
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/christopherkarani/wax/wax-performance-audit)