agentleFS
dmzoneilldmzoneill/skills/investigate-slack-alert/SKILL.md

investigate-slack-alert

Skill2 starsChanged 20 days agoApache-2.0View on GitHub

Investigate Prometheus alerts from Slack, create/link Jira issues, reply with findings. Triggered by app-sre-alerts in alert channels. Billing alerts get special format. Use when user says "investigate Slack alert" or "look into this alert".

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If billing: jira_search(jql="project = AAP AND summary ~ 'BillingEvent'") — get next BillingEvent number

    line 58
  2. Very specific:

    If no match: skill_run("create_jira_issue", summary, description, issue_type, labels)

    line 61

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Investigate Slack Alert

Investigate Prometheus alerts posted in Slack channels. Acknowledges immediately, checks pods/logs, creates or links Jira, replies with summary.

Kubeconfig Rules

FileEnvironment
~/.kube/config.sStage
~/.kube/config.pProduction

Inputs

InputTypePurpose
channel_idstringSlack channel ID
message_tsstringMessage timestamp (threading)
message_textstringAlert message content
alert_urlstringOptional AlertManager URL

Persona Switches

  • incident — K8s, kubectl, Jira
  • slack — slack_send_message for ack and reply

Workflow

1. Bootstrap

  • persona_load("incident")
  • knowledge_query(project="automation-analytics-backend", persona="devops", section="gotchas")
  • check_known_issues("alert", "")

2. Load Config

From config.json → slack.listener.alert_channels[channel_id]:

  • environment, namespace, cluster

3. Parse Alert

Extract from message: alert_name, firing_count, description, links, is_billing, namespace. Billing keywords: billing, subscription, vcpu, etc.

4. Acknowledge

  • persona_load("slack")
  • slack_send_message(target=channel_id, thread_ts=message_ts, text="👀 Looking into this...")

5. Investigate

  • persona_load("incident")
  • kubectl_get_pods(namespace, environment) — pod status
  • kubectl_logs(namespace, selector="app=automation-analytics-processor-ingress", tail=50) — if processor/error pods
  • code_search(query=alert_name, project="automation-analytics-backend", limit=5)

6. Search Jira

  • jira_search(jql="project = AAP AND summary ~ '{alert_name}' AND status NOT IN (Done, Closed)")
  • If billing: jira_search(jql="project = AAP AND summary ~ 'BillingEvent'") — get next BillingEvent number

7. Create or Link Jira

  • If no match: skill_run("create_jira_issue", summary, description, issue_type, labels)
  • Billing format: BillingEvent XXXXX - [Processor] Error: ...

8. Reply to Slack

  • persona_load("slack")
  • Build response: alert, env, namespace, pod status, errors, Jira link, quick links
  • slack_send_message(target=channel_id, thread_ts=message_ts, text=response)

9. Log & Update

  • memory_session_log("Investigated Slack alert", ...)
  • Update state/environments

10. Failure Recovery

  • k8s "forbidden"/"unauthorized" → kube_login("stage"|"prod")
  • "no route to host" → vpn_connect()
  • Kibana auth → open Kibana in browser
  • Slack "not_in_channel" → invite bot to channel

Billing Alert Special Handling

  • Higher priority
  • Format: BillingEvent XXXXX - [Processor] Error: description
  • Numbered sequentially from existing billing events

Output

Summary with: alert, environment, unhealthy pods, error patterns, Jira key/url, Slack reply status.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.