solidjs

solidjs is a cursor rule for Cursor from sanjeed5/awesome-cursor-rules-mdc. It costs 2,114 tokens per session, scanned A, original, CC0-1.0.

A set of coding rules for SolidJS 1.x, a JavaScript framework for building user interfaces. It covers reactive updates, component structure, file naming, and styling.

In plain words
What is it for?
Use it when building or reviewing SolidJS applications, especially when organizing components and choosing CSS Modules for scoped styles.
Why use it?
It helps prevent inconsistent components, hard-to-maintain code, and mistakes caused by using experimental SolidJS 2.0 features.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit Use it when building or reviewing SolidJS applications, especially when organizing components and choosing CSS Modules for scoped styles.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/sanjeed5/awesome-cursor-rules-mdc/solidjs
About the project

awesome-cursor-rules-mdc is a generator that creates Cursor MDC rule files from structured library information, using semantic search and language models to gather and organize guidance. Developers use it to produce reusable rules for libraries in Cursor, and the catalogue includes 200 of those rules.

sanjeed5/awesome-cursor-rules-mdc · 3,571 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/sanjeed5/awesome-cursor-rules-mdc

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for solidjs

README.md
[![agentmods](https://agentmods.dev/badge/rules/sanjeed5/awesome-cursor-rules-mdc/solidjs.svg)](https://agentmods.dev/rules/sanjeed5/awesome-cursor-rules-mdc/solidjs)
Your own site
<a href="https://agentmods.dev/rules/sanjeed5/awesome-cursor-rules-mdc/solidjs"><img src="https://agentmods.dev/badge/rules/sanjeed5/awesome-cursor-rules-mdc/solidjs.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,114 This file is loaded in full into every session.
When invoked 2,114 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.02114 $0.02114
Opus 5 $0.01057 $0.01057
Sonnet 5 $0.00423 $0.00423
Haiku 4.5 $0.00211 $0.00211

Measured 4d ago against content hash ca5966d7c18f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

solidjs scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

rules-mdc/solidjs.mdc · 273 lines

How it starts

The opening of the file, as written. The whole thing — 273 lines — stays where its author put it; the contents beside it link to each section on GitHub.

solidjs Best Practices

This document outlines the definitive best practices for developing with SolidJS 1.x. Adhere to these guidelines to leverage Solid's fine-grained reactivity, ensure optimal performance, and maintain a consistent, scalable codebase.


1. Use SolidJS 1.x (Stable)

Always use the current stable 1.x release. SolidJS 2.0 is experimental and not ready for production. Avoid any features or APIs mentioned for 2.0.

2. Component Architecture & Code Organization

2.1. Component File Naming

Use PascalCase for component filenames. This clearly distinguishes components from other modules.

  • ❌ BAD: mybutton.jsx, user-profile.jsx
  • ✅ GOOD: MyButton.jsx, UserProfile.jsx

2.2. Keep Components Lean

Components should be small and focused. Extract complex logic or UI parts into separate components or custom primitives.

2.3. Colocate Styles

Use Vite's CSS Modules for component-specific styling. This provides scoped styles without runtime overhead.

  • ❌ BAD: Global CSS files, CSS-in-JS libraries with runtime.
  • ✅ GOOD:
    // MyComponent.module.css
    .container {
      background-color: var(--color-primary);
    }
    .text {
      color: white;
    }
    
    // MyComponent.jsx
    import styles from './MyComponent.module.css';
    
    function MyComponent() {
      return <div class={styles.container}><span class={styles.text}>Hello</span></div>;
    }
    

3. Props Handling

SolidJS props are reactive getters. Incorrect handling breaks reactivity.

3.1. Never Destructure Props Directly

Do not destructure props at the component's top level. This immediately loses reactivity. Access props via props.propertyName.

  • ❌ BAD:
    function MyComponent({ name, age }) { // React pattern, breaks Solid reactivity
      return <div>{name} is {age}</div>;
    }
    
  • ✅ GOOD:
    function MyComponent(props) {
      return <div>{props.name} is {props.age}</div>; // Access directly
    }
    

Read the full file on GitHub · 273 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 273 lines · 2,114 tokens per session scan A ca5966d7c18f

Subscribe to this mod's changes

solidjs is a cursor rule published in the GitHub repository sanjeed5/awesome-cursor-rules-mdc (3,571 stars, last pushed 3mo ago), licensed CC0-1.0. It adds 2,114 tokens to every session, about $0.0106 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.