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/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/jorgejie/ai_scaffold/performance_check"><img src="https://agentmods.dev/badge/skills/jorgejie/ai_scaffold/performance_check.svg" alt="Reviewed on agentmods" width="80" 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.5 | $0.00016 | $0.01710 |
| Sonnet 5.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 2mo 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.
- 2mo 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 (57 stars, last pushed 3mo ago), licensed MIT. It adds 40 tokens to every session and 4,274 once invoked, about $0.0002 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.
performance_check compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| performance_checkJorgejie/ai_scaffold | Skill | 57 | 3mo ago | MIT | A | 40 | Claude Code, Codex |
| systematic-debuggingopen-metadata/OpenMetadata | Skill | 16k | today | Apache-2.0 | A | 37 | Claude Code |
| log-error-digestzebbern/claude-code-guide | Skill | 4.7k | 2d ago | MIT | A | 71 | Claude Code, Codex |
| incident-response-incident-responsermyndharis/antigravity-skills | Skill | 2.0k | 2d ago | MIT | A | 36 | Claude Code, Codex |
| cwv-optimizeradobe/skills | Skill | 322 | today | Apache-2.0 | A | 112 | Claude Code |
| ci-fixersipyourdrink-ltd/bernstein | Skill | 1.2k | today | Apache-2.0 | A | 15 | Claude Code, Codex |
| diagnosing-missing-recordingsPostHog/posthog | Skill | 41k | today | none | A | 76 | Claude Code, Codex |