cinderx-env-clean

cinderx-env-clean is a skill for Claude Code, Codex from sisibeloved/cpython-optimize-skill. It costs 52 tokens per session (484 once invoked), scanned A, original, MIT.

A pre-command hook that runs a shell check before a Bash tool call. It comes from a CPython optimization toolkit.

In plain words
What is it for?
Use it in an agent setup where Bash commands must pass an automatic preparation or validation step first.
Why use it?
It lets the agent apply a validation or routing check before executing a shell command.

Skill for Claude CodeCodex

Part of the cpython-optimize-skill plugin — 35 skills, 9 agents, 2 hooks, 1 MCP server shipped together

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 skills/sisibeloved/cpython-optimize-skill/cinderx-env-clean
Any agent
npx skills add sisibeloved/cpython-optimize-skill --skill cinderx-env-clean
Clone the repo
git clone --depth 1 https://github.com/sisibeloved/cpython-optimize-skill

Made for: Claude Code, Codex.

Or install cpython-optimize-skill, the plugin that ships this one along with the rest of its 35 skills, 9 agents, 2 hooks, 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 cinderx-env-clean

README.md
[![agentmods](https://agentmods.dev/badge/skills/sisibeloved/cpython-optimize-skill/cinderx-env-clean.svg)](https://agentmods.dev/skills/sisibeloved/cpython-optimize-skill/cinderx-env-clean)
Your own site
<a href="https://agentmods.dev/skills/sisibeloved/cpython-optimize-skill/cinderx-env-clean"><img src="https://agentmods.dev/badge/skills/sisibeloved/cpython-optimize-skill/cinderx-env-clean.svg" alt="Measured on agentmods" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 484 The whole file, excluding the scripts and references it only reads on demand.
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.1 $0.00052 $0.00484
Opus 5 $0.00026 $0.00242
Sonnet 5 $0.00010 $0.00097
Haiku 4.5 $0.00005 $0.00048

Measured 5d ago against content hash 405ddcb410d6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

cinderx-env-clean 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 5d 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.

plugins/cpython-optimize-skill/skills/cinderx-env-clean/SKILL.md · 37 lines

What it actually says

CinderX Env Clean

只清理被破坏的 CPython/CinderX 实验环境。先由 cinderx-env-validate 证明不可复用,再执行清理。

清理对象

  • 错误 editable install、残留 wheel、旧 cinderx.__file__ 指向。
  • build 目录、CMake/Ninja 产物、错版本 generated headers。
  • 污染 venv、错误 PYTHONPATH、坏 LD_LIBRARY_PATH
  • 错误 Docker 容器、挂错源码的 bind mount、残留 pyperformance env
  • patchlevel.hSOABI、解释器微版本不一致造成的错版本头文件。
  • AArch64 RuntimeTests 中 /opt/python314 构建为共享/PIC Python,导致 _Python_LIBRARY_RELEASE 指向 libpython3.14.so_PyThreadState_GetCurrent@pltTLSDESCDetectsThreadStateOffset 失败。

保留对象

默认保留 cache:pip cache、Docker layer、可复用源码 checkout、历史 run.json / speedup.json / 日志。要删除 cache 必须说明原因。

反问 Gate

  • 清理会删除非 cache 产物、历史日志、run.json、core dump、HIR/jit.log 或用户工作目录时,必须询问。
  • 同一 host/workspace 下有多个可疑环境且无法确认目标环境时,询问要清理哪一个。
  • 无法判断应清理重建还是保留现场继续取证时,询问用户优先级。

输出

  • 清理前环境指纹
  • 清理了什么
  • 保留了什么 cache
  • 清理后需要调用的 bootstrap 步骤

不要用重新安装掩盖环境漂移;漂移原因要写清楚。

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. 5d ago First seen · 37 lines · 52 tokens per session scan A 405ddcb410d6

Subscribe to this mod's changes

cinderx-env-clean is a skill published in the GitHub repository sisibeloved/cpython-optimize-skill (2 stars, last pushed 7d ago), licensed MIT. It adds 52 tokens to every session and 484 once invoked, about $0.0003 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-31.