用途分类 / 其他用途
Python Design Patterns Skill 安全审计
作者说它能做什么(原文)
Python design patterns including KISS, Separation of Concerns, Single Responsibility, and composition over inheritance. Use this skill when designing a new service or component from scratch and choosing how to layer responsibilities, when refactoring a God class or monolithic function that has grown too large, when deciding whether to add a new abstraction or live with duplication, when evaluating
第三方安全检查结论
这次检查未发现明显风险
- 已检查文件
- 2
- 发现的风险
- 0
会不会运行危险命令?检查是否下载程序后直接运行、让他人远程控制电脑,或藏起要运行的命令。未发现风险
会不会泄露文件和密钥?检查是否发送含密码或密钥的文件,以及代码里是否直接写了密钥。未发现风险
会不会删除文件或一直在后台运行?检查是否大范围删除文件、改写磁盘,或设置自动启动。未发现风险
会不会绕过安全保护?检查是否跳过网站安全验证、开放过多文件权限,或取消操作前的确认。未发现风险
会不会误导 AI 或隐藏内容?检查工作说明是否要求 AI 忽略你的指令、干扰检查结果,或夹带看不见的文字。未发现风险
会不会偷偷改推广链接或收款方?检查是否强制替换推广链接或收款对象,同时要求隐瞒更改。未发现风险
Skill 逻辑拆解
该 Skill 是 Python 软件设计指导材料,目标是帮助设计、重构和评估代码结构;它提出简化设计、职责分离、优先组合等原则。
查看原文
Write maintainable Python code using fundamental design principles. These patterns help you build systems that are easy to understand, test, and modify.### 1. KISS (Keep It Simple)Choose the simplest solution that works. Complexity must be justified by concrete requirements.### 2. Single Responsibility (SRP)Each unit should have one reason to change. Separate concerns into focused components.### 3. Composition Over InheritanceBuild behavior by combining objects, not extending classes.### 4. Rule of ThreeWait until you have three instances before abstracting. Duplication is often better than premature abstraction.主文件指示代理仅在简要说明不足时读取随附的详细参考文件;提供的清单确认该引用文件存在。
查看原文
## Detailed patterns and worked examplesDetailed pattern documentation lives in `references/details.md`. Read that file when the navigation tier above is insufficient.详细文件中的数据库、缓存、外部 API 和通知代码均位于教学示例中,用来说明分层与依赖注入。可见内容没有要求运行这些片段、安装软件、读取用户文件、使用凭据或发送真实数据。
查看原文
### Pattern 3: Separation of ConcernsOrganize code into distinct layers with clear responsibilities.┌─────────────────────────────────────────────────────┐│ Repository Layer (data access) ││ - SQL queries ││ - External API calls ││ - Cache operations │└─────────────────────────────────────────────────────┘### Pattern 7: Dependency InjectionPass dependencies through constructors for testability.从这里开始 · 工作说明SKILL.md
python-design-patterns文件引用关系图
1 处引用哪些文件发起引用引用了什么
文件与检查记录2 个文件
检查范围与遗漏
逐文件查看涉及的内容
下方列出本次涉及的原文范围;纳入检查不代表已查清所有问题。
SKILL.md已纳入全文references/details.md已纳入全文
这份报告只针对上方版本。我们看了拿到的代码和说明文件,没有实际运行 Skill,也没有检查它另外安装的软件包。因此,这不是“保证安全”的承诺;换了版本或使用环境,结果也可能不同。
SKILL.md工作说明references/details.md配套文件
代码和说明中提到的操作
读取文件
Detailed pattern documentation lives in `references/details.md`. Read that file when the navigation tier above is insufficient.- 读取了多少行
- 440
- 文件校验值(用于核对版本)
- d8c9c02a0ca891d73d24f8c9c7492442bd005e44e214180c941acf0d1bddb567