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 agentmods add skills/xakki/ai-agents-skills/performance-optimizationnpx skills add Xakki/ai-agents-skills --skill performance-optimizationgit clone --depth 1 https://github.com/Xakki/ai-agents-skillsWrote 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/xakki/ai-agents-skills/performance-optimization)<a href="https://agentmods.dev/skills/xakki/ai-agents-skills/performance-optimization"><img src="https://agentmods.dev/badge/skills/xakki/ai-agents-skills/performance-optimization.svg" alt="Measured on agentmods" 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.00023 | $0.00859 |
| Opus 5 | $0.00012 | $0.00430 |
| Sonnet 5 | $0.00005 | $0.00172 |
| Haiku 4.5 | $0.00002 | $0.00086 |
Grade A, and why
performance-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 5d 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.
This is a copy
100% identical to performance-optimization — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
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
Apply these performance optimization principles when developing web applications, themes, and frontend interfaces.
Core Performance Principles
- Prioritize server-side rendering as a first principle, as opposed to client-side JavaScript
- Minimize client-side JavaScript to reduce bundle size and improve Time to Interactive
- Optimize for Core Web Vitals: LCP, FID, and CLS
- Measure performance continuously and establish baselines
- Consider performance impact of every architectural decision
Server-Side Rendering
- Render content server-side whenever possible
- Use streaming rendering for faster Time to First Byte
- Implement proper caching strategies for rendered content
- Avoid blocking resources that delay rendering
- Pre-render static content where applicable
CSS Best Practices
Selector Efficiency
- Avoid ID selectors for styling; use classes instead
- Maintain specificity at 0 1 0 where possible
- Avoid deep nesting of selectors (max 3 levels)
- Use BEM or similar naming conventions for clarity
- Prefer class selectors over element selectors
CSS Organization
- Use CSS variables for colors, spacing, and repeated values
- Group related styles logically
- Remove unused CSS to reduce payload
- Consider critical CSS inlining for above-the-fold content
- Use CSS containment for complex layouts
Layout Performance
- Avoid layout thrashing (forced synchronous layouts)
- Use transform and opacity for animations (GPU accelerated)
- Minimize paint and composite operations
- Use will-change sparingly and intentionally
- Prefer flexbox and grid over floats and positioning
JavaScript Optimization
Code Organization
- Use the module pattern for code organization
- Prefix private methods with appropriate indicators
- Prefer const over let; avoid var
- Avoid external dependencies when native APIs suffice
- Split code into logical, loadable chunks
Loading Strategies
- Defer non-critical JavaScript
- Use async loading for independent scripts
- Implement code splitting for large applications
- Lazy load components and routes
- Preload critical resources
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.
- 5d ago First seen · 135 lines · 23 tokens per session scan A c9a2f350c65f
performance-optimization is a skill published in the GitHub repository Xakki/ai-agents-skills (6 stars, last pushed 14d ago), licensed MIT. It adds 23 tokens to every session and 859 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to performance-optimization, differing in 0 lines, and is treated as a copy.
Other skills, from other repositories
kanban-retro
Forensic retrospective on how work actually FLOWED through the kanban-pro board — reconstruct each card's timeline from the change-log (lane moves, bounces, forced moves, attention, dispatch loops, rounds, cycle time), attribute it to the model that really served it (model-pro requested-vs-resolved, context overflow…
kanban-worker
Work cards from the shared kanban-pro board (MCP server "kanban-pro") as a pull worker — listwork to get your queue, claimcard before touching anything, move/comment per the card's flow, release when done. Use when asked to "pick up work", "work the board", process kanban cards, or when a task mentions being tracked…
kanban-orchestrator
Manage the shared kanban-pro board (MCP server "kanban-pro") as an orchestrator — turn goals into cards (subcards via parent/child relations), set up each board's workflow (columns + the legal transitions between them), assign and prioritize, watch progress via the change-feed cursor, unblock. Never works cards…
kanban-upgrade
Bring a kanban-pro card up to the CURRENT board structure and make its recorded state TRUE — plan steps, finding statuses, the verification contract (checks), verdict. Evidence-first: never claim a status the card cannot prove. Use after a board/schema change (e.g. checks are new), when a card's report looks stale or…
kanban-pro-work-reporting
Maintain structured, observable work reports on kanban-pro cards via the kanban-pro MCP workreport tools. Use when an agent works, prepares, reviews, routes, asks questions on, or summarizes a kanban-pro card so the card stays self-explanatory without relying on free-form comments.
agent-code-analyzer
Agent skill for code-analyzer - invoke with $agent-code-analyzer.