kramme-cc-workflow/skills/kramme:code:cleanup-ai/SKILL.md
Remove AI-generated code slop from a branch. Use when cleaning up AI-generated code, removing unnecessary comments, defensive checks, or type casts. Checks the branch diff against the resolved base and fixes style inconsistencies. Not for generated, vendored, lockfile, snapshot, or `*.d.ts` files.
npx skillsauth add abildtoft/kramme-cc-workflow kramme:code:cleanup-aiInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
4 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill uses the kramme:deslop-reviewer agent to identify AI slop in the branch's diff against a base, then applies the agent's recommended fixes.
Sibling: this is the AI-slop-specific pass via kramme:deslop-reviewer; for a general simplification pass on the same post-feature branch, use kramme:code:refactor-pass.
Parse $ARGUMENTS before the preconditions. If --auto is present, set AUTO_MODE=true and remove the flag before base-branch resolution. --auto applies medium-confidence cleanup findings automatically; it does not bypass dirty-worktree protection or behavior/API/test-expectation safeguards.
Run git status --porcelain. If the working tree is dirty and AUTO_MODE=true, stop with MISSING REQUIREMENT: working tree is dirty; rerun without --auto to decide whether to continue. If the working tree is dirty and AUTO_MODE is false, confirm with the user before continuing — the skill's edits will land alongside theirs in git diff and will be hard to separate when reverting.
Resolve the base branch — try these sources in order; use the first non-empty value:
gh pr view --json baseRefName --jq '.baseRefName' 2>/dev/nullgit symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@'Assign the result to BASE_BRANCH with any leading origin/ stripped, then validate and fetch:
git check-ref-format --branch "$BASE_BRANCH" && \
git fetch origin "refs/heads/${BASE_BRANCH}:refs/remotes/origin/${BASE_BRANCH}" && \
git rev-parse --verify --quiet "origin/$BASE_BRANCH"
On failure, stop and ask the user to re-run with the base branch as the skill argument.
Scan for slop
If git diff origin/$BASE_BRANCH...HEAD is empty, report "no branch changes to review" and stop.
Launch kramme:deslop-reviewer in code review mode against git diff origin/$BASE_BRANCH...HEAD.
Filter the findings
Discard any finding whose file is generated, vendored, a lockfile, a snapshot, or *.d.ts before deciding what to fix.
Apply fixes by confidence
The agent scores findings 0–100. Apply the agent's specific recommendation per finding — do not pattern-match generically:
AUTO_MODE=true, apply automatically and count it separately as medium-confidence auto-applied.Leave a finding unchanged when applying it would alter test expectations, public APIs, or behavior the agent itself flagged as possibly intentional.
Report
1–3 sentences: which files were edited, plus counts for applied / confirmed / skipped / filtered.
development
Runs kramme:pr:code-review as a closeout review loop for local or PR branch changes before commit, ship, or final response. Use when the user asks for autoreview, second-model review, or a final code-review pass after non-trivial edits. Not for UX, visual, accessibility, or product review.
development
Guides topic-level understanding verification for a PR, branch, feature, document, spec, design decision, bug fix, or other concrete subject. Use when the user asks to confirm, quiz, drill, teach-and-check, or verify that they understand a topic. Maintains a topic-specific checklist artifact and requires demonstrated understanding before marking the topic complete. Not for ordinary explanations without verification, end-of-session summaries, or code/test correctness checks.
testing
Design a CI/CD pipeline with quality gates, a <10-minute budget, feature-flag lifecycle, and an exit checklist. Use when adding a new CI pipeline, changing gate configuration, or planning a rollout for a new service. Complementary to kramme:pr:fix-ci (which fixes failures in an existing pipeline). Covers gate ordering, secrets storage, branch protection, rollback mechanism, and staged-rollout guardrails — not a rollout-execution runbook.
tools
--- name: kramme:visual:demo-reel description: Capture local demo evidence for observable product behavior: screenshots, before/after image sets, browser reels, terminal recordings, and short GIF/video proof. Use when shipping UI changes, CLI features, or any change where PR reviewers would benefit from visual or behavioral evidence. argument-hint: "[what to capture] [--url <url>|auto] [--tier static|before-after|browser-reel|terminal-recording]" disable-model-invocation: true user-invocable: tr