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.
npx agentmods add rules/leaveanest/slack-utils-channel/push_rulesgit clone --depth 1 https://github.com/leaveanest/slack-utils-channelWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.02210 | $0.02210 |
| Opus 5 | $0.01105 | $0.01105 |
| Sonnet 5 | $0.00442 | $0.00442 |
| Haiku 4.5 | $0.00221 | $0.00221 |
Grade A, and why
push_rules 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 260 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Cursor Rules for slack-utils
コミット前の必須チェックリスト
重要: git push する前に必ず以下のコマンドをローカルで実行し、全てがパスすることを確認してください。
必須実行コマンド
# 1. フォーマットチェック
deno fmt --check
# 2. リントチェック
deno lint
# 3. 全テスト実行
deno test --allow-all
ワークフロー
- コードを変更
- 上記3つのコマンドを実行
- 全てパスしたことを確認
git add .git commit -m "..."git push
理由
CIでのフォーマットエラーやテスト失敗を防ぐため、ローカルで事前に全てのチェックを実行する必要があります。
プロジェクト情報
- このプロジェクトはDenoプロジェクトです
package.jsonは存在しません- 改行コードはLF(Unix形式)に統一されています
- Slackチャンネル名は
#05-miyazawaです
新規関数作成時のルール
重要: 新しい関数やモジュールを作成する際は、必ず以下を実施してください。
必須事項
-
関数にJSDocコメントを追加
- 関数の目的と動作を説明する
- パラメータの説明を
@paramで記載 - 戻り値の説明を
@returnsで記載 - エラーの場合は
@throwsで記載
/** * Slackチャンネルの情報を取得します * * @param client - Slack APIクライアント * @param channelId - 取得対象のチャンネルID * @returns チャンネルの概要情報 * @throws {Error} チャンネル情報の取得に失敗した場合 */ export async function retrieveChannelSummary( client: SlackAPIClient, channelId: string, ): Promise<ChannelSummary> { // ... } -
テストファイルを作成
- 関数と同じディレクトリに
test.tsを配置 - 正常系と異常系の両方をテスト
- テスト名は日本語で明確に記述(例: "正常にチャンネル情報を取得できる")
- モックを使用して外部依存を排除
- 関数と同じディレクトリに
-
テストカバレッジ
- 主要な処理パスをカバーする
- エッジケースやエラーハンドリングもテスト
- 最低限、正常系1つ・異常系1つを含める
テストファイルの命名規則
- 関数ファイル:
mod.tsまたは{function_name}.ts - テストファイル:
test.tsまたは{function_name}_test.ts - テストファイルは関数ファイルと同じディレクトリに配置
参考例
functions/get_channel_info/ を参照してください:
mod.ts: JSDocコメント付きの関数実装test.ts: 正常系・異常系のテストケース
I18n(多言語対応)ルール
重要: エラーメッセージやユーザー向けメッセージを記述する際は、必ず以下を実施してください。
必須事項
-
直接文字列を使わず
t()関数を使用- ハードコードされた文字列は避ける
- 全てのユーザー向けメッセージは翻訳可能にする
// ❌ 悪い例 throw new Error("Failed to load channel info"); // ✅ 良い例 import { t } from "../../lib/i18n/mod.ts"; throw new Error(t("errors.channel_not_found", { error })); -
英語をベース言語として
locales/en.jsonに追加- 新しいメッセージは必ず
locales/en.jsonに追加 - 適切なカテゴリ(
errors,messages,logs)に配置 - プレースホルダーは
{変数名}の形式で記述
- 新しいメッセージは必ず
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.
- 2d ago First seen · 260 lines · 2,210 tokens per session scan A f4eaa7a38cda
push_rules is a cursor rule published in the GitHub repository leaveanest/slack-utils-channel (4 stars, last pushed 2mo ago), licensed MIT. It adds 2,210 tokens to every session, about $0.0111 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.
Other cursor rules, from other repositories
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
cli-error-handling
CLI command error handling patterns.
prefer-direct-imports-over-module-mocks
Prefer extracting a testable core over vi.mock / vi.resetModules when unit tests need to reach production logic entangled with config, env, or singletons.
control-plane-descriptors
Control plane descriptor and instance implementation patterns.
family-instance-domain-actions
Family instance domain action implementation patterns.