code-patterns
Check the Core and repo-local pattern libraries for known solutions to recurring design problems before inventing a new approach. Triggered when facing type-safety issues, validation questions, or boundary design pressure.
- License 许可
- MIT
- 最近更新
- 2026-11-11
- Stars
- ★ 0
- Forks
- 4
01 前言 Front Matter
- name
- code-patterns
- description
- Check the Core and repo-local pattern libraries for known solutions to recurring design problems before inventing a new approach. Triggered when facing type-safety issues, validation questions, or boundary design pressure.
- classification
- passive
03 SKILL.md 正文
Code Patterns
When you identify a design problem -- especially type-safety issues,
validation questions, or boundary design pressure -- check both
.agent/practice-core/patterns/ and .agent/memory/active/patterns/
before inventing a new approach.
When to Use
- You are about to write a type ignore or cast
- You are designing a validation boundary
- You see a runtime conversion that mirrors a compile-time type
- You encounter a function returning a claimed type for unvalidated data
- A reviewer flags boundary pressure or type widening
Steps
- Read
.agent/practice-core/patterns/README.mdto see whether a portable general pattern already exists. - Read
.agent/memory/active/patterns/README.mdto discover repo-local patterns. - Match the current problem against each pattern's description.
- If a pattern matches, read its full file and apply the approach.
- If no pattern matches, proceed normally -- do not force a fit.
Important
This skill is not always-active. It triggers when an engineer or agent encounters a design problem where type safety, validation, or boundary pressure is involved. It is a discovery mechanism, not a mandate.
04 同仓库更多 Skills
tsdoc
Write code-adjacent API documentation and the matching durable doc updates.
systematic-debugging
Structured debugging workflow. Use when encountering bugs, test failures, or unexpected behaviour. Reproduce, isolate, hypothesise, verify, fix, regression test.
start-right-thorough
Thorough grounding — full directive read, metacognition, and execution outline.
start-right-quick
Quick grounding at session start — read directives, memory, and check practice box.
receiving-code-review
How to process code review feedback effectively. Understand before acting, verify suggestions technically, ask for clarification when needed. Complements the reviewer sub-agents.
napkin
Maintain a per-repo napkin file at .agent/memory/napkin.md that tracks mistakes, corrections, and what works. Always active, every session, unconditionally. Read distilled.md and napkin.md before doing anything. Write to the napkin continuously as you work. Log your own mistakes, not just user corrections.