Borrowing it
Nothing to install: this file belongs to nwiizo/cargo-coupling. 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/nwiizo/cargo-coupling/main/.claude/skills/similarity/SKILL.mdgit clone --depth 1 https://github.com/nwiizo/cargo-couplingWrote 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/nwiizo/cargo-coupling/similarity)<a href="https://agentmods.dev/skills/nwiizo/cargo-coupling/similarity"><img src="https://agentmods.dev/badge/skills/nwiizo/cargo-coupling/similarity/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/nwiizo/cargo-coupling/similarity"><img src="https://agentmods.dev/badge/skills/nwiizo/cargo-coupling/similarity.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 7 findings, up to high
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- high Tool Misuse · line 4 Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
- high Tool Misuse · line 25 Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
- high Tool Misuse · line 31 Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
- high Tool Misuse · line 37 Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
- high Tool Misuse · line 48 Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
- high Tool Misuse · line 65 Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
- high Tool Misuse · line 76 Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
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.00000 | $0.00579 |
| Opus 5 | $0.00000 | $0.00290 |
| Sonnet 5 | $0.00000 | $0.00116 |
| Haiku 4.5 | $0.00000 | $0.00058 |
Grade A, and why
similarity 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 7d 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
Similarity - Code Similarity Analysis
Execution Steps
- Run
similarity-rsto detect code similarities - Analyze detected duplicates (95%+: immediate, 85-95%: review)
- Create refactoring plan
Commands
# Basic scan
similarity-rs ./src
# With threshold
similarity-rs ./src --threshold 0.85
# Skip test functions
similarity-rs ./src --skip-test
# Show code in output
similarity-rs ./src --print
# Strict detection (95%+)
similarity-rs ./src --threshold 0.95 --skip-test
# Include type similarity
similarity-rs ./src --experimental-types
# CI integration
similarity-rs ./src --threshold 0.95 --skip-test --fail-on-duplicates
Options
| Option | Description | Default |
|---|---|---|
-t, --threshold |
Similarity threshold (0.0-1.0) | 0.85 |
-m, --min-lines |
Minimum lines | 3 |
--min-tokens |
Minimum tokens | 30 |
-p, --print |
Show code in output | - |
--skip-test |
Skip test functions | - |
--exclude |
Exclude directories | - |
--experimental-types |
Check type similarity | - |
--fail-on-duplicates |
Exit 1 if duplicates found | - |
Interpretation
| Similarity | Category | Action |
|---|---|---|
| 95%+ | Near-exact duplicate | Extract to common function |
| 85-95% | Structural similarity | Consider generics/traits |
| < 85% | Possible false positive | Review manually |
Workflow with cargo-coupling
# 1. Detect similar code
similarity-rs ./src --threshold 0.85 --skip-test
# 2. Check coupling impact
cargo run -- coupling ./src
# 3. Visualize in Web UI
cargo run -- coupling --web ./src
Recommended Workflow
- Initial scan:
similarity-rs . --threshold 0.8 --skip-test - Detailed analysis:
similarity-rs ./src --threshold 0.95 --print - Type check:
similarity-rs ./src --experimental-types --threshold 0.85
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.
- 7d ago First seen · 79 lines · 0 tokens per session scan A d01aa9372438
similarity is a skill published in the GitHub repository nwiizo/cargo-coupling (96 stars, last pushed 4d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 579 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-09-01.
Other skills, from other repositories
autoreview
Pre-commit/ship code review: Codex default; optional Claude or Pi.
rework-rate
Measure and interpret PR rework rate — the emerging 5th DORA metric.
omh-code-review
This is a Hermes-native code-review workflow skill.
revdiff-plan
Review the last Codex assistant message (plan, analysis, or proposal) with inline annotations in a TUI overlay. Extracts the most recent response from Codex rollout files and opens it in revdiff for review and annotation. Activates on "revdiff-plan", "review plan with revdiff", "annotate plan", "review last response"…
code-reviewer
Code review specialist focused on patterns, bugs, security, and performance.
agent-teams-simplify-and-harden
Implementation + audit loop using parallel agent teams with structured simplify, harden, and document passes. Spawns implementation agents to do the work, then audit agents to find complexity, security gaps, and spec deviations, then loops until code compiles cleanly, all tests pass, and auditors find zero issues or…