---
title: "Generate a CRUD workflow"
description: "Use Autohand Code to create a resource end to end, from database schema to admin list, editor, and public API."
seo:
  canonical: "https://autohand.ai/use-cases/generate-crud-workflow/"
---
Generate a CRUD workflow with Autohand Code is a full-stack workflow that connects data schema, API handlers, admin UI, validation, search, empty states, and public reads for one resource.

## At a glance

| Question | Answer |
| --- | --- |
| Best for | admin-managed content, operational records, internal tools, and resources with draft or archive states |
| Primary inputs | Fields, required validation, lifecycle states, and archive rules; Which records are public, private, draft, or archived; Admin permissions, audit needs, and expected empty states |
| Autohand Code returns | A complete resource path with create, read, update, archive, and empty states. |
| Avoid when | the team only needs a single endpoint or a static table |

## How Autohand Code handles this workflow

1. Designs the schema and indexes around the real query paths.
2. Adds create, read, update, archive, and duplicate-slug behavior.
3. Builds the admin list and editor with validation states.
4. Connects public API reads and focused verification.

## Best inputs

- Fields, required validation, lifecycle states, and archive rules
- Which records are public, private, draft, or archived
- Admin permissions, audit needs, and expected empty states

## Strong prompt

```bash
autohand -p "Add CRUD management for this resource across DB, API, and admin UI"
```

## Autohand Code CLI options

- When `slash_goal` is enabled, create a durable target with `/goal "Add admin CRUD for this resource across DB, API, and UI"` before starting.
- Use `autohand --auto-mode "Build this CRUD workflow in validated slices" --checkpoint-interval 2` when the work spans several layers.
- Use `--restricted` for the initial schema and API review, then switch to normal approvals for migrations and test runs.

## Review before accepting

Verify create, edit, publish or archive, empty results, duplicate slugs, and public read behavior before calling it complete.

## Source and validation signals

Autohand AI maintains this workflow as first-party product guidance for Autohand Code. Use the [Autohand Code CLI Playbook](https://github.com/autohandai/code-cli/blob/main/docs/AUTOHAND_PLAYBOOK.md), [CLI reference](/working-with-autohand-code/cli-reference), and [configuration reference](https://github.com/autohandai/code-cli/blob/main/docs/config-reference.md) when choosing between interactive mode, command mode, auto-mode, feature-enabled /goal, /settings, skills, MCP, and permission settings. The related resources below link to product docs and tutorials for the workflow, and the final answer should name repository-specific files, commands, outputs, or docs that a reviewer can verify.

## Frequently asked questions

**What is Generate a CRUD workflow with Autohand Code?**

Generate a CRUD workflow with Autohand Code is a full-stack workflow that connects data schema, API handlers, admin UI, validation, search, empty states, and public reads for one resource.

**When should a team use Generate a CRUD workflow?**

Use it when one resource needs to work across database, API, admin, and public surfaces.

**What evidence should reviewers check for Generate a CRUD workflow?**

Verify create, edit, publish or archive, empty results, duplicate slugs, and public read behavior before calling it complete.

## Related resources

**[Tutorial: Generate a Full CRUD Feature](/tutorials/generate-crud-feature)**

Wire schema, API, admin UI, validation, and empty states together.

**[Guide: Internal Tools Skill](/guides/skills/internal-tools)**

Shape admin and operational workflows with the right agent context.

**[Tutorial: Write Database Migrations](/tutorials/write-database-migrations)**

Handle schema changes that support a new CRUD surface.
