Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

Back to skills

Stacks Domain Modeling

ASecurity

Use when building or sharpening a Stacks project's domain language - challenging a fuzzy or overloaded term, naming a model or event, writing or editing CONTEXT.md, or recording an architecture decision as an ADR under docs/adr/.

625 stars
0 votes
0 copies
1 views
Added 9/3/2026
developmenttypescriptgobashsqlgit

Security Analysis

A100/100

Scanned 9/3/2026

Install to Claude Code

$npx -y skills add stacksjs/stacks --skill stacks-domain-modeling --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Stacks Domain Modeling?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Stacks Domain Modeling
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/stacksjs-stacks-domain-modeling/badge)](https://www.skillsdirectory.com/skills/stacksjs-stacks-domain-modeling)

More formats (shields.io, HTML) on the badges page.

Download Zip
Files
SKILL.md
---
name: stacks-domain-modeling
description: Use when building or sharpening a Stacks project's domain language - challenging a fuzzy or overloaded term, naming a model or event, writing or editing CONTEXT.md, or recording an architecture decision as an ADR under docs/adr/.
license: MIT
compatibility: Bun >= 1.3.0, TypeScript
allowed-tools: Read Edit Write Bash Grep Glob
---

# Domain modeling

Actively build and sharpen the project's domain model as you design. This is the
*active* discipline: challenging terms, inventing edge-case scenarios, and
writing the glossary and the decisions down the moment they crystallise. Merely
*reading* `CONTEXT.md` for vocabulary is not this skill, that is a one-line habit
any skill can do. This skill is for when you are changing the model.

In a Stacks app the domain language is not decoration. It becomes the model name,
the table name, the route URI, the event name (`article:created`), the action
file name and the stx component name, all at once. A term settled badly is a
rename across five layers later.

Credit: adapted from Matt Pocock's `domain-modeling` skill (MIT),
<https://github.com/mattpocock/skills>.

## File structure

Most repos have a single context:

```
/
├── CONTEXT.md
├── docs/
│   └── adr/
│       ├── 0001-derive-migrations-from-models.md
│       └── 0002-sqlite-for-local-development.md
└── app/
```

If a `CONTEXT-MAP.md` exists at the root, the repo has several contexts and the
map points at where each one lives. Create both lazily: only when you have
something to write. If no `CONTEXT.md` exists, create it when the first term is
resolved. If no `docs/adr/` exists, create it when the first ADR is needed.

Formats for both files: [FORMATS.md](FORMATS.md).

## During the session

### Challenge against the glossary

When the user uses a term that conflicts with the existing language in
`CONTEXT.md`, call it out immediately. "Your glossary defines cancellation as X,
but you seem to mean Y. Which is it?"

### Sharpen fuzzy language

When a term is vague or overloaded, propose a precise canonical one. "You are
saying account. Do you mean the Customer or the User? Those are different
things, and this project already has a `User` model."

### Discuss concrete scenarios

When domain relationships are on the table, stress-test them with specific
scenarios. Invent cases that probe the edges and force precision about where one
concept ends and the next begins.

### Cross-reference with the code

The code is a second source of truth for the domain, and in a Stacks project it
is an unusually legible one. When the user states how something works, check
whether the models agree:

- `app/Models/` and `storage/framework/defaults/app/Models/` for the nouns.
- The `belongsTo` / `hasMany` / `belongsToMany` declarations for the
  relationships.
- Model events (`observe: true` emits `<model>:created`, `:updated`, `:deleted`)
  for the verbs.
- `routes/` for the URIs the outside world sees.

If you find a contradiction, surface it. "Your code cancels whole Orders, but you
just said partial cancellation is possible. Which is right?"

A term that lands in `CONTEXT.md` and disagrees with a model name is a bug in one
of the two. Say which one you think should move.

### Update CONTEXT.md inline

When a term is resolved, update `CONTEXT.md` right there. Do not batch these up.

`CONTEXT.md` is a glossary and nothing else. Keep it free of implementation
detail: no file paths, no schemas, no config. Those go stale, and the whole value
of the file is that it does not.

### Offer ADRs sparingly

Only offer to record a decision when all three are true:

1. **Hard to reverse.** The cost of changing your mind later is meaningful.
2. **Surprising without context.** A future reader will wonder why it was done
   this way.
3. **The result of a real trade-off.** There were genuine alternatives and you
   picked one for specific reasons.

If any of the three is missing, skip it.

## Downstream

> Reach for `stacks-codebase-design` when the argument is about a module's
> shape rather than its name, and `stacks-grilling` when the term will not
> settle without an interview.

Attribution

stacksjsstacksjs
View sourceMore from stacksjs →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Browser Extension Developer

Use this skill when developing or maintaining browser extension code in the `browser/` directory, including Chrome/Firefox/Edge compatibility, content scripts, background scripts, or i18n updates.

281612 votes

Seo Optimizer

SEO optimization with keyword analysis, readability assessment, technical validation, content quality. Use for search rankings, blog posts, content audits, or encountering keyword density, readability scores, meta tags, schema markup errors.

2132 votes

Google Official Seo Guide

Official Google SEO guide covering search optimization, best practices, Search Console, crawling, indexing, and improving website search visibility based on official Google documentation

1862 votes

Tanstack Start

Build a full-stack TanStack Start app on Cloudflare Workers from scratch — SSR, file-based routing, server functions, D1+Drizzle, better-auth, Tailwind v4+shadcn/ui. Use whenever the user mentions TanStack Start, asks to scaffold a full-stack Cloudflare app with SSR, wants an SSR dashboard, or asks for a React 19 + Cloudflare Workers app with file-based routing and server functions — even if they don't name TanStack Start specifically. No template repo — Claude generates every file fresh per ...

9881 votes

Pentest

PTES-aligned adversarial security audit for backend, frontend, and mobile applications. Produces a CVSS-scored Hacker Report with verified PoCs and phased remediation.

5491 votes
View all in development →