pm-gate

pm-gate is a command for Claude Code from VandanaAjayDubey111/great-pm. It costs 53 tokens per session (1,886 once invoked), scanned A, original, MIT.

A command for approving, rejecting, listing, or viewing GreatPM gates. A gate is a deliberate approval point that must be closed before the next workflow stage can continue.

In plain words
What is it for?
Managing open approval points and explicitly allowing or stopping the next stage of a GreatPM workflow.
Why use it?
It keeps agents from automatically advancing past decisions that require human approval.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: model in frontmatter; positional $N argument.

Part of the great-pm plugin — 114 skills, 34 commands, 48 agents, 5 hooks shipped together

Good fit Managing open approval points and explicitly allowing or stopping the next stage of a GreatPM workflow.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/vandanaajaydubey111/great-pm/pm-gate
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.

Clone the repo
git clone --depth 1 https://github.com/VandanaAjayDubey111/great-pm

Made for: Claude Code.

Or install great-pm, the plugin that ships this one along with the rest of its 114 skills, 34 commands, 48 agents, 5 hooks.

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 pm-gate

README.md
[![agentmods](https://agentmods.dev/badge/commands/vandanaajaydubey111/great-pm/pm-gate/github.svg)](https://agentmods.dev/commands/vandanaajaydubey111/great-pm/pm-gate)
Your own site
<a href="https://agentmods.dev/commands/vandanaajaydubey111/great-pm/pm-gate"><img src="https://agentmods.dev/badge/commands/vandanaajaydubey111/great-pm/pm-gate/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 pm-gate

Your own site · 80×15
<a href="https://agentmods.dev/commands/vandanaajaydubey111/great-pm/pm-gate"><img src="https://agentmods.dev/badge/commands/vandanaajaydubey111/great-pm/pm-gate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 53 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,886 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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.00053 $0.01886
Opus 5.5 $0.00021 $0.00754
Sonnet 5.5 $0.00011 $0.00377
Haiku 4.5 $0.00005 $0.00189

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

Security

Grade A, and why

pm-gate 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 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.

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.

commands/pm-gate.md · 181 lines

How it starts

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

You are the great-pm /pm-gate command. Under gate-policy: explicit (great-pm's default), you are the only path that closes a great-pm gate. Agents file gates as open Beads tasks and STOP — they wait for the human to run /pm-gate approve <id>.

This enforces governance: human decides, agent never auto-advances. A pipeline-enforcement gate command ( update); great-pm's default is more conservative — explicit, not auto.

Setup

source .great-pm/env.sh 2>/dev/null || export PATH="/opt/homebrew/bin:$HOME/.local/bin:/usr/local/bin:$PATH"

ACTION="${1:-list}"
GATE_ID="${2:-}"
REASON="${3:-}"

# Read gate-policy for informational output. Behavior of /pm-gate does
# not depend on the policy — /pm-gate is the explicit-path tool.
GATE_POLICY=$(grep "^gate-policy:" .great-pm/PROJECT.md 2>/dev/null | awk '{print $2}' || echo "explicit")

Action: approve <id> — close a gate, unblock the next stage

if [ -z "$GATE_ID" ]; then
  echo "Usage: /pm-gate approve <id>"
  echo ""
  echo "Open great-pm gates:"
  bd list --label gate --status open 2>/dev/null | head -10
  exit 1
fi

# Verify the issue exists and is a gate
GATE_INFO=$(bd show "$GATE_ID" 2>/dev/null)
if [ -z "$GATE_INFO" ]; then
  echo "Error: gate '$GATE_ID' not found."
  echo "Run '/pm-gate list' to see open gates."
  exit 1
fi

# Sanity check: title must contain 'gate:'
TITLE=$(echo "$GATE_INFO" | grep -i "^title:" | head -1)
if ! echo "$TITLE" | grep -qi "gate:"; then
  echo "Error: '$GATE_ID' is not a gate (title: $TITLE)."
  echo "Use 'bd close $GATE_ID' for regular tasks."
  exit 1
fi

# Close the gate
bd close "$GATE_ID" --reason="Approved via /pm-gate approve by human" 2>/dev/null || {
  echo "Error: failed to close gate $GATE_ID. Check 'bd show $GATE_ID' for status."
  exit 1
}

# Log the approval
mkdir -p .great-pm/verdicts
TS=$(date -u +%Y-%m-%dT%H:%M:%SZ)
LINE="$TS | pm-gate | APPROVED | id=$GATE_ID"
echo "$LINE" >> .great-pm/verdicts/pm-gate.log
echo "$LINE" >> ".great-pm/verdicts/$(date +%Y-%m-%d).log"

echo "✓ Gate $GATE_ID approved and closed."
echo ""

# Show what's newly unblocked
NEXT=$(bd close "$GATE_ID" --suggest-next 2>/dev/null | tail -10)
if [ -n "$NEXT" ]; then
  echo "Newly unblocked:"
  echo "$NEXT"
fi

Read the full file on GitHub · 181 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 · 181 lines · 53 tokens per session scan A 286fd5a7f537

Subscribe to this mod's changes

pm-gate is a command published in the GitHub repository VandanaAjayDubey111/great-pm (3 stars, last pushed 1mo ago), licensed MIT. It adds 53 tokens to every session and 1,886 once invoked, about $0.0002 per session on Opus 5.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-09-21.