shift: Skill for Claude Code

.agents/skills/perf/SKILL.md

perf is a skill for Claude Code, Codex from shift-editor/shift. It costs 89 tokens per session (4,250 once invoked), scanned A, original, Apache-2.0.

A workflow for measuring and fixing slowness in Shift's desktop app. It uses production-like builds and user actions to connect slow frame times or extra interface updates to their causes.

In plain words
What is it for?
Use it to investigate lag while scrubbing, dragging, editing, undoing, or opening fonts, and to profile or review performance tests.
Why use it?
It replaces guesses about performance with measurements from the build users run, so fixes can be checked against the same scenario before and after.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is shift-editor/shift's own configuration. It tells Claude Code and Codex how to work on shift itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything shift configures →

Reuse

Borrowing it

Nothing to install: this file belongs to shift-editor/shift. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/shift-editor/shift/main/.agents/skills/perf/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/shift-editor/shift

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for perf

README.md
[![agentmods](https://agentmods.dev/badge/skills/shift-editor/shift/perf/github.svg)](https://agentmods.dev/skills/shift-editor/shift/perf)
Your own site
<a href="https://agentmods.dev/skills/shift-editor/shift/perf"><img src="https://agentmods.dev/badge/skills/shift-editor/shift/perf/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for perf

Your own site · 80×15
<a href="https://agentmods.dev/skills/shift-editor/shift/perf"><img src="https://agentmods.dev/badge/skills/shift-editor/shift/perf.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 89 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,250 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00089 $0.04250
Opus 5.5 $0.00036 $0.01700
Sonnet 5.5 $0.00018 $0.00850
Haiku 4.5 $0.00009 $0.00425

Measured 3d ago against content hash c509f2809a43, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

perf scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/perf/SKILL.md · 132 lines

How it starts

The opening of the file, as written. The whole thing — 132 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/perf — Measuring and fixing slowness in Shift

Measure the build users run, find what started the work, fix that, and measure again with the same command. A guess that "this looks expensive" has been wrong more often than right here; a number with a cause attached has not.

1. Measure a packaged production build

Never draw conclusions from pnpm dev. React's development build adds jsxDEV, prop validation, and render logging that made up about half of every dev profile and pointed at the wrong code.

pnpm profile:build      # native bridge (release) + renderer minified like a release, with source maps and component names (~1 min warm)
pnpm profile:desktop --font <path> [--glyph A] [--scenario scrub] [--axis Weight] [--seconds 8] [--cpu out.cpuprofile]

profile:desktop launches the packaged app with a throwaway profile, opens the font and glyph, drives the scenario with real pointer input, and prints:

  • Frame times (p50/p90/p99, frames over 33 ms) — the number the user feels.
  • React renders per commit, and for each re-rendered subtree the component and the hook slot or context that started it. This is what tells you what to fix.
  • A source-mapped CPU profile — busy time, top self time, top inclusive time in Shift code. Open the saved .cpuprofile in Chrome DevTools for flame charts.

Notes:

  • The packaged app is in apps/desktop/out/<platform>-<arch>/ (linux-unpacked/shift on Linux). Older out/Shift-* directories are stale Electron Forge output; ignore them.
  • Packaged builds disable Node's inspector fuse, so Playwright's _electron.launch cannot attach. The script uses Chromium's --remote-debugging-port and connectOverCDP instead.
  • On a remote or headless Linux session the app needs the desktop's environment (DISPLAY/WAYLAND_DISPLAY, XDG_RUNTIME_DIR, DBUS_SESSION_BUS_ADDRESS), and must not inherit a Nix LD_LIBRARY_PATH.
  • Linux needs Chromium's Vulkan feature for WebGPU; without a GPU adapter the glyph grid falls back and the numbers mean nothing.
  • Add a scenario to scripts/profile-desktop.mjs rather than writing a one-off script, so the next person can rerun your measurement.

Read the full file on GitHub · 132 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago Changed · +9 lines c509f2809a43
  2. 7d ago Changed · +53 lines · +25 tokens per session 4ccc6aa74e9f
  3. 11d ago Changed · +1 lines 68e606021dd4
  4. 20d ago First seen · 69 lines · 64 tokens per session scan A dae8b50de66e

Subscribe to this mod's changes

perf is a skill published in the GitHub repository shift-editor/shift (379 stars, last pushed today), licensed Apache-2.0. It adds 89 tokens to every session and 4,250 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-09.

Related

Other skills, from other repositories

systematic-debugging

4-phase systematic debugging methodology with root cause analysis and evidence-based verification. Use when debugging complex issues.

DDS-Solutions/AI-TadPole-OS · 25 tokens

performance-profiling

Performance profiling principles. Measurement, analysis, and optimization techniques. Core Web Vitals, Lighthouse audits, flame graphs, and bundle inspection.

DDS-Solutions/AI-TadPole-OS · 32 tokens

lint-and-validate

Automatic quality control, linting, and static analysis procedures. Use after every code modification to ensure syntax correctness and project standards. Triggers onKeywords: lint, format, check, validate, types, static analysis.

DDS-Solutions/AI-TadPole-OS · 48 tokens

verify-changes

Prove code works by running it, not just checking it exists. Verification through execution rather than inspection. Use after writing or modifying code to ensure it actually functions correctly.

DDS-Solutions/AI-TadPole-OS · 38 tokens

migrate-oxlint

Guide for migrating a project from ESLint to Oxlint. Use when asked to migrate, convert, or switch a JavaScript/TypeScript project's linter from ESLint to Oxlint.

oxc-project/oxc · 44 tokens

moli-webfetch

Fetch, inspect, crawl, and capture live, JavaScript-rendered websites with Moli. Use when Codex needs current web content, web research, fact lookup, link following, a bounded crawl, client-rendered or response-gated content, network diagnostics, or a standalone HTML, Markdown, JSON, semantic-tree, viewport or…

lexmount/moli · 90 tokens