deploy

deploy is a command for Claude Code from rohanmistry231/Claude-Code-Project-Structure-Learning-Repository. It costs 0 tokens per session (672 once invoked), scanned A, original, MIT.

A deployment command for the Blog API, with staging and production environments. It checks the Git state, branch, tests, and linter before building and deploying a Python package.

In plain words
What is it for?
Use `/deploy`, `/deploy staging`, or `/deploy production` to build and release the Blog API after its required checks pass.
Why use it?
It prevents deployment when the code has uncommitted changes or failing tests and checks, reducing avoidable release errors.

Command for Claude Code

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/rohanmistry231/claude-code-project-structure-learning-repository/deploy
Clone the repo
git clone --depth 1 https://github.com/rohanmistry231/Claude-Code-Project-Structure-Learning-Repository

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 deploy

README.md
[![agentmods](https://agentmods.dev/badge/commands/rohanmistry231/claude-code-project-structure-learning-repository/deploy.svg)](https://agentmods.dev/commands/rohanmistry231/claude-code-project-structure-learning-repository/deploy)
Your own site
<a href="https://agentmods.dev/commands/rohanmistry231/claude-code-project-structure-learning-repository/deploy"><img src="https://agentmods.dev/badge/commands/rohanmistry231/claude-code-project-structure-learning-repository/deploy.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 672 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00000 $0.00672
Opus 5 $0.00000 $0.00336
Sonnet 5 $0.00000 $0.00134
Haiku 4.5 $0.00000 $0.00067

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

Security

Grade A, and why

deploy scanned grade A with 1 finding 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 3d 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.

Makes network callslowCapability

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

curl -sf https://<target-host>/health
.claude/commands/deploy.md · 110 lines

How it starts

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

/deploy

Deploy the Blog API to the target environment.

Usage

/deploy [environment]
  • environment — one of staging or production (default: staging)

What this command does

When the user runs /deploy or /deploy staging or /deploy production, execute the following steps in order. Stop and report if any step fails.


Step 1 — Pre-flight checks

Run these checks before touching anything. If any fail, abort and tell the user what failed:

# 1a. Make sure the working tree is clean
git status --porcelain
# Expected: no output. If there is output, say "Uncommitted changes found — commit or stash first."

# 1b. Make sure we're on the right branch
git branch --show-current
# Expected: "main" for production, any branch for staging.

# 1c. Run the full test suite
pytest arc/tests/ -v --tb=short
# Expected: 0 failures. Do not deploy if tests fail.

# 1d. Run the linter
ruff check arc/
# Expected: exit code 0.

Step 2 — Build

# Build a deployable package (wheel)
pip install build
python -m build --wheel

The wheel will appear in dist/. Note the filename for Step 3.


Step 3 — Deploy

For staging:

# Push the wheel to the staging server via scp, then restart the service
scp dist/*.whl [email protected]:/opt/blog-api/
ssh [email protected] "
  cd /opt/blog-api &&
  pip install --force-reinstall *.whl &&
  systemctl restart blog-api
"

For production:

# Same as staging but target production server
# IMPORTANT: always confirm with the user before running this block
scp dist/*.whl [email protected]:/opt/blog-api/
ssh [email protected] "
  cd /opt/blog-api &&
  pip install --force-reinstall *.whl &&
  systemctl restart blog-api
"

Always ask the user to confirm before deploying to production. Say: "Ready to deploy vX.Y.Z to PRODUCTION. This will affect live users. Confirm? (yes/no)"


Step 4 — Post-deploy smoke test

Read the full file on GitHub · 110 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. 3d ago First seen · 110 lines · 0 tokens per session scan A c1e5c2519ecb

Subscribe to this mod's changes

deploy is a command published in the GitHub repository rohanmistry231/Claude-Code-Project-Structure-Learning-Repository (2 stars, last pushed 5mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 672 tokens. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.