killpy AGENTS.md

A guide to killpy, a Python command-line and terminal interface tool that finds Python environments, caches, and installed packages that can be removed to free disk space.

In plain words
What is it for?
Use it when working on environment discovery, cache cleanup, package removal, the interactive terminal interface, or the `killpy clean` command.
Why use it?
It describes what the tool can safely discover and how its interactive deletion workflow is organized. This helps developers understand its cleanup scope before changing commands or deletion behavior.

Instructions file for CodexOpenCode

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.

agentmods
npx agentmods add instructions/tlaloc-es/killpy/agents-md
Clone the repo
git clone --depth 1 https://github.com/Tlaloc-Es/killpy

Made for: Codex, OpenCode.

Per session 1,818 This file is loaded in full into every session.
When invoked 1,818 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.01818 $0.01818
Opus 5 $0.00909 $0.00909
Sonnet 5 $0.00364 $0.00364
Haiku 4.5 $0.00182 $0.00182

Measured 2d ago against content hash 9f6fcb4f36cd, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

killpy AGENTS.md 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 2d 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.

AGENTS.md · 168 lines

How it starts

The opening of the file, as written. The whole thing — 168 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md

Project Overview

killpy is a Python CLI/TUI utility to find and remove Python-related environments and free disk space.

Main capabilities:

  • Discover local virtual environments (.venv and folders containing pyvenv.cfg)
  • Discover Conda environments
  • Discover Poetry virtualenvs
  • Discover installed pipx packages and uninstall them
  • Remove __pycache__ directories

Primary UX:

  • Interactive terminal UI (Textual app) for listing and deleting environments
  • CLI command to clean caches (killpy clean)

Goal

Help users reclaim disk space safely by surfacing Python environments with size info and allowing explicit deletion actions.

Tech Stack

  • Python >=3.10 (CI/classifiers cover 3.10–3.13; ruff targets py310)
  • click for CLI command routing
  • textual for interactive terminal UI
  • rich as a dependency used by Textual ecosystem and terminal rendering

Reference links:

Packaging and tooling:

  • pyproject.toml (PEP 621 metadata)
  • uv support ([tool.uv] package = true)
  • Commit/version workflow via commitizen
  • Lint/type/test dev tooling declared under [dependency-groups].dev

Repository Structure

Top-level:

  • pyproject.toml — package metadata, dependencies, scripts, tool config
  • README.md — user documentation
  • CHANGELOG.md — release history
  • .github/workflows/ — CI/release automation

Package layout (killpy/):

  • __main__.py — CLI entrypoint (killpy script); the cli click group, the --delete-all fast path, and subcommand registration
  • cli.py — Textual app (TableApp) and interactive actions
  • models.py — shared dataclasses: Environment (core contract), plus GitInfo, ScoredEnvironment, Suggestion, ScanRecord
  • scanner.pyScanner: orchestrates detectors, deduplicates results
  • cleaner.pyCleaner: deletion via shutil.rmtree, conda env remove, pipx uninstall, or uv tool uninstall (routed by Environment.managed_by)
  • commands/clean.pykillpy clean subcommand
  • commands/delete.pykillpy delete subcommand
  • commands/list.pykillpy list subcommand
  • commands/stats.pykillpy stats subcommand
  • commands/doctor.pykillpy doctor subcommand (health report + scoring)
  • commands/find.pykillpy find subcommand (locate a package across envs)
  • commands/_utils.py — shared command helpers (filter_envs, partition_in_use)
  • intelligence/ — scoring layer: git_analyzer.py, scoring.py, suggestions.py, tracker.py (scan-history persistence)
  • cleaners/__init__.pyremove_pycache helper
  • files/__init__.py — file-size helpers (get_total_size, format_size)
  • detectors/ — one detector class per environment type:
    • base.pyAbstractDetector interface
    • venv.py.venv dirs and pyvenv.cfg-based envs
    • pyenv.py — pyenv-managed Python versions
    • poetry.py — Poetry global virtualenv cache
    • conda.py — Conda environments
    • pipx.py — pipx packages
    • hatch.py — Hatch environments
    • pipenv.py — Pipenv virtualenvs
    • tox.py — tox .tox directories
    • uv.py — uv tool environments (uv tool install) and uv-managed Python installs
    • artifacts.py — build artifacts (dist/, build/, *.egg-info)
    • cache.py — cache dirs (__pycache__, .mypy_cache, .pytest_cache, …)

Read the full file on GitHub · 168 lines

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. 2d ago First seen · 168 lines · 1,818 tokens per session scan A 9f6fcb4f36cd

Subscribe to this mod's changes

killpy AGENTS.md is an instructions file published in the GitHub repository Tlaloc-Es/killpy (128 stars, last pushed 14d ago), licensed MIT. It adds 1,818 tokens to every session, about $0.0091 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-08-30.