AI Assistant Configuration Guide

Every EasyAdminBlazor source license includes a set of AI assistant configurations tuned for this framework: let ChatGPT / Cursor / Claude follow the framework conventions and generate clean, compilable business code for you.

What's included

Asset Location Purpose
easyadmin-conventions skill .github/skills/easyadmin-conventions/SKILL.md Mandatory development conventions: architecture, naming, entity model, page patterns, DI, security, testing, anti-patterns
easyadmin-frontend skill .github/skills/easyadmin-frontend/SKILL.md One-click generation of admin CRUD pages (AdminTable) and customer-facing corporate pages from an entity
Corporate templates easyadmin-frontend/assets/templates/corporate/ Standard corporate site: Home / Services / Products / News / Contact, with sample data and images

Using it with ChatGPT

  1. Open a ChatGPT project / agent that supports skills, and add the skill directory .github/skills/ (or add the two SKILL.md files individually).
  2. Just describe what you need, for example:
    • "Generate the front-end and back-end pages for the product module: admin CRUD (AdminTable) plus public list/detail pages"
    • "Build a corporate site for the company website: Home, Services, Products, News, Contact"
  3. The AI reads the easyadmin-conventions first, then produces framework-compliant code.

Using it with Cursor / Claude

  1. Add the contents of the two SKILL.md files to your project's Cursor Rules (.cursor/rules/ or .cursorrules) or CLAUDE.md.
  2. Ask the AI to generate or refactor modules against those rules, for example:
    • "Create a read-only admin list page for feedback"
    • "Check whether my new module complies with easyadmin-conventions and fix it"

Example prompts

  • Full module: Generate the front-end and back-end pages for the product module: admin CRUD (AdminTable) plus public list/detail pages (the entity is created automatically per conventions if it doesn't exist)
  • Front-end pages: Create a public news list page and detail page with category filtering
  • Corporate site: Build a corporate site for the company website: Home, Services, Products, News, Contact
  • Admin page: Create a read-only admin list page for feedback
  • Code review: Check whether my new module complies with easyadmin-conventions and fix it

Tip: just describe the business domain in plain words, e.g. "products", "news" or "feedback". The AI locates or creates the entity first, then generates the pages following the skill workflow — you don't need to create the entity yourself.

Anti-pattern checklist after generation

  • Front-end pages must not inject IFreeSql — always use IBaseRepository<TEntity>
  • Navigation properties: no = null! — use nullable for optional, = [] for collections
  • Enum members must be English
  • Only trusted back-office content may be rendered with Html.Raw
  • Front-end pages must not reuse the admin MainLayout — use a dedicated public layout
  • Entity string fields: no = null! — use = string.Empty
  • doc/代码生成.md: type → component mapping
  • doc/开始一个新模块.md: new module workflow