app-walkthrough
Job skill for showing how an app or product is used, step by step, on rebuilt real screens. Adds walkthrough questions, the…
Use to make software faster or lighter when speed, memory, CPU or size is the problem. Do NOT use for correctness bugs.
Claude Code
$ npx -y skills add KenKaiii/gg-framework --skill lean --agent claude-code
Codex
$ npx skills add KenKaiii/gg-framework --skill lean -a codex -y
Cursor
$ npx skills add KenKaiii/gg-framework --skill lean -a cursor -y
Gemini CLI
$ npx skills add KenKaiii/gg-framework --skill lean -a gemini-cli -y
GitHub Copilot
$ npx skills add KenKaiii/gg-framework --skill lean -a github-copilot -y
OpenCode
$ npx skills add KenKaiii/gg-framework --skill lean -a opencode -y
Windsurf
$ npx skills add KenKaiii/gg-framework --skill lean -a windsurf -y
name: lean description: "Use to make software faster or lighter when speed, memory, CPU or size is the problem. Do NOT use for correctness bugs." # Checklist audits only (Security, Dependencies, Secrets / Performance); hidden from routine coding after the 27 Oct 2026 skill-value bench. hidden: true license: Performance engineering guidance, not a benchmark certification. Sources and snapshot date are recorded at the foot of each reference file. compatibility: Snapshot dated 3 October 2026; Node release schedule, Core Web Vitals browser support and the current Next.js version re-verified 22 October 2026. Thresholds and tool names decay — re-verify before asserting them as current.
**Pick your mode now:**
| You are… | Mode | Do | |---|---|---| | Writing or editing a feature (any size) | **Inline gate** | Apply *Binding defaults* + *AI-code traps* while you write. One line in the reply on what you did. No benchmarks, no spawning. | | Asked "make it faster / why slow / eating RAM / will it run smoothly", a regression, pre-ship | **Full pass** | Run *Full-pass workflow*. Read `references/playbooks.md` sections for the stacks found; `references/memory-and-processes.md` for any memory or process finding. |
**Process safety:** kill only an exact PID you started (the bash tool's rule); a process using lots of CPU/RAM is a finding to report, not a target. Details: `references/memory-and-processes.md`.
On from the first line of code: never ship the heavy version intending to "optimize later".
1. **Measure, then cut.** In a pass, never optimize from vibes: baseline → find the bottleneck → fix → re-measure. Build-mode defaults apply without benchmarking. 2. **Fix the shared cause once.** The N+1 belongs in the query layer, not a memo at each call site. 3. **Optimize user time, not machine time.** Startup, first paint, navigation, hot interactions, the nightly job. 4. **Memory should be flat.** After N cycles of the core loop, committed memory ≈ after 1. A climbing staircase is a leak; a sawtooth back to baseline is GC. 5. **Nothing outlives its job.** Timers, listeners, subscriptions, watchers, child processes, temp files, locks: each has an owner that ends it on success *and* every failure path. 6. **Bounded by default.** Cache, queue, buffer, retry, log, list render: cap and eviction policy at creation. 7. **Small is fast.** Deleting dead code, unused deps and duplicate styles is the cheapest optimization. 8. **Numbers or silence.** Before/after on the same machine and data, cold and warm. Say what moved, X → Y, and what you could not measure. 9. **No perf theater.** Complexity must pay for itself in measured user time, or revert it. 10. **Label evidence** on every claim: `RUNTIME` (measured), `CODE` (read in source), `DEDUCED` (inferred), `SNAPSHOT` (dated external source).
Scan your own diff before replying.
| Trap | Detect | Fix | |---|---|---| | Whole-library imports | `import * as Icons`, `import _ from "lodash"`, root imports of big icon/UI/date kits | Per-icon/per-function imports or the library's documented tree-shakable entry; confirm in the bundle analyzer | | Effect refetch loops | `useEffect` fetching with object/array/function deps created during render, or no deps array | Fetch on the server / in the route loader / via a query library keyed by primitives | | Over-fetching | `SELECT *`, `findMany()` without `take`/`select`, API returning full rows to render two fields | Select needed columns, paginate, shape on the server | | N+1 | `await` on a query inside `for` / `.map` | Join/include/batch (`IN (...)`, DataLoader) | | Unvirtualized lists | `.map` over unbounded data into DOM or `ScrollView` | Paginate or virtualize (`FlatList`/`FlashList`, TanStack Virtual, `LazyColumn`) | | Polling | `setInterval(fetch…)` without cleanup or visibility check | Events; else backoff + pause + cleanup | | Everything client-side | `"use client"` at the top of a page tree; browser fetches data the server already had | Push the client boundary down to the interactive leaf | | Memo sprinkling | `useMemo`/`useCallback`/`React.memo` on everything | React Compiler on → write plain code, keep manual memo only as an escape hatch (e.g. stable effect deps). Compiler off → memo only what the Profiler implicates | | Unbounded module cache | `const cache = new Map()` at
The coding agent that gets more out of your AI subscription. Fastest and leanest of 20 agents tested, with unlimited local search of real open-source code.
Job skill for showing how an app or product is used, step by step, on rebuilt real screens. Adds walkthrough questions, the…
Job skill for a before-and-after video, showing life without the product, then with it. Adds before/after questions, idea…
Resolve and reuse the user's brand identity for a Motion video. Use when fonts, colours, logos or brand copy need mapping or a…
Job skill for a video about a developer tool: a CLI, API, library, SDK or editor plugin. Adds questions, terminal and code moves,…
Job skill for a product, feature or brand launch video. Adds launch questions, idea patterns, moves and pitfalls to the motion…
Job skill for a video like one the user supplies. Measures the reference's rhythm and style rules with reference-study.mjs, then…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.