og-cli CLAUDE.md

og-cli CLAUDE.md is an instructions file for coding agents from carlosprados/og-cli. It costs 2,680 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

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 instructions/carlosprados/og-cli/claude-md
Clone the repo
git clone --depth 1 https://github.com/carlosprados/og-cli

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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,680 This file is loaded in full into every session.
When invoked 2,680 The same file — it is already loaded in full.
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.02680 $0.02680
Opus 5 $0.01340 $0.01340
Sonnet 5 $0.00536 $0.00536
Haiku 4.5 $0.00268 $0.00268

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

Security

Grade A, and why

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

CLAUDE.md · 191 lines

How it starts

The opening of the file, as written. The whole thing — 191 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.

Read the full file on GitHub · 191 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. 5d 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 6d ago), licensed Apache-2.0. It adds 2,680 tokens to every session, about $0.0134 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 instructions, from other repositories