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

.clinerules/

# Cline Rules (.clinerules/): 配置場所とツールでの読み込み方

Cline Rulesは .clinerules/ 内のMarkdownファイルです。Clineはこれらをグローバルルールや AGENTS.md と組み合わせます。任意のpaths frontmatterを指定すると、一致するファイルにルールを限定できます。

## 配置場所

- ワークスペース: .clinerules/*.md または .cline/rules/*.md。どちらも検索されます。
- グローバル: Windowsでは Documents\Cline\Rules、macOSとLinuxでは ~/Documents/Cline/Rules に加え、~/.cline/rules と ~/Cline/Rules。
- 他のツール向けのファイルも自動検出されます: AGENTS.md、~/.agents/AGENTS.md、.cursorrules、.windsurfrules。

## 形式

Markdownファイル。必要に応じて01-coding.mdのように番号を付けられます。YAML frontmatterも任意で指定できます。paths配列にglobを指定すると、コンテキスト内のファイルがいずれかのパターンに一致したときにルールが有効になります。frontmatterがない場合は常に有効、paths: []の場合は無効です。YAMLが無効な場合はルールが有効になります。

Frontmatterのキー: `paths`

`.clinerules/`

```
---
paths:
  - "src/components/**"
  - "src/hooks/**"
---

# Components and hooks

- Function components only.
- Hook names start with use and the files live in src/hooks/.
- Split any component that grows past 200 lines.
- Add a test next to each new hook.
```

## 優先順位と統合

ワークスペースとグローバルのルールが適用され、競合する場合はワークスペースのルールが優先されます。各ルールは個別にオンまたはオフにできます。

## ヒント

- コンテキストには、言及されたパス、開いているタブや表示中のタブ、編集中のファイル、保留中の編集内容が含まれます。
- YAMLが無効な場合はルールが有効になるため、pathsの入力ミスがあるとルールは常に有効になります。編集後に確認してください。
- VS CodeのRulesパネル、またはスラッシュコマンド/newruleからルールを作成できます。

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)

[.cursor/rules/*.mdc](https://dotsagent.io/ja/instructions/files/cursor-rules)

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

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

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

## 出典

1. [docs.cline.bot](https://docs.cline.bot/features/cline-rules)/features/cline-rules

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

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