og-cli: Instructions file for Claude Code

CLAUDE.md

og-cli CLAUDE.md is an instructions file for Claude Code from carlosprados/og-cli. It costs 4,329 tokens per session, scanned A, original, Apache-2.0.

Repository instructions for Claude Code, an AI coding assistant, describing the og command-line tool for the OpenGate IoT platform and how its Go code is organised.

In plain words
What is it for?
Building, testing, formatting, linting, and understanding the og tool, including its API client, terminal interface, configuration, and MCP server.
Why use it?
They give the assistant project-specific context so it can use the right commands, files, and conventions instead of guessing.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

This is carlosprados/og-cli's own configuration. It tells Claude Code how to work on og-cli 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 og-cli configures →

Reuse

Borrowing it

Nothing to install: this file belongs to carlosprados/og-cli. 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/carlosprados/og-cli/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/carlosprados/og-cli

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 og-cli CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/carlosprados/og-cli/claude-md/github.svg)](https://agentmods.dev/instructions/carlosprados/og-cli/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/carlosprados/og-cli/claude-md"><img src="https://agentmods.dev/badge/instructions/carlosprados/og-cli/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 og-cli CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/carlosprados/og-cli/claude-md"><img src="https://agentmods.dev/badge/instructions/carlosprados/og-cli/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 4,329 This file is loaded in full into every session.
When invoked 4,329 The same file — it is already loaded in full.
Security scan A 1 finding. 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.04329 $0.04329
Opus 5.5 $0.01732 $0.01732
Sonnet 5.5 $0.00866 $0.00866
Haiku 4.5 $0.00433 $0.00433

Measured 1mo ago against content hash 92387e786f5c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

og-cli CLAUDE.md scanned grade A with 1 finding 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

(`curl … | jq -S .` vs `og … -o json | jq -S .`), not against the spec.
CLAUDE.md · 278 lines

How it starts

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

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project

og is a CLI tool (binary name: og) for the OpenGate IoT platform REST API by Amplía Soluciones. Built in Go with Cobra (commands), Viper (config), and Bubble Tea + Lip Gloss (interactive TUI).

Commands

task build          # build the og binary
task test           # go test ./... -v
task lint           # golangci-lint run ./...
task fmt            # gofmt + goimports
task tidy           # go mod tidy
task install        # go install with ldflags
go test ./internal/client/ -run TestLogin -v   # run a single test

Version info is injected via ldflags — see Taskfile.yml LDFLAGS.

Architecture

main.go              → cmd.Execute()
cmd/                 → Cobra commands (root, login, version, mcp, datamodels, devices)
pkg/opengate/        → OpenGate REST API client (HTTP methods, auth, resource methods)
pkg/query/           → Search filter parser (-w "field op value", query strings)
internal/config/     → Viper config, profiles, .env loading
internal/mcp/        → MCP server (stdio + HTTP transports) + tool definitions
internal/output/     → JSON/table output formatting
internal/tui/        → Bubble Tea interactive TUI
internal/unwrap/     → Workspace/rule/connector unwrap to local dirs
internal/views/      → Named field views for searches

pkg/ is the public library surface: it is consumed by external services (e.g. Punto de Luz), so its API is a contract. internal/ is CLI-private.

Library conventions for pkg/:

  • Every method that performs I/O takes ctx context.Context as its first parameter, propagated to http.NewRequestWithContext. No exceptions.
  • Per-client configuration goes through functional options on New (WithHTTPClient, WithTLS, WithAPIVersion, WithAPIKey) — never process-wide state. ConfigureTLS/NewHTTPClient are deprecated leftovers kept for the CLI, which has exactly one endpoint per invocation.
  • North API path constants carry the {v} version placeholder, resolved per client. Never hardcode a version segment.
  • A misconfigured client is not a panic and not a second constructor: New records the error, and Err() plus every request return it.
  • A typed getter is lossy by construction. Most families return json.RawMessage and pass the platform's bytes through; datamodels, datasets, timeseries and workspaces decode into structs, so any field the struct does not name is dropped without a word. Where a struct exists, ship a …Raw sibling (GetDatamodelRaw, GetDatasetRaw, GetTimeSeriesRaw, ListTimeSeriesRaw, GetWorkspaceRaw) so callers who need fidelity are not hostage to this package being current — and surface it as --raw on the CLI get. Note og workspace pull reads through the struct too, so workspaces are the one family whose pull is not a passthrough.

Read the full file on GitHub · 278 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 Changed · +49 lines · +908 tokens per session 92387e786f5c
  2. 1mo ago Changed · +24 lines · +473 tokens per session 93830e2f8b2c
  3. 2mo ago Changed · +14 lines · +268 tokens per session 5fb15eb22f41
  4. 2mo ago First seen · 191 lines · 2,680 tokens per session scan A ee4236b439f4

Subscribe to this mod's changes

og-cli CLAUDE.md is an instructions file published in the GitHub repository carlosprados/og-cli (2 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 4,329 tokens to every session, about $0.0173 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

og-cli CLAUDE.md compared with instructions from other repositories

og-cli CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
og-cli CLAUDE.mdcarlosprados/og-cliInstructions file21mo agoApache-2.0A4,329Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode