sweetspot

sweetspot is a skill for Claude Code, Codex from tozhax/plumbwork. It costs 127 tokens per session (6,646 once invoked), scanned B, original, MIT.

A guide for measuring and improving a working system's speed, memory use, stored or bundled size, and network traffic. It aims to preserve the system's existing behaviour while comparing trade-offs.

In plain words
What is it for?
Use it to profile hot paths, measure time, RAM, disk footprint, or network use, and apply controlled performance improvements.
Why use it?
It avoids speculative optimisation that makes code harder to understand or changes edge-case results without evidence. It also provides a stopping point when further gains would require unacceptable trade-offs.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Gemini CLI.

Good fit Use it to profile hot paths, measure time, RAM, disk footprint, or network use, and apply controlled performance improvements.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tozhax/plumbwork/sweetspot
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add tozhax/plumbwork --skill sweetspot
Clone the repo
git clone --depth 1 https://github.com/tozhax/plumbwork

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 sweetspot

README.md
[![agentmods](https://agentmods.dev/badge/skills/tozhax/plumbwork/sweetspot/github.svg)](https://agentmods.dev/skills/tozhax/plumbwork/sweetspot)
Your own site
<a href="https://agentmods.dev/skills/tozhax/plumbwork/sweetspot"><img src="https://agentmods.dev/badge/skills/tozhax/plumbwork/sweetspot/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 sweetspot

Your own site · 80×15
<a href="https://agentmods.dev/skills/tozhax/plumbwork/sweetspot"><img src="https://agentmods.dev/badge/skills/tozhax/plumbwork/sweetspot.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 127 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,646 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00127 $0.06646
Opus 5.5 $0.00051 $0.02658
Sonnet 5.5 $0.00025 $0.01329
Haiku 4.5 $0.00013 $0.00665

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

Security

Grade B, and why

sweetspot scanned grade B with 1 finding 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 2d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

1. **Working Baseline Prerequisite:** Apply `sweetspot` only to systems whose functional behavior is currently working and stable. If tests are failing or the system crashes, route to `~/.gemini/config/skills/diagnosing-
skills/sweetspot/SKILL.md · 161 lines

How it starts

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

Sweetspot — Controlled Performance, Memory, Footprint & Network Optimization Gate

Optimizing an already working, stable system requires stricter discipline than fixing a broken one. Unconstrained optimization prompts across execution speed, Random-Access Memory (RAM), disk footprint, or network Input/Output (I/O) often trigger three failure modes in language models: inventing unmeasured micro-optimizations that degrade readability, silently breaking edge-case behavior or data fidelity, or mutating a project's architecture and purpose without asking. sweetspot enforces controlled, behavior-preserving optimization across three universal local resource axes—Time (Speed/Latency), Memory (RAM Footprint), and Disk (Binary, Bundle & Storage Footprint)—plus a Conditional 4th Axis for networked systems—Network (I/O Download/Upload Bandwidth & Round-Trip Time (RTT) Latency), backed by multi-file hot-path discovery, repeatable measurements, explicit Cross-Axis Trade-off governance, and an honest stop condition when a system reaches its Pareto Frontier (the holistic sweet spot where all active axes meet without structural compromise).


1. Core Invariants

  1. Working Baseline Prerequisite: Apply sweetspot only to systems whose functional behavior is currently working and stable. If tests are failing or the system crashes, route to ~/.gemini/config/skills/diagnosing-bugs/SKILL.md first.
  2. Behavior & Data Preservation (GEMINI.md Rule 9): A controlled optimization leaves every observable contract identical: return values, output formatting, error boundaries, determinism, side effects, wire protocol compatibility, and stored data fidelity. Never delete user data, audit logs, or required assets to claim a memory, disk, or network reduction.
  3. Measure Before and After (GEMINI.md Rule 8): Intuition about where time, memory, disk space, or network bandwidth is spent holds zero evidentiary weight. Every optimization claim requires a repeatable before-and-after measurement on the target machine (using deterministic loopback harnesses or exact payload/request counters for network boundaries, never noisy external internet jitter).
  4. Holistic Multi-Axis Default, Explicit Axis Flags & Trade-Off Discipline:
    • Holistic Intersection Mode (--all / --holistic, or No Flag — Default): When the user requests general optimization without restricting to a single axis (such as "optimize this game", "bu oyunu/yazılımı optimize et", /sweetspot, or /sweetspot --all), target the Holistic Multi-Axis Intersection simultaneously:
      • 3-Axis Local Intersection (Time + Memory + Disk): Applied automatically when Step 1 detects a purely local/offline codebase with no network boundaries.
      • 4-Axis Networked Intersection (Time + Memory + Disk + Network): Activated automatically inside Holistic Mode whenever Step 1 detects network boundaries (Hypertext Transfer Protocol (HTTP), WebSocket, Remote Procedure Call (gRPC), socket clients/servers, remote database/service queries, multiplayer netcode, or web bundle/asset delivery).
      • First eliminate joint slack—dead work, per-frame allocation churn, duplicate in-memory buffers, unstreamed full-file reads, redundant N+1 network round trips, uncompressed wire payloads, and unused dependencies or assets—that improves all active axes together (or improves at least one axis by >= 1% with 0% regression beyond < 1% noise on all other active axes) until the software reaches its Pareto Frontier.
    • Single-Axis Mode (--time, --memory, --disk, --net or Natural Language) & Cross-Axis Trade-Off Gate: When the user passes an explicit single-axis flag or names a specific primary axis in natural language, focus on that primary axis and treat all remaining active axes as non-regressing guardrails (< 1% noise floor). Once the Pareto Frontier is reached in either mode, any further gain that requires trading away another resource axis beyond < 1% noise (such as caching in memory or disk to cut network round trips, spending extra processor time on high-ratio compression to shrink upload/download bandwidth, or adding cold-start decompression latency to shrink disk size) is classified as Zone 2 and requires explicit user approval before editing code.

Read the full file on GitHub · 161 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. 2d ago First seen · 161 lines · 127 tokens per session scan B 90ffdb42ae55

Subscribe to this mod's changes

sweetspot is a skill published in the GitHub repository tozhax/plumbwork (33 stars, last pushed 2d ago), licensed MIT. It adds 127 tokens to every session and 6,646 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-12-02.

Related

sweetspot compared with skills from other repositories

sweetspot next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
sweetspottozhax/plumbworkSkill332d agoMITB127Claude Code, Codex
systematic-debuggingopen-metadata/OpenMetadataSkill16kyesterdayApache-2.0A37Claude Code
log-error-digestzebbern/claude-code-guideSkill4.7ktodayMITA71Claude Code, Codex
observability-audit-sessionsIBM/mcp-context-forgeSkill4.9kyesterdayApache-2.0A64Claude Code, Codex
cwv-optimizeradobe/skillsSkill343yesterdayApache-2.0A112Claude Code
performance-verificationvalkor-ai/loomSkill1.6k2d agoApache-2.0A45Claude Code, Codex
loop-engineeringhuytieu/COG-second-brainSkill1.6kyesterdayMITA63Claude Code