controller-guidelines

Define development best practices for building MetaMask controllers.

Updated Apr 10, 2026
One-click install
npx skills add https://github.com/abretonc7s/metamask-skills --skill controller-guidelines
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: controller-guidelines
Source: https://github.com/abretonc7s/metamask-skills/tree/main/domains/coding/skills/controller-guidelines
Command: npx skills add https://github.com/abretonc7s/metamask-skills --skill controller-guidelines

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Provides comprehensive development guidelines to ensure consistency, correctness, and security in creating controllers within MetaMask's architecture.

Core Features & Use Cases

  • Design Principles: Outlines best practices for naming, API clarity, and state management in controllers.
  • Implementation Patterns: Offers conventions for constructor options, messenger usage, and state updating.
  • Validation and Lifecycle: Guides proper initialization, cleanup, and documentation to prevent common pitfalls.

Quick Start

Reference this Skill when designing a new controller to adhere to MetaMask's architecture standards.

Frequently Asked Questions about controller-guidelines

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What are the best practices for state management in software controllers?

Best practices for state management in software controllers dictate using clear API boundaries and standardized state updating patterns. Following these design principles ensures secure and maintainable controller architectures.

How do I implement a controller using the messenger pattern?

Implement a controller using the messenger pattern by following established conventions for constructor options and state updating. This ensures consistent initialization and proper lifecycle management throughout the controller's development.

Does this architecture guidelines skill work for general software design?

This architecture guidelines skill targets controller implementation specifically within the MetaMask architecture. It provides specialized conventions for naming, API clarity, and messenger usage rather than general software design patterns.

What is the standardized way to handle controller initialization and cleanup?

The standardized way to handle controller initialization and cleanup involves following specific validation and lifecycle guidelines. Proper initialization and documentation prevent common pitfalls and ensure correct state management.

Why do I need development guidelines for building controllers?

Development guidelines for building controllers are needed to ensure consistency, correctness, and security within complex software architectures. They provide design principles and implementation patterns that prevent common architectural pitfalls.

Are there limitations to using standardized controller development patterns?

Standardized controller development patterns are focused on specific architectural environments like MetaMask. Limitations arise when attempting to apply these specialized messenger conventions and state validation rules outside their intended controller architecture.