fetch-rules
Fetch and apply Cursor-style workspace rules supporting all rule formats (.cursor/rules/*.md, *.mdc, AGENTS.md, and legacy .cursorrules).
Best use case
fetch-rules is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Fetch and apply Cursor-style workspace rules supporting all rule formats (.cursor/rules/*.md, *.mdc, AGENTS.md, and legacy .cursorrules).
Teams using fetch-rules should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/fetch-rules/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How fetch-rules Compares
| Feature / Agent | fetch-rules | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Fetch and apply Cursor-style workspace rules supporting all rule formats (.cursor/rules/*.md, *.mdc, AGENTS.md, and legacy .cursorrules).
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Fetch Rules ## Purpose This skill emulates Cursor's rule selection behavior for AI agents. It discovers and selects rules from: - **Project Rules** (`.cursor/rules/`) - `.mdc` files with frontmatter (`description`, `globs`, `alwaysApply`) - `.md` files without frontmatter (treated as always-apply) - **AGENTS.md** files (root and nested subdirectories) - **Legacy `.cursorrules`** at repo root (deprecated but still supported) ### Rule Selection Semantics | Rule Type | Selection Behavior | |---|---| | `alwaysApply: true` | Always included | | Simple `.md` (no frontmatter) | Always included | | `globs: ...` | Included when any candidate file matches | | `description: ...` | Included when prompt overlaps with description keywords | | No metadata (`.mdc` only) | Included only when explicitly referenced | | `AGENTS.md` | Always included when in scope (directory hierarchy) | Candidate files come from `--files`, `--use-git-diff`, and file-like paths found in `--prompt`. ## Requirements - `bash` (macOS / Linux default) - `git` optional (only if you use `--use-git-diff`) No Python, Node, or jq required. ## Usage Run commands from this skill directory (the directory containing this `SKILL.md`). Do not hardcode agent install paths. ```bash bash scripts/fetch_rules.sh --prompt "<your request>" ``` Optional file hints: ```bash bash scripts/fetch_rules.sh --prompt "<request>" --files path/to/a.ts path/to/b.sql bash scripts/fetch_rules.sh --prompt "<request>" --use-git-diff ``` Force-include a rule by filename: ```bash bash scripts/fetch_rules.sh --prompt "<request>" --explicit global.mdc bash scripts/fetch_rules.sh --prompt "<request>" --explicit react-patterns.md ``` ## Supported Formats | Format | Location | Description | |---|---|---| | `.mdc` | `.cursor/rules/` | Rules with YAML frontmatter for fine-grained control | | `.md` | `.cursor/rules/` | Simple markdown rules (always applied) | | `AGENTS.md` | Root or subdirs | Simple agent instructions (always applied in scope) | | `.cursorrules` | Root only | Legacy format (deprecated, will be removed) | ## Notes - If multiple rules share the same filename, the rule in the closest scoped directory wins (deepest scope). - Glob matching uses bash pattern matching (`[[ file == pattern ]]`). Cursor-style `**` works effectively as `*` in this matcher. - `AGENTS.md` files are combined hierarchically—parent directories' instructions apply alongside more specific subdirectory instructions.
Related Skills
langsmith-fetch
Debug LangChain and LangGraph agents by fetching execution traces from LangSmith Studio. Use when debugging agent behavior, investigating errors, analyzing tool calls, checking memory operations, or examining agent performance. Automatically fetches recent traces and analyzes execution patterns. Requires langsmith-fetch CLI installed.
framer-motion-rules
Defines framer motion is being used for animations
economic-calendar-fetcher
Fetch upcoming economic events and data releases using FMP API. Retrieve scheduled central bank decisions, employment reports, inflation data, GDP releases, and other market-moving economic indicators for specified date ranges (default: next 7 days). Output chronological markdown reports with impact assessment.
data-fetching
Data fetching architecture guide using Service layer + Zustand Store + SWR. Use when implementing data fetching, creating services, working with store hooks, or migrating from useEffect. Triggers on data loading, API calls, service creation, or store data fetching tasks.
data-fetching-patterns
Explains data fetching strategies including fetch on render, fetch then render, render as you fetch, and server-side data fetching. Use when implementing data loading, optimizing loading performance, or choosing between client and server data fetching.
cursor-rules-synchronizer
Synchronizes Cursor Rules (.mdc files in .cursor/rules/) to CLAUDE.md by generating a Rules section with context-efficient descriptions and usage instructions. Use when setting up Cursor Rules for the first time, after adding or modifying rules, or when the Rules section in CLAUDE.md is missing or outdated.
cursor-rules-review
Audit Cursor IDE rules (.mdc files) against quality standards using a 5-gate review process. Validates frontmatter (YAML syntax, required fields, description quality, triggering configuration), glob patterns (specificity, performance, correctness), content quality (focus, organization, examples, cross-references), file length (under 500 lines recommended), and functionality (triggering, cross-references, maintainability). Use when reviewing pull requests with Cursor rule changes, conducting periodic rule quality audits, validating new rules before committing, identifying improvement opportunities, preparing rules for team sharing, or debugging why rules aren't working as expected.
metadata-and-seo-rules
Focuses on optimizing metadata and SEO to improve discoverability of the documentation.
vercel-kv-database-rules
Defines how to interact with Vercel's KV database for storing and retrieving session and application data.
python-fastapi-scalable-api-cursorrules-prompt-fil
Apply for python-fastapi-scalable-api-cursorrules-prompt-fil. --- description: Defines conventions specific to FastAPI usage in the backend. globs: backend/src/**/*.py
python-django-best-practices-cursorrules-prompt-fi
Apply for python-django-best-practices-cursorrules-prompt-fi. --- description: Configurations for Django settings file with the list of dependencies and conventions. globs: **/settings.py
pre-configured-apis-rules
Rules for using pre-configured APIs in the project, using them only if they are required by the project.