技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
adversarial-ddd【数据与研究】Use this skill to gate DDD and ubiquitous-language quality with a pass/fail adversarial review — a single blind reviewer subagent judges a diff, a module/bounded context, or a DSL/semantic-model surface against 20 decidable rules across glossary lifecycle (a recorded ubiquitous language is required once domain concepts exist — absence is FAIL; code m…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
A domain-driven design and ubiquitous-language gate for any codebase — a pass/fail gate: a single blind reviewer subagent judges the work against this gate's rules with an adversarial mandate, and the work passes only when every rule is PASS or N/A. This skill renders verdicts; it never fixes the work.
The gate's engine is the glossary lifecycle: once a target contains domain concepts, a recorded ubiquitous language (a glossary) must exist — its absence is a FAIL whose fix list names the exact file to create and the terms it must define. Run the gate on any project and the first verdict forces the vocabulary into existence; every later run holds the code, tests, docs, and customer-facing copy to it and keeps it well-sized. That is how one skill produces a common, well-understood vocabulary across many projects, exactly as DDD prescribes.
*Manager/*Helper types, setStatus() transitions, anemic entities, vendor types absorbed into the model.Do not apply to targets with no domain concepts — pure infrastructure, build tooling, generic libraries (the reviewer prompt's precondition aborts with "GATE NOT APPLICABLE"). Do not apply when the user wants explanations or refactoring rather than a verdict. Rules whose prerequisite structure is absent (no identifiable contexts, no DSL, no glossary yet for the conformance rules) go N/A, not FAIL — except the two absence rules (gloss-language-recorded, dsl-deterministic-validator-exists), where the missing artifact is itself the FAIL.
Follow these steps exactly — the gate's value is that every review runs the same way.
gloss-* rules search the repo for a glossary and for term usage, and the ctx-* rules need sibling contexts visible beyond the diff. Note where docs and user-facing copy live if they exist.references/ (all gloss-*.md, lang-*.md, model-*.md, ctx-*.md, dsl-*.md files).If the same rule flips verdicts across re-reviews of an unchanged target, or a human reads the evidence and overrides the verdict, that is a decidability bug in the rule — record it in gotchas.md and sharpen the rule; do not override the gate.
The reviewer returns, per rule: PASS | FAIL | N/A, evidence (file:line, a quote, or the glossary entry — required for PASS as well as FAIL), and for every FAIL, the fix that flips the rule to PASS once applied — the named change plus its location, never a restatement of the violation. The reviewer also reports which glossary it found (or that none exists and where it searched). The final report follows assets/templates/verdict.md.
| # | Category | Prefix | Covers |
|---|---|---|---|
| 1 | Glossary Lifecycle | gloss- | A recorded ubiquitous language exists (absence is FAIL), code conforms to it, every entry stays live, definitions carry business meaning |
| 2 | Language Consistency | lang- | One name per concept, one meaning per name, no semantics-free names on domain rules, transitions named as operations, one vocabulary across code/tests/docs/UI |
| 3 | Domain Model Integrity | model- | Rules live with the model, valid on construction, domain types over bare primitives, named states over boolean flag piles |
| 4 | Boundaries & Context Integrity | ctx- | Published interfaces between contexts, anticorruption at vendor seams, infrastructure-free domain, one writer per stored model |
| 5 | Semantic Model & DSL Surface | dsl- | Semantic model separate from carrier syntax, illegal statements unconstructible or fail-fast, deterministic validator for external DSLs |
domain-architect (experimental) — teaching-style domain modeling guidance; use it when the goal is designing the model rather than gating it.adversarial-ts-patterns (experimental) — pattern-usage gate for TypeScript/React; run alongside this gate on TS targets for full coverage (it owns the state-machine and over-abstraction rules at the code-idiom level).feature-arch-gate (experimental) — folder/feature architecture gate; complementary at the project-structure level.| File | Description |
|---|---|
| references/reviewer-prompt.md | Self-contained prompt template for each blind reviewer |
| assets/templates/verdict.md | Verdict report template |
| references/_sections.md | Category definitions and ordering |
| metadata.json | Version and source references |