Borrowing it
Nothing to install: this file belongs to Peiiii/nextclaw. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/Peiiii/nextclaw/master/.agents/wiki/skills/frontend/frontend-code-optimization/SKILL.mdgit clone --depth 1 https://github.com/Peiiii/nextclawWrote 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/peiiii/nextclaw/frontend-code-optimization)<a href="https://agentmods.dev/skills/peiiii/nextclaw/frontend-code-optimization"><img src="https://agentmods.dev/badge/skills/peiiii/nextclaw/frontend-code-optimization/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/peiiii/nextclaw/frontend-code-optimization"><img src="https://agentmods.dev/badge/skills/peiiii/nextclaw/frontend-code-optimization.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.00066 | $0.00633 |
| Opus 5.5 | $0.00026 | $0.00253 |
| Sonnet 5.5 | $0.00013 | $0.00127 |
| Haiku 4.5 | $0.00007 | $0.00063 |
Grade A, and why
frontend-code-optimization 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 1mo 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.
What it actually says
前端代码优化
定位
这是显式前端治理任务的诊断入口,不是所有前端改动的生命周期 owner。本 skill 只识别最高收益的结构问题并选择一个当前专项 owner;阶段推进、验证、Review 和交付由当前生命周期负责。
诊断顺序
- 找出用户可见行为和稳定业务事实。
- 判断当前对象是展示组件、业务容器、adapter、manager/store/presenter 还是生命周期 owner。
- 查重复状态、重复 action、宽 props、组件内业务编排、effect 状态迁移和重复 UI 骨架。
- 按收益排序:事实双写/错误 owner > 业务透传 > 生命周期不安全 > 重复实现 > 单纯文件偏长。
- 每次只选择一个可验证 vertical slice,不同时启动所有前端专项治理。
专项选择
- 状态归属、MVP、store/manager/presenter、prop drilling:View Logic 解耦。
- React key、动态组件、streaming DOM、焦点/选区/iframe/editor 连续性:渲染生命周期安全。
- 样式 owner、响应式、基础组件可移植性:样式封装。
- 操作语义、状态反馈、键盘可达性、tooltip/menu:交互质量。
- 文件和 feature root 变化:文件组织治理。
同一判断只加载一个上述专项;完成该 slice 后再决定是否需要下一项。
实施原则
- 先删重复计算、重复状态、重复入口和无语义中间组件。
- 业务状态与动作收敛到最近 owner,展示组件只接展示合同。
- 不因文件长机械拆分;按变化原因、生命周期、不变量和真实复用拆分。
- 不用新 ViewModel/Presenter/Manager 包装混乱;新 owner 必须减少参数面或删除旧职责。
- 必要的清晰增长允许存在,不为行数门槛扩大无关重构。
输出
审计时给出 findings、证据、正确 owner、优先级和最小 slice。实施时只汇报当前 slice、主要验证和是否出现新的结构风险,不自动加载主观 review 或完整治理全家桶。
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.
- 1mo ago Changed 6f8c16e7aeeb
- 2mo ago First seen · 41 lines · 66 tokens per session scan A 96617604a455
frontend-code-optimization is a skill published in the GitHub repository Peiiii/nextclaw (263 stars, last pushed yesterday), licensed MIT. It adds 66 tokens to every session and 633 once invoked, about $0.0003 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.
frontend-code-optimization compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| frontend-code-optimizationPeiiii/nextclaw | Skill | 263 | yesterday | MIT | A | 66 | Claude Code, Codex |
| ha-skill-creatorshiwenwen/hope-agent | Skill | 1.9k | yesterday | MIT | A | 106 | Claude Code |
| ha-browsershiwenwen/hope-agent | Skill | 1.9k | yesterday | MIT | A | 140 | Claude Code |
| ha-logsshiwenwen/hope-agent | Skill | 1.9k | yesterday | MIT | A | 183 | Claude Code, Codex |
| ha-pet-importshiwenwen/hope-agent | Skill | 1.9k | yesterday | MIT | A | 109 | Codex |
| ha-skill-installershiwenwen/hope-agent | Skill | 1.9k | yesterday | MIT | A | 82 | Claude Code, Codex |
| email-draftshiwenwen/hope-agent | Skill | 1.9k | yesterday | MIT | A | 46 | Claude Code, Codex |