用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/cwilliams5/Alt-Tabby --skill review-file-size命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Audit all lint-ignore suppressions for appropriateness and overuse
Pre-flight checklist — run high-signal review skills before a release
Discover functions that block the main thread, then micro-audit each for internal optimization opportunities
基于 SOC 职业分类
正在显示 SKILL.md
| name | review-file-size |
| description | Find files approaching context limits and evaluate whether coupling-aware splits are worthwhile |
| user-invocable | true |
| disable-model-invocation | true |
Enter planning mode. Identify source files approaching the context load limit and evaluate whether they can be meaningfully split. Use parallelism where possible.
Files over ~25k tokens cause problems: the Read tool must batch them, they bloat context for tasks that only need a small piece, and they're harder to reason about in a single pass. But splitting a file poorly — into two halves that share all the same globals and must always be loaded together — is worse than one large file. A split only helps if the pieces are independently useful.
Scan all .ahk files in src/ and tests/ (excluding src/lib/). For each file, estimate the token count — don't rely on line counts alone. AHK files with long DllCall signatures, inline strings, or dense logic have significantly more tokens per line than sparse files with short functions.
Approximate token estimation: Read each file and estimate tokens. Characters ÷ 4 is a rough baseline, but AHK identifiers and camelCase inflate this. Aim for a reasonable estimate, not exact counts.
Threshold: Only flag files that are approaching trouble — roughly 20k+ tokens. Files well under this threshold are fine regardless of line count. Don't propose splitting a 500-line file that's 12k tokens just because it's "large by line count."
For each file above the threshold, use the tools to assess whether a split is viable:
| Tool | What It Tells You |
|---|---|
query_interface.ps1 <file> | Public functions and globals — are there distinct groups serving different consumers? |
query_global_ownership.ps1 <globalName> | For each global the file uses — who else writes/reads it? Would a split add manifest entries? |
query_function_visibility.ps1 <funcName> | For key functions — who calls them? Would splitting require cross-file calls between the halves? |
Look for natural seams:
Look for coupling walls:
For each file where a seam exists, evaluate the net benefit:
Benefits of splitting:
Costs of splitting:
#Include dependenciesOnly recommend a split when the net benefit is clearly positive. A file at 22k tokens with no natural seam is better left alone than forcibly split into two 11k-token files that are joined at the hip.
Section 1 — File size inventory (only files near/above threshold):
| File | Lines | Est. Tokens | Status |
|---|---|---|---|
gui_state.ahk | 1400 | ~28k | Above threshold |
gui_paint.ahk | 900 | ~19k | Approaching |
viewer.ahk | 1100 | ~22k | Above threshold |
Section 2 — Coupling analysis for candidates:
| File | Natural Seam? | Shared Globals Across Seam | New Manifest Entries | Independently Useful? |
|---|---|---|---|---|
gui_state.ahk | Yes — interceptor vs state transitions | 2 (gGUI_State, gGUI_Sel) | 0 (both already shared) | Yes — interceptor logic reads different than state logic |
viewer.ahk | Weak — most functions share gViewer_* | 8 | 4 new entries | No — halves always loaded together |
Section 3 — Recommended splits (only where net-positive):
| File | Split Into | Seam | Tokens Each | Coupling Cost | Benefit |
|---|---|---|---|---|---|
gui_state.ahk | gui_state.ahk + gui_interceptor.ahk | Interceptor event handling vs state transitions | ~14k / ~14k | 0 new manifest entries | Tasks investigating input vs state can load one half |
Section 4 — Files left alone (above threshold but not worth splitting):
| File | Est. Tokens | Why Not Split |
|---|---|---|
viewer.ahk | ~22k | All functions share 8+ gViewer_* globals — no seam |
Ignore any existing plans — create a fresh one.