Configure Cursor project rules using .cursor/rules/.mdc files and legacy .cursorrules.

MITAuto-check passedAgent Workflows

Install Cursor Rules Config

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill cursor-rules-config -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace cursor-rules-config --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/cursor-rules-config .claude/skills/cursor-rules-config && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
cursor-rules-config
GitHub stars
2.8k
Token cost
~2.2k tokens
SKILL.md length
514 words
Files
7 (incl. references)
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Configure Cursor project rules using .cursor/rules/.mdc files and legacy .cursorrules.

  • Works in 4 steps: Write one clear rule per concern with… → Keep shared rules in source control and… → Test new rules on a non-sensitive… → …
  • Cursor project settings
  • SKILL.md covers Overview, Prerequisites, Instructions and Output, plus 8 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Cursor Rules Config is an agent skill from jeremylongshore/tons-of-skills-marketplace. Configure Cursor project rules using .cursor/rules/.mdc files and legacy .cursorrules. Triggers on "cursorrules", ".cursorrules", "cursor rules", "cursor config", "cursor project settings", ".mdc rules", "project rules".

Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including reference files (for example `references/advanced-configuration.md`, `references/basic-configuration.md` and `references/errors.md`). Compatibility notes: Designed for Claude Code

It sits in Agent Workflows, covering Agent instruction files. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.

When your agent uses it

  • Cursor project settings
  • Tasks that involve Agent instruction files

Example prompts

  • “cursorrules”
  • “.cursorrules”
  • “cursor rules”
  • “/cursor-rules-config”

Requirements

  • Python 3
  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Write, Edit, Bash(cmd:*)

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Write one clear rule per concern with scope, priority, and concrete acceptance behavior.
  2. Keep shared rules in source control and use path-scoped rules for local conventions.
  3. Test new rules on a non-sensitive fixture, inspect resulting behavior, and merge via normal review.
  4. Periodically remove stale/conflicting rules and document any intentional exceptions.

What it can do on your machine

Read from SKILL.md and the folder at commit cfae287. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit
    • Bash(cmd:*)

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are yaml).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • docs.cursor.com
    • forum.cursor.com
    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Designed for Claude Code

    From compatibility in the SKILL.md frontmatter.

Context cost

Cursor Rules Config loads about 2.2k tokens when it runs, and up to ~4.1k if it reads all its reference files. Until then it costs about 60 tokens; SKILL.md has 514 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~60
When it runs · the whole SKILL.md, loaded when a task matches
~2.2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jeremylongshore/tons-of-skills-marketplace at commit cfae287, republished under its MIT licence (© jeremylongshore). 514 words, ~2,156 tokens.

Download SKILL.mdSave it as .claude/skills/cursor-rules-config/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
cursor-rules-config
description
Configure Cursor project rules using .cursor/rules/*.mdc files and legacy .cursorrules. Triggers on "cursorrules", ".cursorrules", "cursor rules", "cursor config", "cursor project settings", ".mdc rules", "project rules".
allowed-tools
Read, Write, Edit, Bash(cmd:*)
compatibility
Designed for Claude Code
version
1.19.0
license
MIT
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
saas, cursor, cursor-rules

Cursor Rules Config

Overview

Manage Cursor rules as versioned engineering policy that shapes AI context and behavior; rules must be specific, scoped, reviewed, and consistent with repository source of truth.

Prerequisites

  • Repository owner approval, existing engineering/security standards, and a test workspace.
  • A reviewed ignore strategy for secrets, generated files, and sensitive data.

Instructions

  1. Write one clear rule per concern with scope, priority, and concrete acceptance behavior.
  2. Keep shared rules in source control and use path-scoped rules for local conventions.
  3. Test new rules on a non-sensitive fixture, inspect resulting behavior, and merge via normal review.
  4. Periodically remove stale/conflicting rules and document any intentional exceptions.

Output

  • A reviewed, versioned rule set with clear scope and a tested behavior example.

Error Handling

ConditionSafe response
Rules conflictResolve to one authority and test the revised rule before rollout.
Rule exposes sensitive contentRemove it, repair ignore controls, and assess the exposure.
Rule is too broadScope it by path/task rather than disabling all shared governance.

Examples

Add a path-scoped API rule that requires existing validation and tests, then test it on a sanitized fixture. Open a PR for the rule and verify it does not apply to unrelated frontend files before merging.

Configure project-specific AI behavior through Cursor's rules system. The modern approach uses .cursor/rules/*.mdc files; the legacy .cursorrules file is still supported but deprecated.

Rules System Architecture

Modern Project Rules (.cursor/rules/*.mdc)

Each .mdc file contains YAML frontmatter followed by markdown content:

yaml
---
description: "Enforce TypeScript strict mode and functional patterns"
globs: "src/**/*.ts,src/**/*.tsx"
alwaysApply: false
---
# TypeScript Standards

