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.
npx skills add nxtg-ai/forge-plugin --skill optimizationgit clone --depth 1 https://github.com/nxtg-ai/forge-pluginWrote 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.
[](https://agentmods.dev/skills/nxtg-ai/forge-plugin/optimization)<a href="https://agentmods.dev/skills/nxtg-ai/forge-plugin/optimization"><img src="https://agentmods.dev/badge/skills/nxtg-ai/forge-plugin/optimization/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.
<a href="https://agentmods.dev/skills/nxtg-ai/forge-plugin/optimization"><img src="https://agentmods.dev/badge/skills/nxtg-ai/forge-plugin/optimization.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00110 | $0.01901 |
| Opus 5.5 | $0.00044 | $0.00760 |
| Sonnet 5.5 | $0.00022 | $0.00380 |
| Haiku 4.5 | $0.00011 | $0.00190 |
Grade A, and why
Optimization 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 12d 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.
How it starts
The opening of the file, as written. The whole thing — 135 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Performance Optimization
Diagnose and fix performance problems from measurement, never from guessing. This
skill is the reasoning layer; the deterministic scan lives in the /nxtg-forge:optimize
command and the performance agent.
The one rule
Measure → find the real bottleneck → fix that one thing → re-measure. Repeat.
Premature optimization wastes effort on code that isn't hot. A profile that shows where time/memory/allocations actually go beats any intuition. Optimize the top item, prove the delta, then re-profile — the bottleneck usually moves.
Where this fits in Forge
| Surface | What it does | When |
|---|---|---|
/nxtg-forge:optimize (command) |
Deterministic 7-dimension static scan (large files, as any, dead exports, deps, dup, console, TODO debt) + optional --fix |
Codebase-health sweep, refactor triage |
performance agent (agents/performance.md) |
Bundle analysis, React render profiling, memory-leak hunting, API latency | Deep dive on a specific slow surface |
| This skill | The measure-first method + fix patterns both of the above apply | Any "it's slow" reasoning |
/nxtg-forge:optimize is a TypeScript-oriented static-quality scan — it does not run a
profiler. For actual runtime numbers you still profile (browser DevTools, cargo flamegraph, node --prof, EXPLAIN ANALYZE). Read reference/patterns.md for the
full per-domain fix catalog; keep this file for triage.
Triage: classify the bottleneck first
Before touching code, put the symptom in one bucket — the fix set is different for each.
- CPU-bound — high CPU, work scales with input. Causes: O(n²) loops, redundant recompute, heavy regex, no memoization. Fix: better algorithm/data structure, cache results, memoize.
- Memory-bound — RSS climbs, GC thrash, OOM. Causes: leaks (unremoved listeners, growing caches), giant objects held in scope, no pagination. Fix: release refs, bound caches, stream/paginate.
- I/O-bound — low CPU but slow wall-clock. Causes: sync I/O, N+1 queries, chatty network, missing cache. Fix: batch, async/parallel, cache, add indexes.
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 12d ago Changed · +4 tokens per session aa9b778d69cc
- 1mo ago First seen · 135 lines · 106 tokens per session scan A 610f4583b693
Optimization is a skill published in the GitHub repository nxtg-ai/forge-plugin (6 stars, last pushed 4d ago), licensed MIT. It adds 110 tokens to every session and 1,901 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-09-03.
Other skills, from other repositories
fix-issue
Fixes GitHub issues using parallel analysis agents for root cause investigation, code exploration, and regression detection. Reads issue context from gh CLI, searches codebase and memory for related patterns, generates a fix with tests, and links the resolution back to the issue via PR. Includes prevention analysis to…
error-analysis
Evals-first error analysis for LLM apps: clusters real Langfuse or JSONL traces into a human-confirmed failure taxonomy with counts, then recommends binary pass/fail evals for recurring named modes. Use to learn what to measure before writing evals. Not for CI failures.
ci-debug
Diagnose a failing CI run against an 11-pattern playbook. Classifies the failure, cites the relevant memory entry, proposes the exact fix command — but NEVER applies without explicit user approval. Use when a specific PR check or GitHub Actions run failed and you want a diagnosis instead of speculation. Don't use for…
monitoring-observability
Monitoring and observability patterns for Prometheus metrics, Grafana dashboards, Langfuse v4 LLM tracing (astype, scorecurrentspan, shouldexportspan, LangfuseMedia), and drift detection. Use when adding logging, metrics, distributed tracing, LLM cost tracking, or quality drift monitoring.
paired-probe
Refuse a verdict a probe did not earn. Runs a check where the fault IS present and where it is NOT, and blocks the answer when both arms print the same thing, because a check that cannot disagree with you has measured nothing. Also catches the zero-sample sweep that reads as "clean" and the swallowed error that reads…
code-coherence-review
Reviews code and plans for logic coherence, correctness, and structural integrity.