Source profileQuality 93/100Review permissions

athola/claude-night-market/plugins/pensive/skills/performance-review/SKILL.md

performance-review

Detects time and space complexity hotspots via AST scan. Use when code feels slow, before performance-sensitive merges, or to find O(n²) regressions.

Source repository stars
331
Declared platforms
0
Static risk flags
2
Last source update
2026-08-26
Source checked
2026-08-28

Decision brief

What it does: where it fits

Detects time and space complexity hotspots via AST scan.

Best for

  • Pre-merge review of code that runs on user-scaled inputs.
  • Triage of a function that "feels slow" before reaching for a
  • Audit a refactor for newly introduced O(n²) patterns.

Not for

  • The target needs runtime measurement (memory profile, CPU
  • General refactoring guidance not focused on hotspots: use

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexNot declaredNo explicit evidencePortability before use
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/athola/claude-night-market --skill "plugins/pensive/skills/performance-review"
Safe inspection promptEditorial

Inspect the Agent Skill "performance-review" from https://github.com/athola/claude-night-market/blob/6720bb5cdeadeea6de6e4786a449126b3d417536/plugins/pensive/skills/performance-review/SKILL.md at commit 6720bb5cdeadeea6de6e4786a449126b3d417536. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

Workflow

What the source asks the agent to do

  1. 01

    Performance Review

    Static-analysis review of time and space complexity hotspots.

    Pre-merge review of code that runs on user-scaled inputs.Triage of a function that "feels slow" before reaching for aAudit a refactor for newly introduced O(n²) patterns.
  2. 02

    Quick Start

    Review the “Quick Start” section in the pinned source before continuing.

    Review and apply the “Quick Start” source section.
  3. 03

    Workflow

    Load modules/time-complexity.md for the time-side patterns and modules/space-complexity.md for space-side. Each module documents the AST shape of every detector.

    Identify target files. If invoked with no argument, useNote language(s) involved. Tier 1 covers Python; non-PythonHIGH: O(n²) or worse on input-sized iterables (T1, T2).
  4. 04

    Step 1: Context (perf-review:context-established)

    Identify target files. If invoked with no argument, use

    Identify target files. If invoked with no argument, useNote language(s) involved. Tier 1 covers Python; non-Python- Identify target files. If invoked with no argument, use git diff --name-only. If invoked with a path, scope to that. - Note language(s) involved. Tier 1 covers Python; non-Python files need gauntlet for Tier 2 coverag…
  5. 05

    Step 2: Tier 1 AST scan (perf-review:scan-complete)

    Load modules/time-complexity.md for the time-side patterns and modules/space-complexity.md for space-side. Each module documents the AST shape of every detector.

    Load modules/time-complexity.md for the time-side patterns and modules/space-complexity.md for space-side. Each module documents the AST shape of every detector.Alongside the automated scan, load modules/memory-allocation-lenses.md and apply its three manual lenses (unbounded external-source collections, hot-path recompute, serial blocking I/O) by reading the target files.For each Python target file, call:

Permission review

Static risk signals and limitations

Reads files

low · line 30

The documentation asks the agent to read local files, directories, or repositories.

/performance-review path/to/file.py # scan one file

Runs scripts

medium · line 267

The documentation asks the agent to run terminal commands or scripts.

python plugins/imbue/scripts/citation_verifier.py \

Evidence record

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score93/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars331SourceRepository attention, not individual Skill quality
Compatibility0 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
athola/claude-night-market
Skill path
plugins/pensive/skills/performance-review/SKILL.md
Commit
6720bb5cdeadeea6de6e4786a449126b3d417536
License
MIT
Collected
2026-08-28
Default branch
master
View the original SKILL.md

Table of Contents

Performance Review

Static-analysis review of time and space complexity hotspots.

The skill runs in three escalating tiers. Tier 1 uses Python's stdlib ast and always runs. Tier 2 uses gauntlet's tree-sitter parser to extend detection across languages when gauntlet is installed. Tier 3 uses the gauntlet code graph to upgrade severity when hotspots reach other hotspots transitively. If gauntlet is missing, Tiers 2 and 3 no-op and Tier 1 still produces useful findings on Python source.

Quick Start

/performance-review                  # scan changed files
/performance-review path/to/file.py  # scan one file
/performance-review --tier 1         # force Tier 1 only

Programmatic use:

from pensive.skills.performance_review import PerformanceReviewSkill

skill = PerformanceReviewSkill()
result = skill.analyze(context, "src/module.py")
for f in result.issues:
    print(f"[{f.severity}] {f.file}:{f.line} {f.message}")

When To Use

  • Pre-merge review of code that runs on user-scaled inputs.
  • Triage of a function that "feels slow" before reaching for a profiler.
  • Audit a refactor for newly introduced O(n²) patterns.
  • Guardrail for AI-generated code where nested-loop hot spots are common.

When NOT to Use

  • The target needs runtime measurement (memory profile, CPU time on real data). Use Skill(parseltongue:python-performance) instead: that skill drives cProfile, py-spy, and benchmarks.
  • General refactoring guidance not focused on hotspots: use Skill(pensive:code-refinement) whose algorithm-efficiency module covers broader optimization patterns. This skill detects; that skill teaches.
  • Deciding whether a hand-rolled loop transform (unrolling, manual SIMD, strength reduction) is worth keeping: use Skill(leyline:loop-optimization) for the hand-vs-compiler rule. This skill flags hotspot shapes, not transformation choices.
  • Architecture-level performance (sharding, caching layers, queue placement): use Skill(pensive:architecture-review).

Required TodoWrite Items

  1. perf-review:context-established
  2. perf-review:scan-complete
  3. perf-review:findings-categorized
  4. perf-review:integration-checked
  5. perf-review:report-generated
  6. perf-review:findings-verified

Workflow

Step 1: Context (perf-review:context-established)

  • Identify target files. If invoked with no argument, use git diff --name-only. If invoked with a path, scope to that.
  • Note language(s) involved. Tier 1 covers Python; non-Python files need gauntlet for Tier 2 coverage.

Step 2: Tier 1 AST scan (perf-review:scan-complete)

Load modules/time-complexity.md for the time-side patterns and modules/space-complexity.md for space-side. Each module documents the AST shape of every detector.

Alongside the automated scan, load modules/memory-allocation-lenses.md and apply its three manual lenses (unbounded external-source collections, hot-path recompute, serial blocking I/O) by reading the target files.

For each Python target file, call:

from pensive.skills.performance_review import PerformanceReviewSkill

result = PerformanceReviewSkill().analyze(context, path)

The visitor walks the AST once and emits ReviewFinding records.

Step 3: Categorize and rank (perf-review:findings-categorized)

Group findings by severity:

  • HIGH: O(n²) or worse on input-sized iterables (T1, T2).
  • MEDIUM: Unbounded allocation or per-iteration overhead (T3, T4, S1, S3).
  • LOW: Style-level inefficiencies (T5, T6, S2).
  • CRITICAL: Reserved for Tier-3 transitive upgrades.

Within a severity, sort by file then line. Suppress findings the user has explicitly marked acceptable (TODO/comment markers) at module-load time of the target.

Step 4: Tier 2/3 enrichment (perf-review:integration-checked)

Load modules/gauntlet-integration.md for the contract.

If gauntlet is installed, run Tier 2 on non-Python files that were skipped at Step 2. If a .gauntlet/graph.db exists in the working tree, run Tier 3 to upgrade severities based on transitive hotspot reachability.

If gauntlet is missing, this step is a no-op and the report notes "Tier 2/3 not available: install gauntlet for multi-language and call-chain coverage."

Step 5: Report (perf-review:report-generated)

Emit a markdown report:

## Performance Review: <target>

### HIGH (<count>)
- src/foo.py:42: Nested loop over the same iterable 'items'.
  Suggestion: sort + two pointers, or hash-set membership.

### MEDIUM (<count>)
- ...

### LOW (<count>)
- ...

Tier coverage: 1 (always) | 2 (gauntlet ✓/✗) | 3 (graph ✓/✗)

The report is informational. Apply fixes via Skill(pensive:code-refinement) or hand-merge.

Tiered Analysis

TierSourceWhen it runsWhat it covers
1stdlib astAlways (Python source only)T1-T6, S1-S3
2gauntlet.treesitter_parserWhen gauntlet importableSame patterns adapted to JS/TS, Go, Rust, Java, C/C++
3gauntlet.graph.GraphStoreWhen .gauntlet/graph.db existsSeverity upgrade via transitive call chains

Output Format

Findings use the shared ReviewFinding dataclass from pensive.skills.base:

ReviewFinding(
    file="src/module.py",
    line=42,
    severity="HIGH",  # LOW | MEDIUM | HIGH | CRITICAL
    category="time",  # time | space
    message="Nested loop over the same iterable 'items'.",
    suggestion="Sort + two pointers, or hash-set membership.",
    anchor="verbatim source text at file:line",
    code_snippet="",
)

This shape matches every other pensive review skill, so the findings can flow into Skill(pensive:unified-review) without translation.

Cross-Plugin Dependencies

DependencyRequired?Effect when missing
gauntlet.treesitter_parserOptionalTier 2 returns []; Python coverage unchanged
gauntlet.graph.GraphStoreOptionalTier 3 returns []; severities are not upgraded

The optional-import contract follows the precedent in plugins/leyline/src/leyline/tokens.py:25-32: try-import to a module-level sentinel, then early-return on None inside each tier helper. plugins/gauntlet/hooks/precommit_gate.py:35-40 is the boolean-flag variant of the same shape. See modules/gauntlet-integration.md for the exact code shape.

Supporting Modules

  • modules/time-complexity.md: T1-T6 detector patterns and AST shapes.
  • modules/space-complexity.md: S1-S3 detector patterns.
  • modules/gauntlet-integration.md: Tier 2/3 contract, fallback semantics, examples.
  • modules/kuva-visualization.md: Rendering benchmark data as charts with kuva (criterion, pytest-benchmark, ad-hoc tables). Covers when chart evidence satisfies proof-of-work requirements.
  • modules/memory-allocation-lenses.md: Manual review lenses (not AST detectors) for unbounded collections fed from external sources, hot-path recompute that should be memoized, and serial blocking I/O over unbounded sets. Apply by reading the code; the detector-test rule in Testing does not cover these because nothing is automated.

Verification

A perf-review finding is only useful if the caller can confirm it is real. Use this checklist before treating any finding as worth fixing:

  1. Reproduce under a profiler. Run cProfile, py-spy, or the language-specific equivalent on the hotspot. The findings pinpoint AST shapes; the profiler validates the runtime impact.
  2. Re-run the failing benchmark. If benches/ exists, the hotspot should show up in numbers, not just AST scans.
  3. Compare numbers before and after the proposed fix. The fix is wrong if numbers do not move. Capture both timings as evidence references like [E1] (before) and [E2] (after). When 3+ data points exist, render a kuva chart and attach it to the PR (see modules/kuva-visualization.md).
  4. Sample two or three reported hotspots manually. Findings can be true at the AST level and false at the call-graph level when callers short-circuit. Manual sampling catches that.

The Skill(imbue:proof-of-work) discipline applies: claims like "the hotspot is fixed" require evidence, not assertion.

Testing

A test file already lives at plugins/pensive/tests/skills/test_performance_review.py covering the AST-shape detectors. Two rules for changes here:

  • Add a new detector with a test. Any new T-* or S-* pattern added to the modules ships with a test that has the smallest AST sample exercising it.
  • Add a regression test for any false positive removed. When the skill stops firing on a shape that used to look hot, the reason should appear as a test case so the regression is discoverable later.

The Iron Law applies: a new detector without a failing test first is a request to skip TDD on a code-analysis component, which is exactly the place where TDD pays off most.

Verify Findings Are Grounded (perf-review:findings-verified)

Every finding must cite a real location and a verbatim anchor. Write findings to .review/findings.json and confirm each citation resolves:

python plugins/imbue/scripts/citation_verifier.py \
  --findings .review/findings.json --repo-root .

Drop or label UNVERIFIED any finding the verifier fails (exit 1); only verified findings enter the report. See Skill(imbue:review-core) Step 5 and Skill(imbue:structured-output) for the schema.

Exit Criteria

  • A perf-review report file exists for the requested target.
  • Every finding carries a severity label and a concrete suggestion the caller can act on.
  • Time-complexity (T1-T6) and space-complexity (S1-S3) detectors have been run; tier coverage is reported.
  • Tier 2 (gauntlet treesitter) and Tier 3 (graph store) contracts honor the optional-import sentinel: missing modules return [] rather than raising.
  • Each new detector ships with a smallest-AST test that fails before the detector exists; each removed false positive ships with a regression test.
  • Findings flow into Skill(pensive:unified-review) without translation when invoked from the unified entry point.
  • Every reported finding carries a Location + verbatim Anchor confirmed by citation_verifier.py (exit 0), or unverified findings were dropped or labeled UNVERIFIED

Frequently asked questions

What to verify before installation and use

What does the performance-review source document cover?

Detects time and space complexity hotspots via AST scan.

How do I install performance-review?

The source record exposes this install command: npx skills add https://github.com/athola/claude-night-market --skill "plugins/pensive/skills/performance-review". Inspect the command and pinned source before running it.

Which permission-related actions were detected?

Static rules flagged read-files, exec-script in the source; the page lists the matching lines and excerpts.

Alternatives

Compare before choosing

Computed 10025,136

alirezarezvani/claude-skills

app-store-optimization

App Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklist

Computed 9967

brucesongs/kali-claw

insecure-design

Insecure Design (OWASP A06:2025) focuses on security flaws in system architecture and design phases, rather than code implementation-level bugs.

Computed 9916

NintendaDev/unikit-ai

unikit-docs

Generate and maintain the project's TECHNICAL documentation from its codebase — scans the project structure, tech stack, and module boundaries, then writes a lean README landing page plus detailed topic pages (architecture, modules, setup, build, APIs), only the docs that are relevant. Use whenever the user wants to create, update, or validate documentation of the CODE or the project itself, e.g. "generate documentation", "create docs", "write the README", "update the project docs", "document th

Computed 9836,049

K-Dense-AI/scientific-agent-skills

dask

Distributed computing for larger-than-RAM pandas/NumPy workflows. Use when you need to scale existing pandas/NumPy code beyond memory or across clusters. Best for parallel file processing, distributed ML, integration with existing pandas code. For out-of-core analytics on single machine use vaex; for in-memory speed use polars.