Borrowing it
Nothing to install: this file belongs to shaharia-lab/goai. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/shaharia-lab/goai/main/CLAUDE.mdgit clone --depth 1 https://github.com/shaharia-lab/goaiWrote 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.
[](https://agentmods.dev/instructions/shaharia-lab/goai/claude-md)<a href="https://agentmods.dev/instructions/shaharia-lab/goai/claude-md"><img src="https://agentmods.dev/badge/instructions/shaharia-lab/goai/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.
<a href="https://agentmods.dev/instructions/shaharia-lab/goai/claude-md"><img src="https://agentmods.dev/badge/instructions/shaharia-lab/goai/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.01119 | $0.01119 |
| Opus 5.5 | $0.00448 | $0.00448 |
| Sonnet 5.5 | $0.00224 | $0.00224 |
| Haiku 4.5 | $0.00112 | $0.00112 |
Grade A, and why
goai 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 2mo 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.
How it starts
The opening of the file, as written. The whole thing — 43 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.
Overview
GoAI provides a unified interface over multiple LLM providers, embeddings, vector storage, and a full Model Context Protocol (MCP) client/server implementation (module github.com/shaharia-lab/goai). It is a library — there is no main package; runnable usage lives in _examples/.
The root package (package goai) keeps its source files flat in the repository root, prefixed by concern (llm_*, mcp_*, embedding_*, vector_*, chat_history_*). Additional functionality is being organized into subpackages — place new self-contained subsystems in their own directory/package rather than adding to the root.
Commands
go build ./... # build
go test ./... # run all tests
go test ./... -covermode=atomic -coverprofile=coverage.out # tests with coverage (as CI runs them)
go test -run TestName ./... # run a single test by name
go run _examples/simple_chat.go # run an example
golangci-lint run # lint (CI uses super-linter with VALIDATE_GO)
There is no Makefile. CI (.github/workflows/CI.yaml) runs lint (super-linter), tests + Codecov, then a SonarCloud scan.
Architecture
The package follows a consistent facade + provider-interface pattern in every subsystem: a high-level struct wraps a provider interface, so implementations are swappable and injectable for testing.
- LLM (
llm.go,types.go):LLMRequest(facade) wraps theLLMProviderinterface (GetResponse/GetStreamingResponse). Providers:llm_provider_openai.go,llm_provider_anthropic.go,llm_provider_aws_bedrock.go,llm_provider_gemini.go, plusllm_provider_no_ops.go. Each provider has a matching thin client wrapper (e.g.llm_provider_openai_client.go) that isolates the vendor SDK for mocking. Streaming lives in separate*_streaming.gofiles.NewLLMRequestautomatically wraps the provider in aTracingLLMProvider(decorator pattern,tracing_llm_provider.go) unless already traced. Request options are functional options (WithMaxToken,WithTemperature, etc.) viaNewRequestConfig. - Tools (
tools_provider.go):ToolsProvidersupplies tools to LLM calls either from a local in-process[]Toollist or from an MCPClient— the two are mutually exclusive (adding one blocks the other).ExecuteTooltries local tools first, then falls back to the MCP client. - Embeddings (
embedding.go):EmbeddingServicewraps theEmbeddingProviderinterface; validates input and response. Bedrock provider inembedding_aws_bedrock_provider.go. - Vector storage (
vector_storage.go):VectorStoragefacade wrapsVectorStorageProvider. Postgres/pgvector implementation invector_storage_postgres.go; validation invector_validation.go.chunking.gosplits text for embedding. - Chat history (
chat_history_*.go):ChatHistoryStorageinterface with in-memory and SQLite implementations. - MCP (
mcp_*.go): a complete MCP implementation.- Client:
mcp_client.go(Client+Transportinterface) with two transports —mcp_client_sse.go(HTTP/SSE) andmcp_client_std.go(stdio). - Server:
mcp_server_base.go(BaseServerholds tools/resources/prompts, built withServerConfigOptions likeUseLogger) wrapped by a transport server —NewStdIOServer(mcp_server_stdio.go) orNewSSEServer(mcp_server_sse.go), each with aRun(ctx)loop. Wire protocol types are JSON-RPC 2.0 inmcp_types.go. Seemcp_doc.gofor an end-to-end server example.
- Client:
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.
- 2mo ago First seen · 43 lines · 1,119 tokens per session scan A 766f9011fc3e
goai CLAUDE.md is an instructions file published in the GitHub repository shaharia-lab/goai (10 stars, last pushed 1mo ago), licensed MIT. It adds 1,119 tokens to every session, about $0.0045 per session on Opus 5.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.
goai CLAUDE.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| goai CLAUDE.mdshaharia-lab/goai | Instructions file | 10 | 1mo ago | MIT | A | 1,119 | Claude Code |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | yesterday | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |