adeu: Skill for OpenCode

.opencode/skills/check-duplication/SKILL.md

check-duplication is a skill for OpenCode from dealfluence/adeu. It costs 18 tokens per session (261 once invoked), scanned A, original, MIT.

A procedure for finding repeated code in Python, TypeScript, and JavaScript projects and combining suitable duplicates into shared helpers.

In plain words
What is it for?
Scanning for duplicate blocks, extracting shared logic when it is used often enough, and running tests, builds, or type checks afterward.
Why use it?
It reduces repeated code while requiring checks that the changes do not alter behavior.

Skill for OpenCode

Written for OpenCode: installed under .opencode/.

This is dealfluence/adeu's own configuration. It tells OpenCode how to work on adeu itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything adeu configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is uv run python scripts/check_code_duplication.py -m 6 -n 20.

Reuse

Borrowing it

Nothing to install: this file belongs to dealfluence/adeu. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/dealfluence/adeu/main/.opencode/skills/check-duplication/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/dealfluence/adeu

Made for: OpenCode.

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 check-duplication

README.md
[![agentmods](https://agentmods.dev/badge/skills/dealfluence/adeu/check-duplication/github.svg)](https://agentmods.dev/skills/dealfluence/adeu/check-duplication)
Your own site
<a href="https://agentmods.dev/skills/dealfluence/adeu/check-duplication"><img src="https://agentmods.dev/badge/skills/dealfluence/adeu/check-duplication/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 check-duplication

Your own site · 80×15
<a href="https://agentmods.dev/skills/dealfluence/adeu/check-duplication"><img src="https://agentmods.dev/badge/skills/dealfluence/adeu/check-duplication.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 18 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 261 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00018 $0.00261
Opus 5.5 $0.00007 $0.00104
Sonnet 5.5 $0.00004 $0.00052
Haiku 4.5 $0.00002 $0.00026

Measured 2mo ago against content hash d779f1a2aec0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

check-duplication 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 2mo 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.

.opencode/skills/check-duplication/SKILL.md · 32 lines

What it actually says

Check Code Duplication Skill

This skill provides a systematic approach to finding and pruning duplicate code blocks and repeated boilerplate across Python, TypeScript, and JavaScript source files.

Workflow

  1. Run the Duplication Spotter: Execute python scripts/check_code_duplication.py to identify duplicate code blocks:

    uv run python scripts/check_code_duplication.py -m 6 -n 20
    
  2. Target High-Score Duplications: Focus on blocks with high duplication scores (lines $\times$ occurrences) in source modules.

  3. Prune & Deduplicate:

    • Extract repeated boilerplate or constructor patterns into shared helper functions.
    • Collapse repeated dictionary/object constructions into helper functions.
    • Maintain 3+ call sites requirement for new abstractions.
  4. Verify Behavior: Always run test suites to ensure zero functional regressions:

    • Python: uv run pytest & uv run mypy src
    • Node: npm run build && npm test
    • LangChain: uv run pytest in langchain
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. 2mo ago First seen · 32 lines · 18 tokens per session scan A d779f1a2aec0

Subscribe to this mod's changes

check-duplication is a skill published in the GitHub repository dealfluence/adeu (169 stars, last pushed 3d ago), licensed MIT. It adds 18 tokens to every session and 261 once invoked, about $0.0001 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-30.

Related

Other skills, from other repositories

lsp-mcp-server

Use with Codex, Claude Code, or another MCP client when lsp-mcp-server is connected and semantic code navigation, analysis, refactoring, or diagnostics are needed. Covers all 29 lsp tools for TypeScript, Python, Rust, Go, C/C++, Ruby, PHP, Elixir, Kotlin, Java, and user-configured languages. Prefer these tools to text…

ProfessioneIT/lsp-mcp-server · 108 tokens

lain

Structural code intelligence for AI coding agents. Use this skill when the user wants to understand how a codebase is organized (modules, call graphs, file dependencies), find where to start reading, trace the impact of a change, find code by meaning, or understand what a symbol does in its full context. Do NOT use…

spuentesp/lain · 90 tokens

explore

Build an accurate mental model of an unfamiliar codebase, feature, or area before changing it — where it lives, how it connects, what it does, and why. Use when asked how something works, where something is, when onboarding to a repo, or before editing code you don't know. For a cross-cutting question that needs…

TheWinci/mimirs · 79 tokens

debug

Trace a bug, error, or regression to its root cause. Use when investigating a failure, a stack trace, unexpected behavior, or "why does X happen".

TheWinci/mimirs · 35 tokens

lain-architecture

Use for system-shape questions through Lain — "map this subsystem", "compare these modules", "trace the dependency chain", "how deep is this in the stack", "where is the god object", "run a raw graph query". Covers the arch and raw packages.

spuentesp/lain · 60 tokens

lain-comprehension

Use when reading, locating, or assessing code through Lain's MCP tools — "where is X", "explain this", "what breaks if I change this", "what should I read first", "is this answer trustworthy". Covers the default core surface and the honest-answer contract.

spuentesp/lain · 63 tokens