pn-deslop

pn-deslop is a skill for Cursor from perniemann/pnCore. It costs 33 tokens per session (302 once invoked), scanned A, original, MIT.

A code-cleanup review for removing unnecessary comments, defensive code, type casts, nesting, and other inconsistent patterns. It keeps the program’s behavior unchanged unless there is a clear bug.

In plain words
What is it for?
Use it before shipping a branch or pull request, or when asked to clean up code without performing a broad rewrite.
Why use it?
It removes distracting or low-quality changes that can make code harder to read and maintain, including unwanted patterns introduced by AI tools.

Skill for Cursor

Written for Cursor: shipped in a Cursor plugin.

Part of the pn-core plugin — 133 skills, 19 commands, 9 agents, 1 MCP server shipped together

Good fit Use it before shipping a branch or pull request, or when asked to clean up code without performing a broad rewrite.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/perniemann/pncore/pn-deslop
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add perniemann/pnCore --skill pn-deslop
Clone the repo
git clone --depth 1 https://github.com/perniemann/pnCore

Made for: Cursor.

Or install pn-core, the plugin that ships this one along with the rest of its 133 skills, 19 commands, 9 agents, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pn-deslop

README.md
[![agentmods](https://agentmods.dev/badge/skills/perniemann/pncore/pn-deslop/github.svg)](https://agentmods.dev/skills/perniemann/pncore/pn-deslop)
Your own site
<a href="https://agentmods.dev/skills/perniemann/pncore/pn-deslop"><img src="https://agentmods.dev/badge/skills/perniemann/pncore/pn-deslop/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pn-deslop

Your own site · 80×15
<a href="https://agentmods.dev/skills/perniemann/pncore/pn-deslop"><img src="https://agentmods.dev/badge/skills/perniemann/pncore/pn-deslop.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 302 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00033 $0.00302
Opus 5 $0.00016 $0.00151
Sonnet 5 $0.00007 $0.00060
Haiku 4.5 $0.00003 $0.00030

Measured 7d ago against content hash a55c8b785a70, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

pn-deslop scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packages/pn-core-mcp/content/skills/ci/pn-deslop/SKILL.md · 38 lines

What it actually says

Remove AI code slop

Check the diff against main (or the current changes) and remove AI-generated slop introduced in the branch or session.

When to use

  • As part of the review phase in the pn-review-optimize-loop (before or after quality gates).
  • When the user asks to "clean up" or "deslop" the code.
  • Before finalizing a PR or ship to reduce noise and inconsistency.

Focus areas

  • Extra comments that are unnecessary or inconsistent with local style
  • Defensive checks or try/catch blocks that are abnormal for trusted code paths
  • Casts to any used only to bypass type issues
  • Deeply nested code that should be simplified with early returns
  • Other patterns inconsistent with the file and surrounding codebase

Guardrails

  • Keep behavior unchanged unless fixing a clear bug.
  • Prefer minimal, focused edits over broad rewrites.
  • Keep the final summary concise (1–3 sentences).

Output

  • List of slop removed (file and change type).
  • Short confirmation when done.

Orchestration context

  • pn-review-optimize-loop — Deslop is part of the review phase; run with pn-config-review, pn-review-plugin-submission (when applicable), then optimize-phase skills.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 38 lines · 33 tokens per session scan A a55c8b785a70

Subscribe to this mod's changes

pn-deslop is a skill published in the GitHub repository perniemann/pnCore (0 stars, last pushed 4d ago), licensed MIT. It adds 33 tokens to every session and 302 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.