ai-viewer: Skill for Claude Code

.agents/skills/project-go-backend/SKILL.md

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

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is netdata/ai-viewer's own configuration. It tells Claude Code and Codex how to work on ai-viewer 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 ai-viewer configures →

Reuse

Borrowing it

Nothing to install: this file belongs to netdata/ai-viewer. 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/netdata/ai-viewer/master/.agents/skills/project-go-backend/SKILL.md
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/github.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/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 project-go-backend

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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. 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.00057 $0.01988
Opus 5.5 $0.00023 $0.00795
Sonnet 5.5 $0.00011 $0.00398
Haiku 4.5 $0.00006 $0.00199

Measured 1mo ago against content hash 61e7a9077cd3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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. 1mo 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 1mo ago), licensed MIT. It adds 57 tokens to every session and 1,988 once invoked, about $0.0002 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-08-31.

Related

Other skills, from other repositories

structlog-structured-logging

Modern, powerful structured logging for Python using structlog. Use when adding or improving logging in Python projects, configuring structlog for dev/production, working with contextvars for request-scoped logging, integrating structlog with stdlib logging, or writing tests for logging behavior.

DemboNauta/skill-doc-generator · 61 tokens

optimizing-ef-core-queries

Optimize Entity Framework Core queries by fixing N+1 problems, choosing correct tracking modes, using compiled queries, and avoiding common performance traps. Use when EF Core queries are slow, generating excessive SQL, or causing high database load.

Harmeet10000/skills · 53 tokens

payload

Use when working with Payload projects (payload.config.ts, collections, fields, hooks, access control, Payload API). Use when debugging validation errors, security issues, relationship queries, transactions, or hook behavior.

payloadcms/payload · 43 tokens

client-setup

Create a vanilla tRPC client with createTRPCClient (), configure link chain with httpBatchLink/httpLink, dynamic headers for auth, transformer on links (not client constructor). Infer types with inferRouterInputs and inferRouterOutputs. AbortController signal support. TRPCClientError typing.

trpc/trpc · 63 tokens

adapter-express

Mount tRPC as Express middleware with createExpressMiddleware() from @trpc/server/adapters/express. Access Express req/res in createContext via CreateExpressContextOptions. Mount at a path prefix like app.use('/trpc', ...). Avoid global express.json() conflicting with tRPC body parsing for FormData.

trpc/trpc · 67 tokens

trpc-router

Entry point for all tRPC skills. Decision tree routing by task: initTRPC.create(), t.router(), t.procedure, createTRPCClient, adapters, subscriptions, React Query, Next.js, links, middleware, validators, error handling, caching, FormData.

trpc/trpc · 59 tokens