When profiling performance use performance profiler

From DNYoussef/context-cascade · View interactive version

When profiling performance use performance profiler is an AI agent skill from the GitHub repository DNYoussef/context-cascade. [assert|neutral] Comprehensive performance profiling, bottleneck detection, and optimization system [ground:given] [conf:0.95] [state:confirmed]

How to use this skill

Skill file

/============================================================================/

/* WHEN-PROFILING-PERFORMANCE-USE-PERFORMANCE-PROFILER SKILL :: VERILINGUA x VERIX EDITION */

/============================================================================/


name: when-profiling-performance-use-performance-profiler

version: 1.0.0

description: |

[assert|neutral] Comprehensive performance profiling, bottleneck detection, and optimization system [ground:given] [conf:0.95] [state:confirmed]

category: performance

tags:

author: Claude Code

cognitive_frame:

primary: evidential

goal_analysis:

first_order: "Execute when-profiling-performance-use-performance-profiler workflow"

second_order: "Ensure quality and consistency"

third_order: "Enable systematic performance processes"


/----------------------------------------------------------------------------/

/* S0 META-IDENTITY */

/----------------------------------------------------------------------------/

[define|neutral] SKILL := {

name: "when-profiling-performance-use-performance-profiler",

category: "performance",

version: "1.0.0",

layer: L1

} [ground:given] [conf:1.0] [state:confirmed]

/----------------------------------------------------------------------------/

/* S1 COGNITIVE FRAME */

/----------------------------------------------------------------------------/

[define|neutral] COGNITIVE_FRAME := {

frame: "Evidential",

source: "Turkish",

force: "How do you know?"

} [ground:cognitive-science] [conf:0.92] [state:confirmed]

Kanitsal Cerceve (Evidential Frame Activation)

Kaynak dogrulama modu etkin.

/----------------------------------------------------------------------------/

/* S2 TRIGGER CONDITIONS */

/----------------------------------------------------------------------------/

[define|neutral] TRIGGER_POSITIVE := {

keywords: ["when-profiling-performance-use-performance-profiler", "performance", "workflow"],

context: "user needs when-profiling-performance-use-performance-profiler capability"

} [ground:given] [conf:1.0] [state:confirmed]

/----------------------------------------------------------------------------/

/* S3 CORE CONTENT */

/----------------------------------------------------------------------------/

Performance Profiler Skill

Kanitsal Cerceve (Evidential Frame Activation)

Kaynak dogrulama modu etkin.

Overview

When profiling performance, use performance-profiler to measure, analyze, and optimize application performance across CPU, memory, I/O, and network dimensions.

MECE Breakdown

Mutually Exclusive Components:

  1. Baseline Phase: Establish current performance metrics
  2. Detection Phase: Identify bottlenecks and hot paths
  3. Analysis Phase: Root cause analysis and impact assessment
  4. Optimization Phase: Generate and prioritize recommendations
  5. Implementation Phase: Apply optimizations with agent assistance
  6. Validation Phase: Benchmark improvements and verify gains

Collectively Exhaustive Coverage:

Features

Core Capabilities:

Profiling Modes:

Usage

Slash Command:

/profile [path] [--mode quick|standard|deep] [--target cpu|memory|io|network|all]

Subagent Invocation:

Task("Performance Profiler", "Profile ./app with deep CPU and memory analysis", "performance-analyzer")

MCP Tool:

mcp__performance-profiler__analyze({
  project_path: "./app",
  profiling_mode: "standard",
  targets: ["cpu", "memory", "io"],
  generate_optimizations: true
})

Architecture

Phase 1: Baseline Measurement

  1. Establish current performance metrics
  2. Define performance budgets
  3. Set up monitoring infrastructure
  4. Capture baseline snapshots

Phase 2: Bottleneck Detection

  1. CPU profiling (sampling or instrumentation)
  2. Memory profiling (heap analysis)
  3. I/O profiling (syscall tracing)
  4. Network profiling (packet analysis)
  5. Database profiling (query logs)

Phase 3: Root Cause Analysis

  1. Correlate metrics across dimensions
  2. Identify causal relationships
  3. Calculate performance impact
  4. Prioritize issues by severity

Phase 4: Optimization Generation

  1. Algorithmic improvements
  2. Caching strategies
  3. Parallelization opportunities
  4. Database query optimization
  5. Memory optimization
  6. Network optimization

Phase 5: Implementation

  1. Generate optimized code with coder agent
  2. Apply database optimizations
  3. Configure caching layers
  4. Implement parallelization

Phase 6: Validation

  1. Run benchmark suite
  2. Compare before/after metrics
  3. Verify no regressions
  4. Generate performance report

Output Formats

Performance Report:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.