跳转到正文
报告库
用途分类 / 开发辅助

Codebase Design Skill 安全审计

作者说它能做什么(原文)

Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.

第三方安全检查结论

发现安全风险

已检查文件
4
发现的风险
2
会不会运行危险命令?检查是否下载程序后直接运行、让他人远程控制电脑,或藏起要运行的命令。未发现风险
会不会泄露文件和密钥?检查是否发送含密码或密钥的文件,以及代码里是否直接写了密钥。发现 1 项风险
中风险

项目架构信息会在未再次确认的情况下分发给多个子代理

原文依据:5 处
发现了什么

流程要求在向用户展示说明后立即启动至少三个子代理,并向每个代理提供文件路径、耦合细节以及 CONTEXT.md 中的领域词汇;它没有设置内容最小化、敏感信息排除或单独确认步骤。

为什么需要注意

私有代码结构、内部服务关系或 CONTEXT.md 中的敏感业务术语会进入更多代理上下文,扩大处理面;并行代理还可能增加用户未预期的计算消耗。

当用户要求探索候选接口时,该流程会在展示说明后立即启动至少三个子代理,并把文件路径、耦合细节、依赖分类及 CONTEXT.md 领域词汇交给它们;文本没有要求再次确认或剔除敏感内容。若子代理具有不同的数据处理或保留边界,这会扩大项目架构信息的接触面。用户可事先限制可分享的文件和字段,并要求明确子代理的数据边界。

DESIGN-IT-TWICE.md:17来自说明文档打开原文件
Show this to the user, then immediately proceed to Step 2. The user reads and thinks while the sub-agents work in parallel.
查看另外 4 个位置
DESIGN-IT-TWICE.md:21来自说明文档打开原文件
Spawn 3+ sub-agents in parallel. Each must produce a **radically different** interface for the deepened module.Prompt each sub-agent with a separate technical brief (file paths, coupling details, dependency category from [DEEPENING.md](DEEPENING.md), what sits behind the seam). The brief is independent of the user-facing problem-space explanation in Step 1. Give each agent a different design constraint:
DESIGN-IT-TWICE.md:30来自说明文档打开原文件
Include both [SKILL.md](SKILL.md) vocabulary and CONTEXT.md vocabulary in the brief so each sub-agent names things consistently with the architecture language and the project's domain language.
DESIGN-IT-TWICE.md:3来自说明文档打开原文件
When the user wants to explore alternative interfaces for a chosen deepening candidate, use this parallel sub-agent pattern. Based on "Design It Twice" (Ousterhout): your first idea is unlikely to be the best.
DESIGN-IT-TWICE.md:19来自说明文档打开原文件
### 2. Spawn sub-agentsSpawn 3+ sub-agents in parallel. Each must produce a **radically different** interface for the deepened module.Prompt each sub-agent with a separate technical brief (file paths, coupling details, dependency category from [DEEPENING.md](DEEPENING.md), what sits behind the seam). The brief is independent of the user-facing problem-space explanation in Step 1. Give each agent a different design constraint:
会不会删除文件或一直在后台运行?检查是否大范围删除文件、改写磁盘,或设置自动启动。发现 1 项风险
中风险

重构流程指示删除原有单元测试

原文依据:1 处
发现了什么

指导把旧的浅模块测试一概视为“浪费”并删除,而没有要求先证明新接口测试覆盖相同的边界条件、故障模式和安全回归。

为什么需要注意

执行重构时可能永久移除仍有价值的回归测试,使内部行为缺陷、权限检查或异常路径不再被测试发现。

该流程明确要求在新接口测试存在后删除旧的浅模块单元测试,但没有要求先核对旧测试覆盖的边界条件、故障模式或安全回归。若新测试只覆盖可观察的常规结果,删除旧测试可能造成回归检测能力丢失。用户可要求作者提供逐项覆盖映射,并在确认等效覆盖前保留旧测试。

DEEPENING.md:32来自说明文档打开原文件
## Testing strategy: replace, don't layer- Old unit tests on shallow modules become waste once tests at the deepened module's interface exist; delete them.- Write new tests at the deepened module's interface. The **interface is the test surface**.- Tests assert on observable outcomes through the interface, not internal state.- Tests should survive internal refactors, since they describe behaviour, not implementation. If a test has to change when the implementation changes, it's testing past the interface.
会不会绕过安全保护?检查是否跳过网站安全验证、开放过多文件权限,或取消操作前的确认。未发现风险
会不会误导 AI 或隐藏内容?检查工作说明是否要求 AI 忽略你的指令、干扰检查结果,或夹带看不见的文字。未发现风险
会不会偷偷改推广链接或收款方?检查是否强制替换推广链接或收款对象,同时要求隐瞒更改。未发现风险

