ras-commander: Agent for Claude Code

.claude/agents/python-environment-manager.md

python-environment-manager is an agent for Claude Code from gpt-cmdr/ras-commander. It costs 130 tokens per session (3,868 once invoked), scanned C, original, MIT.

An automated tool for creating and managing Python environments used by ras-commander, a library for automating HEC-RAS water-flow models. It also helps Jupyter notebooks load the local source code during development.

In plain words
What is it for?
Creating and checking Conda environments, configuring Jupyter kernels, troubleshooting imports, and upgrading ras-commander. It also supports running example notebooks and testing changes from a local repository.
Why use it?
It removes guesswork when creating environments, fixing import errors, upgrading the library, or choosing between installed and local code. It keeps user environments separate from source-code development environments.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

This is gpt-cmdr/ras-commander's own configuration. It tells Claude Code how to work on ras-commander itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ras-commander configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is uv run scripts/notebooks/audit_ipynb.py examples/*.ipynb.

Reuse

Borrowing it

Nothing to install: this file belongs to gpt-cmdr/ras-commander. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/gpt-cmdr/ras-commander/main/.claude/agents/python-environment-manager.md
Clone the repo
git clone --depth 1 https://github.com/gpt-cmdr/ras-commander

Made for: Claude Code.

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 python-environment-manager

README.md
[![agentmods](https://agentmods.dev/badge/agents/gpt-cmdr/ras-commander/python-environment-manager/github.svg)](https://agentmods.dev/agents/gpt-cmdr/ras-commander/python-environment-manager)
Your own site
<a href="https://agentmods.dev/agents/gpt-cmdr/ras-commander/python-environment-manager"><img src="https://agentmods.dev/badge/agents/gpt-cmdr/ras-commander/python-environment-manager/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.

agentmods 80×15 button for python-environment-manager

Your own site · 80×15
<a href="https://agentmods.dev/agents/gpt-cmdr/ras-commander/python-environment-manager"><img src="https://agentmods.dev/badge/agents/gpt-cmdr/ras-commander/python-environment-manager.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 130 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,868 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00130 $0.03868
Opus 5.5 $0.00052 $0.01547
Sonnet 5.5 $0.00026 $0.00774
Haiku 4.5 $0.00013 $0.00387

Measured 1mo ago against content hash 9a950886659b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

python-environment-manager scanned grade C with 2 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 1mo 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.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

| uv | Windows: `irm https://astral.sh/uv/install.ps1 \| iex`<br>Mac/Linux: `curl -LsSf https://astral.sh/uv/install.sh \| sh` |

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

| uv | Windows: `irm https://astral.sh/uv/install.ps1 \| iex`<br>Mac/Linux: `curl -LsSf https://astral.sh/uv/install.sh \| sh` |
.claude/agents/python-environment-manager.md · 510 lines

How it starts

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

Python Environment Manager

Set up and manage ras-commander Python environments. Handle environment creation, validation, troubleshooting, and upgrades.

Key Decision: No Editable Install for Development

CRITICAL: The rascmdr_local environment does NOT use pip install -e .

Instead, use a toggle cell in Jupyter notebooks that manipulates sys.path to load local source code. This approach:

  • Guarantees local source is always loaded (even if pip package exists)
  • Remains simple to understand and explain
  • Works reliably across all environments
  • Can be toggled with a single variable

Why sys.path.insert(0, ...) Works

Python searches sys.path in order (index 0 first). By inserting the local repo path at position 0:

  1. Python finds ras_commander/ in the repo first
  2. The pip-installed package (if any) is never reached
  3. 100% guaranteed local source loading

Standard Environment Names

RasCommander (User Environment)

Purpose: Standard user environment with pip package

When to use:

  • Running example notebooks as an end user
  • Using ras-commander for HEC-RAS automation
  • NOT editing ras-commander source code

Setup:

conda create -n RasCommander python=3.13
conda activate RasCommander
pip install ras-commander
pip install jupyter ipykernel
python -m ipykernel install --user --name RasCommander --display-name "Python (RasCommander)"

rascmdr_local (Development Environment)

Purpose: Development environment with dependencies only (NO ras-commander pip install)

When to use:

  • Editing ras-commander source code
  • Contributing to the library
  • Testing code changes immediately

Setup:

conda create -n rascmdr_local python=3.13
conda activate rascmdr_local

# Install DEPENDENCIES ONLY - NOT ras-commander itself
pip install h5py numpy pandas geopandas matplotlib shapely scipy xarray tqdm requests rasterstats rtree pyproj fiona

# Install Jupyter
pip install jupyter ipykernel
python -m ipykernel install --user --name rascmdr_local --display-name "Python (rascmdr_local)"

Read the full file on GitHub · 510 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. 1mo ago First seen · 510 lines · 130 tokens per session scan C 9a950886659b

Subscribe to this mod's changes

python-environment-manager is an agent published in the GitHub repository gpt-cmdr/ras-commander (88 stars, last pushed today), licensed MIT. It adds 130 tokens to every session and 3,868 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it C with 2 findings (downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

Geoprocessing Specialist

ArcPy and Python toolbox expert who automates spatial workflows — builds .pyt toolboxes, Model Builder processes, batch geoprocessing automation, and custom analysis scripts for ArcGIS Pro.

SHAdd0WTAka/Zen-Ai-Pentest · 45 tokens

python-pro

Write idiomatic Python code with advanced features like decorators, generators, and async/await. Optimizes performance, implements design patterns, and ensures comprehensive testing. Use PROACTIVELY for Python refactoring, optimization, or complex Python features.

echoVic/blade-code · 51 tokens

temporal-test-builder

Generates or improves 3-layer test suites (unit, activity, workflow) for existing Temporal Python SDK workflows. Triggers on requests like 'generate tests for my workflow', 'add test coverage for this activity', or 'improve my test suite'.

canonical/copilot-collections · 56 tokens

package-reviewer

Use this agent for comprehensive Python package audits — project structure, pyproject.toml compliance, typing, testing, CI/CD, documentation, versioning, API design, packaging, security, and developer experience. Handles both targeted file reviews and full repository audits. Examples: Context: User has a Python…

oborchers/fractional-cto · 287 tokens

script-operator

Specialized in bash and Python. Can inspect/modify the environment and create/edit/execute scripts.

MadGraphTeam/MadAgents · 24 tokens

python-reviewer

Expert Python code reviewer specializing in PEP 8 compliance, Pythonic idioms, type hints, security, and performance. Use for all Python code changes. MUST BE USED for Python projects.

Fmarzochi/EGC · 43 tokens