cleanslice

CleanSlice architecture for NestJS + Nuxt full-stack apps. Use for vertical slice features, gateway pattern, Provider.vue, Pinia stores, DTOs, or any CleanSlice project work.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "cleanslice" with this command: npx skills add cleanslice/skills/cleanslice-skills-cleanslice

CleanSlice


Quick Start

CleanSlice organizes code into vertical slices — self-contained feature modules following Clean Architecture.

Fixed stack: NestJS + Prisma (API) · Nuxt 3 + Vue 3 + Pinia (App) · Tailwind + shadcn-vue (UI)


Quick Reference

NeedAnswer
Slice folder nameSINGULAR: user/ not users/
Route/page filesPLURAL: /users, users.vue
DTO file namecamelCase: createUser.dto.ts
Data access layerGateway (NOT Repository)
State managementPinia stores/ (NOT composables)
Component entryProvider.vue required in every folder
DI tokensAbstract class with I prefix: IUserGateway
Backend orderschema → types → gateway → service → mapper → dtos → controller → module
Frontend ordernuxt.config → stores → components → pages
Implementation orderAPI first, then App

Bundled Resources

References (references/):

  • workflow.md — Four-phase workflow, fix-bug workflow, git commits, system prompt
  • backend.md — NestJS slice structure, module, controller, service, gateway, mapper, DTOs, types
  • frontend.md — Nuxt slice structure, auto-imports, Provider.vue, stores, composables
  • gateway.md — Gateway pattern with full code examples (abstract class, DI wiring)
  • typescript.md — TypeScript standards (no-any, I prefix, Types suffix, import aliases)
  • errors.md — Error pattern (BaseError, domain errors, interceptor, no try/catch in controllers)

When to Load References

  1. Load references/workflow.md when:

    • Starting any new feature, project, or bug fix
    • User asks how to plan or structure work
    • Need the four-phase workflow or system prompt
    • Trigger phrases: "new feature", "add", "create", "build", "implement", "plan", "start"
  2. Load references/backend.md when:

    • Implementing any API slice (NestJS)
    • Writing controllers, gateways, mappers, DTOs, modules
    • Questions about backend file structure or standards
    • Trigger phrases: "controller", "DTO", "module", "NestJS", "API", "endpoint", "Prisma"
  3. Load references/frontend.md when:

    • Implementing any App slice (Nuxt)
    • Writing stores, components, pages, composables
    • Questions about auto-imports, Provider.vue, or Pinia
    • Trigger phrases: "store", "page", "component", "Nuxt", "Vue", "Provider", "frontend"
  4. Load references/gateway.md when:

    • Implementing data access layer
    • Questions about Gateway vs Repository
    • DI injection tokens and abstract class pattern
    • Trigger phrases: "gateway", "repository", "data layer", "inject", "DI"
  5. Load references/typescript.md when:

    • Questions about naming conventions or TypeScript rules
    • Writing interfaces, enums, types, or imports
    • Any code review or standards check
    • Trigger phrases: "interface", "enum", "type", "naming", "any", "import alias", "standards"
  6. Load references/errors.md when:

    • Implementing error handling in any slice
    • Creating domain error classes
    • Questions about where errors belong or how they flow
    • Trigger phrases: "error", "exception", "throw", "not found", "catch", "BaseError"

Critical Rules

Mandatory Four-Phase Workflow

Every task follows these phases — stop and wait for user approval between each:

PhaseWhat You DoEnd With
Phase 1High-level plan: slices, pages, endpoints (NO file paths)"Do you approve?" → STOP
Phase 2Detailed plan: file paths, schemas, components, DTOs"Do you approve?" → STOP
Phase 3Implementation: API first, then App
Phase 4Review: validate against patterns, plan next iteration"STOP or continue?" → STOP

Technology Stack (FIXED — Never Ask)

api/    → NestJS + Prisma
app/    → Nuxt 3 + Vue 3 + Pinia
styling → Tailwind + shadcn-vue
db      → PostgreSQL (SQLite for dev)

Slice Structure

API slice                           App slice
api/src/slices/{slice}/             app/slices/{slice}/
├── {slice}.module.ts               ├── nuxt.config.ts
├── {slice}.controller.ts           ├── pages/
├── domain/                         │   ├── {slices}.vue        ← plural
│   ├── {slice}.types.ts            │   └── {slices}/[id].vue
│   ├── {slice}.service.ts          ← optional, for business logic
│   └── {slice}.gateway.ts          ├── components/
├── data/                           │   └── {slice}/
│   ├── {slice}.gateway.ts          │       ├── Provider.vue    ← REQUIRED
│   └── {slice}.mapper.ts           │       └── Layout.vue
└── dtos/                           ├── stores/
    ├── {slice}.dto.ts              │   └── {slice}.ts
    └── create{Slice}.dto.ts        └── composables/

Forbidden Patterns

WrongCorrect
.repository.ts.gateway.ts
AiService, ChatService (data access)AiGateway, ChatGateway — external integrations are gateways
UserRepositoryUserGateway (Prisma IS the repository)
composables/useChat.ts for statestores/chat.ts
create-message.dto.tscreateMessage.dto.ts
ChatWindow.vuechat/Provider.vue
features/slices/
hooks/stores/
React / Next.js / ViteNuxt
ExpressNestJS
TypeORMPrisma
Vanilla CSSTailwind + shadcn-vue
File paths in Phase 1Save for Phase 2

Git Commit Format

<type>: <description>
TypeDescription
featNew feature
fixBug fix
docsDocumentation only
refactorCode change, no feature/fix
testAdding/updating tests
choreMaintenance tasks

Add ! for breaking changes: feat!: change response format

Rules: lowercase · no period · imperative mood · under 72 chars


Official Documentation

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

conventional-commits

No summary provided by upstream source.

Repository SourceNeeds Review
General

nano-banana-2

Nano Banana 2 - Gemini 3.1 Flash Image Preview

Repository Source
44.8K153inferen-sh
General

qwen-image-2

Qwen-Image - Alibaba Image Generation

Repository Source
44.6K153inferen-sh
General

p-video

Pruna P-Video Generation

Repository Source
44.6K153inferen-sh