Create Form Drawer
Developmentcreate-form-drawerCreate Form Drawer is an Agent Skill for development published in the erxes/erxes repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Build erxes drawer, sheet, or dialog forms with local validation, mutations, state, toasts, and close/reset behavior. Use for create and edit flows in frontend plugins.
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/erxes/erxes/blob/HEAD/.agents/skills/create-form-drawer/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/create-form-drawer, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Skill: Create Form Drawer
Workflow
- Find the closest create/edit drawer, sheet, or dialog in the same plugin.
- Reuse existing
erxes-uiform, drawer, sheet, dialog, input, button, toast, and loading components. - Reuse the plugin's existing React Hook Form and Zod patterns when present.
- Keep form schema, default values, types, mutation hooks, and drawer state near the feature unless the plugin already has a shared location.
- Match nearby submit behavior: loading state, disabled buttons, toast, refetch/cache update, close drawer, and form reset.
- Ensure the affected list/detail/count/selector UI updates after submit without a browser refresh, using the nearby Apollo cache, refetch, or subscription pattern.
- Preserve route params and required IDs such as
websiteId, board IDs, pipeline IDs, or plugin-specific IDs. - Run focused validation:
pnpm nx lint <plugin>andpnpm nx build <plugin>. Runpnpm nx test <plugin>when tested behavior or test setup changed.
Important
- Do not create a new form, drawer, modal, validation, or state system.
- Do not duplicate GraphQL mutations without searching existing feature and shared GraphQL folders.
- Do not store form values in global atoms unless the nearby feature already uses that pattern.
- Do not rely on users refreshing the page to see newly created, updated, or removed records.
- Keep empty, error, and loading states consistent with surrounding screens.