project-go-backend

project-go-backend is a skill for Claude Code, Codex from netdata/ai-viewer. It costs 57 tokens per session (1,988 once invoked), scanned A, original, MIT.

A set of Go coding patterns for ai-viewer, covering file watching, SQLite databases, server-sent events, structured logs, and related backend code. Server-sent events are a way for a server to stream updates to a browser over an open connection.

In plain words
What is it for?
Use it when editing ingestion, storage, presentation, adapters, canonical data, or observability code, especially when adding dependencies, goroutines, blocking operations, or streaming.
Why use it?
It keeps backend changes consistent with the project’s dependency, concurrency, context, and resource-cleanup rules.

Skill for Claude CodeCodex

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/netdata/ai-viewer/project-go-backend
Any agent
npx skills add netdata/ai-viewer --skill project-go-backend
Clone the repo
git clone --depth 1 https://github.com/netdata/ai-viewer

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 project-go-backend

README.md
[![agentmods](https://agentmods.dev/badge/skills/netdata/ai-viewer/project-go-backend.svg)](https://agentmods.dev/skills/netdata/ai-viewer/project-go-backend)
Your own site
<a href="https://agentmods.dev/skills/netdata/ai-viewer/project-go-backend"><img src="https://agentmods.dev/badge/skills/netdata/ai-viewer/project-go-backend.svg" alt="Measured on agentmods" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,988 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.00057 $0.01988
Opus 5 $0.00028 $0.00994
Sonnet 5 $0.00011 $0.00398
Haiku 4.5 $0.00006 $0.00199

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

Security

Grade A, and why

project-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 4d 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.

.agents/skills/project-go-backend/SKILL.md · 221 lines

How it starts

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

Go Backend Patterns

Stack Versions

Always pin to the latest stable Go release. Update Go toolchain (go.mod go directive + CI runner) when a new minor release is GA and has been out for 2+ weeks.

Dependency policy: prefer stdlib. When a library is needed, prefer the canonical pure-Go option:

Need Library
File watching github.com/fsnotify/fsnotify
SQLite modernc.org/sqlite (pure Go, CGO-free, cross-compiles)
Logging stdlib log/slog
HTTP routing stdlib net/http + http.ServeMux (Go 1.22+ pattern routing)
UUIDs github.com/google/uuid
Testing assertions stdlib testing; resist adding testify
YAML config gopkg.in/yaml.v3

Adding any new dependency requires a one-line note in the SOW under ## Decisions.

Concurrency Patterns

Goroutine ownership

Every goroutine has a clear owner who is responsible for starting and stopping it. Document in the constructor godoc:

// NewIngester constructs an ingester. The caller MUST call Close to stop
// the internal worker goroutines.
func NewIngester(...) *Ingester { ... }

Context propagation

  • Every blocking function takes ctx context.Context as the first parameter.
  • Every goroutine respects ctx.Done() for shutdown.
  • HTTP handlers use r.Context() and pass it through to store/query calls.
  • Registered REST handlers (mux.HandleFunc("/api/...", p.<handler>)) keep their method gate directly visible in the handler body as r.Method != http.Method... comparisons. Do not extract the method guard itself into a helper: scripts/spec-drift.sh intentionally fails closed when it cannot prove the registered verb/path contract from the handler body. Extract the error writer or response/query work instead.

Channels

  • Direction: prefer <-chan T / chan<- T in function signatures to make ownership explicit.
  • Buffer sizes: documented in code with a comment explaining the choice and the drop policy when full.
  • Close: only the sender closes. Document who the sender is.

Read the full file on GitHub · 221 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. 4d ago First seen · 221 lines · 57 tokens per session scan A 61e7a9077cd3

Subscribe to this mod's changes

project-go-backend is a skill published in the GitHub repository netdata/ai-viewer (2 stars, last pushed yesterday), licensed MIT. It adds 57 tokens to every session and 1,988 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-31.

Related

Other skills, from other repositories

sqlite-schema-design

Design or review schemas for crates/cloudsync using SQLite Sync constraints, not generic SQLite advice. Use when adding synced tables, changing synced columns, or planning CloudSync-safe migrations.

fastrepl/anarlog · 42 tokens

reactive-sqlite-ui

Build SQLite-backed reactive UI in apps/desktop using stable patterns for reads, selection, forms, writes, and loading states. Use when implementing or reviewing screens built on useDrizzleLiveQuery and SQLite mutations.

fastrepl/anarlog · 53 tokens

saas-builder

Clone, verify, map, and build on top of ixartz/SaaS-Boilerplate for a user's SaaS idea. Use when a user wants to reuse SaaS Boilerplate, evaluate how their product fits it, or build product-specific pages, database schema, roles, permissions, MVP features, and launch scope on top of the boilerplate.

ixartz/SaaS-Boilerplate · 75 tokens

build-with-tinybase

Scaffold, extend, and verify reactive local-first JavaScript or TypeScript applications with TinyBase. Use when choosing TinyBase for in-memory tabular or key-value state, generating an app with create-tinybase, adding schemas or UI bindings, configuring browser or database persistence, configuring MergeableStore…

tinyplex/tinybase · 76 tokens

migrate-to-sqlite

Migrate a TinyBase table to SQLite. Use when asked to move a data domain (e.g. templates, vocabs) from the TinyBase store to the app SQLite database.

fastrepl/anarlog · 44 tokens

sq

Guides use of the sq CLI to query SQL databases and tabular files with SLQ (sq's jq-like query language) or native SQL, manage sources, choose output formats, and run inspect, diff, and table commands. Use when the user mentions sq, SLQ, wrangling CSV/Excel/JSON/DB data, cross-source joins, or command-line data…

neilotoole/sq · 89 tokens