AGENT SKILL
create_domain_contract
Use when defining a typed domain contract — an application use case (business flow) or a repository interface (persistence boundary) — with clean architecture boundaries.
适用职业律师与法务
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-12
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- create_domain_contract
- risk
- writes-files
- family
- architecture-contracts
- profile
- core
- summary
- Define a typed use case or repository interface with clean-architecture boundaries
- maturity
- stable
- triggers
- [ "use case", "repository interface", "domain contract", "persistence boundary", "port and adapter", "protocol for the repository" ]
- visibility
- internal
- description
- Use when defining a typed domain contract — an application use case (business flow) or a repository interface (persistence boundary) — with clean architecture boundaries.
- auto_trigger
- true
- small_model_path
- false
03 SKILL.md 正文
Skill: create_domain_contract
Purpose
Create a typed domain contract aligned with clean architecture boundaries. This skill
covers two contract shapes selected via contract_type:
use_case— an application use case that expresses an explicit business flow.repository— a repository/persistence interface that isolates infrastructure details from domain and application logic.
Required Input
contract_type:use_case|repository.- Common: entity/aggregate or business goal, and the typed input/output models.
- For
use_case: actor(s) involved and the expected business outcome. - For
repository: required operations (CRUD/query) and consistency/transactional constraints.
Output Format
- Contract name (use case name, or interface/protocol name).
- Python module/class/function (or protocol) proposal.
- Typed input/output models involved in each operation.
- For
use_case: ordered execution flow and error-handling strategy. - For
repository: method signatures, adapter implementation guidance (infra side), and a contract-behavior test strategy.
Mode
- use_case — model the business flow as an application-layer use case. Keep the flow ordered and explicit; define error handling.
- repository — model the persistence boundary as an interface/protocol. Keep the domain independent from infrastructure implementations; prefer minimal, explicit method contracts.
Execution Rules
- Follow
.github/architecture.md. - Apply
.github/standards.md. - Respect
.github/domain-boundaries.md(domain must not depend on infrastructure). - Use absolute imports and type hints.
- Keep naming/docstrings in English.
04 同仓库更多 Skills
writing-plans
Use when you have a spec or requirements for a multi-step task, before touching code
★ 0
writing-clearly-and-concisely
暂无简介
★ 0
verify_changes
暂无简介
★ 0
validate_module_structure
暂无简介
★ 0
using-git-worktrees
Use when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback
★ 0
ui-ux-pro-max
暂无简介
★ 0