Agent skill

Reduce Similarities

by ccusage in ccusage/ccusage

Detects duplicated Rust code with the dev-shell similarity-rs CLI.

Custom licenceAuto-check passed

Install Reduce Similarities

skills CLI
$ npx skills add ccusage/ccusage --skill reduce-similarities -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ccusage/ccusage reduce-similarities --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ccusage/ccusage.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/reduce-similarities .claude/skills/reduce-similarities && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
reduce-similarities
GitHub stars
19k
Token cost
~431 tokens
SKILL.md length
173 words
Files
1
Skills in repo
17
Repo updated
First seen
Licence
Custom licence

At a glance

Detects duplicated Rust code with the dev-shell similarity-rs CLI.

  • Reviewing .rs files for repeated functions
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Parallel struct and enum definitions
  • Before extracting a shared helper

What it does

Reduce Similarities is an agent skill from ccusage/ccusage. Detects duplicated Rust code with the dev-shell similarity-rs CLI. Use when reviewing .rs files for repeated functions, impl methods, or parallel struct and enum definitions, or before extracting a shared helper.

Its SKILL.md is about 430 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It works with Rust.

When your agent uses it

  • Reviewing .rs files for repeated functions
  • Parallel struct and enum definitions
  • Before extracting a shared helper

Example prompts

  • “Use the reduce-similarities skill to detect duplicated Rust code with the dev-shell similarity-rs CLI”
  • “/reduce-similarities”

Requirements

  • Pre-approved tools (allowed-tools): Bash(similarity-rs *), Read, Grep, Glob

What it can do on your machine

Read from SKILL.md and the folder at commit 5ca8d8e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash(similarity-rs *)
    • Read
    • Grep
    • Glob

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are bash).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Reduce Similarities loads about 431 tokens when it runs. Until then it costs about 58 tokens; SKILL.md has 173 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~58
When it runs · the whole SKILL.md, loaded when a task matches
~431

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

Its licence (Custom licence) doesn't allow us to republish the file, so here is its outline and opening line. It has 173 words (~431 tokens).

“similarity-rs comes from the Nix dev shell (similarity in nix/dev-shell.nix); prefix it with direnv exec . from outside the shell. TypeScript duplication belongs to the typescript and ast-grep skills.”

