project-adapters

A step-by-step guide for adding or changing an adapter. An adapter converts one source format into the project’s standard event format without handling unrelated formats.

In plain words
What is it for?
Use it when working on adapters, canonical event conversion, or related fixtures, including scanning data, following updates, resuming from a cursor, and handling errors or duplicate records.
Why use it?
It provides a repeatable path from studying the source format to writing a specification, implementation, sanitized examples, and tests.

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

Made for: Claude Code, Codex.

Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,040 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.00039 $0.01040
Opus 5 $0.00019 $0.00520
Sonnet 5 $0.00008 $0.00208
Haiku 4.5 $0.00004 $0.00104

Measured yesterday against content hash 960c1879ef35, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

project-adapters 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 yesterday.

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-adapters/SKILL.md · 76 lines

How it starts

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

Adapters

Mental Model

An adapter is a sealed unit that converts one source format into the canonical event stream. It knows everything about its format and nothing about anything else. See .agents/sow/specs/adapter-contract.md.

Adding a New Adapter

  1. Read the format authoritatively first. Open the upstream source mirror under /opt/baddisk/monitoring/repos/ai/<tool>/ and read its persistence code. Sample real files (sanitized) from the operator's environment.

  2. Write the spec first. Create .agents/sow/specs/adapter-<name>.md. Required sections: source format, record shape, watch strategy, cursor design, mapping to canonical events, sub-agent linkage, known edge cases, references. The spec is the source of truth; the code follows.

  3. Create the package. internal/adapters/<name>/adapter.go. Implement the canonical.Adapter interface. Keep the file under 400 lines; split helpers into sibling files.

  4. Commit sanitized fixtures. testdata/<name>/<scenario>/. Scenarios are listed in testing-strategy.md. Run scripts/sanitize-fixture.sh before committing.

  5. Write tests. Scan, Tail, cursor resume, error handling, idempotency. Use golden files.

  6. Register the factory. internal/adapters/registry.go:

    registry["myadapter"] = myadapter.Factory
    
  7. Add auto-discovery probe. internal/ingest/discover.go: add a probe entry that detects the format's presence on disk.

  8. Update docs. README.md Source Formats table; docs/adding-an-adapter.md if any new patterns emerged.

  9. Open or update a SOW. Use the external reviewer gates from project-second-opinions on the adapter SOW's gap analysis, implementation plan, and implementation before closing the work.

Modifying an Existing Adapter

  1. Read the adapter's spec under .agents/sow/specs/adapter-<name>.md.
  2. Read recent commits to that adapter (git log -p internal/adapters/<name>/).
  3. Check existing fixtures for coverage of the case you're touching.
  4. Make the change.
  5. Update the spec in the same commit as the code.
  6. Run go test ./internal/adapters/<name>/... with -race.
  7. If the canonical mapping changed, refresh golden files with -update-golden and inspect the diff manually before committing.

Read the full file on GitHub · 76 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. yesterday First seen · 76 lines · 39 tokens per session scan A 960c1879ef35

Subscribe to this mod's changes

project-adapters is a skill published in the GitHub repository netdata/ai-viewer (2 stars, last pushed 2d ago), licensed MIT. It adds 39 tokens to every session and 1,040 once invoked, about $0.0002 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

dd-code-generation

Use pup CLI for immediate Datadog operations or generate code for integration into applications.

DataDog/pup · 16 tokens

opentelemetry-net-instrumentation

Provides guidance for implementing OpenTelemetry instrumentation in .NET codebases, covering tracing (Activities/Spans), metrics, logs, naming conventions, error handling, performance, SDK setup, resources, context propagation, and API design best practices.

Aaronontheweb/dotnet-skills · 56 tokens

migrate-state-management

Migrate Redux or React Context to the correct state option (React Query for server state, nuqs for URL/shareable state, Zustand for global client state). Use when refactoring away from Redux/Context, moving state to the right store, or when the user asks to migrate state management.

SigNoz/signoz · 64 tokens

frontmcp-observability

Use when adding tracing, structured logging, metrics, or monitoring to a FrontMCP server. Covers zero-config OpenTelemetry distributed tracing across all flows; the this.telemetry API for custom spans, events, and attributes in tools, plugins, agents, and skills; structured JSON logging with trace correlation and…

agentfront/frontmcp · 177 tokens

golang-observability-opentelemetry

Instrumenting Go applications with OpenTelemetry for distributed tracing, Prometheus for metrics, and structured logging with slog.

bobmatnyc/claude-mpm-skills · 31 tokens

Observability Checklist

Reviews a service or codebase against a full observability checklist — logs, metrics, traces, and alerting gaps.

Notysoty/openagentskills · 28 tokens