design-duplicate-rule

design-duplicate-rule is a command for Claude Code from BanibrataChatterjee/AwesomeSalesforceSkills. It costs 0 tokens per session (563 once invoked), scanned A, original, Apache-2.0.

A designer for Salesforce Matching Rules and Duplicate Rules, which identify records that may represent the same person or company and decide whether to block or warn about them.

In plain words
What is it for?
Use it to inventory existing rules and design exact or fuzzy matching based on fields such as email, phone, name, or company. It can produce Setup-ready XML and a Custom Permission stub for approved integration bypasses.
Why use it?
It converts a duplicate-record policy into deployable rule definitions and considers integration bypass needs. It also highlights Salesforce-specific limits, such as Lead conversion not firing duplicate rules.

Command for Claude Code

Written for Claude Code: a Claude Code command (commands/*.md).

Good fit Use it to inventory existing rules and design exact or fuzzy matching based on fields such as email, phone, name, or company. It can produce Setup-ready XML and a Custom Permission stub for approved integration bypasses.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/banibratachatterjee/awesomesalesforceskills/design-duplicate-rule
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/BanibrataChatterjee/AwesomeSalesforceSkills

Made for: Claude Code.

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 design-duplicate-rule

README.md
[![agentmods](https://agentmods.dev/badge/commands/banibratachatterjee/awesomesalesforceskills/design-duplicate-rule/github.svg)](https://agentmods.dev/commands/banibratachatterjee/awesomesalesforceskills/design-duplicate-rule)
Your own site
<a href="https://agentmods.dev/commands/banibratachatterjee/awesomesalesforceskills/design-duplicate-rule"><img src="https://agentmods.dev/badge/commands/banibratachatterjee/awesomesalesforceskills/design-duplicate-rule/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 design-duplicate-rule

Your own site · 80×15
<a href="https://agentmods.dev/commands/banibratachatterjee/awesomesalesforceskills/design-duplicate-rule"><img src="https://agentmods.dev/badge/commands/banibratachatterjee/awesomesalesforceskills/design-duplicate-rule.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 563 The whole file, excluding the scripts and references it only reads on demand.
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.00000 $0.00563
Opus 5 $0.00000 $0.00282
Sonnet 5 $0.00000 $0.00113
Haiku 4.5 $0.00000 $0.00056

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

Security

Grade A, and why

design-duplicate-rule 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 11d 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.

commands/design-duplicate-rule.md · 83 lines

How it starts

The opening of the file, as written. The whole thing — 83 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/design-duplicate-rule — Design a Matching Rule + Duplicate Rule pair

Wraps agents/duplicate-rule-designer/AGENT.md. Produces Setup-ready Matching Rule + Duplicate Rule XML with the bypass Custom Permission for integrations.


Step 1 — Collect inputs

Ask the user:

1. Object API name?
   Example: Lead

2. Target org alias (required)?

3. Policy?
   block              - hard block on exact match
   alert              - warn but allow
   block-on-create-only
   alert-on-create-only

4. Match basis?
   email / phone / name+company / custom:<comma-separated API names>
   Example: email  OR  custom:Email,Company,Country

5. Fuzziness? exact (default) / fuzzy
   (Some fields only support exact — agent downgrades with a note if needed)

6. Integration exempt? yes (default) / no
   (If yes, the agent emits a Bypass_Duplicate_Rule_<Object> Custom Permission stub)

If policy=block and the object is Lead, the agent will flag that Lead Convert does NOT fire duplicate rules — plan accordingly.


Step 2 — Load the agent

Read agents/duplicate-rule-designer/AGENT.md + mandatory reads.


Step 3 — Execute the plan

  1. Inventory existing match + duplicate rules on the object (refuse to design competing rules)
  2. Validate the match_basis (field types, fuzzy support)
  3. Design the Matching Rule (emit XML)
  4. Design the Duplicate Rule with policy (emit XML)
  5. Handle Convert + Merge boundaries (Lead especially)
  6. Integration exemption pattern (Custom Permission stub)
  7. Emit the test plan

Step 4 — Deliver the output

  • Summary + confidence
  • Matching Rule XML (fenced block with target path)
  • Duplicate Rule XML (fenced block with target path)
  • Custom Permission stub (if new)
  • Interaction notes (Convert, Merge, Person Accounts)
  • Test plan
  • Process Observations
  • Citations

Step 5 — Recommend follow-ups

  • /architect-perms if the bypass Custom Permission is new and needs PSG integration
  • /preflight-load for any integration that will hit the rule
  • /analyze-field-impact for the matched fields

Read the full file on GitHub · 83 lines

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. 11d ago First seen · 83 lines · 0 tokens per session scan A 85f2db240b8f

Subscribe to this mod's changes

design-duplicate-rule is a command published in the GitHub repository BanibrataChatterjee/AwesomeSalesforceSkills (3 stars, last pushed 4mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 563 tokens. 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.