kerberos AGENTS.md

kerberos AGENTS.md is an instructions file for Codex, OpenCode from mongodb-js/kerberos. It costs 854 tokens per session, scanned A, original, Apache-2.0.

Project-specific instructions for AI coding assistants working on a Node.js native add-on that provides Kerberos authentication for the MongoDB driver. Kerberos is a network login system that lets clients prove their identity to a service.

In plain words
What is it for?
Use them when installing or rebuilding the add-on, changing its Node.js or C++ wrapper, running authentication tests, linting, formatting, or regenerating its documentation.
Why use it?
They explain the required native build dependencies, authentication setup, test requirements, and formatting commands for both JavaScript and C++ code.

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/mongodb-js/kerberos/agents-md
Clone the repo
git clone --depth 1 https://github.com/mongodb-js/kerberos

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 kerberos AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/mongodb-js/kerberos/agents-md.svg)](https://agentmods.dev/instructions/mongodb-js/kerberos/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/mongodb-js/kerberos/agents-md"><img src="https://agentmods.dev/badge/instructions/mongodb-js/kerberos/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 854 This file is loaded in full into every session.
When invoked 854 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.00854 $0.00854
Opus 5 $0.00427 $0.00427
Sonnet 5 $0.00171 $0.00171
Haiku 4.5 $0.00085 $0.00085

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

Security

Grade A, and why

kerberos 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 4d 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 · 47 lines

How it starts

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

AGENTS.md

Instructions for AI coding agents working in this repository. This file is the source of truth. Tool-specific files (e.g. CLAUDE.md) should only import it.

Project Overview

kerberos is a Node.js native addon providing Kerberos/GSSAPI authentication, used primarily by the MongoDB Node.js driver for GSSAPI auth. The C++ addon (node-addon-api / N-API 9) wraps GSSAPI on Unix and SSPI on Windows. On install, prebuild-install looks for a prebuilt addon binary, falling back to a source build via node-gyp rebuild (requires system Kerberos dev headers, e.g. libkrb5-dev, on Unix).

Commands

All scripts from package.json:

  • npm install — installs deps and compiles the addon.
  • npx node-gyp rebuild — recompile the addon only.
  • npm test — run mocha tests. Requires a compiled addon and a reachable KDC (configured via KERBEROS_USERNAME/KERBEROS_PASSWORD/KERBEROS_REALM/KERBEROS_HOSTNAME env vars).
  • npm run check:lint — lint JS/TS.
  • npm run format-js — eslint --fix.
  • npm run format-cxx — clang-format the C++ sources in src/.
  • npm run docs — regenerate README.md from JSDoc in lib/index.js (never edit README.md directly, edit etc/README.hbs or the JSDoc).
  • npm run precommitcheck-clang-format. Verifies C++ formatting, and is invoked by the pre-commit hook.
  • npm run prepare — points core.hooksPath at .githooks/ so the tracked pre-commit hook is active. Runs automatically on npm install in a clone. It does not run for downstream consumers installing the published package.
  • npm run prebuild — build prebuilt addon binaries (prebuild --runtime napi --strip --verbose --all). Used by CI and release, rarely run locally.

Structure

  • src/ — C++ addon. kerberos.cc defines the N-API bindings.
  • src/unix/ — GSSAPI implementation.
  • src/win32/ — SSPI implementation.
  • lib/index.js — entrypoint: loads the compiled .node binary and exports promisified wrappers plus GSS flag/OID constants.
  • index.d.ts — the public types.
  • binding.gyp — node-gyp config. Selects unix vs win32 sources per platform.
  • test/ — mocha tests, plus test/bundling/webpack for bundler compatibility.

Read the full file on GitHub · 47 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. 4d ago First seen · 47 lines · 854 tokens per session scan A b30dad3260f6

Subscribe to this mod's changes

kerberos AGENTS.md is an instructions file published in the GitHub repository mongodb-js/kerberos (177 stars, last pushed 6d ago), licensed Apache-2.0. It adds 854 tokens to every session, about $0.0043 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.