clean-crap
Measure JavaScript and TypeScript function complexity, join LCOV test coverage, compute CRAP scores, and gate delivery on a threshold.
Skill by pedrosatin
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/pedrosatin-clean-crap
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: testing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Node.js package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/clean-crap
What's inside
- Skill name
clean-crap- Description
- Measure JavaScript and TypeScript function complexity, join LCOV test coverage, compute CRAP scores, and gate delivery on a threshold. Use when running /clean-crap or as a deterministic complexity-and-coverage check before code review.
- License
- MIT
- Instructions
- 38 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Files (7)
- .gitignore
- SKILL.md
- example.ts · fixtures/
- package-lock.json
- package.json
- clean-crap.mjs · scripts/
- cli.test.mjs · test/
SKILL.md (first lines)
# clean-crap Run the bundled CLI against the target project. Install the skill-local dependency once, then run from any directory: ```sh npm ci --prefix /path/to/skills/clean-crap node /path/to/skills/clean-crap/scripts/clean-crap.mjs --root /path/to/project ``` Flags, coverage modes, threshold, positional path filters, and exit codes live in `node /path/to/skills/clean-crap/scripts/clean-crap.mjs --help`. CRAP = complexity² × (1 − coverage)³ + complexity. Only entries with numeric CRAP gate; null-CRAP entries never fail. ## Parser The TypeScript parser reports top-level functions, variable-assigned functions/arrows, and class methods/accessors/constructors/property arrows. Nested callbacks and local functions increment the enclosing entry; they are not separate report rows. Complexity starts at 1 and increments for each if, loop, catch, ternary, switch label including default, logical `&&`, `||`, `??`, and explicit `?.` operation. Sources include `.ts`, `.tsx`, `.js`, `.jsx`, `.mts`, `.cts`, `.mjs`, and `.cjs`. Dependencies, generated output, declarations, test files, and `.worktrees/` copies are excluded by default. ## Coverage join LCOV is discovered as `*.info` files under any directory named `coverage` below the root. Multiple files merge per source path; later files win on overlapping line and function records. `SF:` paths may be absolute, or relative to the directory that contains the `coverage` folder. Per-entry coverage prefers `DA:` line records inside the entry's line range (covered lines / total instrumented lines in range). When the file has no DA records in range, it falls back to binary `FNDA:` function hit counts (exact name or last `.`/`#` segment match). Entries whose file has no LCOV section keep null coverage. ## Git selection `--changed` limits analysis to files added, modified, untracked, or unmerged in git. The root must be inside a git repository. Deletions are excluded. Renamed files count under their new path. The filter intersects with positional path arguments. `--since <revision>` selects files changed from the revision’s merge-base with HEAD through HEAD, plus current staged, unstaged, and untracked changes. Use it for committed delivery work and subsequent corrections. It excludes deletions, uses rename destinations, and intersects positional filters. Choose either `--since` or `--changed`. ## Report The CLI writes `<root>/.metrics/crap.json`. `.metrics/` is a local untracked artifact: keep it ignored and never commit it. Use the report to choose a small refactor, then run the project's existing tests and regenerate. Reduce CRAP by splitting complex functions or adding tests that exercise uncovered branches.
From pedrosatin/skills, MIT.
More from pedrosatin/skills
- 0.570score
humanizer
pedrosatin
Rewrite AI-sounding English prose so it reads like the writer without changing what it says.
SkillAFreshness: AClaude Code +9 - 0.570score
validate-agent-config
pedrosatin
Validate the machine's agent configuration: instruction files (CONTEXT.md, AGENTS.md, CLAUDE.md, GEMINI.md), symlinks, @ imports, skill frontmatter, and…
SkillAFreshness: AClaude Code +9 - 0.567score
setup
pedrosatin
Initialize a project for local specs and tickets: scaffolds .scratch/, domain docs, and AGENTS.md, checks graphify, and generates the HTML Project Hub.
SkillAFreshness: AClaude Code +9 - 0.567score
board
pedrosatin
Open the project board (Project Hub at .scratch/index.html) in the default browser.
SkillAFreshness: AClaude Code +9 - 0.565score
pr-description
pedrosatin
Draft a local PR body from the diff and observed validation, or create/edit the remote PR with evidence attachments.
SkillAFreshness: AClaude Code +9 - 0.561score
unslop-br
pedrosatin
Remove vícios de linguagem de IA (AI slop), clichês, gerundismos e estruturas artificiais em Português Brasileiro (PT-BR).
SkillAFreshness: AClaude Code +9 - 0.561score
pr-loop
pedrosatin
Deliver one backlog item through /pr-loop: implement, clean, verify, review, correct, then publish and merge with authorization.
SkillAFreshness: AClaude Code +9 - 0.560score
graphify
pedrosatin
Use when exploring or asking questions about a codebase, its architecture, file relationships, or project content — especially when graphify-out/ exists…
SkillAFreshness: AClaude Code +9 - 0.558score
babysit-prs
pedrosatin
Review open PRs in the current repository, merge the safe ones, and leave a draft comment on the rest.
SkillAFreshness: AClaude Code +9 - 0.539score
publication-hygiene
pedrosatin
Validate Git commits, pushes, and GitHub pull-request activity before publishing, removing agent provenance and operational WIP while preserving product…
SkillAFreshness: AClaude Code +9 - 0.539score
grilling
pedrosatin
Grill the user relentlessly about a plan, decision, or idea.
SkillAFreshness: AClaude Code +9 - 0.536score
to-tickets
pedrosatin
Break a plan, spec, or the current conversation into a set of tracer-bullet tickets, each declaring its blocking edges, published to the configured tracker…
SkillAFreshness: AClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Oct 12, 2026 (16 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/pedrosatin/skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from pedrosatin
- 0.570score
validate-agent-config
pedrosatin
Validate the machine's agent configuration: instruction files (CONTEXT.md, AGENTS.md, CLAUDE.md, GEMINI.md), symlinks, @ imports, skill frontmatter, and…
SkillAFreshness: AClaude Code +9 - 0.570score
humanizer
pedrosatin
Rewrite AI-sounding English prose so it reads like the writer without changing what it says.
SkillAFreshness: AClaude Code +9 - 0.567score
board
pedrosatin
Open the project board (Project Hub at .scratch/index.html) in the default browser.
SkillAFreshness: AClaude Code +9 - 0.567score
setup
pedrosatin
Initialize a project for local specs and tickets: scaffolds .scratch/, domain docs, and AGENTS.md, checks graphify, and generates the HTML Project Hub.
SkillAFreshness: AClaude Code +9 - 0.565score
pr-description
pedrosatin
Draft a local PR body from the diff and observed validation, or create/edit the remote PR with evidence attachments.
SkillAFreshness: AClaude Code +9 - 0.561score
unslop-br
pedrosatin
Remove vícios de linguagem de IA (AI slop), clichês, gerundismos e estruturas artificiais em Português Brasileiro (PT-BR).
SkillAFreshness: AClaude Code +9
Cite this page
clean-crap skill. Agent Mart. https://agentmart.dev/skills/pedrosatin-clean-crap (last updated 2026-10-24)