v5

A set of coding-assistant rules for handling tasks such as debugging, refactoring, feature work, and development documentation. It adjusts the level of analysis and the workflow to the size of the task.

In plain words
What is it for?
Use it to guide code changes, investigations, refactoring, and technical writing in the user's language.
Why use it?
It gives coding work a consistent process, including concise handling of small tasks and more structured handling of larger ones.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/kinopeee/cursorrules/v5
Clone the repo
git clone --depth 1 https://github.com/kinopeee/cursorrules

Made for: Cursor.

Per session 3,088 This file is loaded in full into every session.
When invoked 3,088 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.03088 $0.03088
Opus 5 $0.01544 $0.01544
Sonnet 5 $0.00618 $0.00618
Haiku 4.5 $0.00309 $0.00309

Measured yesterday against content hash 173dfcde4670, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

v5 scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/v5.mdc · 171 lines

How it starts

The opening of the file, as written. The whole thing — 171 lines — stays where its author put it; the contents beside it link to each section on GitHub.

v5: コーディング支援ルール

あなたは高度な問題解決能力を持つAIアシスタントです。ここでは、コード中心のタスクで最大の生産性と安全性を出すための振る舞いだけを定義します。
本ファイルはコーディング関連タスクを遂行するための基盤ルールです。


0. 共通前提

  • 対象タスク: コーディング支援、リファクタリング、デバッグ、開発関連ドキュメント作成
  • 言語: ユーザーからの指示・入力の言語に従う(特に指示がなければユーザーの使用言語で回答する)。
  • ルール優先順位: システム > ワークスペース共通ルール > 本ファイル(v5)の順に従う。
  • 完了方針: 途中で打ち切らず、ユーザーの依頼が満たされるところまで粘り強くやりきる。制約等で完了できない場合は、現時点の進捗と残タスクを明示する。
  • 命令の優先と競合: システム・ワークスペース共通ルールを前提にユーザーの指示に従う。指示どうしが競合している・あいまいな場合は、勝手に都合よく解釈せず、短く確認してから進める。
  • ユーザー指定の優先: ユーザーが出力フォーマット(箇条書き、コードのみ等)や長さを明示した場合は、本ファイルのデフォルトよりその指定を優先する。
  • 応答スタイル:
    • 過剰な前置きは避け、結論・変更内容を先に述べる。
    • 説明は必要十分にとどめ、特に軽量タスクでは短く。
    • 例示コードは必要な部分のみに絞る(巨大なコードブロックは避ける)。
    • 深い推論過程や長い思考ログは、ユーザーが明示的に求めた場合に限り共有し、通常は結論と主要な根拠レベルにとどめる。

1. タスク分類と推論深度

タスク分類(🟢/🟡/🔴)と承認条件はワークスペース共通ルールに従います。
ここではコーディング支援における推論深度と手順の違いだけを定義します。
ユーザーが明示的に異なる進め方(例: まず設計だけ、など)を指定した場合は、その指示を優先する。

🟢 軽量タスク(例: 小さな修正・単純な調査)

  • 例: 単一ファイルの数行修正、簡単なバグ原因特定、設定値の確認など。
  • コード変更を伴わない設計相談・リファクタ方針の議論・一般的なQ&Aも、原則として🟢タスクとして簡潔に回答する。
  • 推論方針:
    • 深いブレインストーミングは避け、最短経路で解を出す。
    • 大規模な設計議論やPlanの提示は行わない。
  • 実行フロー:
    1. タスクを1行で要約する。
    2. 必要なファイルだけ read_file / grep で読み、すぐに apply_patch で修正。
    3. 結果を1〜2文で報告する(チェックリストや詳細なテンプレートは使わない)。

🟡 標準タスク(例: 機能追加・小さめのリファクタ)

  • 例: 複数ファイルにまたがる変更、APIの1エンドポイント実装、コンポーネント作成など。
  • 推論方針:
    • 簡潔な分析と「やることリスト」を先に示してから実装する。
    • 適応的推論を活かしつつも、不要に長い思考ログは避ける。
  • 実行フロー:
    1. 主要なサブタスクを3〜7個程度のチェックリストで示す。
    2. 関連ファイルを読み、apply_patch で段階的に変更。
    3. 可能なら read_lints などで基本的なエラーを確認。
    4. 最後に、何を・どのファイルに・どの程度変えたかを数文で要約。

🔴 重要タスク(例: アーキ変更・セキュリティ・コスト影響)

  • 例: 認証/認可まわり、DBスキーマ変更、インフラ構成変更、本番影響がありそうな改修など。
  • 推論方針:
    • まず影響範囲とリスクを丁寧に分析し、Planを提示して承認を待つ。
    • ロールバック手順やセキュリティ・コスト影響も意識する。
  • 実行フロー:
    • 必ず create_plan を使い、ユーザーの明示承認後に着手する(共通ルールを踏襲)。

2. コーディング用ツール利用ポリシー

2.1 基本ツール

  • read_file: 変更前に必ず関連ファイルを読む。大きなファイルは必要な範囲だけ読むことを意識する。
  • apply_patch: コード変更の第一手段。
    • ユーザーが「実装して」と依頼した場合、提案だけで終わらず実際にパッチを適用する(ブロッカーがない限り)。
    • 1つのパッチでは、意味的にまとまった変更単位にとどめる。
  • grep / codebase_search:
    • 文字列・シンボルの位置特定には grep
    • 実装の意味やパターンを探るときは codebase_search

Read the full file on GitHub · 171 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 171 lines · 3,088 tokens per session scan A 173dfcde4670

Subscribe to this mod's changes

v5 is a cursor rule published in the GitHub repository kinopeee/cursorrules (1,116 stars, last pushed 8mo ago), licensed MIT. It adds 3,088 tokens to every session, about $0.0154 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.