context-sherpa AGENTS.md

Project instructions for AI agents working on the hackafterdark/context-sherpa Go API project.

In plain words
What is it for?
Use them when changing that project, especially for its Go workflow, directory structure, and rules for finding code.
Why use it?
They explain the project's conventions and how to navigate code without reading unrelated sections.

Instructions file for CodexOpenCode

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/hackafterdark/context-sherpa/agents-md
Clone the repo
git clone --depth 1 https://github.com/hackafterdark/context-sherpa

Made for: Codex, OpenCode.

Per session 2,907 This file is loaded in full into every session.
When invoked 2,907 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.02907 $0.02907
Opus 5 $0.01453 $0.01453
Sonnet 5 $0.00581 $0.00581
Haiku 4.5 $0.00291 $0.00291

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

Security

Grade A, and why

context-sherpa 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 2d 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 · 138 lines

How it starts

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

AGENTS.md - Project-Wide Conventions

This document provides essential context and rules for AI agents working on this Go API project. It covers the Go backend, the development workflow, and project-wide standards.

Rule: Context-First Navigation

  1. NEOR (Never Read Without a Reason): Do not read a file larger than 100 lines using read_file. Always use list_symbols_in_file first to find the relevant section.
  2. Symbol Over Grep: If searching for a function, struct, or variable, you MUST use search_definitions (SCIP) before attempting grep. Grep is a fallback for text; SCIP is for logic.
  3. Structural Extraction: When you need to understand a specific logic block (like a registration handler), use ast_grep_scan. Do not ingest the entire file if you only need one method.
  4. Token Preservation: Before sending a block of code >500 tokens back to the main loop, call summarize_code_intent locally to distill the logic into a high-density summary.

1. Development Workflow

The development process is managed by standard Go tooling.

  • Primary Command: To run the application in development mode, execute the following command from the project root directory:
    go run ./...
    
  • Building for Production: To create a production-ready executable, run the following command from the project root directory:
    go build -o server ./cmd/server
    
  • Restarting the MCP Server: After building a new server executable, the running MCP server must be restarted for the changes to take effect. Ask the user to restart the server and wait for their confirmation before attempting to use any updated MCP tools.
  • Running Tests: To run all tests, execute the following command from the project root directory:
    go test ./...
    

2. Go Backend Conventions

Adherence to these conventions is crucial for a clean, maintainable, and idiomatic Go codebase.

  • Idiomatic Go: Write clear, simple, and idiomatic Go. Follow standard conventions for naming variables, packages, and interfaces. Avoid creating unnecessary abstractions or wrapper functions.
  • Prefer Copying over Abstraction: When a small amount of utility code is needed in multiple places, prefer copying the code over creating a new shared package. A little duplication is often better than introducing a premature or incorrect abstraction that creates an unnecessary dependency. This follows the Go proverb: "A little copying is better than a little dependency."
  • Variable Naming: Follow Go's convention for variable naming. Use short, concise variable names (e.g., i, buf, req) for variables with a limited scope and lifespan. As a variable's scope and distance from its declaration grows, use a longer, more descriptive name (e.g., userCache, incomingRequest). This improves readability by signaling the variable's importance and scope.
  • Code Formatting: All Go code must be formatted with go fmt. It is strongly recommended to configure your editor to run go fmt on save.
  • Logging: Use the github.com/charmbracelet/log package for all logging. Do not use the standard log or fmt packages for application logging.
  • Testing: Write unit tests for all new functions, especially for business logic and utility packages. Place test files alongside the code they are testing (e.g., app_test.go).
  • GoDoc Comments: All exported (public) types, functions, constants, and variables must have godoc-compliant comments. The comment block must begin with the name of the element it is describing, followed by a period. This is the standard format recognized by the go doc tool and is essential for generating clean, readable documentation. Do not include extraneous words like "godoc" in the first line of the comment.

Read the full file on GitHub · 138 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. 2d ago First seen · 138 lines · 2,907 tokens per session scan A d50dc5c010be

Subscribe to this mod's changes

context-sherpa AGENTS.md is an instructions file published in the GitHub repository hackafterdark/context-sherpa (27 stars, last pushed 5mo ago), licensed MIT. It adds 2,907 tokens to every session, about $0.0145 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-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 · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 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,345 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, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

next.js 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,296 tokens