system-performance-guardrail
Measure, root-cause, fix, verify and record performance contention on a developer machine: cloud-sync daemons (iCloud Drive, OneDrive, Dropbox, Google Drive)…
Skill by jpantsjoha
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/jpantsjoha-system-performance-guardrail
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: documents, design, backend, testing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Shell scripts
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/system-performance-guardrail
What's inside
- Skill name
system-performance-guardrail- Description
- Measure, root-cause, fix, verify and record performance contention on a developer machine: cloud-sync daemons (iCloud Drive, OneDrive, Dropbox, Google Drive), file indexers, AI-tool MCP server fleets, and automation browsers left behind by tests and browser skills. Trigger when the machine is slow, apps freeze, browser or MCP tool calls time out, load exceeds the core count, or before and after any UI/UX/performance test run. Includes the L0–L4 optimisation scale and the test-hygiene contract.
- License
- Apache-2.0
- Instructions
- 89 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Files (2)
- SKILL.md
- perf-guardrail.sh · scripts/
SKILL.md (first lines)
# system-performance-guardrail — the machine is part of the test environment
Agentic delivery runs many things at once on one laptop: several AI CLI sessions, each with its
own MCP servers; browser automation (Playwright, Selenium, Puppeteer, a CDP harness); indexers;
cloud-sync clients; dev servers; test suites. When they contend, the symptoms look like product
bugs — timeouts, flaky UI tests, "the site is slow" — and the next agent spends its budget
diagnosing a healthy remote. This skill makes the machine's state a measured input, gives each
signature a cause and a bounded action, and makes cleanup a contract rather than a hope.
Script: `scripts/perf-guardrail.sh` (bash 3.2, macOS, no sudo, no third-party tools). Read-only
except `cleanup --yes` (kills), `icloud throttle|restore` (signals) and `record` (appends). Linux notes are at the end.
## The loop
| Phase | Command | Output |
|---|---|---|
| 1 Measure | `perf-guardrail.sh snapshot --save /tmp/pre.snap`, `hangs 7`, `fleet`, `orphans` (`rows` gives the same as machine-readable lines for CI gates) | load vs cores, memory, swap, top consumers **with the session that owns them**, sync daemons (a stopped one is flagged), indexer, MCP fleets, automation browsers, and every app hang report with the frames that explain it |
| 2 Attribute | the signature table below | one cause per signature, never "the Mac is slow" |
| 3 Act | only the sanctioned actions below | bounded, reversible, one attempt |
| 4 Verify | `perf-guardrail.sh verify /tmp/pre.snap`, `hangs 1` | a before → after table in the reply; a fix without numbers did not happen |
| 5 Record | `perf-guardrail.sh record "<one line>"` | a dated lessons file the next agent reads before re-deriving anything |
Interpretation rules: load average on macOS counts runnable threads only, so high load with free
memory is CPU contention, not paging; `ps %cpu` is a lifetime average, confirm live with
`top -l 2 -s 1 -pid`; a *frozen* app (a hang report) is almost never memory — read the report.
## Signature → cause → action
| Signature | Cause | Action |
|---|---|---|
| Hang reports whose main thread waits in the cloud-sync client (`ubiquityIdentityToken` → `CloudDocs` → `bird` on macOS); the sync daemon shows stat `T` | someone stopped the daemon with SIGSTOP; its IPC port stays open and every caller waits forever | `perf-guardrail.sh icloud restore` (SIGCONT). **Never SIGSTOP a sync daemon**: a stopped process is worse than a dead one, because a dead one returns an error and a stopped one returns nothing |
| Load far above the core count, memory fine, a dozen `npm exec …@latest` / `npx` processes at 60–80% CPU each | an AI CLI run starting its entire MCP server list; `@latest` re-resolves against the registry on every start | `fleet` to find the owner; remove servers the run does not use; pin versions; prefer remote (HTTP) MCP servers over per-session stdio processes |
| Indexer (`mds_stores`, Windows Search) at 150–250% CPU, workers respawning | indexing git repositories and `node_modules` inside a cloud-synced folder | keep repositories outside the sync root; exclude dev trees from the indexer |
| `git`, `rsync`, `mv` asleep for minutes at 0% CPU on a synced path | evicted ("online-only") files being materialised; moving a tree out of the sync root downloads all of it first | work outside the sync root; copy out, verify against `origin`, delete in place — never `mv` out. Git state read inside a sync root is not trustworthy: the client can rewrite `.git` from a stale cloud snapshot |
| Sync client at 50–100% CPU with hundreds of item-not-found errors per 30 s | retry storm after a mass deletion inside the sync root | one restart of the client; then let it drain (overnight, if needed); last resort: sign the folder out and back in |
| Browser family memory > 6 GB, or a headless / throwaway-profile browser or WebDriver whose launcher is gone | a test or browser skill opened it and never closed it | `perf-guardrail.sh cleanup` lists the candidates; `cleanup --yes` kills them; `--all --yes` every disposable one after a test run. Only **disposable** browsers qualify: headless, or a profile under a temp dir / Playwright / Puppeteer / Selenium / harness path (extend with `PERF_DISPOSABLE_RE`). A browser on a normal profile is never a candidate, even with `--remote-debugging-port` — that is a developer's DevTools session; `PERF_KEEP_RE` protects anything else |
| Several AI CLI sessions each holding stdio MCP children | every session starts its own servers | close idle sessions; remote servers where they exist |
## Sanctioned actions and guards
Safe, reversible, no permission needed: SIGCONT a stopped daemon; throttle a sync client to
background priority (`taskpolicy -b` on macOS, `renice`/`ionice` on Linux) rather than stopping it;
kill disposable automation browsers and drivers (`cleanup --yes`; dry run first); remove unused MCP
servers after backing up the config; one `killall` of a wedged daemon that its supervisor will respawn.
Needs the operator: system extensions, privileged daemons, indexer privacy lists, turning
"optimise storage" off (check how many gigabytes would download first).
Never: SIGSTOP a daemon; unload a system-protected service; `mv` a tree out of a sync root; kill by
name pattern without reading the parent chain; loop a kill.
## The cloud-sync and performance optimisation scale
Use it to say where a machine or a team is, and what the next step costs.
| Level | State | Evidence |
|---|---|---|
| L0 Unmeasured | slowness is folklore; agents retry and blame the remote | no snapshot, no hang-report triage |
| L1 Measured | one snapshot before retrying anything; WARN/CRIT thresholds | `snapshot` in every degradation report |
| L2 Attributed | every consumer has an owner; hang reports read; signatures named | `fleet`, `orphans`, `hangs` in the record |
| L3 Governed | sanctioned actions only; sync throttled on a schedule, never stopped; repositories outside the sync root; tests close what they open | scheduler in place, cleanup contract in the test strategy, lessons file growing |
| L4 Self-healing | scheduled checks re-apply throttles and heal stray stops; cleanup runs after every automation job; before/after numbers in every report | zero hang reports over a month; no orphaned browsers older than a run |
## The test-hygiene contract (for every generated UI/UX/performance/load test)
1. Teardown is unconditional: every browser, context, page, driver, dev server and child
process is closed in `afterEach`/`afterAll` or `try/finally`, and closing runs on failure.
2. Teardown is proven: the suite ends with a resource count — automation browsers and
drivers = 0, harness tabs ≤ the cap, no MCP child older than the run — and fails on leftovers.
3. Browser-driving skills obey the same contract: close every tab you opened before the turn
ends; never leave the automation browser with more than ten tabs.
4. Performance tests measure a quiet machine: snapshot first; if load exceeds the core count
or a sync daemon is busy, the numbers are not the product's.
5. The failsafe is not the fix: a leftover that `cleanup` lists is a defect filed against the
suite, with the `orphans` output as evidence.
## Cross-harness
Copy or symlink this directory into each harness's skill root (Claude Code `~/.claude/skills`,
Codex `~/.codex/skills`, Antigravity `~/.gemini/config/skills`). Headless model lanes that cannot
run commands should be given the script's output to reason over.
## Linux notes
Replace `memory_pressure` with `/proc/meminfo`, `sysctl vm.loadavg` with `/proc/loadavg`,
hang reports with `journalctl -p err` and `coredumpctl`, `taskpolicy -b` with
`renice 19` + `ionice -c3`, and the daemon names with the sync client in use.From jpantsjoha/ai-native-developer-experience, Apache-2.0.
More from jpantsjoha/ai-native-developer-experience
- 0.641score
cloud-expert
jpantsjoha
Cloud guardrails for any vendor workload — Google Cloud (GCP, Vertex AI, GKE), AWS (IAM, EKS, Bedrock), Azure (Entra ID, Policy, AKS), Alibaba Cloud (RAM…
SkillAFreshness: A★ 13Claude Code +9 - 0.641score
cloud-checkup
jpantsjoha
Read-only SRE checkup of any GCP project: deterministic probes of the edge, Cloud Run services, 7-day error logs, Cloud Scheduler, alert policies and uptime…
SkillAFreshness: A★ 13Claude Code +9 - 0.641score
using-the-harness
jpantsjoha
Session-start orientation for this team harness.
SkillAFreshness: A★ 13Claude Code +9 - 0.641score
operating-model-bootstrap
jpantsjoha
Bootstrap or harden a project's operating model for mixed human and AI delivery teams.
SkillAFreshness: A★ 13Claude Code +9 - 0.641score
pr-reviewer
jpantsjoha
Review gate for correctness, reuse, and simplification.
SkillAFreshness: A★ 13Claude Code +9 - 0.638score
cost-guardrail
jpantsjoha
LLM and cloud cost awareness — model tiering, token budgets, right-sizing, and when a cheaper model suffices.
SkillAFreshness: A★ 13Claude Code +9 - 0.636score
mcp-server-scaffold
jpantsjoha
Scaffold and govern an MCP server as a bounded tool seam.
SkillAFreshness: A★ 13Claude Code +9 - 0.636score
the-architect
jpantsjoha
Architecture decisions, trade-off analysis, and ADR authoring.
SkillAFreshness: A★ 13Claude Code +9 - 0.636score
adversarial-gate
jpantsjoha
JP's signature red-team pass — "how would I break this?" Argue against your own approach before proceeding.
SkillAFreshness: A★ 13Claude Code +9 - 0.636score
delivery-orchestrator
jpantsjoha
Decompose an epic into atomic parallelizable tasks, route each to the right skill, and keep the four delivery records straight — issues, STATUS, ROADMAP…
SkillAFreshness: A★ 13Claude Code +9 - 0.636score
frontend-performance-audit
jpantsjoha
Measure real frontend performance — Core Web Vitals (LCP, CLS, INP), page-load traces, CPU and network throttling, Lighthouse accessibility/SEO scores, and…
SkillAFreshness: A★ 13Claude Code +9 - 0.636score
get-it-done
jpantsjoha
Pursue an agreed goal to a working outcome without waiting: decompose it, re-prioritise as evidence arrives, branch, gate, get an independent review (a…
SkillAFreshness: A★ 13Claude Code +9
Signals
- Stars
- 13
- Forks
- 4
- Open issues
- 2
- Last commit (this folder)
- Sep 14, 2026 (1 month ago)
- Last release
- Oct 16, 2026 (12 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Apache-2.0
- Website
- jpantsjoha.com
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from jpantsjoha
- 0.641score
using-the-harness
jpantsjoha
Session-start orientation for this team harness.
SkillAFreshness: A★ 13Claude Code +9 - 0.641score
pr-reviewer
jpantsjoha
Review gate for correctness, reuse, and simplification.
SkillAFreshness: A★ 13Claude Code +9 - 0.641score
cloud-expert
jpantsjoha
Cloud guardrails for any vendor workload — Google Cloud (GCP, Vertex AI, GKE), AWS (IAM, EKS, Bedrock), Azure (Entra ID, Policy, AKS), Alibaba Cloud (RAM…
SkillAFreshness: A★ 13Claude Code +9 - 0.641score
operating-model-bootstrap
jpantsjoha
Bootstrap or harden a project's operating model for mixed human and AI delivery teams.
SkillAFreshness: A★ 13Claude Code +9 - 0.641score
cloud-checkup
jpantsjoha
Read-only SRE checkup of any GCP project: deterministic probes of the edge, Cloud Run services, 7-day error logs, Cloud Scheduler, alert policies and uptime…
SkillAFreshness: A★ 13Claude Code +9 - 0.638score
cost-guardrail
jpantsjoha
LLM and cloud cost awareness — model tiering, token budgets, right-sizing, and when a cheaper model suffices.
SkillAFreshness: A★ 13Claude Code +9
Cite this page
system-performance-guardrail skill. Agent Mart. https://agentmart.dev/skills/jpantsjoha-system-performance-guardrail (last updated 2026-10-24)