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.
npx agentmods add instructions/tninja/ai-code-interface.el/agents-mdgit clone --depth 1 https://github.com/tninja/ai-code-interface.elWhat 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 | $0.02539 | $0.02539 |
| Opus 5 | $0.01269 | $0.01269 |
| Sonnet 5 | $0.00508 | $0.00508 |
| Haiku 4.5 | $0.00254 | $0.00254 |
Grade A, and why
ai-code-interface.el 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.
How it starts
The opening of the file, as written. The whole thing — 214 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
This file provides guidance to coding agents working with code in this repository.
Common Development Commands
Byte Compilation
emacs -batch -f batch-byte-compile *.el
- Treat new byte-compilation warnings as regressions when touching Emacs Lisp code.
- Prefer reproducible batch verification first, ideally
emacs -Qwith the necessary load-path and dependencies configured for the target file. - If batch compilation fails to load required files or packages, treat that as a verification failure to resolve or report, not as a clean pass.
- If
emacs -Qcannot be made to work cleanly, compile files individually throughemacsclientas a fallback to match the active Emacs session more closely. - For documentation hygiene on touched files, also run
M-x checkdoc(or batchcheckdoc-file) before wrapping up changes.
Running Tests
# Run a specific test file
emacs -batch -L . -l ert -l test/test_ai-code-change.el -f ert-run-tests-batch-and-exit
# Run all tests
emacs -batch -L . -l ert --eval "(mapc #'load-file (file-expand-wildcards \"test/test_*.el\"))" -f ert-run-tests-batch-and-exit
CI Testing
The project uses melpazoid for CI checks. The workflow is defined in .github/workflows/melpazoid.yml.
High-Level Architecture
Core Design Philosophy
This is a unified interface package for AI-assisted software development that abstracts over multiple AI coding CLI backends (Claude Code, Gemini CLI, OpenAI Codex, Pi, GitHub Copilot CLI, Opencode, Kilo, Grok CLI, Cursor CLI, CodeBuddy Code CLI, Kiro CLI). The package provides a consistent user experience across different AI tools while maintaining context-aware code actions and agile development workflows.
Backend System Architecture
The backend system is pluggable and defined in ai-code-backends.el. Each backend is registered as a property list in ai-code-backends:
(ai-code-backends
'((claude-code
:label "Claude Code"
:require ai-code-claude-code
:start ai-code-claude-code
:switch ai-code-claude-code-switch-to-buffer
:send ai-code-claude-code-send-command
:resume ai-code-claude-code-resume
:config "~/.claude.json"
:upgrade "npm install -g @anthropic-ai/claude-code@latest"
:cli "claude")
;; ... other backends
))
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.
- 2d ago First seen · 214 lines · 2,539 tokens per session scan A 2f9028291324
ai-code-interface.el AGENTS.md is an instructions file published in the GitHub repository tninja/ai-code-interface.el (274 stars, last pushed 4d ago), licensed Apache-2.0. It adds 2,539 tokens to every session, about $0.0127 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.
Other instructions, from other repositories
codex-usage-widget AGENTS.md
Instructions for ognjeeen/codex-usage-widget, covering agents.md, project, scope and decision discipline, authorization and repository safety and architecture boundaries.
CodexClaw AGENTS.md
Instructions for MackDing/CodexClaw, covering repository guidelines, repo structure, start and dev commands, test commands and lint and format.
codex-token-meter AGENTS.md
Instructions for prefect12/codex-token-meter, covering ai token meter development guide, project shape, build and verification, git workflow and ai token meter test loop.
codex-loop-orchestra AGENTS.md
Instructions for LEO001020/codex-loop-orchestra, covering loop discipline, 1. decomposition discipline (single-pass plan-and-solve), 3. return convention (all subagents, mandatory), 4. recoverable compression directive and 5. kernel trigger rules (ipybox, when enabled).
ai-session-search AGENTS.md
Instructions for lililib/ai-session-search, a project described as: Local-first full-text search and reusable context library for AI coding sessions across Claude Code, Codex, Cursor, OpenCode, Copilot CLI, and more. Source sessions stay read-only.
codex-switch AGENTS.md
AGENTS.md instructions for ChArLiEdance/codex-switch, covering repository agents and platform isolation.