Configure typed Mastra Factory rules and exact-leaf overrides in deployment code
npx skills add https://github.com/mastra-ai/mastra --skill configure-factory-rules
Help the user change Factory policy in the typed deployment configuration. Factory rules are trusted server code. Never place deployment policy in this skill, repository instructions, browser code, or a parallel actions system.
new MastraFactory, defaultFactoryRules, and the rules property.rules, start with defaultFactoryRules({ version, overrides }) and pass the result to MastraFactory.Do not guess a file path. Factory deployments can assemble MastraFactory from different entry points.
Use one rules tree:
work.<stage>.<source>.onEnter or onExitreview.<stage>.<source>.onEnter or onExittools.<toolName>.onResultgithub.<event>.onEventDo not create an actions config or execute authoritative policy in React. Each handler returns one typed FactoryRuleDecision or undefined.
Work and Review cards move independently. Never mirror their stages or mark Work Done only because a pull request merged.
An override replaces the exact handler leaf. It does not compose with the built-in handler at that leaf. Sibling leaves remain unchanged.
Before replacing a built-in leaf:
src/web/factory/rules/defaults.ts.undefined to allow the ingress with no decision, or return a typed rejection or bounded structured decision.idempotencyKey derived from immutable ingress identity.Set an explicit, deployment-owned version. Change it whenever rule behavior changes. The version identifies persisted evaluations and audit records; it must not be used as event identity or added to ingress deduplication keys.
write and admin are trusted; failures are untrusted.FactoryRuleDecision. Never mutate stage storage directly.undefined, accepted, and rejected paths when they apply.Do not weaken tests or bypass the transition service to make a policy work.
Run Python code in the cloud with serverless containers, GPUs, and autoscaling. Use when deploying ML models, running batch processing jobs, scheduling compute-intensive tasks, or serving APIs that require GPU acceleration or dynamic scaling.
Advanced GitHub Actions workflow automation with AI swarm coordination, intelligent CI/CD pipelines, and comprehensive repository management
Google Cloud Platform CLI - manage GCP resources including Compute Engine, Cloud Run, GKE, Cloud Functions, Storage, BigQuery, and more.
Expert backend architect specializing in scalable API design, microservices architecture, and distributed systems. Masters REST/GraphQL/gRPC APIs, event-driven architectures, service mesh patterns, and modern backend frameworks. Handles service boundary definition, inter-service communication, resilience patterns, and observability. Use PROACTIVELY when creating new backend services or APIs.
Run Python code in the cloud with serverless containers, GPUs, and autoscaling. Use when deploying ML models, running batch processing jobs, scheduling compute-intensive tasks, or serving APIs that require GPU acceleration or dynamic scaling.
Aspire skill covering the Aspire CLI, AppHost orchestration, service discovery, integrations, MCP server, VS Code extension, Dev Containers, GitHub Codespaces, templates, dashboard, and deployment. Use when the user asks to create, run, debug, configure, deploy, or troubleshoot an Aspire distributed application.
Audits Python + BigQuery pipelines for cost safety, idempotency, and production readiness. Returns a structured report with exact patch locations.
Microsoft Store Developer CLI (msstore) for publishing Windows applications to the Microsoft Store. Use when asked to configure Store credentials, list Store apps, check submission status, publish submissions, manage package flights, set up CI/CD for Store publishing, or integrate with Partner Center. Supports Windows App SDK/WinUI, UWP, .NET MAUI, Flutter, Electron, React Native, and PWA applications.
Take mastra-ai/configure-factory-rules from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.