- Use `const` over `let`, never `var`
- Prefer pure functions over classes
- All functions must have explicit return types
- Use discriminated unions over enums

Frontmatter fields:

FieldTypePurpose
descriptionstringConcise rule purpose (shown in Cursor UI)
globsstringGitignore-style patterns for auto-attachment
alwaysApplybooleantrue = always active; false = only when matching files referenced
Rule Types by alwaysApply + globs Combination
alwaysApplyglobsBehavior
trueemptyAlways injected into every prompt
falsesetAuto-attached when matching files are in context
falseemptyManual only -- reference with @Cursor Rules in chat
Show full SKILL.md (205 more words)Show less
File Naming Convention

Use kebab-case with .mdc extension. Names should describe the rule's scope:

.cursor/rules/
  typescript-standards.mdc
  react-component-patterns.mdc
  api-error-handling.mdc
  testing-conventions.mdc
  database-migrations.mdc
  security-requirements.mdc

Create new rules via: Cmd+Shift+P > New Cursor Rule

Complete Project Rules Example

.cursor/rules/project-context.mdc (always-on):

yaml
---
description: "Core project context and conventions"
globs: ""
alwaysApply: true
---
# Project: E-Commerce Platform

Tech stack: Next.js 15, TypeScript 5.7, Prisma ORM, PostgreSQL, Tailwind CSS 4.
Package manager: pnpm. Monorepo with turborepo.

## Conventions
- API routes in `app/api/` using Route Handlers
- Server Components by default, `"use client"` only when needed
- Error boundaries at layout level
- All monetary values stored as integers (cents)
- Dates stored as UTC, displayed in user timezone

.cursor/rules/react-patterns.mdc (glob-scoped):

yaml
---
description: "React component standards for TSX files"
globs: "src/**/*.tsx,app/**/*.tsx"
alwaysApply: false
---
# React Component Rules

- Export components as named exports, not default
- Props interface named `{Component}Props`
- Use `forwardRef` for components accepting `ref`
- Colocate styles in `.module.css` files
- Server Components: no `useState`, `useEffect`, or event handlers

```tsx
// Correct pattern
export interface ButtonProps {
  variant: 'primary' | 'secondary';
  children: React.ReactNode;
  onClick?: () => void;
}

export function Button({ variant, children, onClick }: ButtonProps) {
  return (
    <button className={styles[variant]} onClick={onClick}>
      {children}
    </button>
  );
}

**`.cursor/rules/api-routes.mdc`** (glob-scoped):
```yaml
---
description: "API route handler patterns"
globs: "app/api/**/*.ts"
alwaysApply: false
---
# API Route Standards

- Always validate request body with Zod
- Return typed `NextResponse.json()` responses
- Use consistent error response shape: `{ error: string, code: string }`
- Wrap handlers in try/catch with structured logging

```ts
import { NextRequest, NextResponse } from 'next/server';
import { z } from 'zod';

const CreateOrderSchema = z.object({
  items: z.array(z.object({
    productId: z.string().uuid(),
    quantity: z.number().int().positive(),
  })),
});

export async function POST(req: NextRequest) {
  try {
    const body = await req.json();
    const parsed = CreateOrderSchema.parse(body);
    const order = await createOrder(parsed);
    return NextResponse.json(order, { status: 201 });
  } catch (err) {
    if (err instanceof z.ZodError) {
      return NextResponse.json(
        { error: 'Validation failed', code: 'INVALID_INPUT', details: err.issues },
        { status: 400 }
      );
    }
    return NextResponse.json(
      { error: 'Internal server error', code: 'INTERNAL_ERROR' },
      { status: 500 }
    );
  }
}

## Legacy .cursorrules Format

Place a `.cursorrules` file in project root. Plain markdown, no frontmatter:

```markdown
# Project Rules