Skill 逻辑拆解

7 个说明模块

该 Skill 是一套架构设计指导,要求围绕“小接口、深实现”评估或重构模块,并把接口作为调用者和测试的共同边界。

查看原文
SKILL.md:8来自说明文档打开原文件
Design **deep modules**: a lot of behaviour behind a small interface, placed at a clean seam, testable through that interface. Use this language and these principles wherever code is being designed or restructured. The aim is leverage for callers, locality for maintainers, and testability for everyone.
SKILL.md:64来自说明文档打开原文件
- **The deletion test.** Imagine deleting the module. If complexity vanishes, it was a pass-through. If complexity reappears across N callers, it was earning its keep.- **The interface is the test surface.** Callers and tests cross the same seam. If you want to test *past* the interface, the module is probably the wrong shape.- **One adapter means a hypothetical seam. Two adapters means a real one.** Don't introduce a seam unless something actually varies across it.

它按依赖类型选择测试替身:本地依赖使用本地替身,自有远程服务使用内存适配器,第三方服务使用模拟适配器。

查看原文
DEEPENING.md:15来自说明文档打开原文件
Dependencies that have local test stand-ins (PGLite for Postgres, in-memory filesystem). Deepenable if the stand-in exists. The deepened module is tested with the stand-in running in the test suite. The seam is internal; no port at the module's external interface.
DEEPENING.md:19来自说明文档打开原文件
Your own services across a network boundary (microservices, internal APIs). Define a **port** (interface) at the seam. The deep module owns the logic; the transport is injected as an **adapter**. Tests use an in-memory adapter. Production uses an HTTP/gRPC/queue adapter.
DEEPENING.md:25来自说明文档打开原文件
Third-party services (Stripe, Twilio, etc.) you don't control. The deepened module takes the external dependency as an injected port; tests provide a mock adapter.

当用户探索替代接口时,流程会立即启动至少三个并行子代理,并把文件路径、耦合关系、依赖分类和项目领域词汇分别放入其技术简报。

查看原文
DESIGN-IT-TWICE.md:17来自说明文档打开原文件
Show this to the user, then immediately proceed to Step 2. The user reads and thinks while the sub-agents work in parallel.
DESIGN-IT-TWICE.md:21来自说明文档打开原文件
Spawn 3+ sub-agents in parallel. Each must produce a **radically different** interface for the deepened module.
DESIGN-IT-TWICE.md:23来自说明文档打开原文件
Prompt each sub-agent with a separate technical brief (file paths, coupling details, dependency category from [DEEPENING.md](DEEPENING.md), what sits behind the seam). The brief is independent of the user-facing problem-space explanation in Step 1. Give each agent a different design constraint:
DESIGN-IT-TWICE.md:30来自说明文档打开原文件
Include both [SKILL.md](SKILL.md) vocabulary and CONTEXT.md vocabulary in the brief so each sub-agent names things consistently with the architecture language and the project's domain language.
从这里开始 · 工作说明SKILL.md
codebase-design
连线表示工作说明包含的模块,不是实际运行顺序。点击模块可查看原文。

文件引用关系图

5 处引用
哪些文件发起引用引用了什么
连线表示真实的文件引用,不是运行顺序。点击节点可高亮相关连线,并查看具体文件和原文位置。虚线表示还有文件需要定位。
文件与检查记录4 个文件

检查范围与遗漏

逐文件查看涉及的内容

下方列出本次涉及的原文范围;纳入检查不代表已查清所有问题。

  • SKILL.md已纳入全文
  • DEEPENING.md已纳入全文
  • DESIGN-IT-TWICE.md已纳入全文
  • agents/openai.yaml已纳入全文

这份报告只针对上方版本。我们看了拿到的代码和说明文件,没有实际运行 Skill,也没有检查它另外安装的软件包。因此,这不是“保证安全”的承诺;换了版本或使用环境,结果也可能不同。

  • DEEPENING.md配套文件
  • DESIGN-IT-TWICE.md配套文件
  • SKILL.md工作说明
  • agents/openai.yaml配套文件
读取了多少行
202
文件校验值(用于核对版本)
532a2bd69461d5248a919a3fff042f165864e18fd05c5706fee58520e8366ab2