Skip to content
Agentmart
Submit a tool

vertical-slices

I organise code by feature, not by layer.

Skill by mateonunez

IndexedMIT★ 8
Write a review

Chalk Labs

Need help deploying vertical-slices?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

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/mateonunez-vertical-slices

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.

We use your email only for this newsletter. Privacy

About

I organise code by feature, not by layer. In monorepos, every feature is a workspace package; new files live with the feature they belong to, not in a shared utils/ pile. Use when adding a new feature, deciding where a file goes, proposing package structure, or when user says "vertical slice", "package by feature", or "where should this go".

No 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

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/vertical-slices

What's inside

Skill name
vertical-slices
Description
I organise code by feature, not by layer. In monorepos, every feature is a workspace package; new files live with the feature they belong to, not in a shared utils/ pile. Use when adding a new feature, deciding where a file goes, proposing package structure, or when user says "vertical slice", "package by feature", or "where should this go".
License
MIT
Instructions
78 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Vertical slices

Layered organisation (`controllers/`, `services/`, `repositories/`) makes every change a horizontal cut across the whole codebase. One feature edit touches five folders. Tests in one place, code in another, types in a third. Then six months in, every PR is a tour through the entire repo.

I organise by feature instead. A feature owns its handlers, its services, its types, its tests, its migrations, its fixtures. The seam between features is a package boundary, not a layer convention.

The canonical example is [`ait`](../../personal/ait/SKILL.md) — see the package layout in [`personal/ait/references/core-architecture.md`](../../personal/ait/references/core-architecture.md): `@ait/core`, `@ait/connectors`, `@ait/postgres`, `@ait/qdrant`, `@ait/scheduler`, `@ait/gateway`. Each one owns its slice end to end.

## When this skill is active

You are about to:

- Create a new file or directory and have to decide where it goes
- Add a new feature or domain concept
- Propose monorepo package structure
- Refactor code that has accumulated into a shared `utils/` or `lib/` pile

## The decision tree

When deciding where a new file lives, ask in order:

1. **Does it belong to one feature?** → put it inside that feature's package, next to the code that uses it.
2. **Is it shared by 2+ features in the same domain?** → put it in a domain package (e.g. `@scope/auth`, `@scope/billing`).
3. **Is it shared across the whole product, with no domain coupling?** → consider a `@scope/shared` package, but **only if the abstraction is real**. Three callers is the bar. Two is duplication; one is premature.
4. **None of the above?** → you don't know yet. Inline it. Wait for the third caller before extracting.

## Workspace shape

In pnpm monorepos, the slice boundary is enforced by package boundaries:

```
packages/
  feature-a/
    src/
    test/
    package.json    # name: @scope/feature-a
  feature-b/
    src/
    package.json    # depends on "@scope/feature-a": "workspace:*"
apps/
  api/
  web/
```

Internal deps use `workspace:*`. Scoped names (`@scope/feature`) make the boundary visible at every import site.

## Anti-patterns

- **Shared `utils/` mega-package.** Becomes a junk drawer with no cohesion. Every feature ends up depending on it; nothing depends on a clear contract. Split or delete.
- **Splitting a feature across packages by tier** — e.g. `@scope/auth-controllers`, `@scope/auth-services`, `@scope/auth-repositories`. Re-creates layered organisation at the package level. Collapse to `@scope/auth`.
- **Inventing a feature for a one-off file.** If the file has one caller, it's not a feature, it's an implementation detail. Inline it.
- **Cross-feature imports that bypass the public API.** If `@scope/billing` imports from `@scope/auth/src/internals/`, the boundary is fake. Re-export through the package's `index.ts` or push the shared concept down to a third package.
- **Putting types in a separate `@scope/types` package** when the types belong to one feature. Types live with their owner.

## Useful pnpm scripts for the slice shape

```jsonc
// package.json (root)
{
  "scripts": {
    "dev":   "pnpm run:recursive --parallel dev",
    "build": "pnpm run:recursive build",
    "test":  "pnpm run:recursive test",
    "lint":  "biome check .",
    "run:recursive": "pnpm -r --workspace-concurrency=1 --if-present"
  }
}
```

`run:recursive` is a reusable base — `-r` traverses workspaces, `--workspace-concurrency=1` respects build order, `--if-present` skips packages that don't define the script. Override with `--parallel` for dev servers.

## When refactoring an existing horizontal layout

Don't rewrite the world. Pick one feature, slice it vertically into its own package, prove the pattern, then iterate. A half-finished refactor is worse than no refactor.

If the existing codebase is small (<10 files), just leave it. Premature monorepo-isation is a real failure mode.

From mateonunez/skills, MIT.

More from mateonunez/skills

Signals

Stars
8
Forks
0
Open issues
0
Last commit (this folder)
May 7, 2026 (5 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from mateonunez

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get vertical-slices running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying vertical-slices?

CallGet help
Cite this page

vertical-slices skill. Agent Mart. https://agentmart.dev/skills/mateonunez-vertical-slices (last updated 2026-10-24)