controller-sessions

Configure Cartridge Controller session policies for pre-approved Starknet transactions.

1|Updated Mar 7, 2026
One-click install
npx skills add https://github.com/shariqazeem/Prophecy-Roguelite --skill controller-sessions-shariqazeem
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: controller-sessions
Source: https://github.com/shariqazeem/Prophecy-Roguelite/tree/main/.agents/skills/controller-sessions
Command: npx skills add https://github.com/shariqazeem/Prophecy-Roguelite --skill controller-sessions-shariqazeem

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers configure session keys and permission policies for Cartridge Controller so dApps can execute gasless, pre-approved on-chain calls without repeated wallet confirmations or manual keychain approvals. It prevents execute() failures caused by missing merkle proofs, ensures consistent authorization on local Katana and mainnet flows, and centralizes session lifecycle controls like redirects and verified badges.

Core Features & Use Cases

  • Policy Definitions: Define SessionPolicies that enumerate allowed contracts, method entrypoints, human-readable names, and descriptions to restrict session calls.
  • Spending Limits & Approvals: Configure token approve limits (hex uint) and specify spender addresses to limit on-chain token usage during a session.
  • Signed Message Preapproval: Pre-approve typed message schemas and domains so the app can sign messages without repeated prompts.
  • Error Handling & UX Modes: Choose errorDisplayMode (modal, notification, silent) and control propagateSessionErrors to surface or suppress UI; note that critical errors may still force modal display.
  • Verified Sessions & Redirects: Support verified policy badges for streamlined UX and configure redirect URLs for mobile and cross-platform logout flows.
  • Use Case: A mobile web3 game configures policies that allow place_prediction and buy_relic calls with a capped ETH approve so players transact seamlessly without popups.

Quick Start

Create a SessionPolicies object listing your game contract with required entrypoints, include approve limits for tokens, set errorDisplayMode to your preferred mode, and pass policies to Controller on init.

Frequently Asked Questions about controller-sessions

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

FAQPage Schema
How do I configure Cartridge Controller session policies to execute gasless transactions on Starknet without repeated wallet popups?

To enable gasless transactions without wallet popups, you define a SessionPolicies object enumerating allowed contracts and methods, set token approve limits, and pass it to Controller on init. This restricts session calls to predefined entrypoints and limits on-chain token usage.

What are SessionPolicies in Cartridge Controller and how do they authorize contract calls?

SessionPolicies are configuration objects that enumerate allowed contracts, method entrypoints, human-readable names, and descriptions to restrict session calls. They authorize specific contract interactions without requiring manual keychain approvals during the active session.

How do I pre-approve signed messages and token spending limits for a Starknet dApp session?

You pre-approve signed messages by defining typed message schemas and domains, and set token approve limits using hex uint values with specific spender addresses. This configuration allows the app to sign messages and spend tokens without repeated user prompts.

Can I use Cartridge Controller sessions for mobile web3 games on local Katana and Starknet mainnet?

Yes, Cartridge Controller sessions work for mobile web3 games on both local Katana and mainnet flows. You can configure redirect URLs for cross-platform logout, use verified policy badges for streamlined UX, and set policies for game-specific calls like place_prediction.

Why does my Cartridge Controller execute() call fail with missing merkle proofs during a session?

The execute() call fails with missing merkle proofs when SessionPolicies are not properly configured or verified. Centralizing session lifecycle controls and ensuring consistent authorization across local Katana and mainnet flows prevents these execution failures.

How do errorDisplayMode and propagateSessionErrors affect session transaction UX in Cartridge Controller?

The errorDisplayMode setting controls error surfacing via modal, notification, or silent modes, while propagateSessionErrors determines UI suppression. Critical errors may still force modal display regardless of the chosen error handling configuration.