
gadget-best-practices
Best practices for building with Gadget. Use when developers need guidance on models, actions, routes, access control, Shopify/BigCommerce integrations, frontend patterns, API usage, permissions, or framework decisions. Triggers "model", "action", "route", "permission", "access control", "multi-tenancy", "Shopify", "BigCommerce", "frontend", "API client", "filter", "pagination", "webhook", "background job"
Best practices for building with Gadget. Use when developers need guidance on models, actions, routes, access control, Shopify/BigCommerce integrations, frontend patterns, API usage, permissions, or framework decisions. Triggers "model", "action", "route", "permission", "access control", "multi-tenancy", "Shopify", "BigCommerce", "frontend", "API client", "filter", "pagination", "webhook", "background job"
How to use
This skill provides quick reference patterns and best practices for building with Gadget.
📖 Resources:
- Full documentation: docs.gadget.dev
Read individual rule files for detailed explanations and code examples:
Core Data Modeling
- references/models.md - Data model design patterns and naming conventions
- references/fields.md - Field types, validations, and configuration
- references/relationships.md - Relationship patterns (belongsTo, hasMany, hasManyThrough)
- references/data-access.md - Computed views and computed fields (Gelly aggregates, group by, time-series, access control)
Backend Logic
- references/actions.md - Model actions vs global actions, hooks, and patterns
- references/routes.md - HTTP routes and when to use them vs actions
- references/background-jobs.md - Enqueueing actions and scheduled tasks
Access Control & Security
- references/access-control.md - RBAC, permission filters, and Gelly expressions
- references/shopify-multi-tenancy.md - Shop isolation patterns for Shopify apps
Platform Integrations
- references/shopify-integration.md - Shopify app patterns (webhooks, sync triggers, metafields)
- references/bigcommerce-integration.md - BigCommerce app patterns
- references/webhooks.md - Webhook handling patterns
Frontend Development
- references/frontend-hooks.md - React hooks from @gadgetinc/react
- references/frontend-components.md - Autocomponents and UI patterns
- references/frontend-forms.md - Form handling and validation
Development Workflow
- references/ggt-cli.md - CLI commands for adding models, fields, actions, and routes
- references/deployment.md - Deployment workflows and environments
- references/environments.md - Environment variables and multi-environment strategies
- references/project-structure.md - File organization and conventions
API & Authentication
- references/api-client.md - Using the Gadget API client (filters, pagination, relationships)
- references/authentication.md - User authentication patterns
You Might Also Like
Related Skills

verify
Use when you want to validate changes before committing, or when you need to check all React contribution requirements.
facebook
test
Use when you need to run tests for React core. Supports source, www, stable, and experimental channels.
facebook
feature-flags
Use when feature flag tests fail, flags need updating, understanding @gate pragmas, debugging channel-specific test failures, or adding new flags to React.
facebook
extract-errors
Use when adding new error messages to React, or seeing "unknown error code" warnings.
facebook