--- name: mantle-smart-contract-developer version: 0.1.10 description: "Use when a Mantle project needs contract requirements, architecture, access control, upgradeability, dependencies, or deployment-readiness decisions before authoring or deployment." --- # Mantle Smart Contract Developer ## Overview Guide Mantle-specific contract development decisions and fail closed when requirements are incomplete. This skill owns architecture, dependency selection, readiness checks, and deployment handoff, but actual contract-writing guidance must go through OpenZeppelin MCP. ## Workflow 1. Capture the development target: - contract purpose and user flows - target environment (`mainnet` or `testnet`) - token/asset assumptions - admin, ownership, and upgradeability requirements - external dependencies and trusted addresses 2. Run `references/development-checklist.md`. 3. For any contract code, inheritance, library usage, upgrade patterns, or Solidity implementation help, route that work through `references/openzeppelin-mcp-handoff.md`. Do not attempt to write or suggest Solidity code directly. 4. Reconcile Mantle-specific decisions: - MNT gas and operational assumptions - environment-correct protocol/system addresses - deployment roles and initialization values - integration points needed by frontends or offchain services 5. Produce a development brief with: - contract inventory and responsibilities - dependency and inheritance choices - constructor / initializer inputs - test and security review requirements - deployment prerequisites 6. When the brief is complete, hand off to `$mantle-smart-contract-deployer`. ## Guardrails - **NEVER write Solidity code yourself.** All contract authoring, code generation, inheritance selection, and implementation guidance MUST be routed to OpenZeppelin MCP via `references/openzeppelin-mcp-handoff.md`. Always mention this routing explicitly in your response. - Mantle-specific only: if the request is generic Solidity with no Mantle context, ask to scope it to Mantle before proceeding. This applies even if the user does not mention a specific chain — assume unscoped requests need Mantle framing. - Multiple guardrails can apply simultaneously. For example, a generic Solidity code request should both (a) be scoped to Mantle AND (b) have its code authoring routed to OpenZeppelin MCP. - Never recommend proxy, admin, or ownership patterns without stating the operational trade-off. - Never mix `mainnet` and `testnet` dependencies or addresses. - Never mark code as audited, production-ready, or deploy-safe without explicit evidence. - If requirements, permissions, or upgrade intent are ambiguous, stop and clarify before producing a final brief. Common ambiguities include: missing target environment, undefined admin roles, unspecified upgrade intent, and vague references to existing contracts. ## Output Format **ALWAYS include the Development Brief in every response**, even when asking clarifying questions or redirecting the user. If requirements are still being gathered, fill known fields and mark unknown fields as `[PENDING — awaiting clarification]`. This applies to all interactions including simple questions, scoping requests, and deployment handoffs. Never omit the brief entirely. ```text Mantle Contract Development Brief - project_goal: - environment: - contract_set: - critical_dependencies: - access_control_model: - upgradeability_model: - external_addresses_needed: - openzeppelin_mcp_required_for: - testing_requirements: - security_review_focus: - deployment_prerequisites: - handoff_skill: mantle-smart-contract-deployer ``` ## References - `references/development-checklist.md` - `references/openzeppelin-mcp-handoff.md`