cursor-rules-config
- Repo stars 0
- Author updated Live
- Author repo skills-registry
- Domain
- Other
- Compatible agents
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- Trust score
- 88 / 100 · community maintained
- Author / version / license
- @tomevault-io · no license declared
- Token usage
- Lean
- Setup complexity
- Plug-and-play
- External API key
- Not required
- Operating systems
- Unspecified (assume cross-platform)
- Runtime requirements
- Python >=3.12
- Permissions
-
- Read-only
- Write / modify
- Network behavior
- Local-only
- Install commands
- 26 variants
Profile is derived at build time from SKILL.md and install vectors. Subject to drift from author intent.
Heads up: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: cursor-rules-config
description: | Use when this capability is needed. Configure project-specific AI behavior through Cursor's ru…
category: other
runtime: Python
---
# cursor-rules-config output preview
## PART A: Task fit
- Use case: | Use when this capability is needed. 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. runs entirely locally; runs on Python >=3.12. Works with Claude Code, Cursor, Cline and 23 more..
- Inputs: target material, constraints, expected output, and acceptance criteria.
- Evidence boundary: follow “Rules System Architecture / Modern Project Rules (.cursor/rules/.mdc) / Rule Types by alwaysApply + globs Combination” and do not present inference as author intent.
## PART B: Execution result
- **01** The card summarizes the use case; runtime output centers on “| Use when this capability is needed. 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. runs entirely locally; runs on Python >=3.12. Works with Claude Code, Cursor, Cline and 23 more.”.
- **02** When the source has headings, the agent prioritizes “Rules System Architecture / Modern Project Rules (.cursor/rules/.mdc) / Rule Types by alwaysApply + globs Combination” so the result follows the author’s structure.
- **03** Typical output includes task judgment, concrete steps, required commands or file edits, validation, and follow-up options.
- **04** Risk context follows the fingerprint: read files, write/modify files; mostly runs locally; usually needs no extra API key.
## Running Rules
- read files, write/modify files; mostly runs locally; usually needs no extra API key.
- Validate with a small sample before expanding scope.
- Return the result, validation criteria, and next iteration options. The source does not require a stable slash command. After installation, invoke the skill by name and describe the task.
Name target files or source material, expected output, forbidden changes, and whether network or shell access is allowed. Permission fingerprint: read files, write/modify files.
Start with a small task and check whether the result follows “Rules System Architecture / Modern Project Rules (.cursor/rules/.mdc) / Rule Types by alwaysApply + globs Combination”. Inspect diffs, logs, previews, or tests before expanding scope.
Confirm the final output includes a concrete result, evidence, and next action. If it stays generic, tighten inputs, boundaries, and acceptance criteria.
---
name: cursor-rules-config
description: | Use when this capability is needed. Configure project-specific AI behavior through Cursor's ru…
category: other
source: tomevault-io/skills-registry
---
# cursor-rules-config
## When to use
- | Use when this capability is needed. Configure project-specific AI behavior through Cursor's rules system. The modern…
- Use it when the task has clear inputs, repeatable steps, and validation criteria.
## What to provide
- Target material, scope, expected result, and forbidden changes.
- Whether network, commands, file writes, or external services are allowed.
## Execution rules
- Organize steps around “Rules System Architecture / Modern Project Rules (.cursor/rules/.mdc) / Rule Types by alwaysApply + globs Combination” and keep inference separate from source facts.
- read files, write/modify files; mostly runs locally; usually needs no extra API key.
- Validate with a small sample before expanding the task.
## Output requirements
- Return the deliverable, key evidence, validation method, and next action.
- Mark missing information as unknown; do not invent commands, platforms, or dependencies. The author source anchors workflow facts; repository files anchor sources and commands; Fluxly only adds fit, limitations, and quality judgment.
skill "cursor-rules-config" {
input -> user goal + target files + boundaries + acceptance criteria
context -> Rules System Architecture / Modern Project Rules (.cursor/rules/.mdc) / Rule Types by alwaysApply + globs Combination
rules -> SKILL.md triggers / order / output contract
runtime -> Python | read files, write/modify files | mostly runs locally
guardrails -> usually needs no extra API key + small-sample validation + diff/log review
output -> copyable result + checklist + next iteration
} Cursor Rules Config
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:
---
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:
| Field | Type | Purpose |
|---|---|---|
description |
string | Concise rule purpose (shown in Cursor UI) |
globs |
string | Gitignore-style patterns for auto-attachment |
alwaysApply |
boolean | true = always active; false = only when matching files referenced |
Rule Types by alwaysApply + globs Combination
| alwaysApply | globs | Behavior |
|---|---|---|
true |
empty | Always injected into every prompt |
false |
set | Auto-attached when matching files are in context |
false |
empty | Manual only -- reference with @Cursor Rules in chat |
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):
---
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):
---
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:
- Create
.cursor/rules/directory - Extract global context into an
alwaysApply: truerule - Extract language/framework rules into glob-scoped rules
- Delete
.cursorrulesafter verifying all rules load
Referencing Files in Rules
Use @file syntax to include additional context files when a rule is applied:
---
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
- Open Chat and type
@Cursor Rulesto see which rules are active - Check glob patterns match your files: open a file, then verify the rule appears in context pills
- Rules with
alwaysApply: truealways 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: truefor 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
Source: ComeOnOliver/skillshub — distributed by TomeVault.
Decide Fit First
Design Intent
How To Use It
Boundaries And Review