performance-review
БесплатноБез исполняемых скриптовНе проверенDetects time and space complexity hotspots via AST scan
от athola1 388 установок в других каталогахОб этом скилле
Night Market Skill: ported from claude-night-market/pensive. For the full experience with agents, hooks, and commands, install the Claude Code plugin.
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 tree-sitter to extend
detection to JS/TS, Go, Rust, Java, and C/C++ when the tiers
extra is installed. Tier 3 walks the gauntlet call graph forward
from each finding and raises its severity one step when a callee
holds a hotspot, and runs when the gauntlet plugin is importable
and a .gauntlet/graph.db exists. Without them, Tiers 2 and 3
no-op and Tier 1 still produces 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 drivescProfile,py-spy, and benchmarks. - General refactoring guidance not focused on hotspots: use
Skill(pensive:code-refinement)whosealgorithm-efficiencymodule covers broader optimization patterns. This skill detects, and 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 and leaves the transform choice to that skill. - Architecture-level performance (sharding, caching layers,
queue placement): use
Skill(pensive:architecture-review).
Required Progress Items
perf-review:context-establishedperf-review:scan-completeperf-review:findings-categorizedperf-review:integration-checkedperf-review:report-generatedperf-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 the
tiersextra 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 tree_sitter_language_pack is importable, run Tier 2 on
non-Python files that were skipped at Step 2. If gauntlet is
importable and a .gauntlet/graph.db exists in the scanned
file's directory or any parent, run Tier 3 to upgrade severities
based on hotspots in transitive callees.
Without the extra, this step is a no-op and the report notes
"Tier 2/3 not available: install pensive with the tiers extra
for multi-language and call-chain coverage." A file that
tree-sitter cannot parse adds a warning and yields no Tier 2
findings.
Step 5: Report (perf-review:report-generated)
Emit a markdown report:
## Performance Review: <target>
### HIGH (<count>)
- src/foo.py:42: Nested loop over the sa
Установить performance-review в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл performance-review?
Detects time and space complexity hotspots via AST scan
Как установить скилл performance-review?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл performance-review запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic