Agent skill

Happier Profile And Optimize

by happier-dev in happier-dev/happier

The method for profiling and optimizing anything whose success is a measured cost — frame the phase and metric, choose an instrument that can actually see the cost, label the waste, falsify the…

MITAuto-check passedAgent Workflows

Install Happier Profile And Optimize

skills CLI
$ npx skills add happier-dev/happier --skill happier-profile-and-optimize -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install happier-dev/happier happier-profile-and-optimize --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/happier-dev/happier.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/happier-profile-and-optimize .claude/skills/happier-profile-and-optimize && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
happier-profile-and-optimize
GitHub stars
1.9k
Token cost
~3.2k tokens
SKILL.md length
1,759 words
Files
1
Skills in repo
28
Repo updated
First seen
Licence
MIT

At a glance

The method for profiling and optimizing anything whose success is a measured cost — frame the phase and metric, choose an instrument that can actually see the cost, label the waste, falsify the…

  • Works in 6 steps: Frame the cost before touching an… → Pick the instrument that can see the cost → Label the waste, then write the hypothesis → …
  • Work is about slowness
  • SKILL.md covers 1. Frame the cost before…, 2. Pick the instrument that…, 3. Label the waste, then write… and 4. Build the falsifying…, plus 4 more sections
  • Calls curl

What it does

Happier Profile And Optimize is an agent skill from happier-dev/happier. The method for profiling and optimizing anything whose success is a measured cost — frame the phase and metric, choose an instrument that can actually see the cost, label the waste, falsify the hypothesis with a cheap control before building a fix, and prove the result without over-claiming. Covers app/device and server/database work. Use when work is about slowness, jank, startup/open time, blocked JS, hangs, memory, render churn, a slow query, or a claimed speedup. It does not carry the write-time gotchas for…

Its SKILL.md is about 3.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Agent Workflows, covering Mobile performance, Query optimization and Agent instruction files. The repository describes itself as: Web, Desktop & Mobile client and orchestrator for Codex, Claude Code, OpenCode, Pi, Cursor, Grok, Antigravity, Kimi, Augment Code, Qwen, fully end-to-end encrypted. The licence is MIT.

When your agent uses it

  • Work is about slowness
  • Startup/open time
  • A claimed speedup

Example prompts

  • “/happier-profile-and-optimize”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Frame the cost before touching an instrument
  2. Pick the instrument that can see the cost
  3. Label the waste, then write the hypothesis
  4. Build the falsifying control before the fix
  5. Change, prove, and be willing to revert
  6. When you cannot measure

What it can do on your machine

Read from SKILL.md and the folder at commit 1f03ccd. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • curl

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use curl, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Happier Profile And Optimize loads about 3.2k tokens when it runs. Until then it costs about 148 tokens; SKILL.md has 1,759 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~148
When it runs · the whole SKILL.md, loaded when a task matches
~3.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from happier-dev/happier at commit 1f03ccd, republished under its MIT licence (© happier-dev). 1,759 words, ~3,228 tokens.

