alert-to-ticket

alert-to-ticket is a command for Claude Code from ParkerM2/create-claude-workflow. It costs 15 tokens per session (4,026 once invoked), scanned A, original, MIT.

A command that turns a monitoring alert into a Jira issue, including details such as the affected service, severity, and alert source.

In plain words
What is it for?
Use it to process pasted alerts, monitoring-dashboard URLs, or alert JSON files, then create consistently formatted Jira tickets linked to incidents, deploys, runbooks, and related tickets.
Why use it?
It removes the need to copy alert information into Jira and gather related context by hand. It can also preview the issue before creating it.

Command for Claude Code

Written for Claude Code: installed under .claude/.

Part of the claude-workflow plugin — 10 skills, 25 commands, 3 agents, 6 hooks shipped together

Good fit Use it to process pasted alerts, monitoring-dashboard URLs, or alert JSON files…

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/parkerm2/create-claude-workflow/alert-to-ticket
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/ParkerM2/create-claude-workflow

Made for: Claude Code.

Or install claude-workflow, the plugin that ships this one along with the rest of its 10 skills, 25 commands, 3 agents, 6 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 alert-to-ticket

README.md
[![agentmods](https://agentmods.dev/badge/commands/parkerm2/create-claude-workflow/alert-to-ticket.svg)](https://agentmods.dev/commands/parkerm2/create-claude-workflow/alert-to-ticket)
Your own site
<a href="https://agentmods.dev/commands/parkerm2/create-claude-workflow/alert-to-ticket"><img src="https://agentmods.dev/badge/commands/parkerm2/create-claude-workflow/alert-to-ticket.svg" alt="Measured on agentmods" height="20"></a>
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,026 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 2 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.00015 $0.04026
Opus 5 $0.00008 $0.02013
Sonnet 5 $0.00003 $0.00805
Haiku 4.5 $0.00002 $0.00403

Measured 6d ago against content hash 0d78d70eda52, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

alert-to-ticket scanned grade A 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 6d 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.

const response = await fetch(url);

Runs shell commandslowCapability

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

const deploys = execSync(
.claude/commands/alert-to-ticket.md · 578 lines

How it starts

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

Alert-to-Ticket Automation

Converts monitoring alerts (text, URL, or structured) into properly formatted Jira tickets. Enriches with context (past incidents, recent deploys), maps severity, and links to runbooks and related tickets.

Usage

/alert-to-ticket [<alert-description>] [--url <url>] [--json <file>] [--service <name>] [--severity <level>] [--dry-run]
  • <alert-description>: Paste alert text directly
  • --url <url>: Fetch alert from monitoring dashboard
  • --json <file>: Parse structured alert JSON
  • --service <name>: Override service detection
  • --severity <level>: Override auto-detected severity
  • --dry-run: Preview ticket without creating

Workflow

Phase 1: Alert Intake & Parsing

Ingests alert data from multiple sources and extracts key information.

class AlertParser {
  constructor() {
    this.alert = {
      service: null,
      metric: null,
      threshold: null,
      currentValue: null,
      timestamp: new Date(),
      environment: "production",
      message: "",
      source: null
    };
  }

  async parseInput(input, url, jsonFile) {
    if (jsonFile) {
      return this.parseJSON(jsonFile);
    }

    if (url) {
      return this.parseFromURL(url);
    }

    if (input) {
      return this.parseText(input);
    }

    throw new Error("No alert input provided");
  }

  parseText(text) {
    // Extract common alert patterns
    const patterns = {
      service: /(?:Service|Alert|Service Name):\s*([^\n,]+)/i,
      metric: /(?:Metric|Condition):\s*([^\n,]+)/i,
      threshold: /(?:Threshold|Trigger|Limit):\s*([\d.]+[a-z%]*)/i,
      currentValue: /(?:Current|Actual|Value):\s*([\d.]+[a-z%]*)/i,
      timestamp: /(?:Time|Occurred|Triggered):\s*([^\n,]+)/i,
      environment: /(?:Environment|Env):\s*([\w-]+)/i
    };

    for (const [key, pattern] of Object.entries(patterns)) {
      const match = text.match(pattern);
      if (match) {
        this.alert[key] = match[1];
      }
    }

    // Fallback: look for common service names
    if (!this.alert.service) {
      const serviceMatch = text.match(/\b(api|web|database|cache|queue|scheduler|worker)\b/i);
      if (serviceMatch) this.alert.service = serviceMatch[1];
    }

    this.alert.message = text;
    this.alert.source = "text";

    return this.alert;
  }

  async parseFromURL(url) {
    try {
      const response = await fetch(url);
      const html = await response.text();

      // Extract alert data from HTML (Datadog, New Relic, etc.)
      const serviceMatch = html.match(
        /<span[^>]*class="[^"]*service[^"]*"[^>]*>([^<]+)<\/span>/i
      );
      const metricMatch = html.match(
        /<span[^>]*class="[^"]*metric[^"]*"[^>]*>([^<]+)<\/span>/i
      );
      const valueMatch = html.match(/(?:Value|Current):\s*([\d.]+)/);

      if (serviceMatch) this.alert.service = serviceMatch[1].trim();
      if (metricMatch) this.alert.metric = metricMatch[1].trim();
      if (valueMatch) this.alert.currentValue = valueMatch[1];

      this.alert.message = html;
      this.alert.source = url;

      console.log(`✓ Parsed alert from URL: ${url}`);
      return this.alert;
    } catch (err) {
      console.error(`ERROR: Failed to fetch alert from URL: ${err.message}`);
      return gracefulFailure("Unable to fetch alert from URL");
    }
  }

  parseJSON(jsonFile) {
    try {
      const data = JSON.parse(fs.readFileSync(jsonFile, "utf-8"));

      // Map common alert JSON structures
      this.alert.service = data.service || data.serviceName || data.source || null;
      this.alert.metric = data.metric || data.check || data.condition || null;
      this.alert.currentValue = data.value || data.currentValue || null;
      this.alert.threshold = data.threshold || data.limit || null;
      this.alert.environment = data.environment || data.env || "production";
      this.alert.timestamp = new Date(data.timestamp || new Date());
      this.alert.message = JSON.stringify(data, null, 2);
      this.alert.source = jsonFile;

      console.log(`✓ Parsed structured alert from ${jsonFile}`);
      return this.alert;
    } catch (err) {
      console.error(`ERROR: Failed to parse JSON alert: ${err.message}`);
      return gracefulFailure("Invalid JSON alert file");
    }
  }

  validate() {
    if (!this.alert.service) {
      throw new Error("Could not determine service from alert; use --service");
    }

    if (!this.alert.metric && !this.alert.message) {
      throw new Error("No metric or message found in alert");
    }

    return true;
  }
}

const parser = new AlertParser();
const alert = await parser.parseInput(
  argv._[0], // positional text arg
  argv.url,
  argv.json
);

parser.validate();

console.log(`✓ Alert parsed`);
console.log(`  Service: ${alert.service}`);
console.log(`  Metric: ${alert.metric || "(not specified)"}`);
console.log(`  Value: ${alert.currentValue || "(not specified)"}`);

Read the full file on GitHub · 578 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. 6d ago First seen · 578 lines · 15 tokens per session scan A 0d78d70eda52

Subscribe to this mod's changes

alert-to-ticket is a command published in the GitHub repository ParkerM2/create-claude-workflow (4 stars, last pushed 5mo ago), licensed MIT. It adds 15 tokens to every session and 4,026 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 2 findings (makes network calls, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.