用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/SocketDev/socket-btm --skill optimizing-performance命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Run this repo's GitHub Actions locally with Agent-CI before pushing CI-sensitive changes.
Audit Actions permissions/allowlists against the fleet baseline; --conform fixes drift.
Propagate a wheelhouse template change across fleet repos: worktrees, push/PR fallback, cleanup.
基于 SOC 职业分类
正在显示 SKILL.md
| name | optimizing-performance |
| description | Audits performance in Rust, Go, C++, JS/TS, parsers, Node addons, and WebAssembly. |
| metadata | {"internal":true} |
Treat performance as a measured property of a representative workload. A fast-looking rewrite, compiler attribute, native addon, or WebAssembly feature is not an optimization until it improves the target metric without breaking correctness, portability, or memory limits.
| Situation | Read first | Look for |
|---|---|---|
| Compiler, hot/cold paths, inlining, PGO/LTO | compiler | release mode, representative profiles, code-size and portability trade-offs |
| Parser or tokenizer | parser data-oriented design | copied text, pointer-rich ASTs, allocation per token/node, scattered passes |
.node addon or JS/native boundary | Node native boundaries | startup/load time, value conversion, copies, tiny calls, blocking event loop |
| Wasm or worker/shared memory | WebAssembly capabilities | artifact probes, feature variants, transfer/share ownership, boundary batching |
| Rust | Rust | cloning, growth reallocations, iterator/code-size balance, release profile |
| Go | Go | allocs/op, escape, slice/map growth, GC, contention, pprof |
| C++ | C++ | allocation/indirection, aliasing/lifetime, virtual dispatch, build flags |
| JavaScript or TypeScript | JavaScript/TypeScript | allocation churn, object-shape instability, deopts, string/UTF work, crossings |
For every kept optimization, state:
target-cpu=native and experimental host
features are not a distributable default.Portable SIMD is RUNTIME CPU DISPATCH: one binary detects the CPU at run time and uses AVX2/NEON when present, scalar/SSE2 otherwise. This is the only way a distributed SIMD path both goes fast on new CPUs and runs at all on old ones.
-C target-cpu=native, no baseline
-C target-feature=+avx2, no GOAMD64=v2|v3|v4, each bakes in the build machine's ISA and
SIGILLs on older CPUs. Use runtime dispatch instead. A CONTROLLED target — a homogeneous
fleet, a constrained container, a per-microarch build matrix with a selecting loader, or a
local build where build host == run host — MAY pin to the guaranteed floor, never to
native on a random build box, and records why. Enforced by
scripts/fleet/check/build-microarch-is-portable.mts; a pin passes when annotated
# microarch-pin: local-profiling | removable: YYYY-MM-DD or
# microarch-pin: controlled-target - <justification>.memchr-family primitive. Profile first; measure in release only.