convex-deploy-guard

Classifies and announces the target Convex deployment before running deployment-affecting commands.

9.4k|1.5k|Updated Jan 3, 2026
One-click install
npx skills add https://github.com/openclaw/clawhub --skill convex-deploy-guard
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convex-deploy-guard
Source: https://github.com/openclaw/clawhub/tree/main/.agents/skills/convex-deploy-guard
Command: npx skills add https://github.com/openclaw/clawhub --skill convex-deploy-guard

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Convex projects span multiple deployments (local, dev, preview, prod), and commands aimed at the wrong target cause silent failures or accidental production changes. This Skill enforces a discipline of identifying and announcing the deployment target before any deployment-affecting command runs.

Core Features & Use Cases

  • Target Classification: Reads CONVEX_DEPLOYMENT, convex.json, and CONVEX_DEPLOY_KEY (or the Convex MCP status tool) to classify the target as local-anonymous, dev, preview, or prod.
  • Prod Consent Gating: Requires a fresh, explicit, per-session confirmation before prod deploys, prod env changes, snapshot import/export, or prod-scoped MCP sessions.
  • MCP Safety Defaults: Starts the Convex MCP scoped to non-prod and keeps the read-only prod flag separate from the mutating prod flag.
  • Read-Only Session Mode: Honors user-requested read-only mode absolutely, disabling deploys, env mutations, and imports for the session.
  • Use Case: Before running npx convex deploy, the agent announces target: dev (joyful-capybara-123, personal dev) and only proceeds after confirming the correct deployment.

Quick Start

Ask the agent to check which Convex deployment my project currently targets before running any deploy command.

Frequently Asked Questions about convex-deploy-guard

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I avoid deploying to the wrong Convex deployment?

Identify the target before acting by reading CONVEX_DEPLOYMENT in .env.local, convex.json, and whether CONVEX_DEPLOY_KEY is set, or call the Convex MCP status tool. Announce the classified target in one line before running any deployment-affecting command.

How to safely run npx convex deploy against production?

Treat prod as consent-gated: state exactly what will change on which deployment and get a fresh explicit yes in the current session before running the deploy. A confirmation given earlier or for a different target does not carry over.

What is the difference between the two Convex MCP production flags?

The --cautiously-allow-production-pii flag enables read-only prod tools for audits, while --dangerously-enable-production-deployments enables mutating prod tools. They should never be paired by default, and the MCP should start scoped to a non-prod deployment.

Why did my Convex deploy not change anything?

A deploy that appears to do nothing almost always landed on a different deployment than the one being observed. Re-check the target classification instead of re-running the deploy, and compare npx convex env list fingerprints to confirm.

Can I enforce a read-only session for Convex operations?

Yes, when the user requests read-only mode it is honored absolutely for the rest of the session: no deploys, no env set or remove, no mutations via run, and no imports. The MCP is started with --disable-tools run,envSet,envRemove.