Download SKILL.mdSave it as .claude/skills/happier-profile-and-optimize/SKILL.md (or your agent's skills folder).
name
happier-profile-and-optimize
description
The method for profiling and optimizing anything whose success is a measured cost — frame the phase and metric, choose an instrument that can actually see the cost, label the waste, falsify the hypothesis with a cheap control before building a fix, and prove the result without over-claiming. Covers app/device and server/database work. Use when work is about slowness, jank, startup/open time, blocked JS, hangs, memory, render churn, a slow query, or a claimed speedup. It does not carry the write-time gotchas for UI code — those live in `apps/ui/AGENTS.md`.

Happier Profile and Optimize

Use this skill for any work whose success is a measured cost, not a behavior: slow open/foreground/navigation, jank, hangs, startup, memory, render churn, a query that got slow, or verifying somebody's speedup claim. It is the investigation method — reach for it once a cost exists.

It is deliberately not the list of things to watch for while writing code. Those must apply unprompted, at authoring time, long before anyone suspects a problem, so they live in package instructions that are read on every task: apps/ui/AGENTS.md → Performance and continuity owns the UI write-time invariants (referential stability, narrow subscriptions, component-type stability, high-frequency state placement, dependency-array identity, loop stop conditions, one perf change lands on all platforms). If you are about to restate one of those here, stop and strengthen it there instead.

The rules this skill operates under also live elsewhere and are not restated: root AGENTS.md → Product priorities (name the phase and metric, instrument must be able to see the cost, no ratio without both sides on the same workload and machine state, no blanket memoization) and Risk-weighted execution. Read those; do not re-derive them.

Route out, do not absorb:

  • .agents/skills/happier-diagnose — the incident is a failure (error, hang-to-crash, broken session), not a cost. Diagnose first, then return here only if the outcome is a cost.
  • .agents/skills/happier-testing — lanes, RED/GREEN, mutation proof, live gates. A perf fix with a behavior change is still test-first there.
  • .agents/skills/happier-implement — the actual change, canonical-owner discovery, split-brain sweep.
  • .agents/skills/verify-claims — before relying on any delegated or reported number.
  • .agents/skills/attack-conclusion — before handing off a perf verdict.

1. Frame the cost before touching an instrument

State, in one line each: the phase (cold open, warm foreground, navigation, steady state, per-commit), the metric (blocked ms, count, bytes, dropped frames), the workload (session size, row count, account), and the user-visible symptom. A metric without a phase cannot be reproduced or compared.

Measure the moment that hurts. Some costs are steady-state, not open-time; some are per-commit rather than a resting loop. Profiling the wrong moment produces a real number about the wrong thing.

2. Pick the instrument that can see the cost

Get a total first — total blocked/elapsed time for the phase — then reconcile every instrument's attributed total against it, per the instrument-coverage rule in root AGENTS.md. What that rule costs when skipped, measured here: a React profiler reported ~1.4 s while the JS thread was blocked ~12 s; 88% of the cost was outside React, and a full round of work went into render churn that was not the bottleneck.

Route to the instrument by what it can observe:

You needInstrument
Entry point for RN perf work, sweep order, fix patternsargent-react-native-optimization
React render/commit counts, slow components, before/after render deltasargent-react-native-profiler
CPU hotspots with call paths, UI hangs, memory — anything outside Reactargent-native-profiler (xctrace / Perfetto)
Component tree, props/state identity, why something re-renderedreact-devtools
CDP evaluate, arming an in-app probe, reading the log registryargent-metro-debugger
Server/database cost: which index a query actually seeks, what falls into Filter:, whether a predicate forces a scanthe planner — EXPLAIN QUERY PLAN (SQLite) and EXPLAIN (PostgreSQL), on a seeded table, post-ANALYZE

Do not restate their contents; open the one you need.

Server and database work uses this same method — the instrument just changes. Read a plan for its shape, not its cost number: which index was chosen, which columns the Index Cond actually binds, and what residual predicate landed in Filter:. Run every engine that ships, because they disagree in ways that change the diagnosis: here the same attention query was a bare SCAN main.Session on SQLite but a Bitmap Index Scan on Postgres whose index condition bound only meaningfulActivityAt IS NOT NULL, leaving accountId in the Filter: — an account-wide scan wearing a bitmap. Isolate the cause with counterfactual query shapes, not by reading the query: dropping one OR arm at a time proved the intended index existed and was correct all along, and that a visibility OR alone was sufficient to destroy the seek. Costs on a small dev table are planner estimates, not production timings; the shape is the load-bearing part, and it must be engine-consistent before you act on it.

Memory work distinguishes allocation traffic from retention. Record cumulative allocations/GC separately from live heap, external/native memory, and process footprint. Compare repeated warmed workloads after the same idle/release window and, when the runtime permits it, a diagnostic full collection. Count retained domain records and inspect strong retaining paths before calling growth a leak. A weak-key cache is not proof of collectability when its values are opaque native handles: native code may strongly root the key. Use held-handle and dropped-handle controls across collections to establish that lifetime before changing application callbacks or retention policy. A heap snapshot, debugger, error log, or long Fast Refresh session can itself retain substantial memory; establish that measurement state before claiming application savings. Never add forced GC to product behavior as the fix. Record runtime reloads: a trace interrupted by Fast Refresh is not a continuous workload. For a bounded capture, use existing client development controls to pause auto-refresh, then restore them; preserve the loaded-source identity and respect managed-server ownership. Native-code dependency patches require a rebuilt development client; reconcile generated native projects through the existing build tooling and verify launch/component registration, since compile success and Fast Refresh cannot establish that the patched native path runs. A JavaScript-only dependency patch instead needs an app JavaScript reload and a probe of the loaded patched behavior; it does not itself require a native rebuild.

For unexplained growth after a controlled warmed repeat, the next investigation must identify surviving allocations and their lifetime owner, not merely repeat or widen navigation and collect another total. Disabled React profiling does not establish an empty developer-tool baseline: inspect buffered DevTools operations/history and use its existing connection/flush lifecycle as a diagnostic control before attributing that retention to the app. Object counts and shortest root paths are not dominator-retained sizes; account for weak-key/ephemeron semantics when interpreting a heap graph. For a native/external residual, compare app-specific allocation generations and allocating stacks, then inspect native ownership or memory graphs; RSS alone cannot distinguish live allocations, leaked ownership, allocator reserve, and mapped memory.

Locate in time, then in code. Block timing (e.g. a 16 ms drift sampler armed over the phase) tells you when the thread was stolen; a CPU profile with call paths tells you what stole it. Never fix something located only in time — a time window plus a plausible suspect is a hypothesis, not an attribution.

Show full SKILL.md (679 more words)Show less

3. Label the waste, then write the hypothesis

Force one of these labels before proposing anything. The label constrains the fix:

TOO EARLY (work done before it is needed) · TOO OFTEN (repeated per event/commit/row) · TOO MUCH (correct work, oversized input) · TOO SERIAL (awaited in sequence, parallelizable) · WRONG SHAPE (data structure forces a scan) · N+1 (per-item round trip) · RENDER CHURN (re-render without changed output) · CACHE HAZARD (missing key input, no in-flight sharing, or a stale/poisoned entry).

Then, before any edit:

Hypothesis: <cost> is caused by <work> because <evidence>. Verification: measure with <tool>, inspect <files>.

If <evidence> is a subtraction ("the rest must be X"), root AGENTS.md already rules that a hypothesis, not a measurement — go observe X before fixing it.

4. Build the falsifying control before the fix

Design the cheapest observation that would prove the hypothesis wrong, and run it first. A control that costs minutes routinely retires days of queued work: here, one second-open-with-modules-already-resolved run showed the cost was not module loading and retired an entire lazy-loading workstream before it was built.

Good controls: same flow twice (cold vs warm), the flow with one input emptied, the suspect path short-circuited behind a temporary local branch, the same phase on a second account/session size. Keep the control disposable; it is evidence, not a deliverable.

5. Change, prove, and be willing to revert

  • Fix at the canonical owner via .agents/skills/happier-implement; a perf fix that adds a second path for the same concept is a defect, not an optimization.
  • Replay the same flow, phase, and workload with the same instrument, under root AGENTS.md's paired-measurement gate. Concretely here, work-avoided proofs are call counts, commit counts, bytes parsed, and blocked ms.
  • A fix that costs UX is not a win. This program built, measured, and reverted an idle-rAF scheduling fix because it broke bottom-follow. Record such reverts with the precondition that would make the idea viable again; a reverted measured attempt is a result, not a failure.
  • Sweep after the fix per root AGENTS.md: the same waste label usually has siblings.

6. When you cannot measure

No device, saturated machine, flapping tooling, unreproducible phase: say so plainly and claim nothing. Report the phase, what was attempted, and the missing prerequisite as [blocked]. An inferred number is worse than no number — it survives into later decisions with false authority.

Device measurement recipe

  1. Boot the simulator, launch the app, let it settle.
  2. Resolve the device id from curl -s localhost:18829/json/list and use reactNative.logicalDeviceId — never the raw simulator UDID. Select the exact logical device, never the first compatible debugger target; multiple apps can share Metro. Verify its route against the device being tapped and associate native samples with that device's process. Record this identity with captures and re-resolve it after relaunch. Wrong id = a profile of a different device.
  3. Arm the probe before the action (profiler start, sampler, log registry), then perform exactly the flow you framed in step 1.
  4. Stop and analyze. react-profiler-analyze requires project_root.
  5. Pin bundle identity when a stale bundle could invalidate the result — see .agents/skills/happier-testing device QA rules.

Temporary probes must survive retries and failed captures cleanly: clear a prior probe before replacing its timer handle, keep cleanup in the owning harness, and stop the timer before deleting state its callback reads. Verify cleanup and absence of new diagnostic exceptions in the running app; deleting a global handle alone does not stop an orphaned interval. If a disconnected profiler leaves the runtime contaminated, label its measurements accordingly and respect the user's restart authority before establishing a clean baseline.

Do not wrap Metro's global.__r to count module evaluations. It drops the CDP connection: the for-in over the registry loses its non-enumerable state. Use the first-vs-second-open control from step 4 instead.

Stop and ask when

  • the only available fix trades correctness, accessibility, continuity, freshness, or privacy for speed;
  • the measurement requires a destructive action, another user's session, or shared/production state;
  • the phase cannot be reproduced and the user wants a number anyway;
  • the fix's blast radius exceeds the authorized scope and the local variant would be a second owner.

© happier-dev, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/happier-profile-and-optimize of happier-dev/happier.

Open the folder on GitHubat commit 1f03ccd

Compare with similar skills

Happier Profile And Optimize next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Happier Profile And Optimize compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Happier Profile And Optimize this skillhappier-dev/happier1.9k—~3.2kAutomated safety check: PassMIT
Clawmemyoloshii/ClawMem210—~7.5kAutomated safety check: PassMIT
Docs Gardeningmhmzdev/the-holy-quran-app889—~1.1kAutomated safety check: PassMIT
Code Stylepandulapeter/campfire101—~2.8kAutomated safety check: PassMPL-2.0
Mine HistoryZoneMinder/zmNinjaNg110—~1kAutomated safety check: PassApache-2.0
Advpl Debuggingthalysjuvenal/advpl-specialist186—~487Automated safety check: PassMIT

Similar skills

  • Clawmem

    yoloshii/ClawMem

    ClawMem operational reference for agents at query time — the 3-rule escalation gate, MCP tool routing, the 4 query-optimization levers, pipeline behavior (query vs intentsearch), composite scoring…

    210 GitHub stars~7.5k tokensUpdated 2 days ago
    Agent WorkflowsAuto-check passed
  • Docs Gardening

    mhmzdev/the-holy-quran-app

    Audit and maintain The Holy Qur'an app's knowledge base (AGENTS.md, .agents/rules/, docs/ OKF bundle) for staleness, broken cross-links, drift from code, and OKF structural issues.

    889 GitHub stars~1.1k tokensUpdated 28 days ago
    Agent WorkflowsAuto-check passed
  • Code Style

    pandulapeter/campfire

    Code style, commenting, and documentation conventions for the Campfire codebase.

    101 GitHub stars~2.8k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Mine History

    ZoneMinder/zmNinjaNg

    A skill your agent uses when asked to mine the commit history for lessons the agent instruction files have not captured, to audit whether domain-context and contracts reflect what actually broke, or…

    110 GitHub stars~1k tokensUpdated 2 days ago
    Agent WorkflowsAuto-check passed
  • Advpl Debugging

    thalysjuvenal/advpl-specialist

    A skill your agent uses when the user asks to debug, diagnose, or fix an ADVPL/TLPP error on TOTVS Protheus -- compilation errors (syntax, missing includes, undeclared variables), runtime failures…

    186 GitHub stars~487 tokensUpdated 24 days ago
    DevelopmentAuto-check passed
  • Using Agent Skills

    addyosmani/agent-skills

    Meta-skill for choosing which workflow skill fits the task at hand, plus always-on habits: surface assumptions, stop on confusion, push back, keep it simple and stay in scope.

    103k GitHub starsUsed in 4 repos~2.4k tokens
    Agent WorkflowsAuto-check passed

More from happier-dev/happier

All 28 skills in this repo
  • Happier Review

    happier-dev/happier

    Conduct evidence-backed Happier code, plan-completeness, session, worktree, feature, commit, branch, PR, codebase, and release-readiness reviews with affected-corridor analysis, high-confidence…

    1.9k GitHub stars~4.5k tokensUpdated today
    Auto-check passed
  • Happier CI Stabilize

    happier-dev/happier

    Stabilize failing, flaky, slow, or repeatedly rerun Happier CI and nightlies by collecting all reachable failures from one exact attempt, correcting canonical causes in one batch, simplifying…

    1.9k GitHub stars~2.2k tokensUpdated today
    Auto-check passed
  • Happier Commit Worktree

    happier-dev/happier

    Reconnoiter, classify, validate, group, and commit a large or continuously changing Happier worktree as coherent, human-understandable commits while preserving concurrent work and excluding…

    1.9k GitHub stars~3.9k tokensUpdated today
    Auto-check passed
  • Happier Release

    happier-dev/happier

    Resolve Happier's private release authority and run an exact-SHA release or nightly through cheap admission, verified CI evidence, resumable immutable candidates, and terminal publication proof.

    1.9k GitHub stars~2.4k tokensUpdated today
    Auto-check passed
  • Happier Diagnose

    happier-dev/happier

    Diagnose and explain a Happier runtime, session, daemon, provider (Claude/Codex/OpenCode), authentication, or connectivity incident from logs, structured diagnostics, runtime state, and source…

    1.9k GitHub stars~2.1k tokensUpdated today
    Auto-check passed
  • Happier Implement

    happier-dev/happier

    Implement, change, build, fix, refactor, migrate, or apply accepted review findings in the Happier repositories with canonical-owner discovery, scope-preserving solution economy, TDD, efficient…

    1.9k GitHub stars~4.2k tokensUpdated today
    Auto-check passed

Questions about Happier Profile And Optimize

What does Happier Profile And Optimize do?

The method for profiling and optimizing anything whose success is a measured cost — frame the phase and metric, choose an instrument that can actually see the cost, label the waste, falsify the…. Happier Profile And Optimize is an agent skill from happier-dev/happier. The method for profiling and optimizing anything whose success is a measured cost — frame the phase and metric, choose an instrument that can actually see the cost, label the waste, falsify the hypothesis with a cheap control before building a fix, and prove the result without over-claiming.

When should I use Happier Profile And Optimize?

Happier Profile And Optimize fits situations like: work is about slowness; startup/open time; A claimed speedup.

How do I install Happier Profile And Optimize in Claude Code?

Run `npx skills add happier-dev/happier --skill happier-profile-and-optimize -a claude-code`. Or copy the skill folder (.agents/skills/happier-profile-and-optimize in happier-dev/happier) into .claude/skills/happier-profile-and-optimize in your project. Claude Code loads it when a task matches its description.

How do I install Happier Profile And Optimize in Codex?

Run `npx skills add happier-dev/happier --skill happier-profile-and-optimize -a codex`. Or copy the skill folder (.agents/skills/happier-profile-and-optimize in happier-dev/happier) into .agents/skills/happier-profile-and-optimize in your project. Codex loads it when a task matches its description.

Can I use Happier Profile And Optimize in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add happier-dev/happier --skill happier-profile-and-optimize -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/happier-profile-and-optimize, .gemini/skills/happier-profile-and-optimize, .github/skills/happier-profile-and-optimize and .opencode/skills/happier-profile-and-optimize in your project.

What does Happier Profile And Optimize need to run?

Going by SKILL.md and its folder, Happier Profile And Optimize needs the command-line tools its instructions call (curl).

Does Happier Profile And Optimize access the network?

SKILL.md contains no URLs. Its commands use curl, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Happier Profile And Optimize safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Happier Profile And Optimize use?

Happier Profile And Optimize is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Happier Profile And Optimize use?

About 3.2k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Happier Profile And Optimize?

Skills that share tags, products or a category with Happier Profile And Optimize: Clawmem (yoloshii/ClawMem, 210 stars), Docs Gardening (mhmzdev/the-holy-quran-app, 889 stars), Code Style (pandulapeter/campfire, 101 stars) and Mine History (ZoneMinder/zmNinjaNg, 110 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Happier Profile And Optimize?

happier-dev (a GitHub organization) maintains it in happier-dev/happier, which has 1,883 GitHub stars. The repository holds 28 skills in this directory. The repository was last updated on October 8, 2026.

Source: happier-dev/happier on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.