Controller React
Dynamically adjusts frontend UI elements based on real-time data streams and user interactions for optimized experiences.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add controller-react npx -- -y @trustedskills/controller-react
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"controller-react": {
"command": "npx",
"args": [
"-y",
"@trustedskills/controller-react"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
This skill, controller-react, enables AI agents to integrate Cartridge Controller functionality with React applications using the starknet-react library. It allows for dynamic adjustment of frontend UI elements based on real-time data streams and user interactions by defining session policies that govern contract method calls within a StarkNet environment. The integration requires setting up a connector outside of React components to manage these policies.
When to use it
- Building interactive dashboards where UI elements change based on token approval status.
- Creating applications requiring dynamic authorization flows managed through smart contracts.
- Developing frontend interfaces that interact with StarkNet contracts and require controlled method execution.
- Integrating Cartridge Controller's session policies for secure and controlled interactions within a React application.
Key capabilities
- Integration of Cartridge Controller with
starknet-react. - Definition of
SessionPoliciesto control contract methods (e.g., approve, transfer). - Setup of a
ControllerConnectoroutside of React components for managing policies. - Support for local development using the Katana test network.
Example prompts
- "Integrate Cartridge Controller with my React app to allow users to approve token spending."
- "Set up session policies in my React application to control access to specific StarkNet contract methods."
- "Connect my frontend to the Katana testnet and use Cartridge Controller for managing user interactions."
Tips & gotchas
- Connector Placement: The
ControllerConnectormust be created outside of any React components. - Katana Configuration: For local development using Katana, ensure your
katana.tomlfile is configured withpaymaster = true. - Dependencies: Requires installation of
@cartridge/connector,@cartridge/controller,@starknet-react/core,@starknet-react/chains, andvite-plugin-mkcert.
Tags
TrustedSkills Verification
Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.
Security Audits
| Gen Agent Trust Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
🌐 Community
Passed automated security scans.