Skip to main content
rule

solidjs-basic-cursorrules-prompt-file — Cursor rule: setup and use

Enforces Solid.js conventions in Cursor, including reactive primitives, folder layout, and component rendering patterns.

Install into Cursor · Manually: put the files in place All methods and platforms ↓
.cursor/rules/solidjs-basic-cursorrules-prompt-file.mdc
Open on GitHub

What solidjs-basic-cursorrules-prompt-file does

This rule guides Cursor when generating Solid.js code by enforcing functional JSX components and core reactivity primitives. It directs the assistant to handle state with createSignal() and createStore(), derive values with createMemo(), and manage side effects via createEffect(). Conditional rendering and collections must use <Show> and <For> components rather than ternaries or map() calls.

The configuration outlines a baseline directory layout: src/components, src/pages, and src/utils alongside App.jsx and index.jsx. It also instructs the agent to configure data fetching through createResource(), apply lazy loading, implement Solid Router when routing is needed, and handle failures with error boundaries.

Because alwaysApply is set to false, Cursor will not inject these instructions into every prompt unless relevant project files match the glob pattern.

What it helps with

  • enforce createSignal and createStore for reactive state
  • replace map methods and ternaries with For and Show components
  • scaffold a standard Solid.js project structure with pages and components
  • handle async data fetching using createResource

Example prompts for the agent

  • Build a user list component in Solid.js with dynamic filtering and a loading state
  • Set up page routing using Solid Router with code splitting
  • Convert this React component into a functional Solid.js component using signals

How to install solidjs-basic-cursorrules-prompt-file

Manually: put the files in place

.cursor/rules/solidjs-basic-cursorrules-prompt-file.mdc

Frontmatter: description, globs, alwaysApply

Step by step, with commands for each platform: Cursor rules: .mdc files, four modes and what replaced .cursorrules

Questions about solidjs-basic-cursorrules-prompt-file

How do I install solidjs-basic-cursorrules-prompt-file in Cursor?

Save the rule content to .cursor/rules/solidjs-basic-cursorrules-prompt-file.mdc in your project root.

What reactive primitives does this rule enforce?

It instructs the assistant to use createSignal() for local state, createStore() for complex state, and createMemo() for derived values.

Does the rule run on every query automatically?

No, the frontmatter specifies alwaysApply: false, so Cursor applies it conditionally rather than globally injecting it into every chat.

Source text

solidjs-basic-cursorrules-prompt-file.mdc · CC0-1.0
---
description: "Cursor rules for Solid.js development with basic setup."
globs: **/*
alwaysApply: false
---
// Solid.js Basic Setup .cursorrules

// Prefer functional components

const preferFunctionalComponents = true;

// Solid.js best practices

const solidjsBestPractices = [
  "Use createSignal() for reactive state",
  "Utilize createEffect() for side effects",
  "Implement createMemo() for derived values",
  "Use createResource() for data fetching",
  "Implement Show and For components for conditional and list rendering",
  "Utilize createStore() for complex state management",
];

// Folder structure

const folderStructure = `
src/
  components/
  pages/
  utils/
  App.jsx
  index.jsx
public/
  index.html
`;

// Additional instructions

const additionalInstructions = `
1. Use JSX for component templates
2. Implement proper error boundaries
3. Utilize Solid Router for routing when applicable
4. Use Solid's built-in optimization features
5. Implement lazy-loading for improved performance
6. Follow Solid.js naming conventions and best practices
7. Use server-side rendering (SSR) when needed
`;

© PatrickJS · CC0-1.0 · PatrickJS/awesome-cursorrules

Similar IDE rules

All IDE rules for Frontend and UI →

From the same set234

The whole set →
svelte A Cursor rule that steers the agent toward Svelte conventions: component structure, reactivity, stores, SvelteKit routing and tests. Useful when the agent writes or edits Svelte code. ★ 41,024repo stars svelte-5-vs-svelte-4-cursorrules-prompt-file Guides Cursor to write Svelte 5 code instead of Svelte 4, adopting runes like $state and $derived, native event attributes, and snippets. ★ 41,024repo stars solidjs-typescript-cursorrules-prompt-file This rule guides Cursor through Solid.js and TypeScript conventions, from typed reactive state to component props. Use it when you want those practices reflected in code suggestions. ★ 41,024repo stars solidjs-tailwind-cursorrules-prompt-file A Cursor rule that tells the agent how to write Solid.js code with Tailwind CSS: signals, utility classes, folder layout. ★ 41,024repo stars solidity-react-blockchain-apps-cursorrules-prompt- This Cursor rule guides Solidity contracts and React apps that connect to blockchain services. Use it when reviewing contract safety or Web3 frontend code. ★ 41,024repo stars solidity-hardhat-cursorrules-prompt-file A Cursor rule that turns the AI assistant into a Solidity and smart contract security expert, with Hardhat-based testing and gas work. ★ 41,024repo stars solidity-foundry-cursorrules-prompt-file Directs Cursor to generate secure Solidity smart contracts and implement property-based tests using the Foundry toolkit. ★ 41,024repo stars solana-wallet-aware This Cursor rule adds wallet and transaction safeguards to Solana code, from isolated signing to tests required before live transactions. ★ 41,024repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor