remove-env-var

A command that removes a named environment variable from the `.atxp/.env.production` file. Environment variables are configuration values, such as API keys, kept outside the main code.

In plain words
What is it for?
Use `/remove-env-var KEY` to delete one variable from the production environment file, such as an old API key.
Why use it?
It removes an outdated or unwanted configuration value without editing the file by hand.

Command

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 commands/atxp-dev/claude/remove-env-var
Clone the repo
git clone --depth 1 https://github.com/atxp-dev/claude
Per session 8 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 742 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 $0.00008 $0.00742
Opus 5 $0.00004 $0.00371
Sonnet 5 $0.00002 $0.00148
Haiku 4.5 $0.00001 $0.00074

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

Security

Grade A, and why

remove-env-var 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.

cloud/commands/remove-env-var.md · 133 lines

How it starts

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

Removes an environment variable from .atxp/.env.production.

Usage

/remove-env-var KEY

Replace KEY with the name of the environment variable you want to remove.

Examples

Remove a single variable:

/remove-env-var GOOGLE_ANALYTICS_API_KEY

Remove multiple variables:

/remove-env-var DATAFORSEO_API_KEY
/remove-env-var OLD_API_KEY

Implementation

#!/bin/bash

# Parse arguments
if [ "$#" -ne 1 ]; then
    echo "Usage: /remove-env-var KEY"
    echo "Example: /remove-env-var API_KEY"
    exit 1
fi

KEY="$1"

ENV_FILE=".atxp/.env.production"

if [ ! -f "$ENV_FILE" ]; then
    echo "No environment variables file found at ${ENV_FILE}"
    echo ""
    echo "Nothing to remove."
    exit 0
fi

# Check if the key exists
if ! grep -q "^${KEY}=" "$ENV_FILE"; then
    echo "Environment variable ${KEY} not found in ${ENV_FILE}"
    echo ""
    echo "To see all configured variables, use:"
    echo "  /list-env-vars"
    exit 1
fi

# Create a temporary file and filter out the key
TEMP_FILE=$(mktemp) || {
    echo "Error: Failed to create temporary file"
    exit 1
}
grep -v "^${KEY}=" "$ENV_FILE" > "$TEMP_FILE" || true

# Replace the original file
mv "$TEMP_FILE" "$ENV_FILE"

echo "✓ Removed ${KEY} from ${ENV_FILE}"

# Check if file is now empty
if [ ! -s "$ENV_FILE" ]; then
    echo ""
    echo "The environment variables file is now empty."
    rm "$ENV_FILE"
    echo "✓ Removed empty ${ENV_FILE}"
fi

echo ""
echo "Next steps:"
echo "  1. Review remaining variables: /list-env-vars"
echo "  2. Deploy your agent: /deploy"

How it works

  1. Searches for the environment variable in .atxp/.env.production
  2. Removes the line containing that variable
  3. If the file becomes empty after removal, deletes the file
  4. Changes take effect on the next /deploy

Notes

  • The variable name is case-sensitive
  • To see all configured variables before removing, use /list-env-vars
  • If you remove all variables, the .atxp/.env.production file will be deleted
  • Changes only take effect after running /deploy
  • You can also manually edit .atxp/.env.production if needed

Read the full file on GitHub · 133 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 · 133 lines · 8 tokens per session scan A 3f08df42497e

Subscribe to this mod's changes

remove-env-var is a command published in the GitHub repository atxp-dev/claude (2 stars, last pushed 9mo ago), licensed MIT. It adds 8 tokens to every session and 742 once invoked, about $0.0000 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.