agent-beacon: Instructions file for Claude Code

CLAUDE.md

agent-beacon CLAUDE.md is an instructions file for Claude Code from Asymptote-Labs/agent-beacon. It costs 20,923 tokens per session, scanned D, original, MIT.

Project guidance for Beacon, a local-only tool that collects activity from AI runtimes and exports telemetry. Telemetry is recorded information about what a program or service is doing.

In plain words
What is it for?
Use it to work on the command-line agent, runtime hooks, OpenTelemetry collector, JavaScript SDK, browser extension, and packaging files.
Why use it?
It defines the supported code paths and keeps changes aligned with Beacon’s local-only purpose instead of turning it into a hosted policy or endpoint-protection service.

Instructions file for Claude Code

Written for Claude Code: SessionStart hook event. Also seen: reads .claude/ paths; mentions .claude-plugin; mentions CLAUDE.md.

This is Asymptote-Labs/agent-beacon's own configuration. It tells Claude Code how to work on agent-beacon 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 agent-beacon configures →

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is cd ../opencode-beacon && bun run check && bun test.

About the project

Agent Beacon is a local-first memory layer that records AI coding-agent sessions and turns useful workflows, corrections, and debugging patterns into knowledge that other agents can reuse. Developers use it across Claude Code, Cursor, Codex, OpenCode, and other agent harnesses so lessons and repository conventions persist between sessions. The catalogue entries provide instructions and a skill for working with Beacon's shared agent memory.

Asymptote-Labs/agent-beacon · 2,808 stars · on GitHub · beacon.sh

Reuse

Borrowing it

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

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 agent-beacon CLAUDE.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/asymptote-labs/agent-beacon/claude-md"><img src="https://agentmods.dev/badge/instructions/asymptote-labs/agent-beacon/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 20,923 This file is loaded in full into every session.
When invoked 20,923 The same file — it is already loaded in full.
Security scan D 2 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.20923 $0.20923
Opus 5.5 $0.08369 $0.08369
Sonnet 5.5 $0.04185 $0.04185
Haiku 4.5 $0.02092 $0.02092

Measured today against content hash 5677fc956918, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade D, and why

agent-beacon CLAUDE.md scanned grade D with 2 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 today.

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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

sudo /opt/beacon/bin/beacon endpoint update --apply

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf .tmp/release-<tag>
CLAUDE.md · 607 lines

How it starts

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

CLAUDE.md

Guidance for Claude Code and other coding agents working in this repository.

Project Scope

