generate-message-template

generate-message-template is a skill for Claude Code, Codex from ccfos/nightingale. It costs 59 tokens per session (5,258 once invoked), scanned A, original, Apache-2.0.

A guide for creating or changing Nightingale alert messages. These messages are templates that Nightingale fills with alert details before sending them through email, SMS, voice, DingTalk, Feishu, or other channels.

In plain words
What is it for?
Use it to add details such as the hostname, severity, current value, recovery information, labels, and links to notification messages.
Why use it?
It explains which alert values can be inserted and where templates are edited, without mixing message formatting with alert rules or channel setup.

Skill for Claude CodeCodex

About the project

Nightingale is an open-source monitoring and alerting system that connects to stored metrics and log data, evaluates alert rules, and distributes notifications. Operations teams use it to manage alarms and explore observability data alongside existing data sources and collectors. Catalogue add-ons provide skills for operating Nightingale.

ccfos/nightingale · 13,280 stars · on GitHub

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 skills/ccfos/nightingale/generate-message-template
Any agent
npx skills add ccfos/nightingale --skill generate-message-template
Clone the repo
git clone --depth 1 https://github.com/ccfos/nightingale

Made for: Claude Code, Codex.

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 generate-message-template

README.md
[![agentmods](https://agentmods.dev/badge/skills/ccfos/nightingale/generate-message-template.svg)](https://agentmods.dev/skills/ccfos/nightingale/generate-message-template)
Your own site
<a href="https://agentmods.dev/skills/ccfos/nightingale/generate-message-template"><img src="https://agentmods.dev/badge/skills/ccfos/nightingale/generate-message-template.svg" alt="Measured on agentmods" height="20"></a>
Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,258 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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.00059 $0.05258
Opus 5 $0.00030 $0.02629
Sonnet 5 $0.00012 $0.01052
Haiku 4.5 $0.00006 $0.00526

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

Security

Grade A, and why

generate-message-template 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 5d 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.

aiagent/skill/embedded/builtin/generate-message-template/SKILL.md · 415 lines

How it starts

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

Nightingale (n9e) Notification Message Template Generation

Nightingale message templates use Go text/template / html/template syntax (email uses text/template, others use html/template and then escape). Users edit them on the "Notification Management → Message Templates" page; once saved they are referenced by notification rules, and when an alert fires the variables are substituted with rendered data and sent to each channel.

This skill focuses on writing/modifying the template fragment itself, and does not cover creating notification rules or channel configuration.


Render Context

The renderData passed in when the backend executes:

key type description
.events []*AlertCurEvent The list of alert events in the current batch, usually just 1
.domain string The n9e site URL, used to build redirect links

Automatically injected shorthands (no need to write by hand):

{{ $events := .events }}
{{ $event := index $events 0 }}
{{ $labels := $event.TagsMap }}
{{ $value := $event.TriggerValue }}

So inside the template you can directly use $event.xxx, $labels.agent_hostname, and $value.


Available $event Fields (*AlertCurEvent)

Common Fields

field type description
.Id int64 Alert event ID (used to build the redirect link)
.RuleId int64 Alert rule ID
.RuleName string Rule name
.RuleNote string Rule note
.Severity int Alert severity: 1=Critical, 2=Warning, 3=Info
.PromQl string Alert trigger expression
.RuleAlgo string Rule algorithm type
.TriggerTime int64 Trigger time, unix seconds
.TriggerValue string Metric value at trigger time (already a string)
.FirstTriggerTime int64 First abnormal time (for consecutive alerts)
.LastEvalTime int64 Most recent evaluation time, used as the recovery time on recovery
.IsRecovered bool Whether it has recovered
.NotifyCurNumber int Which notification number this send is
.TargetIdent string Monitored object (usually agent_hostname)
.TargetNote string Object note
.GroupId / .GroupName int64 / string Business group
.Cluster string Data source cluster name
.Cate string Data source type (prometheus / host / mysql / ...)
.RunbookUrl string Runbook link

Read the full file on GitHub · 415 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. 5d ago First seen · 415 lines · 59 tokens per session scan A 386c9ab2610f

Subscribe to this mod's changes

generate-message-template is a skill published in the GitHub repository ccfos/nightingale (13,280 stars, last pushed today), licensed Apache-2.0. It adds 59 tokens to every session and 5,258 once invoked, about $0.0003 per session on Opus 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-08-30.