---
title: "Cursor Project Rules (.cursor/rules/*.mdc): パスと形式 · DotsAgent"
description: ".cursor/rules/*.mdcの配置場所、形式とfrontmatter、グローバル版とネストされた版の統合方法、読み込むツールを解説します。2026-10-01時点で確認済み。"
url: https://dotsagent.io/ja/instructions/files/cursor-rules
---

.cursor/rules/*.mdc

# Cursor Project Rules (.cursor/rules/*.mdc): 配置場所とツールでの読み込み方

Cursor Project Rules は .cursor/rules/ 内の .mdc ファイルです。frontmatter で各ルールを適用する条件を指定します。Cursor は AGENTS.md も読み込みます。また、リポジトリ外で設定する User Rules と Team Rules もあります。

## 配置場所

- .cursor/rules/**/*.mdc（サブフォルダも使用可能）。.cursor/rules 内の通常の .md ファイルは無視されます。
- ルートおよびネストされたフォルダ内の AGENTS.md。
- Cursor の設定で指定する User Rules。
- チームダッシュボードで指定する Team Rules。

## 形式

YAML frontmatter を含む Markdown で、拡張子は .mdc が必須です。alwaysApply: true は常にルールを適用します。alwaysApply: false と globs を指定すると、一致するファイルがコンテキスト内にある場合に適用されます。description だけを指定した場合は、Agent が適用するかどうかを判断します。いずれも指定しない場合、ルールは @-mention したときだけ適用されます。

Frontmatterのキー: `description``globs``alwaysApply`

`.cursor/rules/*.mdc`

```
---
description: React component conventions
globs: src/components/**/*.tsx
alwaysApply: false
---

- One component per file, with a named export matching the file name.
- Type props with an interface named after the component plus Props.
- Use the existing CSS modules; no inline style objects.
- Follow @src/components/Button.tsx as the reference pattern.
```

## 優先順位と統合

チームルール、プロジェクトルール、ユーザールールの順です。適用対象のルールはすべて統合され、競合する場合は先に定義されたルールが優先されます。強制適用されるチームルールは無効にできません。ネストしたAGENTS.mdファイルは親の内容と統合され、より具体的なファイルのルールが優先されます。

## 読み込むツール

| ツール | 対応状況 |
| --- | --- |
| [Cline](https://docs.cline.bot/features/cline-rules) | 旧形式の .cursorrules ファイルを検出します。 |

## ヒント

- globs フィールドでは、複数の glob パターンをカンマで区切ります。
- 各ルールは500行未満にし、ファイルの内容を貼り付ける代わりに @filename で参照してください。
- ルールはCursor Tabには適用されず、User RulesはInline Editには適用されません。
- 旧式の .cursorrules ファイルはCursorのドキュメントで案内されなくなりました。.cursor/rules/ に移してください。

1つのフォームから、AGENTS.mdと5つのツールに対応するルールファイルを生成します。 [AGENTS.mdジェネレーターを開く →](https://dotsagent.io/ja/instructions)

## その他の指示ファイル

[AGENTS.md](https://dotsagent.io/ja/instructions/files/agents-md)

[CLAUDE.md](https://dotsagent.io/ja/instructions/files/claude-md)

[GEMINI.md](https://dotsagent.io/ja/instructions/files/gemini-md)

[.github/copilot-instructions.md](https://dotsagent.io/ja/instructions/files/github-copilot-instructions)

[.devin/rules/*.md](https://dotsagent.io/ja/instructions/files/windsurf-rules)

[.clinerules/](https://dotsagent.io/ja/instructions/files/cline-rules)

[~/.openclaw/workspace/AGENTS.md](https://dotsagent.io/ja/instructions/files/openclaw-workspace)

## 出典

1. [cursor.com](https://cursor.com/docs/context/rules)/docs/context/rules

AIエージェント開発者向けの独立したリファレンスです。ここに記載されているいずれのベンダーとも提携していません。

© 2026 DotsAgent · 確認日: 2026年10月1日
