KunanonJ/superstacks / plugins/superstacks/skills/gardening
gardening
VerifiedUse when finding small maintenance work. One concern per PR, each with a verify command and a small diff budget.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 1.2 KB |
| scripts/diff_budget.py | script | 2.0 KB |
scripts/diff_budget.py
View on GitHub#!/usr/bin/env python3
"""Fail if the working tree diff exceeds a small gardening budget. Stdlib only."""
from __future__ import annotations
import argparse
import subprocess
import sys
def _diff_numstat(base: str) -> list[tuple[int, int, str]]:
proc = subprocess.run(
["git", "diff", "--numstat", f"{base}...HEAD"],
check=False,
capture_output=True,
text=True,
)
if proc.returncode != 0:
proc = subprocess.run(
["git", "diff", "--numstat", base],
check=False,
capture_output=True,
text=True,
)
if proc.returncode != 0:
raise SystemExit(f"diff_budget FAIL: git diff failed\n{proc.stderr}")
rows: list[tuple[int, int, str]] = []
for line in proc.stdout.splitlines():
parts = line.split("\t")
if len(parts) != 3:
continue
added, removed, path = parts
if added == "-" or removed == "-":
continue
rows.append((int(added), int(removed), path))
return rows
def main(argv: list[str] | None = None) -> int:
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("--base", default="HEAD")
parser.add_argument("--max-lines", type=int, default=80)
parser.add_argument("--max-files", type=int, default=6)
args = parser.parse_args(argv)
try:
rows = _diff_numstat(args.base)
except SystemExit as exc:
print(exc, file=sys.stderr)
return 2
files = len(rows)
lines = sum(added + removed for added, removed, _path in rows)
print(f"gardening files: {files}")
print(f"gardening lines: {lines}")
print(f"gardening budget: {args.max_files} files / {args.max_lines} lines")
if files > args.max_files or lines > args.max_lines:
print("gardening FAIL: diff budget exceeded")
for added, removed, path in rows:
print(f"- {path}: +{added} -{removed}")
return 1
print("gardening PASS")
return 0
if __name__ == "__main__":
sys.exit(main())
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |