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/intent-based-dedup/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/intent-based-dedup)<a href="https://agentmods.dev/skills/j5ik2o/event-store-adapter-js/intent-based-dedup"><img src="https://agentmods.dev/badge/skills/j5ik2o/event-store-adapter-js/intent-based-dedup/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/intent-based-dedup"><img src="https://agentmods.dev/badge/skills/j5ik2o/event-store-adapter-js/intent-based-dedup.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.00237 | $0.02341 |
| Opus 5 | $0.00118 | $0.01171 |
| Sonnet 5 | $0.00047 | $0.00468 |
| Haiku 4.5 | $0.00024 | $0.00234 |
Grade A, and why
intent-based-dedup 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 8d 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 intent-based-dedup — 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 — 203 lines — stays where its author put it; the contents beside it link to each section on GitHub.
意図ベースの共通化判定
字面が同じかどうかより、意図(目的)が同じかどうかで共通化する。
核心原則
「字面が同じなら共通化」という単純思考は危険。意図・目的の一致を最優先に判断する。
コード表現が同一でも、ビジネスロジック上の目的が異なれば共通化してはならない。 逆に、表現が異なっていても目的が同じなら統一すべきである。
判断マトリックス
| 字面 | 意図 | 判定 | アクション |
|---|---|---|---|
| 同じ | 同じ | 共通化 ◎ | DRY原則を適用し共通関数に抽出 |
| 異なる | 同じ | 統一 ◎ | どちらかの実装に統一 |
| 同じ | 異なる | 共通化 ✗ | 絶対に共通化禁止(最重要) |
| 異なる | 異なる | 共通化 ✗ | 検討不要 |
判断フロー
重複コードを発見した
↓
2つのコードの「目的」は同じか?
├─ YES → 字面は同じか?
│ ├─ YES → 共通化する(標準的DRY)
│ └─ NO → 実装方式を統一する
└─ NO → 字面は同じか?
├─ YES → ⚠ 共通化禁止(最も危険なケース)
└─ NO → 何もしない
アンチパターン検出
以下のパターンを見つけたらDRY誤適用の兆候:
❌ 異なるドメイン概念に同じユーティリティ関数を使い回す
❌ "たまたま同じ計算式" を共通関数に抽出
❌ 共通化した関数に if (type == A) / else if (type == B) の分岐が増える
❌ 共通関数名が汎用的すぎる(calculate, process, transform等)
❌ 一方の仕様変更時に「もう一方も壊れないか」を心配する
❌ 共通関数のパラメータが増殖し続ける
4パターンの詳細
1. 字面が同じ × 意図が同じ → 共通化する
DRY原則が正しく適用されるケース。
// ❌ 同じ目的の処理が2箇所に重複
fn report_even_squares(numbers: &[i32]) -> Vec<i32> {
numbers.iter()
.filter(|&&x| x % 2 == 0)
.map(|&x| x * x)
.collect()
}
fn display_even_squares(numbers: &[i32]) -> Vec<i32> {
numbers.iter()
.filter(|&&x| x % 2 == 0)
.map(|&x| x * x)
.collect()
}
// ✅ 共通化: 同じ目的なので1つにまとめる
fn even_squares(numbers: &[i32]) -> Vec<i32> {
numbers.iter()
.filter(|&&x| x % 2 == 0)
.map(|&x| x * x)
.collect()
}
2. 字面が異なる × 意図が同じ → 統一する
同じ目的だが異なる実装スタイルで書かれているケース。
// パターンA: 関数型アプローチ
fn total_a(values: &[i32]) -> i32 {
values.iter().fold(0, |acc, &x| acc + x)
}
// パターンB: 命令型アプローチ
fn total_b(values: &[i32]) -> i32 {
let mut sum = 0;
for &v in values { sum += v; }
sum
}
// ✅ どちらか一方に統一(チーム規約に従う)
fn total(values: &[i32]) -> i32 {
values.iter().sum()
}
3. 字面が同じ × 意図が異なる → 共通化禁止(最重要)
最も危険なケース。 形式上同じコードでも、ビジネス上の目的が異なる。
// ケース1: 攻撃力計算(地形倍率を適用)
fn adjusted_attack_points(weapon_points: &[i32]) -> Vec<i32> {
weapon_points.iter()
.map(|&x| x * 2)
.filter(|&x| x % 2 == 0)
.map(|x| x * x)
.collect()
}
// ケース2: 武器加工費用計算
fn weighted_crafting_costs(amounts: &[i32]) -> Vec<i32> {
amounts.iter()
.map(|&x| x * 2)
.filter(|&x| x % 2 == 0)
.map(|x| x * x)
.collect()
}
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.
- 8d ago First seen · 203 lines · 237 tokens per session scan A a00ebb166758
intent-based-dedup is a skill published in the GitHub repository j5ik2o/event-store-adapter-js (24 stars, last pushed yesterday), licensed Apache-2.0. It adds 237 tokens to every session and 2,341 once invoked, about $0.0012 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to intent-based-dedup, 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…