You are working on a Django REST Framework API.

## Stack
- Python 3.12, Django 5.1, DRF 3.15
- PostgreSQL 16 with pgvector extension
- Redis for caching and Celery broker
- pytest for testing

## Conventions
- ViewSets over function-based views
- Always use serializer validation
- Custom exceptions inherit from `APIException`
- All endpoints require authentication unless explicitly marked
- Use `select_related` and `prefetch_related` to avoid N+1 queries

## Code Style
- Type hints on all function signatures
- Docstrings on all public methods (Google style)
- Max function length: 30 lines

Migration: .cursorrules to .cursor/rules/

Split a monolithic .cursorrules into scoped .mdc files:

  1. Create .cursor/rules/ directory
  2. Extract global context into an alwaysApply: true rule
  3. Extract language/framework rules into glob-scoped rules
  4. Delete .cursorrules after verifying all rules load

Referencing Files in Rules

Use @file syntax to include additional context files when a rule is applied:

yaml
---
description: "Database schema context for migration files"
globs: "prisma/**/*.prisma,drizzle/**/*.ts"
alwaysApply: false
---
Reference these files for schema context:
@prisma/schema.prisma
@docs/data-model.md

Debugging Rules

  1. Open Chat and type @Cursor Rules to see which rules are active
  2. Check glob patterns match your files: open a file, then verify the rule appears in context pills
  3. Rules with alwaysApply: true always show; glob rules only appear when matching files are in context

Enterprise Considerations

  • Version control: Commit .cursor/rules/ to git -- rules are project documentation
  • Team alignment: Use alwaysApply: true for team-wide standards
  • Sensitive data: Never put API keys, secrets, or credentials in rules files
  • Rule size: Keep individual rules focused and under 200 lines; split large rules into multiple files
  • Audit trail: Rules changes appear in git history for compliance review

Resources

© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 6 other files (references) in skills/.curated/cursor-rules-config of jeremylongshore/tons-of-skills-marketplace.

  • SKILL.md
  • references/advanced-configuration.md
  • references/basic-configuration.md
  • references/errors.md
  • references/examples.md
  • references/framework-specific-templates.md
  • references/tips-for-effective-rules.md

Open the folder on GitHubat commit cfae287

Compare with similar skills

Cursor Rules Config next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Cursor Rules Config compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Cursor Rules Config this skilljeremylongshore/tons-of-skills-marketplace2.8k—~2.2kAutomated safety check: PassMIT
Using Agent Skillsaddyosmani/agent-skills104k4 repos~2.4kAutomated safety check: PassMIT
Claude ReflectBayramAnnakov/claude-reflect1.8k2 repos~627Automated safety check: PassMIT
Neat-Freak Knowledge CloseoutKKKKhazix/khazix-skills21k—~1.9kAutomated safety check: PassMIT
Writing For Agentsbestofjs/bestofjs3.1k18 repos~2.7kAutomated safety check: PassMIT
Task Observerrebelytics/one-skill-to-rule-them-all3.2k1 repos~11kAutomated safety check: PassCC-BY-4.0

