code-review-and-qualit…
Reviews a code change for correctness, security, maintainability, architecture, performance, and verification gaps, or performs a…
Audits an entity model field by field: what should exist, what exists now, where each value belongs (column, config, computed runtime value, or removal), and what must migrate. Use when comparing a PRD with a schema/model, designing entity fields, or deciding “store or
$ npx -y skills add hylarucoder/hai-stack --skill entity-model-auditor --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/entity-model-auditorContext preview
The summary Claude sees to decide when to auto-load this skill.
Audits an entity model field by field: what should exist, what exists now, where each value belongs (column, config, computed runtime value, or removal), and what must migrate. Use when comparing a PRD with a schema/model, designing entity fields, or deciding “store or
name: entity-model-auditor description: | Audits an entity model field by field: what should exist, what exists now, where each value belongs (column, config, computed runtime value, or removal), and what must migrate. Use when comparing a PRD with a schema/model, designing entity fields, or deciding “store or compute?”, “column or JSON?”, or “does this field belong at all?”. Use hai-prd first when the product intent is still unsettled.
Given a PRD (product requirements document) and an optional codebase, produce a structured data model audit for each entity. The audit answers: what fields should exist, where should they live, what do we have now, and what needs to change.
Two stances run through the whole process:
schemas, and migrations define the current implementation. If they disagree, report the delta; do not silently assume either side is authoritative for every decision.
compatibility, ownership, and operational debugging. JSON/config usually lowers schema-change cost, but it is never "free" when validation, consumers, or persisted data must evolve.
The final artifact is both a specification (the target design) and a migration guide (the work to get there). Anyone reading it should know the target, the current state, and the change.
Produce one audit document per entity: target/current field tables, computed fields, related entities, a grouped change list, and non-obvious design decisions. The canonical section and column shape is in `references/output-template.md`; read it before finalizing.
Read the PRD the user provides. For each entity mentioned, extract every field or attribute — explicit or implied. Group them by the PRD's own sections if it has them.
If the user also points to codebase files (DB models, API types, schemas), read those too. If no codebase is provided, the "current state" columns will be marked as unknown.
Every field goes through five questions in order:
1. What current goal, invariant, contract, audit need, or observable behavior proves it should exist? 2. Can it be derived from durable authoritative data, or must it be persisted? 3. If persisted, does it belong in a column, cohesive config object, or related entity? 4. Does backend behavior interpret it, or is it content carried through unchanged? 5. What exact form is stored versus returned or displayed?
Read `references/field-classification.md` before making these decisions. Explain non-obvious classifications and mark unresolved authority or derivation as undecided rather than guessing.
For each entity, fill the canonical eight-column table in `references/output-template.md`, split between table-level and config fields by classification.
Group fields by logical section (identity, behavior, parameters, access control, etc.) based on what makes sense for the entity. Use the PRD's own grouping as a starting point but don't follow it blindly — regroup if the PRD's sections mix concerns.
After the table, summarize all changes needed in a flat list grouped by change type:
List all fields that are not stored but need to be available at the API or runtime level. For each, document:
Junction tables, version tables, and other related entities go in **section 4** — apply the same five cuts to each related entity's fields.
For any non-obvious classification decision, write a one-row justification:
| Decision | Reasoning | |----------|-----------| | `summary` is a column, not config | Card list displays it directly; avoiding jsonb parse on every list query | | `theme` moved from column to config | Not a query/filter dimension; keeping columns minimal |
Fill the canonical `references/output-template.md`; do not reproduce a second schema here. Keep unknown current-state values explicit and distinguish verified evidence from design recommendations.
Two ordering rules to keep the result honest:
shouldn't exist doesn't need a storage decision.
stored form, not the presentation form (an object storage key, not a full URL). For deeper naming disputes, hand off to hai-naming.
This skill assumes the PRD is roughly settled and focuses on field placement and the storage/migration delta. Route elsewhere when the real problem is upstream:
fields are undecided because the product intent is undecided. Fix the PRD first, then audit.
component-design review, not a field-level data-model audit.
让 Coding Agent 把软件迭代做对:从真实问题出发,完成改动,用证据确认结果。 支持:大多数能读取 Skills(SKILL.md)的 Coding Agent,例如 Claude Code、Codex。 hai-stack 由 @海拉鲁编程客 创建。它把一次软件迭代拆成判断、设计、动手、确认、沉淀五步,每一步都有对应的技能。
Reviews a code change for correctness, security, maintainability, architecture, performance, and verification gaps, or performs a…
Challenges an overly conservative, incremental, or compatibility-led proposal with a bold target model, a concrete…
Pressure-tests an ambitious proposal and returns a landing judgment, one minimum viable proof, explicit cuts, success/failure…
Investigates architecture and change complexity from repository runtime paths to bounded modules, React components, and shared…
Produces a ready-to-run ast-grep command or reusable YAML lint/codemod rule, validated against positive and negative fixtures.…
Audits documentation for internal contradictions and/or mismatches with code, config, schemas, and approved contracts. Use for…