Agent skill

Review Reuse And Dedup

by compartmentdev in compartmentdev/compartment

A skill your agent uses when reviewing compartment repo changes for existing helper reuse, extractable pure utilities, duplicated logic, repeated constants, hardcoded values, or repeated variable…

Apache-2.0Auto-check passedDevOps & Cloud

Install Review Reuse And Dedup

skills CLI
$ npx skills add compartmentdev/compartment --skill review-reuse-and-dedup -a claude-code

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

GitHub CLI
$ gh skill install compartmentdev/compartment review-reuse-and-dedup --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/compartmentdev/compartment.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.codex/skills/review-reuse-and-dedup .claude/skills/review-reuse-and-dedup && 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
review-reuse-and-dedup
GitHub stars
206
Token cost
~753 tokens
SKILL.md length
347 words
Files
2
Skills in repo
12
Repo updated
First seen
Licence
Apache-2.0

At a glance

A skill your agent uses when reviewing compartment repo changes for existing helper reuse, extractable pure utilities, duplicated logic, repeated constants, hardcoded values, or repeated variable…

  • Reviewing compartment repo changes for existing helper reuse
  • SKILL.md covers Overview, What to Check, Review Rules and Sources to Inspect
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Extractable pure utilities

What it does

Review Reuse And Dedup is an agent skill from compartmentdev/compartment. Use when reviewing compartment repo changes for existing helper reuse, extractable pure utilities, duplicated logic, repeated constants, hardcoded values, or repeated variable derivations that should be simplified in the owning package or packages/utils.

Its SKILL.md is about 750 tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `agents/openai.yaml`).

It sits in DevOps & Cloud. It works with Docker. The repository describes itself as: Compartment is a self-hosted deployment system for small software on infrastructure your team controls. The licence is Apache-2.0.

When your agent uses it

  • Reviewing compartment repo changes for existing helper reuse
  • Extractable pure utilities
  • Duplicated logic
  • Repeated constants

Example prompts

  • “/review-reuse-and-dedup”

Requirements

  • Docker

What it can do on your machine

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

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    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

Review Reuse And Dedup loads about 753 tokens when it runs. Until then it costs about 69 tokens; SKILL.md has 347 words of instructions outside code blocks.

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

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

The full file from compartmentdev/compartment at commit 15373e7, republished under its Apache-2.0 licence (© compartmentdev). 347 words, ~753 tokens.

Download SKILL.mdSave it as .claude/skills/review-reuse-and-dedup/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
review-reuse-and-dedup
description
Use when reviewing compartment repo changes for existing helper reuse, extractable pure utilities, duplicated logic, repeated constants, hardcoded values, or repeated variable derivations that should be simplified in the owning package or packages/utils.

Review Reuse and Dedup

Overview

Review a change for unnecessary repetition and missed reuse. The goal is to find actionable simplifications that make the changed code smaller and more canonical without turning packages/utils into a dumping ground.

What to Check

  • Existing helpers or constants that should be used instead of reimplementing equivalent logic.
  • Repeated parsing, normalization, formatting, URL construction, string handling, env handling, or primitive predicates.
  • Duplicated literals such as route paths, header names, status names, env keys, magic numbers, file paths, and error strings.
  • Repeated variable derivations or branching rules that could be named once in the owning layer.
  • New helpers that are pure, primitive, cross-package, and already shared enough to belong in packages/utils.
  • Package-specific helpers that should stay adjacent to the owning API, CLI, worker, edge, docker, kube-runtime, SDK, or contracts layer.

Review Rules

  • Prefer using an existing exported helper before suggesting a new helper. Name the export and file path when one exists.
  • Suggest packages/utils only for tiny pure helpers over primitive runtime values with no DTO, DB, transport, protocol, or business ownership.
  • Prefer package-local extraction for repeated domain rules, command formatting, HTTP mapping, DTO shaping, or layer-owned constants.
  • Do not suggest extracting one-off expressions, obvious inline code, or speculative abstractions.
  • Do not report a duplicate unless the suggested replacement is clearer and meaningfully reduces repeated behavior or contract drift.
  • Treat tests like production only when the duplication hides intent or repeats a nontrivial fixture/helper that should be shared by the owning test harness.
  • If confidence is below 0.7, do not report a finding.

