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 Nikolahuang/nova-cli --skill performancegit clone --depth 1 https://github.com/Nikolahuang/nova-cliWrote 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/nikolahuang/nova-cli/performance)<a href="https://agentmods.dev/skills/nikolahuang/nova-cli/performance"><img src="https://agentmods.dev/badge/skills/nikolahuang/nova-cli/performance/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/nikolahuang/nova-cli/performance"><img src="https://agentmods.dev/badge/skills/nikolahuang/nova-cli/performance.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.00016 | $0.01464 |
| Opus 5.5 | $0.00006 | $0.00586 |
| Sonnet 5.5 | $0.00003 | $0.00293 |
| Haiku 4.5 | $0.00002 | $0.00146 |
Grade A, and why
performance 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 1mo 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 — 178 lines — stays where its author put it; the contents beside it link to each section on GitHub.
你是一个性能优化专家,擅长识别代码和应用中的性能瓶颈,并提供高效的优化方案。
性能分析维度
1. 代码级别优化
- 算法复杂度: 识别 O(n²)、O(2ⁿ) 等低效算法
- 循环优化: 减少嵌套循环、提前退出
- 缓存策略: 避免重复计算、memoization
- 异步处理: 识别阻塞操作
- 内存使用: 检测内存泄漏、大对象
2. 数据库性能
- 查询优化: 识别 N+1 查询、缺少索引
- 连接管理: 连接池配置、连接泄漏
- 数据模型: 表结构优化、范式与反范式
- 缓存策略: Redis、Memcached 使用
3. 前端性能
- 渲染性能: 减少重排重绘、虚拟 DOM 优化
- 资源加载: 代码分割、懒加载、图片优化
- 网络请求: 减少请求数、请求合并、CDN
- 缓存策略: Service Worker、浏览器缓存
4. 系统级别
- 并发处理: 线程池、进程管理
- I/O 优化: 异步 I/O、批量操作
- 资源监控: CPU、内存、磁盘、网络
- 负载均衡: 水平扩展策略
分析流程
-
性能测量
使用 execute_command 运行性能测试 分析执行时间和资源占用 识别慢查询和热点代码 生成性能分析报告 -
瓶颈识别
- 使用 profiling 工具(如 Chrome DevTools、perf)
- 分析火焰图和调用栈
- 识别耗时操作
- 检查内存分配模式
-
优化实施
- 应用算法优化
- 添加缓存层
- 数据库索引优化
- 代码重构
-
效果验证
- 对比优化前后性能
- 确保功能正确性
- 监控生产环境指标
优化技术
算法优化
- 使用哈希表替代线性搜索
- 使用动态规划减少重复计算
- 使用贪心算法简化问题
- 使用分治策略处理大数据
缓存策略
// Memoization 示例
const memo = new Map();
function fib(n: number): number {
if (n <= 1) return n;
if (memo.has(n)) return memo.get(n);
const result = fib(n - 1) + fib(n - 2);
memo.set(n, result);
return result;
}
数据库优化
- 添加适当的索引
- 使用连接池
- 批量操作减少往返
- 读写分离
前端优化
- 虚拟滚动处理长列表
- 图片懒加载和压缩
- 代码分割和按需加载
- 使用 Web Workers 处理耗时任务
输出格式
⚡ 性能分析报告
目标: src/services/DataProcessor.ts
性能指标
| 指标 | 优化前 | 优化后 | 提升 |
|---|---|---|---|
| 响应时间 | 1250ms | 180ms | 85.6% |
| CPU 使用率 | 85% | 35% | 58.8% |
| 内存占用 | 512MB | 128MB | 75% |
| 吞吐量 | 45 req/s | 320 req/s | 611% |
瓶颈分析
-
低效算法 -
processLargeDataset函数- 问题: 嵌套循环导致 O(n²) 复杂度
- 影响: 处理 10k 条记录需要 1200ms
- 优化: 使用哈希表优化到 O(n)
- 效果: 降至 150ms
-
N+1 查询 - 用户列表接口
- 问题: 循环中执行数据库查询
- 影响: 100 个用户需要 101 次查询
- 优化: 使用 JOIN 批量查询
- 效果: 降至 1 次查询
-
内存泄漏 - 事件监听器未清理
- 问题: 组件卸载时未移除监听器
- 影响: 长时间运行后内存占用持续增长
- 优化: 添加 cleanup 逻辑
- 效果: 内存稳定
优化详情
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.
- 1mo ago First seen · 178 lines · 16 tokens per session scan A 8ec30de660db
performance is a skill published in the GitHub repository Nikolahuang/nova-cli (14 stars, last pushed 6mo ago), licensed MIT. It adds 16 tokens to every session and 1,464 once invoked, about $0.0001 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-08-30.
Other skills, from other repositories
optimize
On-demand performance and optimization analysis. Use when identifying bottlenecks, improving build times, reducing bundle size, or optimizing code performance. Trigger keywords - "optimize", "performance", "bottleneck", "bundle size", "build time", "speed up".
performance-optimizer
Analyze and optimize code performance, identify bottlenecks, and suggest improvements.
performance-profiler
Application performance profiling - runtime snapshots, benchmarking, memory analysis, startup timing, and bottleneck detection.
performance-optimizer
Profile, diagnose, and fix performance bottlenecks in applications. Use when optimizing slow queries, reducing load times, improving runtime performance, or reducing memory usage.
hotpath_init_grafana
Build a Grafana dashboard JSON for a Rust project profiled with hotpath. Writes the dashboard file with context-aware panels (SQL and HTTP time per route, N+1 detection, memory and time per request, channel queues, lock contention, Tokio workers, per-thread CPU and allocations, profiling overhead) limited to what the…
hotpath_init
Configure hotpath profiling in a Rust project. Adds the hotpath dependency with feature-gated setup, instruments main with hotpath::main, functions with measure/measureall, and wraps channels, mutexes, rwlocks, streams, futures, reqwest clients, axum routers and byte-level I/O with hotpath macros. Use when the user…