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.
npx agentmods add rules/consensys/ask-o11y-plugin/go-backendgit clone --depth 1 https://github.com/Consensys/ask-o11y-pluginWrote 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.
[](https://agentmods.dev/rules/consensys/ask-o11y-plugin/go-backend)<a href="https://agentmods.dev/rules/consensys/ask-o11y-plugin/go-backend"><img src="https://agentmods.dev/badge/rules/consensys/ask-o11y-plugin/go-backend.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.00445 |
| Opus 5 | $0.00000 | $0.00222 |
| Sonnet 5 | $0.00000 | $0.00089 |
| Haiku 4.5 | $0.00000 | $0.00044 |
Grade A, and why
go-backend 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 3d 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.
What it actually says
Go Backend Patterns
Reference: CLAUDE.md is the authoritative source.
Logging — Never use fmt.Println or stdlib log
// ✅ CORRECT — use the SDK logger
p.logger.Warn("Invalid request body", "error", err)
p.logger.Error("MCP call failed", "tool", toolName, "error", err)
// ❌ WRONG
fmt.Println("error:", err)
log.Printf("error: %v", err)
HTTP Error Responses — Never leak internals
// ✅ CORRECT — generic message to client, details in log
if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
p.logger.Warn("Invalid request body", "error", err)
http.Error(w, "Invalid request body", http.StatusBadRequest)
return
}
// ❌ WRONG — leaks request fragments / internal error details
http.Error(w, fmt.Sprintf("Invalid request: %v", err), http.StatusBadRequest)
RBAC — Double-check pattern (list AND execute)
- Extract role from
req.Context() - Call
canAccessTool(role, toolName)— return 403 if unauthorized - Enforcement must happen at BOTH tool listing and tool execution
OpenAPI Spec — Update when changing HTTP endpoints
Any change to routes in pkg/plugin/plugin.go requires:
- Update
pkg/plugin/openapi/openapi.json - Run
nvm use 22 && npm run validate:openapi
Multi-Org Constraints (CRITICAL)
- SA token from
backend.GrafanaConfigFromContext()is Org 1 only useBuiltInMCP: trueonly works for Org 1 — never set it infull.yaml_- For multi-org: use external
mcp-grafanasidecar - The LLM client intentionally does not send
X-Grafana-Org-Idwhen using SA token auth
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.
- 3d ago First seen · 54 lines · 0 tokens per session scan A bbbe334cc7bc
go-backend is a cursor rule published in the GitHub repository Consensys/ask-o11y-plugin (40 stars, last pushed 9d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 445 tokens. 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.
Other cursor rules, from other repositories
backend
You are an expert in Go, Gin, Gorm, Gen, Cosy (https://cosy.uozi.org/) with a deep understanding of best practices and performance optimization techniques in these technologies.
100-go-mistakes
Cursor rule "100-go-mistakes" from openshift/hypershift, covering general best practices, interfaces, structs and methods, packages and imports and slices.
code-style
Formatting, lint, comments language.
shared-libraries
Shared libraries - condition framework, inventory containers, file-backed DB, itinerary, references.
go-conventions
Go conventions for all Go code (modules, naming, errors, logging, metrics).
go
Go conventions for all Zapstore Go projects (zsp, server, zindex, zapstore-cli).