vps-action

vps-action is a command for Claude Code from rahmanef63/control-room. It costs 0 tokens per session (1,576 once invoked), scanned B, original, MIT.

A procedure for adding actions to the VPS Control Room command pipeline, including the command template, target type, sensitivity, timeout, and optional input validation.

In plain words
What is it for?
Use it when adding operations such as restarting, stopping, or reading logs from containers and other supported VPS targets.
Why use it?
It provides the required registration details and helps ensure potentially risky actions receive confirmation and valid input.

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/rahmanef63/control-room/vps-action
Clone the repo
git clone --depth 1 https://github.com/rahmanef63/control-room

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 vps-action

README.md
[![agentmods](https://agentmods.dev/badge/commands/rahmanef63/control-room/vps-action.svg)](https://agentmods.dev/commands/rahmanef63/control-room/vps-action)
Your own site
<a href="https://agentmods.dev/commands/rahmanef63/control-room/vps-action"><img src="https://agentmods.dev/badge/commands/rahmanef63/control-room/vps-action.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 1,576 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 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.00000 $0.01576
Opus 5 $0.00000 $0.00788
Sonnet 5 $0.00000 $0.00315
Haiku 4.5 $0.00000 $0.00158

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

Security

Grade B, and why

vps-action scanned grade B with 2 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 4d 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

command_template: "sudo systemctl restart {target_id}",

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

import { exec } from "child_process";
.claude/commands/vps-action.md · 201 lines

How it starts

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

VPS Control Room — Action Pipeline Pattern

Gunakan skill ini saat menambahkan action baru ke pipeline executor.

Menambah Action Baru — 4 Langkah

1. Daftarkan di Allowlist

// agent/src/executor/allowlist.ts

export interface ActionDefinition {
  command_template: string;      // {target_id} dan {payload.*} akan di-replace
  target_type: "container" | "service" | "agent" | "dokploy-app" | "fail2ban";
  sensitive: boolean;            // true = butuh confirm dialog di frontend
  timeout_ms: number;
  validate_payload?: (payload: any) => boolean;
}

export const ALLOWLIST: Record<string, ActionDefinition> = {
  "container.restart": {
    command_template: "docker container restart {target_id}",
    target_type: "container",
    sensitive: false,
    timeout_ms: 30000,
  },
  "container.stop": {
    command_template: "docker container stop {target_id}",
    target_type: "container",
    sensitive: true,     // <-- sensitive, butuh konfirmasi
    timeout_ms: 30000,
  },
  "container.logs": {
    command_template: "docker logs --tail {payload.lines} {target_id}",
    target_type: "container",
    sensitive: false,
    timeout_ms: 10000,
    validate_payload: (p) => typeof p?.lines === "number" && p.lines > 0 && p.lines <= 500,
  },
  "service.restart": {
    command_template: "sudo systemctl restart {target_id}",
    target_type: "service",
    sensitive: true,
    timeout_ms: 30000,
  },
  "fail2ban.unban": {
    command_template: "sudo fail2ban-client set sshd unbanip {target_id}",
    target_type: "fail2ban",
    sensitive: true,
    timeout_ms: 10000,
    validate_payload: (p) => true, // target_id divalidasi sebagai IP di validator
  },
  // Dokploy redeploy = HTTP call, bukan shell command
  "dokploy.redeploy": {
    command_template: "__HTTP__", // marker bahwa ini bukan shell command
    target_type: "dokploy-app",
    sensitive: true,
    timeout_ms: 60000,
  },
};

2. Tambah Validator

// agent/src/executor/validators.ts

import { ALLOWLIST } from "./allowlist";

interface ValidationResult {
  valid: boolean;
  reason?: string;
}

// knownTargets di-maintain dari collector results
export function validateCommand(
  action: string,
  targetType: string,
  targetId: string,
  payload: any,
  knownTargets: Map<string, Set<string>> // target_type → Set<target_id>
): ValidationResult {
  // 1. Action ada di allowlist?
  const def = ALLOWLIST[action];
  if (!def) return { valid: false, reason: `unknown action: ${action}` };

  // 2. Target type cocok?
  if (def.target_type !== targetType) {
    return { valid: false, reason: `action ${action} expects target_type ${def.target_type}, got ${targetType}` };
  }

  // 3. Target ID dikenali? (dari collector)
  const targets = knownTargets.get(targetType);
  if (!targets?.has(targetId)) {
    return { valid: false, reason: `unknown target: ${targetType}/${targetId}` };
  }

  // 4. Validasi IP format untuk fail2ban
  if (targetType === "fail2ban") {
    const ipRegex = /^(\d{1,3}\.){3}\d{1,3}$/;
    if (!ipRegex.test(targetId)) {
      return { valid: false, reason: `invalid IP format: ${targetId}` };
    }
  }

  // 5. Payload valid?
  if (def.validate_payload && !def.validate_payload(payload)) {
    return { valid: false, reason: `invalid payload for action ${action}` };
  }

  return { valid: true };
}

Read the full file on GitHub · 201 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. 4d ago First seen · 201 lines · 0 tokens per session scan B 709242b5d176

Subscribe to this mod's changes

vps-action is a command published in the GitHub repository rahmanef63/control-room (19 stars, last pushed 4d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,576 tokens. A static security scan graded it B with 2 findings (asks for root, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.