Sources to Inspect

  • packages/utils/src/index.ts and the exported helper source files.
  • The changed files and their neighboring helpers in the same package.
  • packages/api/test/api-db-test.harness.ts before allowing per-file DB lifecycle setup in API tests.
  • packages/api/test/api-auth-session-test.fixtures.ts before allowing file-local auth/session test helpers in API tests.
  • packages/test-support/src/api-migrations.ts before allowing local migration wrappers in API or CLI tests.
  • packages/cli/test/self-hosted-user-setup.e2e.harness.ts and neighboring self-hosted-user-setup*.harness.ts files before allowing per-file self-hosted user-flow e2e bootstrap, CLI login, app probe, or polling code.
  • docs/layers/utils.md before recommending a cross-package utility.
  • The relevant layer doc for any package where extraction or reuse is suggested.

© compartmentdev, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in .codex/skills/review-reuse-and-dedup of compartmentdev/compartment.

  • SKILL.md
  • agents/openai.yaml

Open the folder on GitHubat commit 15373e7

Compare with similar skills

Review Reuse And Dedup 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.

Review Reuse And Dedup compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Review Reuse And Dedup this skillcompartmentdev/compartment206—~753Automated safety check: PassApache-2.0
Os Usagegoinfinite/os361—~4.8kAutomated safety check: NotesGPL-2.0
Pi K8s Deployrodrigorodrigues/microservices-design-patterns187—~1.6kAutomated safety check: PassNone
Openbiliclaw Adapterwhiteguo233/OpenBiliClaw3.4k—~2.2kAutomated safety check: PassMIT
Setup Cpu Proxy Serverdrawthingsai/draw-things-community584—~3.8kAutomated safety check: PassGPL-3.0
AI ServerOpentrons/opentrons523—~2.5kAutomated safety check: NotesApache-2.0

