login

A command that signs a user into Polydev through a web browser or a supplied user token. Polydev is a service for asking several AI models for perspectives on one question.

In plain words
What is it for?
Use it to start a Polydev session, check for available Polydev tools, open browser authentication, or submit a token-based login in a sandboxed environment.
Why use it?
It provides a defined login path for both normal IDE use and environments where browser access or MCP tools may be limited. It also explains how to authenticate with a token when needed.

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/backspacevenkat/polydev-claude-code-plugin/login
Clone the repo
git clone --depth 1 https://github.com/backspacevenkat/polydev-claude-code-plugin
Per session 7 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,000 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.00007 $0.01000
Opus 5 $0.00003 $0.00500
Sonnet 5 $0.00001 $0.00200
Haiku 4.5 $0.00001 $0.00100

Measured yesterday against content hash 95a6acad8f93, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

login 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 yesterday.

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 -s -X POST "https://www.polydev.ai/api/auth/cli-session/${SESSION_ID}" \
plugins/polydev/commands/login.md · 122 lines

How it starts

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

/polydev-login - Browser Authentication

Login to Polydev directly from your IDE or sandboxed environment.

Instructions

When the user runs /polydev-login:

Step 1: Check if MCP tools are available

Look for tools starting with mcp__plugin_polydev_mcp__ in your available tools list.

Step 2a: If MCP tools ARE available

Call the login tool:

mcp__plugin_polydev_mcp__login({ open_browser: true })

If browser login fails or the environment is sandboxed, the user can pass their token directly:

mcp__plugin_polydev_mcp__login({ user_token: "pd_user_token_here" })

Get the token from https://polydev.ai/dashboard

Step 2b: If MCP tools are NOT available (Cowork / sandboxed environments)

Use this bash-based login flow instead:

# Generate a unique session ID
SESSION_ID=$(openssl rand -hex 32)

# Create the login session on the server
curl -s -X POST "https://www.polydev.ai/api/auth/cli-session/${SESSION_ID}" \
  -H "Content-Type: application/json"

# Generate the auth URL
echo ""
echo "========================================="
echo "  Open this URL in your browser to login:"
echo "========================================="
echo ""
echo "https://polydev.ai/auth?session_id=${SESSION_ID}&redirect=ide-plugin&auto=true"
echo ""
echo "Waiting for authentication..."

Show the auth URL to the user and ask them to open it in their browser.

Then poll for the token:

# Poll every 3 seconds for up to 5 minutes
for i in $(seq 1 100); do
  RESULT=$(curl -s "https://www.polydev.ai/api/auth/cli-session/${SESSION_ID}")
  STATUS=$(echo "$RESULT" | python3 -c "import sys,json; d=json.load(sys.stdin); print(d.get('status',''))" 2>/dev/null)

  if [ "$STATUS" = "completed" ]; then
    TOKEN=$(echo "$RESULT" | python3 -c "import sys,json; print(json.load(sys.stdin).get('token',''))" 2>/dev/null)
    if [ -n "$TOKEN" ]; then
      # Save token to config files
      mkdir -p ~/.config/polydev
      echo "POLYDEV_USER_TOKEN=${TOKEN}" > ~/.polydev.env

      # Add to shell config if not already present
      if ! grep -q "POLYDEV_USER_TOKEN" ~/.zshrc 2>/dev/null && ! grep -q "POLYDEV_USER_TOKEN" ~/.bashrc 2>/dev/null; then
        SHELL_RC="$HOME/.bashrc"
        [ -f "$HOME/.zshrc" ] && SHELL_RC="$HOME/.zshrc"
        echo "" >> "$SHELL_RC"
        echo "# Polydev AI token" >> "$SHELL_RC"
        echo "export POLYDEV_USER_TOKEN=\"${TOKEN}\"" >> "$SHELL_RC"
      fi

      echo ""
      echo "Login successful! Token saved."
      echo "Please restart your IDE for the token to take effect."
      break
    fi
  fi

  if [ "$STATUS" = "expired" ] || [ "$STATUS" = "not_found" ]; then
    echo "Session expired or not found. Please try again."
    break
  fi

  sleep 3
done

Read the full file on GitHub · 122 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. yesterday First seen · 122 lines · 7 tokens per session scan A 95a6acad8f93

Subscribe to this mod's changes

login is a command published in the GitHub repository backspacevenkat/polydev-claude-code-plugin (0 stars, last pushed 5mo ago), licensed MIT. It adds 7 tokens to every session and 1,000 once invoked, about $0.0000 per session on Opus 5. 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.