Skip to main content

AI Context — Slash Commands, Agents & Skills

Radish generates a complete AI development environment alongside your application code. The generator doesn't just produce an app — it produces the skill packs that allow AI agents to effectively work within the framework, customize on top of it, and maintain the core architectural philosophies that make the generated code reliable.

The problem this solves: a generic AI agent dropped into a generated codebase will hallucinate endpoints, edit generated files that get overwritten, and break conventions it doesn't know exist. Radish's generated context teaches agents the rules of the project — what's safe to edit, what requires regeneration, how access control works, what the API surface looks like — so they extend the application rather than fighting it.

What Gets Generated​

FilePurpose
.claude/commands/api.md/api slash command — full REST API reference
.claude/commands/radish.md/radish slash command — project context refresher
.claude/commands/blueprint.md/blueprint slash command — blueprint authoring context
.claude/commands/search.md/search slash command — search infrastructure context (conditional: only when search-enabled entities exist)
.claude/agents/orchestrator.mdCoordinates multi-domain changes via delegation
.claude/agents/datalayer.mdData model and blueprint editing
.claude/agents/roles.mdPermissions and access control
.claude/agents/ui.mdPages, components, layouts, styling
.claude/agents/admin.mdAdmin panel customization
.claude/commands/add-entity.mdGuided entity addition with validation and regeneration
.claude/commands/add-feature.mdFeature enablement (search, CMS, grants, datasets)
.claude/commands/diagnose.mdProject health checks across blueprints and generation
.claude/commands/init.mdNew project blueprint generation
.claude/commands/status.mdCurrent project state inspection
CLAUDE.mdProject entry point: reference-doc locations, slash commands, entities, what not to edit

Agents and slash commands (api.md, radish.md, blueprint.md, search.md) are regenerated on every radish-cli create app run — they're rewritten to stay in sync with your current blueprints. Skills (add-entity, add-feature, diagnose, init, status) are copied once by radish init and never overwritten. Don't edit generated commands directly; put project-specific guidance in .claude/commands/radish.local.md instead (see Customization below).

Slash Commands​

Slash commands inject context on demand mid-session. When Claude Code forgets your API patterns or project structure during a long conversation, invoke the command to refresh its knowledge.

/api — REST API Reference​

Provides everything needed to interact with your app's REST API:

  • Server discovery — how to find the local dev port or production URL
  • Authentication — how to find and use bearer tokens
  • Endpoints — every entity endpoint with field summaries
  • Response format — list/single/error response shapes
  • Query parameters — filtering, pagination, sorting, date ranges
  • Entity-specific filters — enum fields, reference filters derived from your blueprint
  • Encrypted settings — notes that [ENCRYPTED] fields can't be retrieved via REST

Usage:

/api list all products with status=active
/api create a new customer with email and name

The command accepts freeform arguments — describe what you want and the injected context guides the AI to use the right endpoint, auth, and parameters.

/radish — Project Context Refresher​

Re-injects your full project context: entities with field details, roles, features, import patterns, directory ownership (safe vs generated), and available commands.

Usage:

/radish add a due date field to Tasks
/radish

Use /radish at the start of a long session or when the AI starts suggesting edits to generated files.

/blueprint — Blueprint Authoring Context​

Injects context for working with the project's blueprint files: current entity summary, enabled features, blueprint file paths, and the workflow for editing, validating, and regenerating.

Usage:

/blueprint add a tags field to Products

/search — Search Infrastructure Context​

Generated only when the project has search-enabled entities. Provides search entity details (engine, sync mode, searchable/filterable/sortable fields), generated file paths, usage examples, environment variables, and CLI commands.

Usage:

/search why aren't Products showing up in search results

Agent Definitions​

Agent definitions live in .claude/agents/ and provide specialized AI assistants, each with focused knowledge and file access boundaries. They work in Claude Code's VS Code extension and can also be dispatched by Radish Hub for remote operations.

Orchestrator​

Model: Opus — coordinates changes that span multiple domains.

The orchestrator never edits files directly. It analyzes a request, identifies which domains are affected, and delegates to specialized agents in the correct order:

  1. Data model changes → datalayer agent first
  2. Permission changes → roles agent after datalayer
  3. UI changes → ui agent after datalayer (if new entities were needed)
  4. Admin panel → admin agent

After datalayer changes, the orchestrator regenerates the code:

radish-cli create datalayer . --schema blueprints/{prefix}.types.json

Datalayer Agent​

Model: Sonnet — manages the data model by editing blueprint files.

Workflow:

  1. Edit blueprints/{prefix}.types.json
  2. Validate: radish-cli validate .
  3. Regenerate: radish-cli create datalayer .

The datalayer agent knows your entity definitions, field naming conventions (camelCase fields, PascalCase entities), and never touches generated code.

Roles Agent​

Model: Sonnet — manages permissions and access control.

Edits blueprints/{prefix}.roles.json and access guards in route files. Knows the four-layer access control model (RBAC → Ownership → Scoped → Grants) and the permission format.

UI Agent​

Model: Sonnet — builds and customizes the user interface.

Knows your theme, available services, and DaisyUI/Tailwind conventions. Edits non-admin, non-api routes and components. Uses Svelte 5 syntax ($props(), onclick).

Admin Agent​

Model: Sonnet — customizes the admin panel.

Adds new pages rather than modifying generated ones. Knows entity CRUD page locations and AutoForm field metadata.

Skills​

