Python Design Patterns Skill Security Audit
What the author says it does (original text)
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
No obvious risks found in this check
- Files checked
- 2
- Risks found
- 0
Inside this skill
This Skill is guidance for Python software design, intended to help design, refactor, and evaluate code structure; it recommends simplicity, separation of responsibilities, and composition.
View source
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.The main file directs the agent to read the bundled detailed reference only when the short guidance is insufficient; the supplied file set shows that reference is present.
View source
## Detailed patterns and worked examplesDetailed pattern documentation lives in `references/details.md`. Read that file when the navigation tier above is insufficient.Database, cache, external-API, and notification code in the detailed file appears in instructional examples illustrating layering and dependency injection. The visible content does not direct the agent to execute these snippets, install software, read user files, use credentials, or transmit real data.
View source
### 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.File reference map
References: 1Files and check records2 files
Coverage and gaps
Content covered in each file
These are the source ranges included in this check, not a guarantee that every issue has been resolved.
SKILL.mdFull text includedreferences/details.mdFull text included
This report is for the version above. We read the available code and instructions without running the skill or checking extra packages it installs. This is not a promise of safety: a different version or setup may behave differently.
SKILL.mdInstructionsreferences/details.mdSupporting file
Operations mentioned in code and instructions
Read files
Detailed pattern documentation lives in `references/details.md`. Read that file when the navigation tier above is insufficient.- Lines read
- 440
- File checksum (to compare versions)
- d8c9c02a0ca891d73d24f8c9c7492442bd005e44e214180c941acf0d1bddb567