Guides

AI-Assisted Development

How to use Claude Code, Cursor, and other AI coding tools with RawStack.

RawStack is designed to work seamlessly with AI coding assistants. It ships with Claude Code skills files that give AI tools full architectural context for every part of the stack — so generated code follows the right patterns from day one.

What are skills files?

Skills files are structured context documents that live in .claude/skills/. Each file describes the architecture, patterns, conventions, and rules for a specific part of the codebase. When you use Claude Code (or any tool that supports context files), the AI assistant automatically loads the relevant skill for the component you are working on.

RawStack includes skills files for:

  • API (.claude/skills/api-developer.md) — NestJS, DDD, CQRS, Prisma, Redis
  • Mobile App (.claude/skills/app-developer.md) — React Native, iOS, Android
  • Admin Panel (.claude/skills/admin-developer.md) — React, Vite, OpenAPI client
  • Web (.claude/skills/web-developer.md) — Next.js, TypeScript, OpenAPI client

Why does this matter?

Without context, AI coding tools generate code that is structurally generic. They do not know:

  • That commands go in application/, domain logic in domain/, and HTTP handlers in infrastructure/
  • That queries should use Redis caching and commands should go through domain services
  • That HTTP endpoints are named actions (CreateUserAction) rather than controllers
  • How domain events are published via EventBridge

With RawStack's skills files loaded, the AI assistant understands all of this. You can ask it to scaffold a new domain module and the output will follow the correct DDD and CQRS structure.

Using Claude Code

Claude Code picks up .claude/skills/ files automatically when you work inside a RawStack project. The skills are loaded as context when you open a session.

You can invoke skills explicitly using the / command in Claude Code, for example:

/api-developer add a new products domain with CRUD and caching

Using Cursor

For Cursor, you can copy the content of a skills file into a .cursorrules file or paste it as a system prompt in the Cursor settings. The same architectural context applies.

Using GitHub Copilot

Copilot does not natively support skills files, but you can paste the relevant skills file content into a GitHub Copilot Chat session as context before asking it to generate code.

What the API skills file covers

The api-developer.md skills file gives the AI full context for:

  • The DDD layer split: application, domain, infrastructure
  • CQRS: commands for writes, queries for reads
  • Repository pattern: domain defines interfaces, infrastructure implements them
  • The event-driven architecture: internal @nestjs/cqrs bus and external EventBridge
  • Testing conventions: unit tests for domain and application layers, integration tests for infrastructure
  • The CLI and how to add new CLI commands

Extending the skills files

The skills files are plain markdown documents — you can edit them to reflect your own customisations. If you add a new domain module, update the relevant skills file to describe its patterns. This keeps AI-generated code aligned with your evolving architecture.

AI-powered code generation tips

A few patterns that work well with RawStack and AI tools:

Scaffold a new domain module:

"Add a new product module to the API. Follow the same DDD and CQRS structure as the user module. Include a CreateProduct command and a GetProduct query with Redis caching."

Add a new API endpoint:

"Add a PATCH /products/:id endpoint to the product module. Use the same action pattern as UpdateUserAction. Include a Zod DTO and a command handler."

Generate a React Native screen:

"Add a ProductListScreen to the mobile app. Follow the same pattern as the existing account management screen. Use the generated OpenAPI client to fetch data."

Being specific about which existing file or pattern to follow produces the most consistent results.