Similar skills

  • Using Agent Skills

    addyosmani/agent-skills

    Meta-skill for choosing which workflow skill fits the task at hand, plus always-on habits: surface assumptions, stop on confusion, push back, keep it simple and stay in scope.

    104k GitHub starsUsed in 4 repos~2.4k tokens
    Agent WorkflowsAuto-check passed
  • Claude Reflect

    BayramAnnakov/claude-reflect

    Self-learning system that captures corrections during sessions and reminds users to run /reflect to update CLAUDE.md.

    1.8k GitHub starsUsed in 2 repos~627 tokens
    Agent WorkflowsAuto-check passed
  • Neat-Freak Knowledge Closeout

    KKKKhazix/khazix-skills

    Brings project docs, agent rule files, authorized memory and leftover workspace files back in line with what the code and runtime actually do at the end of a work session.

    21k GitHub stars~1.9k tokensUpdated 9 days ago
    Agent WorkflowsAuto-check passed
  • Writing For Agents

    bestofjs/bestofjs

    Writing documents for agents. An agent skill from bestofjs/bestofjs.

    3.1k GitHub starsUsed in 18 repos~2.7k tokens
    Agent WorkflowsAuto-check passed
  • Task Observer

    rebelytics/one-skill-to-rule-them-all

    Monitors task execution for skill improvement opportunities.

    3.2k GitHub starsUsed in 1 repo~11k tokens
    Agent WorkflowsAuto-check passed
  • SkillOpt Sleep Cycle

    microsoft/SkillOpt

    Official

    Runs an on-demand or nightly sleep cycle that reviews past Claude Code sessions and proposes validated updates to CLAUDE.md and skills.

    18k GitHub stars~2.3k tokensUpdated 4 days ago
    Agent WorkflowsAuto-check passed

More from jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Adapting Transfer Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.

    2.8k GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Agent Context Loader

    jeremylongshore/tons-of-skills-marketplace

    Execute proactive auto-loading: automatically detects and loads agents.md files.

    2.8k GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Aggregating Performance Metrics

    jeremylongshore/tons-of-skills-marketplace

    Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.

    2.8k GitHub stars~1.2k tokensUpdated yesterday
    Auto-check passed
  • Analyzing Capacity Planning

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.

    2.8k GitHub stars~947 tokensUpdated yesterday
    Auto-check passed
  • Analyzing Database Indexes

    jeremylongshore/tons-of-skills-marketplace

    Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~2k tokensUpdated yesterday
    Auto-check passed

Categories

Questions about Cursor Rules Config

What does Cursor Rules Config do?

Configure Cursor project rules using .cursor/rules/.mdc files and legacy .cursorrules. Cursor Rules Config is an agent skill from jeremylongshore/tons-of-skills-marketplace.cursorrules.

When should I use Cursor Rules Config?

Cursor Rules Config fits situations like: Cursor project settings; tasks that involve Agent instruction files.

How do I install Cursor Rules Config in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill cursor-rules-config -a claude-code`. Or copy the skill folder (skills/.curated/cursor-rules-config in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/cursor-rules-config in your project. Claude Code loads it when a task matches its description.

How do I install Cursor Rules Config in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill cursor-rules-config -a codex`. Or copy the skill folder (skills/.curated/cursor-rules-config in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/cursor-rules-config in your project. Codex loads it when a task matches its description.

Can I use Cursor Rules Config in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill cursor-rules-config -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cursor-rules-config, .gemini/skills/cursor-rules-config, .github/skills/cursor-rules-config and .opencode/skills/cursor-rules-config in your project.

What does Cursor Rules Config need to run?

SKILL.md names no scripts, command-line tools or credentials: Cursor Rules Config is instructions for the agent only. Our summary lists: Python 3. Its frontmatter pre-approves these tools: Read, Write, Edit, Bash(cmd:*). Compatibility (from SKILL.md): Designed for Claude Code.

Does Cursor Rules Config access the network?

SKILL.md names 3 domains. As links in the text: docs.cursor.com, forum.cursor.com and github.com. This is read from the text; nothing was executed.

Is Cursor Rules Config safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Cursor Rules Config use?

Cursor Rules Config is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Cursor Rules Config use?

About 2.2k tokens (SKILL.md is roughly 8.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.9k tokens, read only when the agent opens those files.

What are the alternatives to Cursor Rules Config?

Skills that share tags, products or a category with Cursor Rules Config: Using Agent Skills (addyosmani/agent-skills, 104k stars), Claude Reflect (BayramAnnakov/claude-reflect, 1.8k stars), Neat-Freak Knowledge Closeout (KKKKhazix/khazix-skills, 21k stars) and Writing For Agents (bestofjs/bestofjs, 3.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Cursor Rules Config?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,827 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 10, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.