infra-lens-mcp: Instructions file for Codex

AGENTS.md

infra-lens-mcp AGENTS.md is an instructions file for Codex, OpenCode from oaslananka/infra-lens-mcp. It costs 482 tokens per session, scanned A, original, MIT.

Repository instructions for an AI agent that investigates Linux servers over SSH and compares their metrics with saved healthy-state baselines.

In plain words
What is it for?
Checking server health, collecting snapshots, recording baselines, comparing current metrics with a baseline, reviewing history, and investigating slow servers.
Why use it?
They provide a consistent way to distinguish current server conditions from recorded normal behavior and explain unusual CPU, memory, or load readings.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions AGENTS.md.

This is oaslananka/infra-lens-mcp's own configuration. It tells Codex and OpenCode how to work on infra-lens-mcp 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 infra-lens-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to oaslananka/infra-lens-mcp. 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/oaslananka/infra-lens-mcp/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/oaslananka/infra-lens-mcp

Made for: Codex, OpenCode.

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 infra-lens-mcp AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/oaslananka/infra-lens-mcp/agents-md/github.svg)](https://agentmods.dev/instructions/oaslananka/infra-lens-mcp/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/oaslananka/infra-lens-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/oaslananka/infra-lens-mcp/agents-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 infra-lens-mcp AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/oaslananka/infra-lens-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/oaslananka/infra-lens-mcp/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 482 This file is loaded in full into every session.
When invoked 482 The same file — it is already loaded in full.
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.00482 $0.00482
Opus 5 $0.00241 $0.00241
Sonnet 5 $0.00096 $0.00096
Haiku 4.5 $0.00048 $0.00048

Measured 10d ago against content hash 37fb81011a8c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

infra-lens-mcp AGENTS.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 10d 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.md · 59 lines

How it starts

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

AGENTS.md

Canonical repository instructions for AGENTS.md-aware coding agents.

Tool usage guide

analyze_server

Connects to a Linux host over SSH, samples the requested collection window, compares the result to recorded baselines, and explains anomalies in plain English.

Use it for questions like:

  • "Is prod-01 healthy right now?"
  • "Why is this server slow?"
  • "What changed compared to normal traffic?"

snapshot

Captures a point-in-time metric snapshot and stores it in SQLite without running anomaly analysis.

Use it when you want fresh telemetry for later history lookups or before a manual investigation.

record_baseline

Stores a labeled healthy-state sample so future comparisons have statistical context.

Use it during normal operating windows such as:

  • daytime steady state
  • peak traffic
  • post-deployment warm state

compare_to_baseline

Collects a fresh snapshot and compares it to a named baseline label.

Use it when an operator already knows which baseline is relevant and wants the shortest differential view.

get_history

Returns CPU, memory, or load history from SQLite, optionally filtered by label.

Use it to answer trend questions and to separate default incident snapshots from named baseline sessions.

Operational limits

  • Host key verification is strict by default. Use known_hosts or pinned SHA256 host key fingerprints.
  • The HTTP transport binds to loopback by default. Non-loopback deployments must use a remote-safe profile, auth, allowed origins, and allowed hosts.
  • SSH credentials are redacted from structured logs and are never stored in SQLite.

Working rules

  • Keep the current MCP tool surface unchanged unless a task explicitly asks for a new tool.
  • Preserve stdio protocol safety: do not write user-facing protocol data to stdout outside MCP responses.
  • Route operational logging through the existing structured logger and keep secrets redacted.
  • Prefer Node 24 for CI, Docker, release, and docs. Keep Node 22 compatibility when engines.node remains >=22.
  • Before wrapping up code changes, run pnpm run lint, pnpm run test:coverage, and pnpm run build. Run pnpm run test:e2e when Docker-backed SSH verification is relevant.
  • Follow docs/release.md for release-please, npm trusted publishing, and MCP Registry version decisions.

Read the full file on GitHub · 59 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. 10d ago First seen · 59 lines · 482 tokens per session scan A 37fb81011a8c

Subscribe to this mod's changes

infra-lens-mcp AGENTS.md is an instructions file published in the GitHub repository oaslananka/infra-lens-mcp (2 stars, last pushed 1mo ago), licensed MIT. It adds 482 tokens to every session, about $0.0024 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