Similar skills

  • Os Usage

    goinfinite/os

    A skill your agent uses when deploying or managing applications on an Infinite OS instance — maps the dashboard, CLI, and REST API, and gives the core deployment workflows.

    361 GitHub stars~4.8k tokensUpdated today
    DevOps & CloudAuto-check: notes
  • Pi K8s Deploy

    rodrigorodrigues/microservices-design-patterns

    Check Docker Hub for a new :latest image on a managed service and roll it out to the home Pi k8s cluster, the same way authentication-service was deployed on 2026-08-29 (SSH + kubectl rollout…

    187 GitHub stars~1.6k tokensUpdated 21 days ago
    DevOps & CloudAuto-check passed
  • Openbiliclaw Adapter

    whiteguo233/OpenBiliClaw

    Use OpenBiliClaw's versioned Agent Bridge CLI to read multi-source recommendations, profile state, dialogue, probes, saved lists, and submit explicit feedback.

    3.4k GitHub stars~2.2k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Setup Cpu Proxy Server

    drawthingsai/draw-things-community

    Set up and verify a new Draw Things CPU proxy and Envoy server using the scripts in Scripts/ServerManagement/CPUScript.

    584 GitHub stars~3.8k tokensUpdated today
    DevOps & CloudAuto-check passed
  • AI Server

    Opentrons/opentrons

    Conventions for the opentrons-ai-server FastAPI service — project structure, uv dependency management, settings, testing, Docker, and deployment.

    523 GitHub stars~2.5k tokensUpdated today
    DevOps & CloudAuto-check: notes
  • Monstermq Broker Config

    vogler75/monster-mq

    Guide for configuring, deploying, and operating the MonsterMQ broker.

    143 GitHub stars~2.2k tokensUpdated today
    DevOps & CloudAuto-check passed

More from compartmentdev/compartment

All 12 skills in this repo
  • Audit Type Ownership

    compartmentdev/compartment

    Audit type ownership and boundary placement in the compartment repo: misplaced or duplicated types, query/service leaks, root export surface, and phased move plans.

    206 GitHub stars~745 tokensUpdated 1 mo ago
    Auto-check passed
  • Open PR And Monitor

    compartmentdev/compartment

    Open or reuse a repo PR and monitor it with a five-minute Codex heartbeat until it is ready, terminal, or blocked.

    206 GitHub stars~470 tokensUpdated 1 mo ago
    Auto-check passed
  • Review A Change

    compartmentdev/compartment

    A skill your agent uses when the user invokes $review-a-change or asks for a compartment repo code review; always use the delegated subagent review path by splitting review into separate parallel…

    206 GitHub stars~1.6k tokensUpdated 1 mo ago
    Auto-check passed
  • Compartment Smoke Test

    compartmentdev/compartment

    Run or delegate a browser-first smoke test of the local compartment through browser-use as a real user: boot or reuse the local stack, install or log in, deploy the repo smoke fixtures, verify CLI…

    206 GitHub stars~2.1k tokensUpdated 1 mo ago
    Auto-check: notes
  • Develop A Feature

    compartmentdev/compartment

    Implement repo changes by starting with preflight feature review, then editing the smallest owning surface on one canonical path and running only diff-triggered checks.

    206 GitHub stars~554 tokensUpdated 1 mo ago
    Auto-check passed
  • Public Docs Maintenance

    compartmentdev/compartment

    Maintain the public Starlight docs site for material changes to shipped Compartment workflows, using generated reference where possible and concise task- and decision-focused guides elsewhere.

    206 GitHub stars~1.3k tokensUpdated 1 mo ago
    Auto-check passed

Works with

Questions about Review Reuse And Dedup

What does Review Reuse And Dedup do?

A skill your agent uses when reviewing compartment repo changes for existing helper reuse, extractable pure utilities, duplicated logic, repeated constants, hardcoded values, or repeated variable…. Review Reuse And Dedup is an agent skill from compartmentdev/compartment. Use when reviewing compartment repo changes for existing helper reuse, extractable pure utilities, duplicated logic, repeated constants, hardcoded values, or repeated variable derivations that should be simplified in the owning package or packages/utils.

When should I use Review Reuse And Dedup?

Review Reuse And Dedup fits situations like: reviewing compartment repo changes for existing helper reuse; extractable pure utilities; duplicated logic; repeated constants.

How do I install Review Reuse And Dedup in Claude Code?

Run `npx skills add compartmentdev/compartment --skill review-reuse-and-dedup -a claude-code`. Or copy the skill folder (.codex/skills/review-reuse-and-dedup in compartmentdev/compartment) into .claude/skills/review-reuse-and-dedup in your project. Claude Code loads it when a task matches its description.

How do I install Review Reuse And Dedup in Codex?

Run `npx skills add compartmentdev/compartment --skill review-reuse-and-dedup -a codex`. Or copy the skill folder (.codex/skills/review-reuse-and-dedup in compartmentdev/compartment) into .agents/skills/review-reuse-and-dedup in your project. Codex loads it when a task matches its description.

Can I use Review Reuse And Dedup 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 compartmentdev/compartment --skill review-reuse-and-dedup -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/review-reuse-and-dedup, .gemini/skills/review-reuse-and-dedup, .github/skills/review-reuse-and-dedup and .opencode/skills/review-reuse-and-dedup in your project.

What does Review Reuse And Dedup need to run?

SKILL.md names no scripts, command-line tools or credentials: Review Reuse And Dedup is instructions for the agent only. Our summary lists: Docker.

Does Review Reuse And Dedup 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 Review Reuse And Dedup 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 Review Reuse And Dedup use?

Review Reuse And Dedup is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Review Reuse And Dedup use?

About 753 tokens (SKILL.md is roughly 3k 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 Review Reuse And Dedup?

Skills that share tags, products or a category with Review Reuse And Dedup: Os Usage (goinfinite/os, 361 stars), Pi K8s Deploy (rodrigorodrigues/microservices-design-patterns, 187 stars), Openbiliclaw Adapter (whiteguo233/OpenBiliClaw, 3.4k stars) and Setup Cpu Proxy Server (drawthingsai/draw-things-community, 584 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Review Reuse And Dedup?

compartmentdev (a GitHub organization) maintains it in compartmentdev/compartment, which has 206 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on August 20, 2026.

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