Skills are task-oriented procedures — step-by-step playbooks that agents invoke (or a developer triggers with /skill-name) to perform common operations correctly. Where agents define who handles a domain, skills define how to perform a specific task within that domain.

The distinction matters: an agent knows the rules of its domain (what files to edit, what conventions to follow), but a skill encodes a complete workflow with validation gates and the right command sequence. An agent without a skill might add a field to a blueprint but forget to validate and regenerate. The skill ensures every step happens in order.

Generated Skills​

SkillWhat it does
add-entityWalks through adding a new entity to the types blueprint — name, fields, relationships, ownership, indexes — then validates the blueprint and regenerates the datalayer
add-featureEnables and configures a platform feature (search, CMS, grants, datasets) — updates app.json feature flags, adds required schema entries, regenerates
diagnoseRuns health checks: blueprint validation, generation drift detection, orphan file scan, search index status, dependency checks
initGuided blueprint generation for a new project — asks about the domain, entities, relationships, roles, features, then produces all four blueprint files
statusReports current project state — entities with field counts, roles and permissions, enabled features, last generation timestamp, drift since last generation

How Skills Work​

Skills are markdown files in .claude/commands/ with a frontmatter description and a structured procedure body. When invoked, the skill's full text is injected into the agent's context, giving it an exact sequence of steps to follow:

User: /add-entity
Agent: (skill loaded) → asks entity name → asks fields → edits types.json → runs validate → runs create datalayer

Each skill includes validation gates — points where it checks for errors before proceeding. If radish-cli validate fails after a blueprint edit, the skill instructs the agent to fix the validation error before regenerating, rather than generating from a broken blueprint.

Adding App-Specific Skills​

Create additional skills in .claude/commands/:

---
description: Run the nightly data sync pipeline
---

# Data Sync

## Steps

1. Check sync status: `GET /api/v1/datasetDefinitions?enabled=true`
2. For each enabled dataset, trigger sync...

Skills are safe to customize — they won't be overwritten on regeneration.

How Context Stays Fresh​

The slash commands and agents are generated from your blueprints. They contain:

  • Asserted facts — entity names, fields, relationships, roles, permissions (derived directly from the blueprint JSON)
  • Pointers — file paths and env var patterns that tell the AI where to look rather than hardcoding values that may change

This means the AI gets accurate entity and field information but discovers runtime details (port numbers, API tokens, URLs) by reading your actual files.

Customization​

What Gets Overwritten vs What's Safe​

PathOn create appSafe to edit?
.claude/agents/*.mdOverwritten — regenerated from blueprintsNo — edits are lost on regeneration
.claude/commands/radish.mdOverwritten — regenerated, then radish.local.md appendedNo — use radish.local.md instead
.claude/commands/api.mdOverwritten — regenerated from blueprintsNo
.claude/commands/blueprint.mdOverwritten — regenerated from blueprintsNo
.claude/commands/search.mdOverwritten — regenerated when search-enabled entities existNo
.claude/commands/radish.local.mdNever overwritten — created once if missing✅ Yes — this is where project-specific context goes
.claude/commands/add-entity.mdSafe — copied once by radish init, never overwritten✅ Yes
.claude/commands/add-feature.mdSafe — copied once by radish init, never overwritten✅ Yes
.claude/commands/diagnose.mdSafe — copied once by radish init, never overwritten✅ Yes
.claude/commands/init.mdSafe — copied once by radish init, never overwritten✅ Yes
.claude/commands/status.mdSafe — copied once by radish init, never overwritten✅ Yes
Custom commands you createNot touched — Radish only writes its own files✅ Yes
Custom agents you createNot touched — Radish only writes its own files✅ Yes

The pattern: Radish overwrites its own generated files to keep them in sync with blueprints. Files you create alongside them are untouched.

Project-Specific Guidance (radish.local.md)​

This is the primary customization point. Put project-specific context here — deployment notes, environment setup, integration details, team conventions — and it gets appended to the /radish slash command every time the app is regenerated:

<!-- .claude/commands/radish.local.md -->

## Deployment
This app deploys to staging via `git push origin staging`.
Production deploys require a tag: `git tag v1.x.x && git push origin v1.x.x`.

## External APIs
- Stripe webhook secret is in `STRIPE_WEBHOOK_SECRET`
- Dynamics 365 sync runs via the `sync:dynamics` scheduled job

Adding App-Specific Commands​

Create additional slash commands in .claude/commands/ with unique names (don't use radish.md or api.md — those are Radish's):

<!-- .claude/commands/deploy.md -->
# Deploy Context

## $ARGUMENTS

---

Steps to deploy this application...

Invoke with /deploy staging.

Adding App-Specific Agents​

Create additional agents in .claude/agents/ with unique names:

---
name: integration
description: Manages third-party API integrations
model: sonnet
---

# Integration Agent

You manage third-party integrations for this app...

Referencing Shared Context​

Agents can import shared context files using the @ directive:

@.radish/docs/datalayer/services.md

Two reference trees ship with every app:

  • .radish/docs/ — the Radish platform docs (blueprints, datalayer, access control, auth, search)
  • .radish/lib/datalayer/docs/ — this app's generated reference (API.md, openapi.yaml, services.md, types.md, roles.md, AI_CONTEXT.md)

Context that belongs to you rather than the app — a personal knowledge base, cross-project conventions — goes in your user-level ~/.claude/CLAUDE.md, which Claude Code loads for every project. Radish never writes it.