Beacon Endpoint Agent is a local-only endpoint telemetry agent for AI runtimes. The shipping code paths are:

  • cli/beacon: public beacon CLI and endpoint runtime.
  • cli/beacon-hooks: hook adapter invoked by Cursor and other supported runtimes.
  • collector-builder: OpenTelemetry Collector distribution and Beacon JSONL exporter.
  • packages/asymptote-sdk-js: TypeScript SDK for cloud agent telemetry that exports Beacon-compatible OpenTelemetry spans.
  • browser-extension: optional MV3 collector (Chrome, plus a beta Firefox build target) that relays Claude.ai and ChatGPT chat telemetry into the local pipeline as OTLP.
  • pkg/asymptoteobserve: shared Go library — event schema, harness-name normalization, provenance markers, token usage, and the threat-rules engine. Imported by the CLI, the hook adapter, and the collector exporter, so a change here reaches all three.
  • plugins: TypeScript sources for the managed runtime plugins/extensions (opencode-beacon, cline-beacon, pi-beacon, omp-beacon, openclaw-beacon, prime-beacon, omo-beacon), each mirrored into an embedded copy under cli/beacon/internal/endpoint/hooks/assets/.
  • agent-skills: publishable Agent Skills plugin for the traces-to-memory workflow (beacon-memory-recall, beacon-memory-distill, beacon-memory-promote), for authoring dashboard lenses (beacon-lens-create), for sharing the current session to beacon.sh (beacon-trace-share, which runs beacon share --current --harness <runtime> --json, keeps the default direct visibility and asks before public), and for continuing local sessions in another runtime (beacon-session-handoff, which uses detached CLI launch) with manifests for Claude Code, Agent Plugins (Codex, Copilot, VS Code, Kiro, Devin), Cursor, Kimi Code, and Gemini CLI. At the repo root, .claude-plugin/marketplace.json is read by most harnesses, .cursor-plugin/marketplace.json by Cursor, and package.json (pi.skills only) makes the repo a Pi/Prime Agent package; keep that root package.json free of dependencies and scripts. cli/beacon/cmd/agent_skills_test.go checks every beacon command and flag the skills name against the real command tree, so rename a command and update the skills together. The binary carries a copy of agent-skills/skills in cli/beacon/internal/agentskills/skills for onboarding and beacon skills install; a test keeps it identical, so copy it across whenever a skill changes.
  • rules and spec/threat-rules: the open rule corpus and the Threat Rules format it conforms to. Every rule's taxonomy.beacon_category is its directory name, and the six embedded baseline rules in pkg/asymptoteobserve/rulestore/baseline are byte-identical copies of their corpus rules; conformance tests enforce both.
  • spec/lenses: the Lenses format — single-file HTML views of one trace that the local dashboard runs in a sandboxed, network-less frame and feeds once through window.beacon.getTrace(). The contract types (LensManifestV1, LensDataV1) live in pkg/asymptoteobserve/lens.go, and lens_test.go pins the spec's examples and manifest schema to them. The dashboard builds the data in BuildLensData (/api/lens-data), lists lenses at /api/lenses, and serves each lens at /lenses/frame/<id> under the spec's CSP with lenses/prelude.js (which defines window.beacon) injected ahead of it; that route is the only one that may be framed. Built-in lenses are cli/beacon/internal/endpoint/dashboard/lenses/*.lens.html, and activity is byte-identical to the spec example (a test enforces it). The session page (static/session.html, initLensTabs in app.js) shows lenses as tabs fed by /api/lens-data?session=, which projects exactly the events that page lists; it is the host half of the protocol and closes a lens that errors, stalls, or navigates its own frame. Trust model (SPEC "Trust model"): the opaque origin, sandbox and CSP keep a lens from touching Beacon or the dashboard and block ordinary network APIs, but cannot fully prevent a lens from sending trace data out through browser features no CSP governs (WebRTC, resource hints, speculative loading), so an installed lens is code the person trusts with the trace data it is shown; never describe the sandbox as making exfiltration impossible. prelude.js removes the RTC* globals and guards the document (refuses creating, inserting or parsing in nested frames, <link> elements and <script type=speculationrules>, parsing markup in the real call's document and context and inserting exactly the checked nodes so <noscript>/foreign-content parser differentials cannot slip through, refuses document.write and execCommand("insertHTML"), and a mutation observer removes those from the file's own markup); that is best-effort hardening, not a boundary, and the hostile probe fixture in testdata/lens-e2e pins each covered path. Installed lenses live in the lens store (cli/beacon/internal/endpoint/lensstore, <BaseDir>/lenses/<id>.lens.html, 0600 under 0700), written only by beacon lenses add|remove (cli/beacon/cmd/lenses.go; add prints the trust warning and confirms on a TTY, and refuses without one or in CI unless --yes); the dashboard rescans it per request and never writes it, and a store lens can never shadow a built-in. asymptoteobserve.CheckLensFile is the one file check every installer, server and linter uses. User docs are docs/concepts/lenses.mdx and docs/cli/lenses.mdx; keep them in sync with the commands and built-in lenses. The authoring loop is beacon lenses spec (the spec carried in the binary as dashboard/lenses/SPEC.md, kept byte-identical to spec/lenses/SPEC.md by a test), beacon lenses data (the exact LensDataV1 for a session), beacon lenses lint (lensstore.Lint; built-ins must lint clean) and beacon lenses preview (the dashboard with Options.LensFiles, re-read per reload).
  • beacon-sandbox: harness that runs a real Claude Code session in a disposable sandbox and checks what Beacon captured. See beacon-sandbox/AGENTS.md.
  • packaging: macOS, Linux, and Windows packaging and deployment assets.
  • terraform: customer-run Terraform modules for the cloud side of object storage forwarding. The base modules aws-s3 and gcs always create a new, dedicated bucket (never an existing one) and the writer every Mac's forwarder uses: the put-only beacon-endpoint-writer IAM user, or a beacon-endpoint-writer service account with objectCreator limited to the prefix by an IAM condition. The enterprise self-hosted path, where Asymptote reads that bucket through ClickHouse, is two separate modules that take the base module's bucket output: aws-s3-asymptote-reader (an asymptote-s3-reader IAM user, because ClickPipes on the GCP-hosted ClickHouse rejects IAM roles, plus an SQS queue and dead-letter queue per stream and the bucket notification, which it owns) and gcs-asymptote-reader (objectViewer for beacon-clickpipes-reader@asymptote-labs, a Pub/Sub topic, the notification and a subscription per stream with the managed path's settings). The queues exist because a ClickPipe without one reads in key order and skips objects that land behind its cursor, which Macs uploading on their own timers cause; their URLs and subscription paths are outputs for the provisioning script's --queue-url. Keep everything Asymptote-specific out of the base modules. No module creates keys unless asked (create_writer_access_key, create_writer_key, create_access_key), so no secret lands in state by default. Resource names and forwarder_settings match the packaged install-forwarder.sh helpers and the manual guides. docs.beacon.sh (docs/log-forwarding/{aws-s3,gcs}-terraform.mdx) documents the base modules only. The reader modules and the self-hosted setup are documented only on docs.asymptotelabs.ai (beacon-mdr docs/deployment/self-hosted-{s3,gcs}.mdx), so keep them out of docs/; /manage/configure-s3-data-connector redirects there. Both sites pin the modules to a release tag; keep them in sync with the variables.
  • docs: the published documentation site (docs.asymptotelabs.ai).

Read the full file on GitHub · 607 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. today Changed · +6 lines · +98 tokens per session 5677fc956918
  2. 2d ago Changed · +184 tokens per session f13b40900fc1
  3. 3d ago Changed · +4 lines · +360 tokens per session 6b9d7bb8908a
  4. 5d ago Changed · +70 tokens per session 7397920d8132
  5. 9d ago Changed · +10 lines · +220 tokens per session 7a613c68d94f
  6. 10d ago Changed · +8 lines · +462 tokens per session edfa0fee2b01
  7. 11d ago Changed · +1 lines · +174 tokens per session bf580cfacf78
  8. 13d ago Changed · +8 lines · +549 tokens per session 23136e46ae66
  9. 14d ago Changed · +2 lines · +3,063 tokens per session 736e7d6f74a0
  10. 15d ago First seen · 568 lines · 15,743 tokens per session scan D 306b92eecf97

Subscribe to this mod's changes

agent-beacon CLAUDE.md is an instructions file published in the GitHub repository Asymptote-Labs/agent-beacon (2,808 stars, last pushed today), licensed MIT. It adds 20,923 tokens to every session, about $0.0837 per session on Opus 5.5. A static security scan graded it D with 2 findings (asks for root, recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 9,715 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,581 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,731 tokens

deno copilot-instructions.md

Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.

denoland/deno · 3,077 tokens