Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/leaveanest/slack-utils-channelnpx agentmods add rules/leaveanest/slack-utils-channel/push_rulesWrote 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.
[](https://agentmods.dev/rules/leaveanest/slack-utils-channel/push_rules)<a href="https://agentmods.dev/rules/leaveanest/slack-utils-channel/push_rules"><img src="https://agentmods.dev/badge/rules/leaveanest/slack-utils-channel/push_rules/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.
<a href="https://agentmods.dev/rules/leaveanest/slack-utils-channel/push_rules"><img src="https://agentmods.dev/badge/rules/leaveanest/slack-utils-channel/push_rules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.02210 | $0.02210 |
| Opus 5.5 | $0.00884 | $0.00884 |
| Sonnet 5.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 1mo 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.
- 1mo 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 3mo ago), licensed MIT. It adds 2,210 tokens to every session, about $0.0088 per session on Opus 5.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
hook-commits
Set up pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo. Use when user wants to add pre-commit hooks, set up Husky, configure lint-staged, or add commit-time formatting/typechecking/testing.
development_workflow
Spamoor Development Workflow and Best Practices.
desktop-release-gate
Desktop app fixes must pass a local packaged build smoke test before pushing release tags or CI desktop builds.
roslyn-mcp-version-bump
Auto-bump Version after successful MCP self-build and reload.
fusebase-flow-implementation
Fusebase Flow implementation phase rules. Use when editing source code per a locked spec.
test-jules-task-queue
Please read the README.md file to understand the purpose of this project. Your goal to to fully test it with real actions.