entity-models
Model API entities as classes inside model/, including base model inheritance, relation helpers, model-to-model composition, and route-to-model instance flows.
Skill by werlang
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/werlang-entity-models
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Node.js package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/entity-models
What's inside
- Skill name
entity-models- Description
- Model API entities as classes inside model/, including base model inheritance, relation helpers, model-to-model composition, and route-to-model instance flows. Use when creating entities, join-table relations, persistence methods, or routes that should coordinate model instances through a shared database driver helper.
- License
- MIT
- Instructions
- 34 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Files (9)
- SKILL.md
- entity-models.md · references/
- error.js · references/mini-project/src/helpers/
- mysql.js · references/mini-project/src/helpers/
- article.js · references/mini-project/src/model/
- model.js · references/mini-project/src/model/
- relation.js · references/mini-project/src/model/
- user.js · references/mini-project/src/model/
- articles.js · references/mini-project/src/routes/
SKILL.md (first lines)
# Entity Models Use this skill when entities should be implemented as classes and relationships should stay in the model layer. ## Rules - Put entity classes in `model/`. - Export named classes only. - Instantiate models in routes instead of passing raw objects around. - Keep relation logic in models or dedicated relation helpers. - Keep persistence logic in models and delegate database access to a shared driver helper. - Let routes orchestrate request-level work through model instances. - **Mass Assignment Defense**: Whitelist explicitly permitted fields on model create/update methods; never assign raw `req.body` directly to database persistence layers per [`security-defense-and-mitigation`](../security-defense-and-mitigation/SKILL.md). - **IDOR / BOLA Prevention**: Always scope entity query and mutation methods by the authenticated account/tenant ID (`where owner_id = ?`) to ensure unauthorized cross-user access is impossible. - **Rich Domain Encapsulation**: Keep validation invariants and domain business rules inside entity methods rather than in anemic data bags per [`clean-code-and-oop`](../clean-code-and-oop/SKILL.md). ## Relation Pattern Use a small relation helper for join tables and many-to-many behavior. Typical responsibilities: - check relation existence - insert relation rows - replace relation sets - delete relation rows - list related rows ## References - Read `references/entity-models.md` for the generic architecture. - Read `references/mini-project/` for a small relation-aware example. - Pair with [`api-building`](../api-building/SKILL.md), [`security-defense-and-mitigation`](../security-defense-and-mitigation/SKILL.md), and [`clean-code-and-oop`](../clean-code-and-oop/SKILL.md).
From werlang/user-skills, MIT.
More from werlang/user-skills
- 0.570score
css-standards
werlang
Enforce reusable, brand-aware CSS architecture for public web apps by owning shared tokens in a common stylesheet, importing page entrypoints first, keeping…
SkillAFreshness: AClaude Code +9 - 0.570score
clean-code-and-oop
werlang
Authoritative engineering standards for writing Clean Code, Object-Oriented Programming (OOP) architectures, SOLID design principles, and safe refactoring.
SkillAFreshness: AClaude Code +9 - 0.570score
code-review
werlang
Review changes since a fixed point (commit, branch, tag, or merge-base) along a risk-calibrated gradient (Trunk vs Leaf code) across Standards, Spec, and…
SkillAFreshness: AClaude Code +9 - 0.570score
git-change-workflow
werlang
Choose and apply a Git branching, worktree, and commit workflow for implementation, refactor, bug-fix, documentation, and configuration work.
SkillAFreshness: AClaude Code +9 - 0.570score
api-building
werlang
Build or refactor reusable Node.js APIs using Express, express.Router, ESM imports, named exports, entity classes in model/, helpers for non-endpoint logic…
SkillAFreshness: AClaude Code +9 - 0.544score
frontend-design
werlang
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one.
SkillAFreshness: AClaude Code +9 - 0.529score
document-touched-code
werlang
Document touched code with JSDoc, method comments, and focused section comments as the default behavior whenever implementing a new feature, refactoring…
SkillBFreshness: BClaude Code +9 - 0.479score
audit-project-context
werlang
Audit, verify, update, or clean docs, prompts, skills, agents, instructions, README files, and other markdown/MD files against the current project codebase.
SkillCFreshness: CClaude Code +9 - 0.474score
documentation-maintenance
werlang
Keep project documentation, agent guidance, comments, and validation instructions synchronized with the real implementation.
SkillCFreshness: CClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Oct 16, 2026 (13 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/werlang/user-skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from werlang
- 0.570score
css-standards
werlang
Enforce reusable, brand-aware CSS architecture for public web apps by owning shared tokens in a common stylesheet, importing page entrypoints first, keeping…
SkillAFreshness: AClaude Code +9 - 0.570score
clean-code-and-oop
werlang
Authoritative engineering standards for writing Clean Code, Object-Oriented Programming (OOP) architectures, SOLID design principles, and safe refactoring.
SkillAFreshness: AClaude Code +9 - 0.570score
code-review
werlang
Review changes since a fixed point (commit, branch, tag, or merge-base) along a risk-calibrated gradient (Trunk vs Leaf code) across Standards, Spec, and…
SkillAFreshness: AClaude Code +9 - 0.570score
git-change-workflow
werlang
Choose and apply a Git branching, worktree, and commit workflow for implementation, refactor, bug-fix, documentation, and configuration work.
SkillAFreshness: AClaude Code +9 - 0.570score
api-building
werlang
Build or refactor reusable Node.js APIs using Express, express.Router, ESM imports, named exports, entity classes in model/, helpers for non-endpoint logic…
SkillAFreshness: AClaude Code +9 - 0.544score
frontend-design
werlang
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one.
SkillAFreshness: AClaude Code +9
Cite this page
entity-models skill. Agent Mart. https://agentmart.dev/skills/werlang-entity-models (last updated 2026-10-24)