access AGENTS.md

A set of project instructions for coding agents working on Access, a self-hosted credential store and API proxy. It explains the codebase structure, security approach, and recurring coding patterns.

In plain words
What is it for?
Use it when developing or reviewing Access code, especially API routes, upstream service clients, authentication, security, audit logging, database models, or its MCP server.
Why use it?
It gives agents the project context they need before changing code, reducing guesses about where logic belongs and how authentication, encryption, and auditing work.

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/scottpedia0/access/agents-md
Clone the repo
git clone --depth 1 https://github.com/Scottpedia0/access

Made for: Codex, OpenCode.

Per session 1,144 This file is loaded in full into every session.
When invoked 1,144 The same file — it is already loaded in full.
Security scan A 1 finding. 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.01144 $0.01144
Opus 5 $0.00572 $0.00572
Sonnet 5 $0.00229 $0.00229
Haiku 4.5 $0.00114 $0.00114

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

Security

Grade A, and why

access AGENTS.md scanned grade A with 1 finding 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -H "Authorization: Bearer $GLOBAL_AGENT_TOKEN" \
AGENTS.md · 115 lines

How it starts

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

Access — Agent Instructions

For agents developing on this codebase

What this is

Access is a self-hosted credential store + API proxy + MCP server for agents and scripts. Next.js App Router + Prisma + PostgreSQL.

Architecture

  • src/app/api/v1/<service>/route.ts — proxy route handlers (Zod validation, auth, proxy upstream)
  • src/lib/<service>/client.ts — upstream API client functions
  • src/lib/access.ts — request authentication (global token, consumer token, session)
  • src/lib/security/encryption.ts — AES-256-GCM encrypt/decrypt with key rotation support
  • src/lib/security/tokens.ts — HMAC-SHA256 consumer token generation and verification
  • src/lib/env.ts — environment variable helpers and encryption key loading
  • src/lib/audit.ts — audit event logging
  • src/middleware.ts — rate limiting and body size enforcement
  • prisma/schema.prisma — data model (Service, Secret, Consumer, AccessGrant, AuditEvent, etc.)
  • mcp-server.mjs — standalone MCP server exposing Google Workspace tools
  • scripts/rotate-keys.ts — encryption key rotation script

Key patterns

  • Every route uses isValidGlobalAgentToken() or authenticateRequestActor() for auth
  • Every route has Zod schemas for input validation
  • Every route catches errors with process.env.NODE_ENV === "development" gating on details
  • export const runtime = "nodejs" on all POST route handlers
  • Google services use authenticateGoogleRequest() which handles multi-account resolution

Adding a new service adapter

  1. Create src/lib/<service>/client.ts with API functions
  2. Create src/app/api/v1/<service>/route.ts following the hubspot pattern
  3. Add env vars to .env.example
  4. Update the Supported Services section in README.md

Data model

  • Service — a registered service (name, slug, description, visibility mode)
  • Secret — encrypted credential belonging to a service (envVarName, encryptedValue)
  • Consumer — an agent identity (name, slug, hashed token)
  • AccessGrant — links a consumer to a service or specific secret
  • AuditEvent — log of every access, reveal, copy, login, and API call
  • GoogleToken — OAuth tokens for Google multi-account broker

Read the full file on GitHub · 115 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 · 115 lines · 1,144 tokens per session scan A fd394c8ef163

Subscribe to this mod's changes

access AGENTS.md is an instructions file published in the GitHub repository Scottpedia0/access (0 stars, last pushed 4mo ago), licensed MIT. It adds 1,144 tokens to every session, about $0.0057 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.