aggregate-logs
CommandGenerate LEARNINGS.md from skill execution logs over a configurable time window.
Static-analysis hot-spot review for time and space complexity.
> /plugin marketplace add athola/claude-night-market
name: performance-review description: Static-analysis hot-spot review for time and space complexity.
Static-analysis hot-spot review for time and space complexity.
/performance-review # scan changed files /performance-review path/to/file.py # scan one file /performance-review --tier 1 # force Tier 1 only (skip gauntlet)
1. **Context**: Identify target files (changed or argument-named). 2. **Tier 1: AST scan**: Detect Python time/space hotspots (nested loops, list `in` lookups, string concat, regex recompile, list-vs-generator, copy-in-loop). 3. **Tier 2: tree-sitter** (if `tree_sitter_language_pack` is installed): nested same-iterable loops, list scans in loops, and appends in nested loops for JS/TS, Go, Rust, Java, C/C++. 4. **Tier 3: gauntlet graph** (if gauntlet is installed and a `.gauntlet/graph.db` exists above the file): raise a finding one severity step when a function it calls, directly or transitively, holds a hotspot. 5. **Report**: Group findings by severity. Each finding cites `file:line`, severity, category (`time`/`space`), the pattern detected, and a concrete suggestion.
| Tier | ID | Pattern | |---|---|---| | 1 | T1 | Nested `for` over the same iterable (HIGH) | | 1 | T2 | `x in <list>` inside a loop (HIGH) | | 1 | T3 | `re.compile()` inside a loop (MEDIUM) | | 1 | T4 | String `+=` accumulator in a loop (MEDIUM) | | 1 | T5 | Recursive function without `@cache` (LOW) | | 1 | T6 | List comprehension passed to a reducer (LOW) | | 1 | S1 | `.append()` inside nested loops (MEDIUM) | | 1 | S2 | `list(...)` wrapping a generator in a reducer (LOW) | | 1 | S3 | `.copy()` / `dict()` / `list()` in a loop (MEDIUM) | | 2 | * | Same patterns adapted to non-Python via tree-sitter | | 3 | * | Severity upgrades from transitive call analysis |
Three patterns are reviewed by eye, not by the AST scan (see `Skill(pensive:performance-review)` module `memory-allocation-lenses.md`):
(ARP table, directory scan, API page loop) with no cap.
on infrequent events (memoize behind a generation counter).
(cap the set, bound concurrency, add per-call timeouts).
Findings from these lenses must name their growth mode: persistent RSS growth versus transient per-frame churn.
clarity beats micro-optimization).
For runtime profiling rather than static analysis, see `Skill(parseltongue:python-performance)`.
A grouped findings list with file:line citations, severity, and fix suggestions. No findings means no detected patterns: not a guarantee of optimal performance.
Install the optional extra (`uv sync --extra tiers` in `plugins/pensive`) to enable Tier 2. Tier 3 also needs the gauntlet plugin importable, which `uv sync` in `plugins/pensive` provides through the dev group. Without them:
missing (sentinel-guarded import).
or no `.gauntlet/graph.db` exists above the file.
Reviews of non-Python source without the extra produce zero findings: that is correct behavior, not an error. A non-Python file that tree-sitter cannot parse adds a warning to the result. Build the graph with `python3 plugins/gauntlet/scripts/graph_build.py <root>`.
If `plugins/gauntlet/scripts/graph_build.py` is absent (a marketplace install, not a checkout), skip this step and say so.
invokes.
including the existing `algorithm-efficiency` module.
A plugin marketplace for Claude Code. Install only the plugins you need to run git workflows, code review, spec-driven development, and autonomous agents from inside your Claude Code session.
Generate LEARNINGS.md from skill execution logs over a configurable time window.
Analyze skill file complexity metrics and generate modularization recommendations for splitting or progressive loading.
Generate context optimization report for skill directories
Create slash commands with brainstorming and best practices
Scaffold new Claude Code skills with brainstorming, TDD methodology, and proper frontmatter and module structure.
Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.