基于 SOC 职业分类
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/cwilliams5/Alt-Tabby --skill profile-coverage命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
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
| name | profile-coverage |
| description | Review profiler instrumentation coverage and recommend new instrumentation points |
| user-invocable | true |
| disable-model-invocation | true |
Enter planning mode. Review which functions are instrumented for profiling and identify gaps. This is a review/discussion step — do not implement instrumentation changes without approval.
Alt-Tabby has a build-time strip profiler (src/shared/profiler.ahk). Functions are instrumented with Profiler.Enter("FuncName") ; @profile / Profiler.Leave() ; @profile pairs. In release builds, tools/compile.ps1 strips all ; @profile lines — true zero cost. In --profile builds, the profiler records QPC-timestamped events to a ring buffer and exports speedscope flame graphs.
The static analysis check validates balanced Enter/Leave per function (sub-check profile_markers in tests/check_batch_directives.ps1) — catches the early-return problem.
Run:
powershell -File tools/query_instrumentation.ps1 -Save
This writes temp/INSTRUMENTATION_MAP.md with every function in src/gui/, src/core/, src/shared/ and whether it's currently instrumented.
Read it and summarize: how many functions total, how many instrumented, coverage %.
For every uninstrumented function, research it and classify:
Use query_function.ps1 <name> to read function bodies. Use query_interface.ps1 <filename> to see a file's public API.
The hot path is: Alt down → Tab → show overlay → paint → Alt up → activate window. But "hot path relevant" is BROADER than "directly in the hot path." It includes:
Critical "On" and runs on a timer or Windows callback. If it's executing when the user presses Alt, the Critical section blocks the hotkey callback until it finishes.A function running on a 5-second background timer that holds Critical for 50ms IS hot-path-relevant because there's a 1% chance per Alt-Tab that it's mid-execution.
Before classifying any MAYBE, check: is its parent already instrumented? Are its children?
When the parent IS instrumented:
When the children ARE instrumented:
When siblings ARE instrumented but there's a gap:
When instrumenting a proposed-YES parent:
Post-#177, the rendering pipeline has extensive uninstrumented hot paths. The profiler currently covers GUI_Repaint (total paint time) but not the breakdown within:
Shader_PreRender in d2d_shader.ahk): 40+ COM calls per shader per frame (cbuffer map, compute dispatch, D3D11 state setup, Draw, GPU→CPU readback). Runs N times per frame (once per active shader layer + mouse + selection + hover). Zero instrumentation currently.FX_DrawShaderLayers, FX_DrawMouseEffect, FX_DrawSelectionEffect, FX_DrawHoverEffect in gui_effects.ahk): DrawImage calls for intermediate texture compositing. Only mouse effect has QPC measurement (for adaptive FPS skip).D2D_SetClipRect, D2D_Commit in gui_overlay.ahk): Clip update + commit on resize. No timing._Anim_FrameLoop in gui_animation.ahk): Compositor clock wait / waitable signal / spin-wait. Frame delta computed (gAnim_FrameDt) but not profiler-instrumented.When classifying functions, pay special attention to these areas — they represent the majority of per-frame GPU-side cost but are invisible to the profiler.
Produce a summary of all YES recommendations:
| File | Function | Why (one line) |
|---|---|---|
gui_paint.ahk | _GUI_PaintOverlay | Variable cost per-item, parent GUI_Repaint can't show which item is slow |
And a count: "X new functions recommended, bringing total from Y to Z (N% coverage)."
Present the summary table and ask if the user wants to discuss any items before implementation. Do NOT implement instrumentation changes in this skill — it is review only.