Borrowing it
Nothing to install: this file belongs to zhangloveyan/backend-skill. 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/zhangloveyan/backend-skill/main/.claude/skills/proj-optimize/SKILL.mdgit clone --depth 1 https://github.com/zhangloveyan/backend-skillWrote 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/zhangloveyan/backend-skill/proj-optimize)<a href="https://agentmods.dev/skills/zhangloveyan/backend-skill/proj-optimize"><img src="https://agentmods.dev/badge/skills/zhangloveyan/backend-skill/proj-optimize/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/zhangloveyan/backend-skill/proj-optimize"><img src="https://agentmods.dev/badge/skills/zhangloveyan/backend-skill/proj-optimize.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.00035 | $0.02211 |
| Opus 5.5 | $0.00014 | $0.00884 |
| Sonnet 5.5 | $0.00007 | $0.00442 |
| Haiku 4.5 | $0.00003 | $0.00221 |
Grade A, and why
proj-optimize 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 — 257 lines — stays where its author put it; the contents beside it link to each section on GitHub.
持续优化与自我进化
适用场景
- 开发过程中发现规范缺失或流程问题
- 项目结束后批量优化积累的问题
- 定期检查和改进开发规范体系
任务文档同步
- 如存在全流程任务文档,将优化相关文件记录到“扩展产物”
- 上下文快照记录优化状态(不写细节)
- 更新下一步指令
使用方式
/proj-optimize record # 记录问题和优化点
/proj-optimize # 执行批量优化(默认模式)
/proj-optimize check # 检查是否有待优化项
/proj-optimize clean # 清理已完成的优化记录
1. 记录模式 (/proj-optimize record)
存储位置
问题记录保存在项目本地文件中:
- 待优化问题:
docs/optimization/pending-issues.md - 优化历史:
docs/optimization/optimization-log.md
优势:
- 项目级隔离:不同项目的优化问题分开管理
- 持久保存:本地文件,不会丢失
- 版本控制:可纳入 Git 管理,团队共享
- 避免臃肿:每个项目只关注自己的优化点
使用时机
- 开发中遇到规范缺失
- 发现流程执行问题
- Skill 使用不便
- 重复性问题出现
记录内容
每次记录包含以下信息:
- 问题描述:具体遇到什么问题
- 影响范围:对开发的影响
- 优化建议:初步的解决思路
- 优先级:P0(阻塞) / P1(重要) / P2(优化)
- 涉及文件:相关的 Skill 或文档文件
记录方式
- 打开
docs/optimization/pending-issues.md - 根据优先级添加到对应分类下
- 使用模板格式记录问题详情
- 保存文件
- 同步任务文档(扩展产物与上下文快照)
记录模板
参考 问题记录模板
2. 执行模式 (/proj-optimize)
执行流程
- 读取问题列表:从
docs/optimization/pending-issues.md读取待优化问题 - 优先级排序:P0 → P1 → P2 顺序处理
- 生成优化方案:分析每个问题,生成详细的修改方案
- 用户确认:逐项展示优化方案,等待用户确认
- 执行修改:只执行用户确认的优化项
- 验证改进:确认优化是否解决问题
- 更新记录:将完成的问题移动到
docs/optimization/optimization-log.md - 同步文档:必要时更新 CLAUDE.md 索引
- 同步任务文档:更新扩展产物与下一步指令
用户确认机制
每个优化方案都会详细展示:
- 修改文件:具体要修改哪些文件
- 修改内容:详细的修改说明
- 影响范围:对现有功能的影响
- 风险评估:修改的风险等级
确认选项:
y- 执行此优化n- 跳过此优化s- 跳过所有剩余优化a- 执行所有剩余优化(批量确认)
优化方案预览格式
## 优化方案预览
### 问题 1/3: [P1] 代码生成缺少异常处理模板
**修改文件**:
- `.claude/skills/proj-gen/templates/service.md`
**修改内容**:
- 在 Service 模板的方法中增加 try-catch 异常处理
- 添加 BusinessException 转换逻辑
**影响范围**:
- 后续使用 /proj-gen 生成的 Service 代码将包含异常处理
- 不影响已有代码
**风险评估**:低风险,向后兼容
**是否执行此优化?**
[y] 是 [n] 否 [s] 跳过所有 [a] 全部执行
优化原则
- 基于实践:所有优化都来自真实开发经验
- 用户主导:所有修改都需要用户明确确认
- 小步快跑:每次优化1-3个问题,避免大幅变动
- 向后兼容:尽量保持现有使用方式不变
- 验证效果:优化后在下次开发中验证是否有效
安全保障
- 预览优先:先展示修改方案,不立即执行
- 逐项确认:每个修改都需要用户明确同意
- 批量选项:提供批量确认,提高效率
- 记录选择:记录用户的确认/拒绝选择,便于后续参考
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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 · 257 lines · 35 tokens per session scan A 95652a0c28da
proj-optimize is a skill published in the GitHub repository zhangloveyan/backend-skill (103 stars, last pushed 23d ago), licensed MIT. It adds 35 tokens to every session and 2,211 once invoked, about $0.0001 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.
proj-optimize compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| proj-optimizezhangloveyan/backend-skill | Skill | 103 | 23d ago | MIT | A | 35 | Claude Code |
| imagegenopenai/codex | Skill | 133k | yesterday | Apache-2.0 | A | 113 | Codex |
| playwright-climicrosoft/playwright | Skill | 99k | yesterday | Apache-2.0 | A | 19 | Claude Code |
| local-ai-agentsmicrosoft/ai-agents-for-beginners | Skill | 79k | 4d ago | MIT | A | 200 | Claude Code, Codex |
| systematic-debuggingobra/superpowers | Skill | 313k | 3d ago | MIT | A | 21 | Claude Code |
| next-cache-components-adoptionvercel/next.js | Skill | 143k | yesterday | MIT | A | 95 | Claude Code |
| next-partial-prefetching-adoptionvercel/next.js | Skill | 143k | yesterday | MIT | A | 103 | Claude Code |