complexity-reduction SKILL.md skillA
complexity-reduction from rustyrazorblade/skills is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add rustyrazorblade/skills/complexity-reduction@git:20260903.4ff0cc0Pins git:20260903.4ff0cc0 in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- rustyrazorblade/skills
- Path
plugins/dev-skills/skills/complexity-reduction/SKILL.md- Versions recorded
- 1
- Latest version
- git:20260903.4ff0cc0, committed Sep 3, 2026
- Size
- 8,378 bytes
- Repository stars
- 44
- License
- Apache-2.0
Measure cognitive complexity and duplicate code with PMD (Java) or rust-code-analysis-cli (Rust), then reduce both by pure-move extraction, re-measuring after every step. Runs over a subsystem or over a PR diff. Use this when the user asks to simplify, refactor, clean up, or reduce the complexity of a subsystem, asks "how complex is X", asks to find duplicate code, asks to make code "beautiful", or asks for a complexity check on a diff or PR. It measures before it edits and re-measures after…
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# Complexity reduction, measured Reduce cognitive complexity and duplication in a **subsystem** or in a **diff**. Every claim is a number from a tool. Every edit is a pure move: behaviour identical, only the shape changes. Cognitive complexity **at or above 15** for one function marks a potential problem, in every language below. It is a threshold to report, not a rule to enforce. ## 1. Tools Pick the tool by language. Never report a number you did not measure. ### Java: `pmd` `pmd` (Homebrew: `brew install pmd`). Two of its commands matter. ```bash pmd check -R <skill dir>/pmd-complexity.xml --file-list <list> -f csv -r <out>.csv --no-progress pmd cpd --minimum-tokens 45 --language java --file-list <list> --format csv ``` `pmd-complexity.xml` beside this file enables CognitiveComplexity (report level 15), CyclomaticComplexity and NPathComplexity, and nothing else. ### Rust: `rust-code-analysis-cli` Install it with cargo. **`--locked` is required**: without it, v0.0.25 fails to compile, because the dependency graph resolves two different `tree-sitter` versions (0.20 expected, 0.27 found). ```bash cargo install --locked rust-code-analysis-cli ``` …
Read the whole file at its exact version.
How to install
mdr add rustyrazorblade/skills/complexity-reduction@sha256:4a367229c980dd58The line at the top of this page pins the label git:20260903.4ff0cc0, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_4tdwnt2u6z22ka2h)
5 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 1 version of this file, committed on Sep 3, 2026.
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (8378 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
rustyrazorblade/skills · 44 stars · license Apache-2.0 · pushed 2026-10-31 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_4tdwnt2u6z22ka2h GET https://markdownregistry.com/api/v1/resolve?ref=rustyrazorblade/skills/complexity-reduction GET https://markdownregistry.com/api/v1/blob/4a367229c980dd582a3fa1dd00d0254cc17ddd801e992cf0f1e3fe3b2ccd237f
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.