Database content crud
Skill codezelat/codezela-web-skills/skills/database-content-crud
Production-grade web development skills for AI coding agents.
npx -y skills add codezelat/codezela-web-skills --skill database-content-crudAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Use when designing, migrating, seeding, or fixing database-backed content, catalogs, categories, articles, CMS data, Postgres, Neon, Supabase, migrations, slugs, ordering, search, pagination, safe deletes, or data verification.
SKILL.md
2.3 KB, as published. Nobody here has run it
Database Content CRUD
Use this for content systems where the data model, admin UX, and public rendering must stay consistent.
Non-Negotiables
- Follow the repo's current data layer. Do not introduce an ORM/query builder if the repo uses raw SQL, and do not bypass an ORM if the repo standardizes on one.
- Migrations and seeds must be idempotent where possible.
- Never run destructive data changes without inspecting current counts and scope.
- New CRUD must handle validation, empty states, search/filter/pagination, ordering, edit/delete edge cases, and path revalidation/cache invalidation.
- Verify DB state after writes.
- Keep ordering explicit. Edits should not reorder rows unless the order field changes; new rows can appear first only if that is the chosen rule.
- Use transactions for multi-table writes and asset cleanup coordination.
Workflow
- Inspect schema, migrations, data helpers, server actions/API routes, and admin components.
- Define content model: required fields, optional metadata, slugs, category relations, images, sort order, status/publish fields.
- Add migration/update script using the repo's existing migration pattern.
- Implement typed validation and unique slug handling.
- Implement create/update/delete with transactions for related rows, images, and dependent records.
- Add admin UI with search/filter/sort/pagination and non-browser confirmation dialogs.
- Revalidate affected public/admin/sitemap paths.
- Read back counts and sample rows after seed or data migration.
Edge Cases
- Slug collision on create and update.
- Required category deleted while products reference it.
- Empty search/filter result.
- Pagination beyond last page after delete.
- Failed image upload after DB insert.
- Seed rerun after manual admin edits.
- User edits title but should preserve explicit slug/order.
Checks
- Migration runs cleanly against target DB.
- Seed can rerun without duplicates.
- CRUD create/edit/delete works from admin.
- Public listing/detail pages reflect DB data.
- New additions and edits preserve intended ordering rules.