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.
npx skills add YSAA1/harness-workflow --skill remove-deadcode-pygit clone --depth 1 https://github.com/YSAA1/harness-workflowWrote 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.
[](https://agentmods.dev/skills/ysaa1/harness-workflow/remove-deadcode-py)<a href="https://agentmods.dev/skills/ysaa1/harness-workflow/remove-deadcode-py"><img src="https://agentmods.dev/badge/skills/ysaa1/harness-workflow/remove-deadcode-py/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.
<a href="https://agentmods.dev/skills/ysaa1/harness-workflow/remove-deadcode-py"><img src="https://agentmods.dev/badge/skills/ysaa1/harness-workflow/remove-deadcode-py.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00075 | $0.01137 |
| Opus 5.5 | $0.00030 | $0.00455 |
| Sonnet 5.5 | $0.00015 | $0.00227 |
| Haiku 4.5 | $0.00007 | $0.00114 |
Grade A, and why
remove-deadcode-py 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 27d 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.
How it starts
The opening of the file, as written. The whole thing — 52 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Remove Dead Code (Python)
Delete unused code from Python projects. Detection relies on tools, conviction relies on evidence, deletion goes in small batches, and clearing everything in one pass is not the goal.
This skill is the on-demand entry for repo-wide cleanup and does not do task close-out (close-out goes through cleanup). The method is inspired by code-yeongyu/oh-my-openagent's remove-deadcode (no text copied); tool behavior defers to the official vulture/Ruff/deptry docs. Repo-wide scanning for non-Python ecosystems is out of scope for this skill: use knip for JS/TS, go tool deadcode for Go, and cargo-machete for Rust.
Workflow
- Pin down entry points (mark off the undeletable zone first):
[project.scripts]andentry_pointsinpyproject.toml/setup.cfg,__main__.py,app.py/run.py/manage.py,conftest.py, Django models/admin/urls/migrations, Celery tasks, plugin registration points. Entry points and framework auto-discovery surfaces = undeletable. - Fast lane:
ruff check --select F401,F841for unused imports/variables; with--fix, accept only safe fixes — F401 in__init__.pyis re-export semantics (Ruff flags it as unsafe); do not delete by hand before confirming__all__. If deptry is installed, also rundeptry .for unused dependencies. - Main scan:
vulture <src> --min-confidence 60. 60% (attributes/classes/functions) is only a lead; 90% (imports) can proceed to conviction; 100% (unreachable code) is mostly trustworthy but still goes through step 4. - Conviction (triple evidence; missing any one downgrades to needs-review):
- Zero references in a repo-wide grep — the scope covers source, strings, comments, config, docs, CI/workflows, Makefile/Dockerfile;
git log --follow <file>provenance: added for an abandoned feature, or long untouched, strengthens the call; recently active ones get downgraded;- Optional corroboration: never executed in test coverage (
coverage report) ≠ dead code; it serves only as a bonus.
- Guard list (a hit means keep, no matter what the tool says):
- Dynamic references reachable within the range of
getattr/globals()/eval/exec/__import__/importlib; - Registration decorators:
@app.route,@router.*,@cli.command,@click.*,@pytest.fixture,@celery.taskand custom registration decorators (grep the decorator definition site to confirm the registration mechanism); - Dunder methods, abstract-method/Protocol implementations, operator overloads, dataclass/Pydantic fields;
- re-exports and
__all__in__init__.py; - Referenced by test files = a legitimate consumer;
- Packaging-config references: include/packages in
pyproject.toml, setup.cfg, MANIFEST.in.
- Dynamic references reachable within the range of
- Batched atomic deletion: one module or one group of related symbols per batch; after each deletion run the project's narrowest tests + typecheck (if configured); commit only when green (the message states the evidence basis); on failure,
git checkout -- <files>rolls back this batch, then shrink the batch size. - Cascade rescan: after each finished batch, rerun vulture — deletions expose new dead code. Produce the report once all batches are done.
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.
- 27d ago Changed · -8 tokens per session 598fab999fd8
- 1mo ago First seen · 52 lines · 83 tokens per session scan A c9b4d5c66dd6
remove-deadcode-py is a skill published in the GitHub repository YSAA1/harness-workflow (3 stars, last pushed 12d ago), licensed MIT. It adds 75 tokens to every session and 1,137 once invoked, about $0.0003 per session on Opus 5.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-17.
Other skills, from other repositories
fastapi-templates
Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.
temporal-python-testing
Test Temporal workflows with pytest, time-skipping, and mocking strategies. Covers unit testing, integration testing, replay testing, and local development setup. Use when implementing Temporal workflow tests or debugging test failures.
prismer-python-debugpy
Debug Python: pdb REPL + debugpy remote (DAP).
manimgl-best-practices
Trigger when: (1) User mentions "manimgl" or "ManimGL" or "3b1b manim", (2) Code contains from manimlib import , (3) User runs manimgl CLI commands, (4) Working with InteractiveScene, self.frame, self.embed(), ShowCreation(), or ManimGL-specific patterns. Best practices for ManimGL (Grant Sanderson's 3Blue1Brown…
python-guidelines
This skill should be used when writing, reviewing, or refactoring Python code. Covers code integration, idiomatic patterns, docstring formatting, anti-abstraction rules, and software engineering basics.
datachain-core
Use ONLY for abstract DataChain SDK questions — API usage, method signatures, or code patterns — when no specific dataset or bucket is referenced. If the request mentions creating, saving, listing, exploring datasets or buckets, use datachain-knowledge instead.