ivy-interactive/ivy-framework/ivy-create-crud
Claude Code and agent skill by ivy-interactive/ivy-framework
- community
Checking that the SKILL.md file is still in the repository.
Create a CRUD app with list, detail, create, and edit views for an Ivy project. Use when the user asks for CRUD views, master-detail views, data management screens, entity management, or wants to build views for database tables. Handles blades, dialogs, sheets, foreign key lookups, search, pagination, parent-child relationships, and async select inputs.
Install
npx vskill@latest install ivy-interactive/ivy-framework/ivy-create-crudSKILL.md
ivy-create-crud
Create a CRUD app with list, detail, create, and edit views for an Ivy project.
Pre-flight: Read Learnings
If the file .ivy/learnings/ivy-create-crud.md exists in the project directory, read it first and apply any lessons learned from previous runs of this skill.
Reference Files
Read these before implementing:
- references/AGENTS.md -- Ivy framework API reference (widgets, hooks, layouts, inputs, colors)
- references/ProductsApp.cs -- simple app entry point with UseBlades
- references/OrdersApp.cs -- app entry point for entity with child relationships
- references/ProductListBlade.cs -- list blade with search, UseQuery, FuncView
- references/ProductDetailsBlade.cs -- details blade with ToDetails, delete, edit trigger
- references/ProductCreateDialog.cs -- create dialog with ToForm, validation
- references/ProductEditSheet.cs -- edit sheet with ToForm, Remove, revalidation
- references/OrderListBlade.cs -- list blade with FK resolution via Include
- references/OrderDetailsBlade.cs -- details blade with related child cards
- references/OrderCreateDialog.cs -- create dialog with async select for FK
- references/OrderEditSheet.cs -- edit sheet with FK fields
- references/OrderLinesBlade.cs -- child relationship blade with table
- references/OrderLineCreateDialog.cs -- child create dialog with parent FK
- references/OrderLineEditSheet.cs -- child edit sheet with async select
Workflow
This skill guides you through creating complete CRUD applications:
- Plan - Analyze the data models and propose CRUD views for selected entities
- Review - Present the plan for user approval (accept / request changes / cancel)
- Implement - Generate all CRUD files following reference patterns, one entity at a time
Step 1: Plan the CRUD App
If the user has specified a database connection, read the connection context using ivy cli explain connections/{ConnectionName}. If not, ask the user which connection to use.
Ask the user which entities they want CRUD views for (suggest all top-level entities as options).
For each selected entity, determine:
- Singular name and plural name
- Lucide icon (PascalCase, e.g.
ShoppingBag,Users,FileText) - Whether it is a top-level entity (gets its own App with list/details/create/edit) or a child entity (shown as a relationship blade on a parent's details view)
- Child entities are those that primarily exist as children of another entity via a required foreign key (e.g., OrderLines belong to Orders)
Detect one-to-many relationships from navigation properties and foreign keys:
- A parent entity's details blade should show a related card linking to child blades
- Child entities get: RelationshipBlade (table view), RelationshipCreateDialog, RelationshipEditSheet
Plan Format
Repeat the ## Create App block for each top-level entity selected.
Chrome Decision
- If the plan has only one `## Create App` block (single entity) and no multi-app navigation needs, add a
### Update Program.cssection that replacesserver.UseAppShell(...)withserver.UseDefaultApp(typeof(TheAppClass));. - If the plan has multiple `## Create App` blocks or the user explicitly wants sidebar navigation, add a
### Update Program.cssection that ensuresserver.UseAppShell(new AppShellSettings().DefaultApp<FirstAppClass>().UseTabs(preventDuplicates: true));is present.
Present the plan to the user and ask them to Accept, Request Changes, or Cancel.
Step 2: Handle Changes
If the user requests changes, apply them to the plan and present the updated plan again.
Step 3: Implement
Once approved, implement each entity's views in order.
Namespace Conventions
- App files (
[PluralName]App.cs):namespace {ProjectNamespace}.Apps; - View files (all blades, dialogs, sheets):
namespace {ProjectNamespace}.Apps.[PluralName];
Required Using Directives
Every generated .cs file must include explicit using statements. Do NOT rely on global usings.
Connection usings (when using a database connection):
using {ProjectNamespace}.Connections.{ConnectionName};-- for context factoryusing {ProjectNamespace}.Connections.{ConnectionName}.Models;-- for entity classes (only if project uses a Models subfolder)using Microsoft.EntityFrameworkCore;-- for ToListAsync, FirstOrDefaultAsync, Include, etc.
Common Ivy usings by view type:
| View Type | Required Namespaces | |
|---|---|---|
| All views | Ivy, Ivy.Core.Hooks, Ivy.Hooks, Ivy.Shared, Ivy.Views | |
| App entry point | + Ivy.Apps | |
| Blades | + Ivy.Views.Blades | |
| Details views | + Ivy.Views.Builders | |
| Forms (dialogs, sheets) | + Ivy.Views.Forms, System.ComponentModel.DataAnnotations | |
| Tables | + Ivy.Views.Tables | |
| Alerts/Callouts | + Ivy.Views.Alerts | |
| Async select inputs | + Ivy.Widgets.Inputs |
Include only the namespaces your file actually uses.
Data Access Pattern
Always use the context factory pattern:
Program.cs Chrome Configuration
Check if the approved plan includes a ### Update Program.cs section. If it does:
- If it specifies
UseDefaultApp: OpenProgram.csand replace theserver.UseAppShell(...)line withserver.UseDefaultApp(typeof(AppClassName));. Remove theUseAppShellline entirely. - If it specifies
UseAppShell: Ensureserver.UseAppShell(new AppShellSettings().DefaultApp<AppClassName>().UseTabs(preventDuplicates: true));is present inProgram.cs. - Follow the approved plan exactly.
Per-View-Type Instructions
App ([PluralName]App.cs)
ListBlade ([Singular]ListBlade.cs)
- Define a
private record [Singular]ListRecord(int Id, ...)with the key display fields. For FK properties (e.g., `CustomerId`, `PartnerId`), do NOT include the raw ID. Instead, include a resolved name field (e.g., `string? CustomerName`) and project it via the navigation property in the `.Select()`. - Use
UseRefreshToken()for create/edit refresh flow. UseEffectonrefreshTokento pop, revalidate, and push to DetailsBlade.onItemClickedpushes[Singular]DetailsBlade(id).- Create button:
Icons.Plus.ToButton(...).Ghost().Tooltip("Create [Singular]").ToTrigger(isOpen => new [Singular]CreateDialog(isOpen, refreshToken)). - Two UseQuery methods:
Use[Singular]ListRecords(filtered list) andUse[Singular]ListRecord(single item for FuncView). - List query: filter with
.Where(), order by.OrderByDescending(e => e.CreatedAt),.Take(50), tags:[typeof([Entity][])]. - Single item query:
RevalidateOnMount = false,initialValue: record, tags:[(typeof([Entity]), record.Id)]. - Search input + create button in a horizontal header layout.
- If entity has FK properties, ALWAYS
.Include()the navigation property and project the human-readable name into the record -- NEVER expose raw FK IDs as display columns. Explicitly type asIQueryable<Entity>to avoid IIncludableQueryable type issues.
DetailsBlade ([Singular]DetailsBlade.cs)
- Constructor:
(int [entityCamelCase]Id). - Query the entity with
.Include()for navigation properties. - Show loading skeleton:
if (query.Loading) return Skeleton.Card(); - Show not found callout if null.
- Delete button with
.WithConfirm(), pops and revalidatestypeof([Entity][]). - Edit button with
.ToTrigger(isOpen => new [Singular]EditSheet(isOpen, [entityCamelCase]Id)). - Details card using anonymous type
.ToDetails().RemoveEmpty().Builder(e => e.Id, e => e.CopyToClipboard()). - Only include "interesting" fields. Exclude CreatedAt, UpdatedAt.
- If entity has one-to-many children: add a related card with
ListItementries that push child blades with count badges.
CreateDialog ([Singular]CreateDialog.cs)
- Constructor:
(IState<bool> isOpen, RefreshToken refreshToken). - Define a
private record [Singular]CreateRequestwith[Required]attributes on required nullable fields (string,int?,Guid?, etc.). Do NOT add[Required]on non-nullable value types (int,decimal,DateTime,bool, etc.). - CRITICAL: CreateRequest MUST NEVER include these auto-managed fields:
Id-- auto-generated by the databaseCreatedAt-- set in OnSubmit:CreatedAt = DateTime.UtcNowUpdatedAt-- set in OnSubmit:UpdatedAt = DateTime.UtcNow- Any other auto-increment or computed fields
- Use the SAME types as in the target entity to avoid type mismatches.
UseState(() => new [Singular]CreateRequest())..ToForm().OnSubmit(OnSubmit).ToDialog(isOpen, title: "Create [Singular]", submitTitle: "Create").- Use
.Builder(e => e.ForeignKeyId, e => e.ToAsyncSelectInput(...))for foreign key fields. - OnSubmit creates entity, sets CreatedAt/UpdatedAt if they exist, saves, returns ID via
refreshToken.Refresh(id).
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingsrc/claude-plugin/skills/ivy-create-crud/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ivy-interactive/ivy-framework/ivy-create-crud)