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
| File | Purpose |
|---|---|
.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.md | Coordinates multi-domain changes via delegation |
.claude/agents/datalayer.md | Data model and blueprint editing |
.claude/agents/roles.md | Permissions and access control |
.claude/agents/ui.md | Pages, components, layouts, styling |
.claude/agents/admin.md | Admin panel customization |
.claude/commands/add-entity.md | Guided entity addition with validation and regeneration |
.claude/commands/add-feature.md | Feature enablement (search, CMS, grants, datasets) |
.claude/commands/diagnose.md | Project health checks across blueprints and generation |
.claude/commands/init.md | New project blueprint generation |
.claude/commands/status.md | Current project state inspection |
CLAUDE.md | Project 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:
- Data model changes → datalayer agent first
- Permission changes → roles agent after datalayer
- UI changes → ui agent after datalayer (if new entities were needed)
- 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:
- Edit
blueprints/{prefix}.types.json - Validate:
radish-cli validate . - 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
| Skill | What it does |
|---|---|
add-entity | Walks through adding a new entity to the types blueprint — name, fields, relationships, ownership, indexes — then validates the blueprint and regenerates the datalayer |
add-feature | Enables and configures a platform feature (search, CMS, grants, datasets) — updates app.json feature flags, adds required schema entries, regenerates |
diagnose | Runs health checks: blueprint validation, generation drift detection, orphan file scan, search index status, dependency checks |
init | Guided blueprint generation for a new project — asks about the domain, entities, relationships, roles, features, then produces all four blueprint files |
status | Reports 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
| Path | On create app | Safe to edit? |
|---|---|---|
.claude/agents/*.md | Overwritten — regenerated from blueprints | No — edits are lost on regeneration |
.claude/commands/radish.md | Overwritten — regenerated, then radish.local.md appended | No — use radish.local.md instead |
.claude/commands/api.md | Overwritten — regenerated from blueprints | No |
.claude/commands/blueprint.md | Overwritten — regenerated from blueprints | No |
.claude/commands/search.md | Overwritten — regenerated when search-enabled entities exist | No |
.claude/commands/radish.local.md | Never overwritten — created once if missing | ✅ Yes — this is where project-specific context goes |
.claude/commands/add-entity.md | Safe — copied once by radish init, never overwritten | ✅ Yes |
.claude/commands/add-feature.md | Safe — copied once by radish init, never overwritten | ✅ Yes |
.claude/commands/diagnose.md | Safe — copied once by radish init, never overwritten | ✅ Yes |
.claude/commands/init.md | Safe — copied once by radish init, never overwritten | ✅ Yes |
.claude/commands/status.md | Safe — copied once by radish init, never overwritten | ✅ Yes |
| Custom commands you create | Not touched — Radish only writes its own files | ✅ Yes |
| Custom agents you create | Not 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.
Related Documentation
- Settings & Encryption — encrypted settings and the
/apicommand's handling of[ENCRYPTED]fields - Developer Workflow — using Radish CLI in your development cycle
- Services — the service layer that agents interact with