unstale

Featured

Detect and repair staleness residue in Python library code and notebooks — dead imports, dead code, resolved TODOs, stale comments/docstrings, and HANDOFF blockers. Use this whenever you want to clean up after a refactor, fix a comment that no longer matches the code, remove unused imports, check for leftover TODOs, detect doc drift, or tidy a notebook before sharing or submission — even without the word "unstale." Default mode auto-detects library .py scope and runs ruff + vulture (deterministic), then LLM semantic checks; never touches notebooks. `--artifact <nb.ipynb>` cleans a notebook as a deliverable (full treatment including dead-code detection). `--exploratory <nb.ipynb>` tidies a working notebook non-destructively (structural + semantic only, no removals ever). Always emits a structured report before any edit.

AI & Automation 61 stars 5 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 90/100

Stars 20%
60
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

**Governing principle: deterministic where you can, LLM where you must — adapt to the repo, never dictate its structure.** ## Live state ```! git status --short 2>/dev/null || echo "(not a git repo)" ``` ## Mode overview | Invocation | Target | Edits? | |---|---|---| | `/unstale` | Auto-detected .py library scope | Report only | | `/unstale --auto` | Same | Apply HIGH fixes | | `/unstale --artifact <nb.ipynb>` | Notebook as deliverable | Report only | | `/unstale --artifact <nb.ipynb> --auto` | Same | Apply HIGH fixes | | `/unstale --exploratory <nb.ipynb>` | Working notebook | Report only (always) | `--artifact` and `--exploratory` are **notebook-only**. If a path ends in `.py`, warn and skip it. --- ## Default mode — scope auto-detection | Signal | Scope | |---|---| | `pyproject.toml` / `setup.py` / `src/` / importable package dir | Library → run both lanes | | Top-level `.py` with no package structure | Ambiguous → skip Lane A (dead-code) | | Only `.ipynb` files | No .py scope → nudge to `--artifact` / `--exploratory` | Check for a CLAUDE.md override line: `unstale library scope: <path>; treat <glob> as exploratory`. Use it if present. Always state the detected scope in the report. If notebooks exist but weren't scanned, emit: > "N notebooks present — run `/unstale --artifact <path>` (clean as deliverable) or `--exploratory <path>` (tidy) to check them." --- ## Default mode — two lanes ### Lane A — Deterministic Run on detected library scope. Tag findings `DE...

Details

Author
dgilford
Repository
dgilford/ai-science-toolkit
Created
3 months ago
Last Updated
yesterday
Language
Shell
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category