fetch-rules
БесплатноБез исполняемых скриптовНе проверенFetch and apply Cursor-style workspace rules supporting all rule formats (.cursor/rules/*.md, *.mdc, AGENTS.md, and legacy .cursorrules).
от diegosouzapw★ 68 звёзд на GitHubОб этом скилле
Fetch Rules
Purpose
This skill emulates Cursor's rule selection behavior for AI agents.
It discovers and selects rules from:
- Project Rules (
.cursor/rules/).mdcfiles with frontmatter (description,globs,alwaysApply).mdfiles without frontmatter (treated as always-apply)
- AGENTS.md files (root and nested subdirectories)
- Legacy
.cursorrulesat 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)gitoptional (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 scripts/fetch_rules.sh --prompt "<your request>"
Optional file hints:
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 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.mdfiles are combined hierarchically—parent directories' instructions apply alongside more specific subdirectory instructions.
Установить fetch-rules в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл fetch-rules?
Fetch and apply Cursor-style workspace rules supporting all rule formats (.cursor/rules/*.md, *.mdc, AGENTS.md, and legacy .cursorrules).
Как установить скилл fetch-rules?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл fetch-rules запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic