Analyzes Truffle language implementations to generate testable performance theories. Loads benchmark baselines, performs systematic code analysis, and produces prioritized hypotheses with verification plans. Use after establishing baseline to identify potential performance issues before profiling. Use when analyzing why code is slow, finding optimization opportunities, or planning performance investigation. (project)
Analyzes Truffle language implementations to generate testable performance theories with verification plans.
/plugin marketplace add antonykamp/cc-truffle-performance-plugin/plugin install antonykamp-cc-truffle-performance-plugin@antonykamp/cc-truffle-performance-pluginThis skill inherits all available tools. When active, it can use any tool Claude has access to.
WORKFLOW.mdSystematically analyzes language implementation code to generate testable performance hypotheses. Produces a prioritized list of theories ready for verification with profiling tools.
verifying-performance-theories skillBENCHMARK_BASELINE.md exists (from establishing-benchmark-baseline skill)Step 1: Ask user for analysis focus using AskUserQuestion:
Step 2: Load benchmark baseline and timing results
Step 3: Execute systematic analysis following WORKFLOW.md
Step 4: Output theory list for verification
Each generated theory includes:
Theory: [Description of the performance issue]
Source: [Where discovered - code location, performance gap, pattern]
Category: [Implementation / Configuration / Architectural]
Severity: [Critical / High / Medium / Low]
Verification Tools:
- Tool 1: [skill name] → Purpose: [what to check]
- Tool 2: [skill name] → Purpose: [what to check]
Expected Evidence: [What tool output would confirm theory]
Rationale: [Why this is expected to be an issue]
Tool Skills for Verification:
detecting-performance-warnings - Find optimization barriersprofiling-with-cpu-sampler - Identify hot functionstracing-execution-counts - Verify frequenciesTool Skills for Verification:
tracing-compilation-events - Check compilation behavioranalyzing-compiler-graphs - Examine IR optimizationsTool Skills for Verification:
profiling-memory-allocations - Track allocation patternsdetecting-deoptimizations - Find instabilitiesanalyzing-compiler-graphs - Deep IR analysisCheck @GenerateBytecode annotation settings:
- [ ] Boxing elimination enabled for primitives?
- [ ] Uncached interpreter enabled?
- [ ] Appropriate tier thresholds?
For EACH @Operation or Node class:
- [ ] Has primitive specializations (int, long, double)?
- [ ] Uses @Cached for method lookups?
- [ ] Proper @TruffleBoundary on slow paths?
- [ ] No virtual calls in hot paths?
For each runtime type (Object, Array, Class, Function):
- [ ] Shape stability maintained?
- [ ] Inline caching for property access?
- [ ] Efficient storage (primitives not boxed)?
- [ ] Slot access uses FrameSlotKind properly?
- [ ] No unnecessary materialization?
- [ ] Stable frame sizes?
- [ ] All @CachedLibrary has limit parameter?
- [ ] @ExportLibrary on appropriate classes?
- [ ] Interop calls cached?
# Performance Theories
Generated: [Date]
Focus: [User-selected focus]
Benchmark: [Benchmark name]
## Theory 1: [Title]
**Source**: [code location or performance gap]
**Category**: Implementation
**Severity**: Critical
**Verification Plan**:
1. `detecting-performance-warnings` → Check for virtual call warnings at [location]
2. `profiling-with-cpu-sampler` → Measure time in [function], expect >X% if theory true
**Expected Evidence**: Virtual call warning at line X, or >30% time in interpreter tier
**Rationale**: [Why this is expected to cause issues]
---
## Theory 2: [Title]
...
Prerequisite Skills:
establishing-benchmark-baseline → Provides BENCHMARK_BASELINE.mdSuccessor Skills:
verifying-performance-theories → Verifies theories with profiling toolsgenerating-performance-reports → Compiles verified findings into reportTool Skills Referenced:
profiling-with-cpu-sampler - Time-based profilingtracing-execution-counts - Frequency analysisdetecting-performance-warnings - Optimization barrierstracing-compilation-events - Compilation analysistracing-inlining-decisions - Inlining analysisdetecting-deoptimizations - Deoptimization detectionprofiling-memory-allocations - Memory profilinganalyzing-compiler-graphs - Deep IR analysis1. [establishing-benchmark-baseline] → Create baseline
2. [Run benchmarks] → Get timing data
3. [generating-performance-theories] → THIS SKILL
4. [verifying-performance-theories] → Verify with tools
5. [generating-performance-reports] → Document findings
See WORKFLOW.md for detailed analysis procedures.
This skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.