Setup Guide
5 min read
Updated Mar 2026

How to Set Up Custom AI Skills in Cursor & Windsurf [2026]

Stop generating outdated code. Here is the exact, step-by-step process to inject custom architectural context into the leading visual AI IDEs.

Quick Answer

To set up a custom AI skill in Cursor, create a file named .cursorrules in your project root. For Windsurf, create a file named .windsurfrules. The IDEs will automatically detect these files and prepend their contents to the LLM's system prompt every time you press Cmd+K or use the Composer.

Method 1: The Global Root File (Best for Simple Projects)

Both IDEs support a single "God-mode" file that controls the entire repository. This is the fastest way to get started.

1

Create the dotfile

Open your terminal or file explorer and create a new file in the exact root folder of your project (alongside package.json or requirements.txt):

touch .cursorrules # If using Cursor IDE
touch .windsurfrules # If using Codeium Windsurf
2

Paste your Skill Template

Copy instructions from our Skills Directory and paste them into the file. It should use XML tags or clear markdown headers.

3

Trigger a Reload

Open your IDE's Chat panel (Cmd+L) and type: "What are your core instructions?" The AI should reply by quoting the file you just created.

Method 2: Multi-File Skills (For Complex Monorepos)

Context Limit Warning

If your `rules` file gets larger than 300 lines, the AI will start to hallucinate or "forget" the instructions at the top. For large apps, use the MDC structure.

Cursor pioneered the Markdown Component (.mdc) structure to solve this. Instead of one massive file, you create specific skills that only trigger when the user is editing a specific area.

Setting up Cursor MDC Rules:

  1. Create a folder in your root directory named exactly .cursor/rules/
  2. Create semantic files inside it: react.mdc, database.mdc, styling.mdc
  3. Add frontmatter to the top of each MDC file indicating when it should activate.
---
description: Activates only when editing React components
globs: src/components/**/*.tsx
---

# React Component Skill
You must use regular functions, not arrow functions, for component definitions.
You must use Tailwind v4.

Troubleshooting Silent Failures

If the AI seems to be ignoring your rules, check these two common culprits:

File Naming

Ensure there is no `.txt` or `.md` extension hidden by your OS. The file must be literally named `.cursorrules` (with the leading dot).

Workspace Conflicts

If you have global settings configured in Cursor's GUI settings menu (Settings > General > Rules for AI), they will overwrite your project's local root rules.

Download Verified `.cursorrules` Templates

Ready to test out your new setup? Grab a pre-configured Agent Skill tailored for your exact language and framework.