nightingale: Instructions file for Claude Code

CLAUDE.md

nightingale CLAUDE.md is an instructions file for Claude Code from ccfos/nightingale. It costs 1,089 tokens per session, scanned A, original, Apache-2.0.

A repository guide for Claude Code, covering Nightingale, an open-source alerting and monitoring platform written in Go. It explains how the project is structured, built, run locally, and changed safely.

In plain words
What is it for?
It helps with building Nightingale, running its services, understanding its frontend and backend layout, and avoiding breaking changes to exported Go functions.
Why use it?
It gives a coding agent the project context and commands it needs, while warning about public interfaces that other software depends on.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md.

This is ccfos/nightingale's own configuration. It tells Claude Code how to work on nightingale itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything nightingale configures →

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,527 stars · on GitHub · n9e.io

Reuse

Borrowing it

Nothing to install: this file belongs to ccfos/nightingale. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/ccfos/nightingale/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/ccfos/nightingale

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 nightingale CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/ccfos/nightingale/claude-md/github.svg)](https://agentmods.dev/instructions/ccfos/nightingale/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/ccfos/nightingale/claude-md"><img src="https://agentmods.dev/badge/instructions/ccfos/nightingale/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for nightingale CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/ccfos/nightingale/claude-md"><img src="https://agentmods.dev/badge/instructions/ccfos/nightingale/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,089 This file is loaded in full into every session.
When invoked 1,089 The same file — it is already loaded in full.
Security scan A 0 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.01089 $0.01089
Opus 5.5 $0.00436 $0.00436
Sonnet 5.5 $0.00218 $0.00218
Haiku 4.5 $0.00109 $0.00109

Measured 19d ago against content hash 8e1cdcd063cb, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

nightingale CLAUDE.md 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 19d 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.

CLAUDE.md · 42 lines

How it starts

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

CLAUDE.md

Nightingale (n9e) is an open-source alerting/monitoring platform (Go, gin + gorm). This file lists only what cannot be learned quickly by reading the code.

Cross-repo constraints

  • The commercial fork flashcatcloud/n9e-plus imports this module, so exported signatures it calls (e.g. alert.Start, centerrt.New, BuildNotifyContext, center.Initialize-style entry points) are effectively public API. Add fields/setters instead of changing parameter lists (see comments in center/center.go and alert/alert.go).
  • The frontend is a separate repo (n9e/fe), embedded as a statik bundle. front/statik/statik.go is committed, so go build ./... works without running fe.sh.

Commands

go build ./...                       # ~1 min cold; also verifies tests compile
go test ./...                        # in-memory sqlite (github.com/glebarez/sqlite), no external services
./n9e --configs etc.local            # etc.local* are git-ignored per-developer configs; etc/ is the shipped default

# CI gates, run when touching integrations/**
go run ./cmd/integrations-alert-action check     # every builtin alert rule needs a non-empty `action` annotation
go run ./cmd/integrations-alert-action update    # tighten integrations/alert_action_baseline.json after fixing rules
go run ./cmd/integrations-i18n check -scope all  # en_US rendering must contain no Chinese

There is no lint config; the two integration checks are the only code gates in CI.

Rules that span several files

  • Center vs edge/alert. n9e (center) owns the DB; n9e-edge and n9e-alert have none. Model functions branch on ctx.IsCenter: gorm directly, or HTTP to the center via pkg/poster against /v1/n9e/.... A new model read path that edge/alert needs must implement both branches, and the center must expose the matching /v1/n9e route.
  • memsto caches. Alert evaluation, dispatch and routers read from memsto/ caches, never the DB on the hot path. Adding a cached table means: model Stat() + GetsAll() (both ctx branches), a cache in memsto, and threading it through alert.Start. Change detection uses count/max(update_at); a row count alone misses "one created, one deleted" between two syncs, so tables without update_at whose rows are never edited (e.g. user_token) compare count + max(id).
  • Caches change only through their periodic sync. Don't patch a cache from an API handler to make a change "take effect immediately": it only covers the instance that served the request, so behind a load balancer the same token or config works on one node and fails on another, and the next sync's full replace can undo it. Accept the sync delay and fix the sync's change detection instead. The one exception is the Skill Gateway's UserTokenCache.Inject, whose token must authenticate within the same request.
  • Schema. models/migrate/migrate.go runs AutoMigrate on center startup, and docker/initsql/a-n9e.sql, docker/sqlite.sql, docker/migratesql/migrate.sql are maintained by hand. A new column/table must land in the gorm struct and all three SQL files. MySQL/PostgreSQL/SQLite differences (text sizes, unique index limits) are handled explicitly in MigrateTables; long string fields need an explicit gorm:"type:..." or AutoMigrate drifts or fails.
  • Models for the frontend. Nullable JSON arrays must be normalized to [] on the way out (see models/alert_rule_null_compat_test.go).
  • Alert pipeline order (alert/): eval (query, produce AlertCurEvent) → process (mute, relabel, dedupe against alert_cur_event) → queue → dispatch (subscribe, notify rules, event pipelines) → sender.
  • Event pipeline processors self-register via models.RegisterProcessor in their package init; a new processor package must also be blank-imported in alert/pipeline/pipeline.go.

Read the full file on GitHub · 42 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. 19d ago Changed · -27 lines · -1,155 tokens per session 8e1cdcd063cb
  2. 26d ago Changed · +2 lines · +206 tokens per session 02898ff14e5a
  3. 2mo ago First seen · 67 lines · 2,038 tokens per session scan A e5256ef77969

Subscribe to this mod's changes

nightingale CLAUDE.md is an instructions file published in the GitHub repository ccfos/nightingale (13,527 stars, last pushed yesterday), licensed Apache-2.0. It adds 1,089 tokens to every session, about $0.0044 per session on Opus 5.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-09-08.

Related

nightingale CLAUDE.md compared with instructions from other repositories

nightingale CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
nightingale CLAUDE.mdccfos/nightingaleInstructions file14kyesterdayApache-2.0A1,089Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA9,887GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file144ktodayMITA7,230Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA5,685GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file150ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA3,303GitHub Copilot
deno copilot-instructions.mddenoland/denoInstructions file109kyesterdayMITA3,077GitHub Copilot