Borrowing it
Nothing to install: this file belongs to j5ik2o/event-store-adapter-js. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/j5ik2o/event-store-adapter-js/main/.agents/skills/tell-dont-ask/SKILL.mdgit clone --depth 1 https://github.com/j5ik2o/event-store-adapter-jsWrote 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/skills/j5ik2o/event-store-adapter-js/tell-dont-ask)<a href="https://agentmods.dev/skills/j5ik2o/event-store-adapter-js/tell-dont-ask"><img src="https://agentmods.dev/badge/skills/j5ik2o/event-store-adapter-js/tell-dont-ask/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/skills/j5ik2o/event-store-adapter-js/tell-dont-ask"><img src="https://agentmods.dev/badge/skills/j5ik2o/event-store-adapter-js/tell-dont-ask.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.00212 | $0.01551 |
| Opus 5 | $0.00106 | $0.00776 |
| Sonnet 5 | $0.00042 | $0.00310 |
| Haiku 4.5 | $0.00021 | $0.00155 |
Grade A, and why
tell-dont-ask 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 10d 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.
This is a copy
100% identical to tell-dont-ask — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 156 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Tell, Don't Ask
オブジェクトに問い合わせるな、命じよ。
核心原則
オブジェクトの内部状態に基づく意思決定をし、その結果で該当オブジェクトを更新してはならない。 (『達人プログラマー 第2版』167ページ)
| アプローチ | 特徴 | 問題 |
|---|---|---|
| Ask | 状態を取得→外部で判断→操作 | ロジックが散在、カプセル化破壊 |
| Tell | オブジェクトに直接命じる | 責任集約、変更に強い |
判断フロー
オブジェクトのメソッド呼び出し
↓
getterで状態を取得しているか?
├─ YES → その後ifで判定している?
│ ├─ YES → Askパターン(問題あり)
│ └─ NO → 表示/出力目的なら許容
└─ NO → Tellパターン(推奨)
アンチパターン検出
以下のパターンを見つけたら変換を検討:
❌ if (obj.getX() > threshold) { obj.setY(...) }
❌ if (obj.getStatus() == ACTIVE) { doSomething(obj) }
❌ obj.getA().getB().doSomething() // デメテルの法則違反
❌ for (item : list) { total += item.getPrice() }
❌ if (user.getRole() == ADMIN) { ... }
変換パターン
1. 状態判定の内部化
// ❌ Ask: 状態を取得して外部で判断
if (user.getAge() >= 18) {
allowAccess(user);
}
// ✅ Tell: 判定ロジックをオブジェクトに持たせる
if (user.isAdult()) {
allowAccess(user);
}
// ✅✅ さらに良い: 処理自体を委譲
user.ifAdult(() -> allowAccess());
2. 条件分岐のポリモーフィズム化
// ❌ Ask: 型で分岐
if (user.getType() == UserType.ADMIN) {
sendAdminNotification(user);
} else {
sendUserNotification(user);
}
// ✅ Tell: 各クラスに責任を持たせる
user.sendNotification(); // Admin/RegularUserで実装が異なる
3. コレクション操作の委譲
// ❌ Ask: 外部で集計
int total = 0;
for (Item item : order.getItems()) {
total += item.getPrice();
}
// ✅ Tell: オブジェクトに集計を任せる
int total = order.calculateTotal();
4. Nullオブジェクトパターン
// ❌ Ask: null判定の分岐
Address addr = user.getAddress();
if (addr != null) {
return addr.format();
} else {
return "住所未登録";
}
// ✅ Tell: NullObjectでデフォルト動作を定義
return user.getAddress().format(); // NullAddressは"住所未登録"を返す
関連原則・スキル
| 原則 / スキル | 関係 |
|---|---|
| law-of-demeter | 連鎖呼び出しを避ける(a.getB().getC() → a.doC()) |
| Feature Envy | 他クラスのデータに執着 → 責任を移動 |
| 単一責任原則 | データと処理を同じ場所に |
| カプセル化 | 内部状態を隠蔽し振る舞いを公開 |
| breach-encapsulation-naming | getter命名でカプセル化破壊を明示 |
適用指針
推奨
- getter後にif文で判定しているコード
- 同じ判定ロジックが複数箇所に散在
- オブジェクトの状態を取得→更新するパターン
- 型やステータスによる条件分岐
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 10d ago First seen · 156 lines · 212 tokens per session scan A 78afcc27ff34
tell-dont-ask is a skill published in the GitHub repository j5ik2o/event-store-adapter-js (24 stars, last pushed yesterday), licensed Apache-2.0. It adds 212 tokens to every session and 1,551 once invoked, about $0.0011 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to tell-dont-ask, differing in 0 lines, and is treated as a copy.
Other skills, from other repositories
code-review-architecture
Architecture-focused code review covering hexagonal boundary violations, DDD anti-patterns, CQRS misuse, and microservices coupling issues. Applied in addition to the language-specific review skill when architecture markers are detected. Invoked when reviewing hexagonal architectures, DDD patterns, or microservices…
cratis-code-review
Review changed code in a Cratis application against the architecture, style, and specification-coverage criteria that the compiler cannot check, and produce a structured report with blocking issues separated from suggestions. Use when asked to review, check, or validate a change. Do not substitute it for a focused…
cratis-engineering-csharp-conventions
Apply the Cratis C# house conventions when writing or reviewing C# in a Cratis repository - formatting, naming, records and primary constructors, nullable handling, XML documentation, custom exceptions, structured logging, dependency injection, and service lifetimes. Use for any "how should this be written" C# style…
review-code
Use this skill when asked to review, check, or validate code in a Cratis-based project. Produces a structured review report with blocking issues and suggestions, checked against all project architecture and style standards.
cratis-engineering-effect-boundaries
Apply the Cratis effect-boundary contract when writing or reviewing code that publishes, persists, generates, propagates, or releases. On those boundaries partial success is failure - no catch-and-continue, no defaulting to success on an unknown outcome. Use when a degraded run could still report success; defer style…
cratis-performance-review
Perform a focused scalability review of changed code in a Cratis application — Chronicle observers and replay, read-model query shape, command and query payloads, .NET enumeration, and React render cost — and report findings by risk. Use when asked to check for performance or scalability problems. Do not use for…