architecture

architecture is a cursor rule for Cursor from KazunariNakayama/raycast-extensions. It costs 428 tokens per session, scanned A, original, MIT.

A coding-rules document for a Raycast extension monorepo, a repository that contains multiple related packages or extensions. It explains where logic belongs, how interfaces should be structured, and how errors and secrets are handled.

In plain words
What is it for?
Guiding Raycast extension architecture, UI component choices, external API clients, error handling, secret management, and shared packages.
Why use it?
It gives contributors shared rules for organizing code and prevents common problems such as hard-coded API keys or inconsistent error messages.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Guiding Raycast extension architecture, UI component choices, external API clients, error handling, secret management, and shared packages.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/kazunarinakayama/raycast-extensions/architecture
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.

Clone the repo
git clone --depth 1 https://github.com/KazunariNakayama/raycast-extensions

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for architecture

README.md
[![agentmods](https://agentmods.dev/badge/rules/kazunarinakayama/raycast-extensions/architecture/github.svg)](https://agentmods.dev/rules/kazunarinakayama/raycast-extensions/architecture)
Your own site
<a href="https://agentmods.dev/rules/kazunarinakayama/raycast-extensions/architecture"><img src="https://agentmods.dev/badge/rules/kazunarinakayama/raycast-extensions/architecture/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for architecture

Your own site · 80×15
<a href="https://agentmods.dev/rules/kazunarinakayama/raycast-extensions/architecture"><img src="https://agentmods.dev/badge/rules/kazunarinakayama/raycast-extensions/architecture.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 428 This file is loaded in full into every session.
When invoked 428 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00428 $0.00428
Opus 5 $0.00214 $0.00214
Sonnet 5 $0.00086 $0.00086
Haiku 4.5 $0.00043 $0.00043

Measured 9d ago against content hash c52a79957770, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

architecture 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 9d ago.

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/architecture.mdc · 33 lines

What it actually says

Architecture Rules (Raycast Monorepo)

コマンドとロジックの分離

  • コマンド(commands/)は薄く保つ。Preferences の読み込みと features の呼び出しのみ。
  • ビジネスロジックは features/*services/* に配置する。
  • 別の拡張の src を直接 import しない。共有は packages/* 経由のみ。

UI 構成

  • 検索/一覧: List を使用
  • 詳細表示: Detail を使用(markdown 形式)
  • 入力フォーム: Form を使用
  • 長文の生成/読み込みは Detail の markdown を逐次更新(ストリーム)

エラーハンドリング

  • 失敗時は必ず showToast({ style: Toast.Style.Failure, title, message }) を表示
  • エラーメッセージは短く、実行可能なアクションを示す
  • 外部 API クライアントは packages/services または拡張ローカルの services/ に配置

秘匿情報の取り扱い

  • 秘匿値(API key, token)は絶対にハードコードしない
  • Preferences 経由で受け取り、関数の引数として渡す
  • 環境や Preferences に直接依存しない純粋な関数を心がける

共有パッケージ

  • @acme/ui: Raycast 標準コンポーネントの薄いヘルパのみ。ビジネスロジックを持たない。
  • @acme/services: 外部 API クライアント。I/O 契約は zod で型定義。
  • @acme/config: 共通設定(tsconfig, eslint, vitest)
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. 9d ago First seen · 33 lines · 428 tokens per session scan A c52a79957770

Subscribe to this mod's changes

architecture is a cursor rule published in the GitHub repository KazunariNakayama/raycast-extensions (2 stars, last pushed 10mo ago), licensed MIT. It adds 428 tokens to every session, about $0.0021 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-31.