— opening of SKILL.md by ccusage, Custom licence
name
reduce-similarities
allowed-tools
Bash(similarity-rs *), Read, Grep, Glob
argument-hint
[path] [--threshold 0.85] [--print]
paths
**/*.rs

Read the full SKILL.md on GitHub

Files

Just SKILL.md in .agents/skills/reduce-similarities of ccusage/ccusage.

Open the folder on GitHubat commit 5ca8d8e

Compare with similar skills

Reduce Similarities next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Reduce Similarities compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Reduce Similarities this skillccusage/ccusage19k—~431Automated safety check: PassCustom licence
Update V8 Versionopeninterpreter/openinterpreter69k2 repos~845Automated safety check: PassApache-2.0
Firecrawl Page Scrape Integrationfirecrawl/firecrawl190k1 repos~944Automated safety check: PassISC
Migrate Core Code to Submodulestinyhumansai/openhuman42k—~2.6kAutomated safety check: PassGPL-3.0
Rust TDD Workflowrtk-ai/rtk83k—~753Automated safety check: NotesApache-2.0
Rust Best Practicesfarm-fe/farm5.6k3 repos~1.1kAutomated safety check: PassMIT

Similar skills

  • Update V8 Version

    openinterpreter/openinterpreter

    Bumps the pinned v8 and rusty_v8 versions in Codex, validates the release-candidate path with the v8-canary check, and traces failures to upstream build changes.

    69k GitHub starsUsed in 2 repos~845 tokens
    DevOps & CloudAuto-check passed
  • Adds Firecrawl's /scrape endpoint to application code to pull markdown, HTML, links, screenshots or structured data from a single known URL.

    190k GitHub starsUsed in 1 repo~944 tokens
    Data & AnalyticsAuto-check passed
  • Migrate Core Code to Submodules

    tinyhumansai/openhuman

    Plans and carries out moving non-host-specific code and its tests from the OpenHuman core into vendored tiny submodule libraries, then releases the submodule and re-pins the host.

    42k GitHub stars~2.6k tokensUpdated today
    DevelopmentAuto-check passed
  • Enforces red-green-refactor for Rust work, with idiomatic test patterns, a naming convention and a pre-commit gate of cargo fmt, clippy and test.

    83k GitHub stars~753 tokensUpdated today
    Testing & QAAuto-check: notes
  • Guide for writing idiomatic Rust code based on Apollo GraphQL's best practices handbook.

    5.6k GitHub starsUsed in 3 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Decides whether an OpenLogi device problem on macOS is a privacy-permission (TCC) problem, using agent log lines, and says which identity needs which grant.

    23k GitHub stars~2.5k tokensUpdated 4 days ago
    DevelopmentAuto-check: notes

More from ccusage/ccusage

All 17 skills in this repo
  • Nushell

    ccusage/ccusage

    Guides ccusage Nushell scripts. An agent skill from ccusage/ccusage.

    19k GitHub stars~938 tokensUpdated today
    Auto-check passed
  • Rust Binary Size

    ccusage/ccusage

    Guides Rust binary size reduction for ccusage. An agent skill from ccusage/ccusage.

    19k GitHub stars~591 tokensUpdated today
    Auto-check passed
  • Skill Creator

    ccusage/ccusage

    Guides repo-local skill creation and updates. An agent skill from ccusage/ccusage.

    19k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • TDD

    ccusage/ccusage

    Guides t-wada Red-Green-Refactor TDD for ccusage logic changes.

    19k GitHub stars~665 tokensUpdated today
    Auto-check passed
  • Commit

    ccusage/ccusage

    Creates atomic Conventional Commits. An agent skill from ccusage/ccusage.

    19k GitHub stars~722 tokensUpdated today
    Auto-check passed
  • Create PR

    ccusage/ccusage

    Runs the full PR lifecycle. An agent skill from ccusage/ccusage.

    19k GitHub stars~646 tokensUpdated today
    Auto-check passed

Works with

Questions about Reduce Similarities

What does Reduce Similarities do?

Detects duplicated Rust code with the dev-shell similarity-rs CLI. Reduce Similarities is an agent skill from ccusage/ccusage. Detects duplicated Rust code with the dev-shell similarity-rs CLI.

When should I use Reduce Similarities?

Reduce Similarities fits situations like: reviewing .rs files for repeated functions; parallel struct and enum definitions; before extracting a shared helper.

How do I install Reduce Similarities in Claude Code?

Run `npx skills add ccusage/ccusage --skill reduce-similarities -a claude-code`. Or copy the skill folder (.agents/skills/reduce-similarities in ccusage/ccusage) into .claude/skills/reduce-similarities in your project. Claude Code loads it when a task matches its description.

How do I install Reduce Similarities in Codex?

Run `npx skills add ccusage/ccusage --skill reduce-similarities -a codex`. Or copy the skill folder (.agents/skills/reduce-similarities in ccusage/ccusage) into .agents/skills/reduce-similarities in your project. Codex loads it when a task matches its description.

Can I use Reduce Similarities in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ccusage/ccusage --skill reduce-similarities -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/reduce-similarities, .gemini/skills/reduce-similarities, .github/skills/reduce-similarities and .opencode/skills/reduce-similarities in your project.

What does Reduce Similarities need to run?

SKILL.md names no scripts, command-line tools or credentials: Reduce Similarities is instructions for the agent only. Its frontmatter pre-approves these tools: Bash(similarity-rs *), Read, Grep, Glob.

Does Reduce Similarities access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Reduce Similarities safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Reduce Similarities use?

Reduce Similarities has a licence file (the repository's licence) that doesn't match a standard licence. Read it on GitHub before reusing the skill.

How many tokens does Reduce Similarities use?

About 431 tokens (SKILL.md is roughly 1.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Reduce Similarities?

Skills that share tags, products or a category with Reduce Similarities: Update V8 Version (openinterpreter/openinterpreter, 69k stars), Firecrawl Page Scrape Integration (firecrawl/firecrawl, 190k stars), Migrate Core Code to Submodules (tinyhumansai/openhuman, 42k stars) and Rust TDD Workflow (rtk-ai/rtk, 83k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Reduce Similarities?

ccusage (a GitHub organization) maintains it in ccusage/ccusage, which has 18,912 GitHub stars. The repository holds 17 skills in this directory. The repository was last updated on October 8, 2026.

Source: ccusage/ccusage on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.