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 skills/sponge-b0b/polaris/deduplicate-codenpx skills add sponge-b0b/Polaris --skill deduplicate-codegit clone --depth 1 https://github.com/sponge-b0b/PolarisWrote 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/sponge-b0b/polaris/deduplicate-code)<a href="https://agentmods.dev/skills/sponge-b0b/polaris/deduplicate-code"><img src="https://agentmods.dev/badge/skills/sponge-b0b/polaris/deduplicate-code.svg" alt="Measured on agentmods" 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 | $0.00038 | $0.00446 |
| Opus 5 | $0.00019 | $0.00223 |
| Sonnet 5 | $0.00008 | $0.00089 |
| Haiku 4.5 | $0.00004 | $0.00045 |
Grade A, and why
deduplicate-code 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 4d 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.
What it actually says
Code Duplication Checks
Objective
Prevent codebase bloat and guard against split-brain logic by identifying existing equivalent code or structural patterns before introducing new helper files or utilities.
Guardrail Constraints
- Single Source of Truth: Do not create a new helper function, service locator, or wrapper module until existing codebase logic has been explicitly audited and ruled out.
- Architectural Boundary: Stop immediately if an analysis shows two separate components attempting to claim authoritative ownership over the same business domain or calculation rule.
Execution Steps
Execute these duplication scanning tools over the workspace target paths before mapping out a refactor or utility extraction:
Step 1: Python Native Structural Scan
Run arid to scan recursively for cloned Python blocks:
arid .
Step 2: Token Sequence Scan
Run jscpd across the repository root to catch structural code clones, configuration layer mirroring, or copy-pasted blocks across different layers:
jscpd .
Step 3: Analysis & Consolidation Rule
- Review the matching lines or token arrays reported by the tooling.
- If a matching helper sequence already exists in the repository, refactor the active code block to safely inherit or consume the existing canonical interface instead of creating a parallel implementation.
Examples
Example 1: Pre-Refactor Analysis Trigger
User: "I want to extract some utility functions for formatting these metrics before writing the plan." Agent Response: "I am triggering the duplication-checks skill via arid and jscpd to verify if equivalent metrics layout logic already exists in the codebase before we design a new helper module." Agent Execution:
arid .
jscpd .
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.
- 4d ago First seen · 50 lines · 38 tokens per session scan A 58bccdeebbb1
deduplicate-code is a skill published in the GitHub repository sponge-b0b/Polaris (4 stars, last pushed today), licensed Apache-2.0. It adds 38 tokens to every session and 446 once invoked, about $0.0002 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 skills, from other repositories
nornweave-api
Give AI agents their own email inboxes using the NornWeave API. Use when building email agents, sending/receiving emails programmatically, managing inboxes, retrieving threads, searching messages, or integrating with email providers (Mailgun, SES, SendGrid, Resend). NornWeave provides LLM-ready markdown parsing and…
commit-push
Commit and push the changes made on this chat session to the current branch. Use best practices from Conventional Commits.
commit
Commit the changes made on this chat session to the current branch. Use best practices from Conventional Commits.
hybrid-ralph
Hybrid architecture combining Ralph's PRD format with Planning-with-Files' structured approach. Auto-generates PRDs from task descriptions, manages parallel story execution with dependency resolution, and provides context-filtered agents for efficient multi-story development.
mega-plan
Project-level multi-task orchestration system. Manages multiple hybrid:worktree features in parallel with dependency resolution, coordinated PRD generation, and unified merge workflow.
planning-with-files
Implements Manus-style file-based planning for complex tasks. Creates taskplan.md, findings.md, and progress.md. Use when starting complex multi-step tasks, research projects, or any task requiring >5 tool calls. Now with automatic session recovery after /clear and optional Git worktree mode.