starknet-react-rules

Specific rules for Starknet React projects, focusing on blockchain integration.

16 stars

Best use case

starknet-react-rules is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Specific rules for Starknet React projects, focusing on blockchain integration.

Teams using starknet-react-rules should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/starknet-react-rules/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/frontend/starknet-react-rules/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/starknet-react-rules/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How starknet-react-rules Compares

Feature / Agentstarknet-react-rulesStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Specific rules for Starknet React projects, focusing on blockchain integration.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Starknet React Rules Skill

<identity>
You are a coding standards expert specializing in starknet react rules.
You help developers write better code by applying established guidelines and best practices.
</identity>

<capabilities>
- Review code for guideline compliance
- Suggest improvements based on best practices
- Explain why certain patterns are preferred
- Help refactor code to meet standards
</capabilities>

<instructions>
When reviewing or writing code, apply these guidelines:

- 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
  </instructions>

<examples>
Example usage:
```
User: "Review this code for starknet react rules compliance"
Agent: [Analyzes code against guidelines and provides specific feedback]
```
</examples>

## Iron Laws

1. **NEVER** interact with Starknet contracts without validating the connected wallet and chain ID
2. **ALWAYS** handle transaction pending, confirmed, and rejected states explicitly
3. **NEVER** hardcode contract addresses — always use environment variables or config files
4. **ALWAYS** use TypeScript types generated from ABI for contract interactions
5. **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:**

```bash
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.

Related Skills

vue-3-nuxt-3-development-cursorrules-prompt-file-cursorrules

16
from diegosouzapw/awesome-omni-skill

Apply for vue-3-nuxt-3-development-cursorrules-prompt-file. --- description: Applies to Vue 3 and Nuxt 3 projects, enforcing best practices for frontend development including TypeScript, TailwindCSS, and Composition API. globs: **/*.{vue,ts,js,jsx,tsx}

tailwind-css-nextjs-guide-cursorrules-prompt-file-cursorrules

16
from diegosouzapw/awesome-omni-skill

Apply for tailwind-css-nextjs-guide-cursorrules-prompt-file. Prompt Generation Rules: - Analyze the component requirements thoroughly - Include specific DaisyUI component suggestions

react

16
from diegosouzapw/awesome-omni-skill

React development patterns and best practices including hooks, state management, and performance optimization.

react-fluent-ui-patterns

16
from diegosouzapw/awesome-omni-skill

Skill for React TypeScript frontend development with Fluent UI Copilot components. Use when creating UI components, handling SSE streams, working with chat interfaces, or implementing theme support.

nextjs15-react19-vercelai-tailwind-cursorrules-prompt-file-cursorrules

16
from diegosouzapw/awesome-omni-skill

Apply for nextjs15-react19-vercelai-tailwind-cursorrules-prompt-file. --- description: Best practices for using Tailwind CSS in Next.js 15 and React 19 applications, including responsive design, custom configurations, and performance optimization. globs: app/**/*

html-specific-rules

16
from diegosouzapw/awesome-omni-skill

Rules specific to HTML files, focusing on accessibility and Tailwind styling.

frontend-react-testing-strategy

16
from diegosouzapw/awesome-omni-skill

Standardized guidelines and patterns for Frontend React Testing Strategy.

Creating Cursor Rules

16
from diegosouzapw/awesome-omni-skill

Expert guidance for creating effective Cursor IDE rules with best practices, patterns, and examples

browser-api-usage-rules

16
from diegosouzapw/awesome-omni-skill

Rules for effectively utilizing Chrome's browser APIs, including error handling and scheduling tasks.

angular-typescript-cursorrules-prompt-file-cursorrules

16
from diegosouzapw/awesome-omni-skill

Apply for angular-typescript-cursorrules-prompt-file. --- description: General rules for Angular components, focusing on code quality, performance, and maintainability. globs: **/*.component.ts

technical-accuracy-and-usability-rules

16
from diegosouzapw/awesome-omni-skill

Ensures the documentation is technically accurate and highly usable for the target audience.

writing-rules

16
from diegosouzapw/awesome-omni-skill

Use when creating rule files in .claude/rules/, adding project conventions, or scoping guidelines to specific paths. Use when user says "add rule", "create convention", "scope guideline". NOT for laws (use <law> in CLAUDE.md).