starknet-react-rules

Starknet React Rules Skill

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "starknet-react-rules" with this command: npx skills add oimiragieo/agent-studio/oimiragieo-agent-studio-starknet-react-rules

Starknet React Rules Skill

  • Centralize blockchain connection management

  • Implement automatic reconnection and error handling

  • Use React hooks for transaction status management

  • Provide clear UI feedback for blockchain interactions

  • Implement comprehensive error handling for blockchain operations

Iron Laws

  • NEVER interact with Starknet contracts without validating the connected wallet and chain ID

  • ALWAYS handle transaction pending, confirmed, and rejected states explicitly

  • NEVER hardcode contract addresses — always use environment variables or config files

  • ALWAYS use TypeScript types generated from ABI for contract interactions

  • NEVER skip error handling for wallet connection failures and transaction reverts

Anti-Patterns

Anti-Pattern Why It Fails Correct Approach

Skipping chain ID validation Wallet connected to wrong network silently corrupts transactions Always validate chainId matches expected Starknet network

Hardcoding contract addresses Breaking changes when deploying to different environments Use environment variables or config files for all contract addresses

Missing transaction state handling Users see blank UI during pending/rejected states Implement loading, confirmed, and rejected state for all transactions

Direct ABI calls without TypeScript types Runtime errors from wrong argument types Use TypeScript types generated from ABI for all contract calls

Ignoring wallet connection errors Silent failures create confusing UX Always handle ConnectionError, UserRejectedRequestError, and RejectedRequestError

Memory Protocol (MANDATORY)

Before starting:

cat .claude/context/memory/learnings.md

After completing: Record any new patterns or exceptions discovered.

ASSUME INTERRUPTION: Your context may reset. If it's not in memory, it didn't happen.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

filesystem

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

slack-notifications

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

chrome-browser

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

diagram-generator

No summary provided by upstream source.

Repository SourceNeeds Review