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 Jorgejie/ai_scaffold --skill performance_checkgit clone --depth 1 https://github.com/Jorgejie/ai_scaffoldWrote 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/jorgejie/ai_scaffold/performance_check)<a href="https://agentmods.dev/skills/jorgejie/ai_scaffold/performance_check"><img src="https://agentmods.dev/badge/skills/jorgejie/ai_scaffold/performance_check.svg" alt="Measured on agentmods" height="20"></a>- NVIDIA SkillSpector pass
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.00040 | $0.04274 |
| Opus 5 | $0.00020 | $0.02137 |
| Sonnet 5 | $0.00008 | $0.00855 |
| Haiku 4.5 | $0.00004 | $0.00427 |
Grade A, and why
performance_check 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 8d 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 — 399 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Performance & Security Check — 性能与安全检查
触发方式: 由
proactive-correctionagent 在维度4中自动调用检查范围: 内存泄漏、OOM风险、启动速度、ANR、卡顿、代码安全
1. 内存泄漏检测 (Memory Leak Detection)
1.1 Android/Java/Kotlin 内存泄漏
| # | 检查项 | 检测方法 | 严重度 |
|---|---|---|---|
| ML-1 | Context泄漏 | 检查静态字段持有Activity/Context引用 | ❌ 致命 |
| ML-2 | 监听器未移除 | 检查onDestroy中是否移除Listener/Observer | ❌ 致命 |
| ML-3 | Handler泄漏 | 检查Handler是否为静态内部类或使用WeakReference | ❌ 致命 |
| ML-4 | 静态集合未清理 | 检查static List/Map是否无限增长 | ❌ 致命 |
| ML-5 | Bitmap未recycle | 检查Bitmap使用后是否调用recycle() | ️ 警告 |
| ML-6 | Cursor未关闭 | 检查数据库Cursor是否在finally中关闭 | ❌ 致命 |
| ML-7 | WebView泄漏 | 检查WebView是否在onDestroy中销毁 | ❌ 致命 |
| ML-8 | 单例持有Activity引用 | 检查单例模式是否持有Activity/View引用 | ❌ 致命 |
检测模式:
// 错误示例
class MyActivity : Activity() {
companion object {
var instance: MyActivity? = null // 静态持有Activity
}
override fun onCreate() {
instance = this // 泄漏!
}
}
// ✅ 正确示例
class MyActivity : Activity() {
override fun onDestroy() {
super.onDestroy()
// 清理所有引用
listener?.remove()
handler?.removeCallbacksAndMessages(null)
}
}
1.2 iOS/Swift 内存泄漏
| # | 检查项 | 检测方法 | 严重度 |
|---|---|---|---|
| ML-iOS1 | 强引用循环 | 检查delegate/closure是否使用weak | ❌ 致命 |
| ML-iOS2 | Block循环引用 | 检查Block中是否使用__weak self | 致命 |
| ML-iOS3 | NotificationCenter未移除 | 检查dealloc中是否removeObserver | ❌ 致命 |
| ML-iOS4 | Timer未invalidate | 检查Timer使用后是否invalidate | ❌ 致命 |
| ML-iOS5 | Delegate强引用 | 检查delegate属性是否为weak | ❌ 致命 |
1.3 C++/NDK 内存泄漏
| # | 检查项 | 检测方法 | 严重度 |
|---|---|---|---|
| ML-NDK1 | malloc/free不匹配 | 检查每个malloc是否有对应的free | ❌ 致命 |
| ML-NDK2 | new/delete不匹配 | 检查每个new是否有对应的delete | ❌ 致命 |
| ML-NDK3 | JNI LocalRef泄漏 | 检查LocalRef使用后是否DeleteLocalRef | ❌ 致命 |
| ML-NDK4 | 异常路径未释放 | 检查goto/error路径是否释放资源 | ❌ 致命 |
2. OOM风险检测 (Out of Memory Risk)
2.1 Bitmap OOM
| # | 检查项 | 检测方法 | 严重度 |
|---|---|---|---|
| OOM-1 | 大图未压缩 | 检查Bitmap加载是否使用inSampleSize | 致命 |
| OOM-2 | 频繁创建Bitmap | 检查循环中是否创建Bitmap | ❌ 致命 |
| OOM-3 | 未使用图片缓存 | 检查是否使用Glide/Picasso/Fresco | ️ 警告 |
| OOM-4 | 内存泄漏的Bitmap | 检查Bitmap是否被静态引用 | ❌ 致命 |
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.
- 8d ago First seen · 399 lines · 40 tokens per session scan A d66c157f2047
performance_check is a skill published in the GitHub repository Jorgejie/ai_scaffold (53 stars, last pushed 27d ago), licensed MIT. It adds 40 tokens to every session and 4,274 once invoked, about $0.0002 per session on Opus 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
debug-optimize-lcp
Guides debugging and optimizing Largest Contentful Paint (LCP) using Chrome DevTools MCP tools. Use this skill whenever the user asks about LCP performance, slow page loads, Core Web Vitals optimization, or wants to understand why their page's main content takes too long to appear. Also use when the user mentions…
systematic-debugging
Use when debugging a failing test, build error, or runtime issue that isn't immediately obvious. Guides a 4-phase root cause analysis instead of random fix attempts.
diagnose
Trace from a reproduced symptom to the source code that causes it. Pin the specific file and approximate line, rate confidence in the cause and clarity of the fix independently, and always propose a concrete fix.
repro-admin
Reproduce an EmDash admin UI bug. Attach a container, start the demo dev server, drive the admin with agent-browser using the dev-bypass session, and capture the reproduction as screenshots plus a replayable transcript.
log-error-digest
Analyze log files to troubleshoot errors, identify peak error periods, and produce error clustering, frequency statistics, and time distribution reports. Supports JSON, syslog, and Nginx formats with automatic detection. Use when a user uploads a .log file and asks to analyze errors, find patterns, debug issues, or…
byted-util-volcengine-detect-retry
An orchestration workflow for Volcengine Cloud Detect, a service that checks websites or network endpoints from test locations.