akm: Instructions file for Codex

AGENTS.md

akm AGENTS.md is an instructions file for Codex, OpenCode from itlackey/akm. It costs 4,606 tokens per session, scanned A, original, MPL-2.0.

A repository guide for AKM, a Bun-based command-line application. It describes the project structure, development workflow, build output, formatting, and test commands.

In plain words
What is it for?
Use it to install dependencies, inspect the CLI architecture, format and lint code, run type checks and unit or integration tests, build the package, and verify only changed areas.
Why use it?
It tells coding agents which checks and focused tests to run and prevents common mistakes such as generating test files in the distribution folder.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions CLAUDE.md; reads ~/.codex paths; mentions Codex.

This is itlackey/akm's own configuration. It tells Codex and OpenCode how to work on akm itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything akm configures →

View source ↗ itlackey/akm
Reuse

Borrowing it

Nothing to install: this file belongs to itlackey/akm. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/itlackey/akm/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/itlackey/akm

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/itlackey/akm/agents-md/github.svg)](https://agentmods.dev/instructions/itlackey/akm/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/itlackey/akm/agents-md"><img src="https://agentmods.dev/badge/instructions/itlackey/akm/agents-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.

agentmods 80×15 button for akm AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/itlackey/akm/agents-md"><img src="https://agentmods.dev/badge/instructions/itlackey/akm/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 4,606 This file is loaded in full into every session.
When invoked 4,606 The same file — it is already loaded in full.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.04606 $0.04606
Opus 5.5 $0.01842 $0.01842
Sonnet 5.5 $0.00921 $0.00921
Haiku 4.5 $0.00461 $0.00461

Measured 3d ago against content hash cdf871211023, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

akm 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 3d 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- **Classification rule (ORG-03/04/05/06)**: a file belongs under `tests/integration/` iff it opens a real database (`openIndexDatabase`/`openExistingDatabase`), touches the network, or spawns a real process (`spawn`/`sp
AGENTS.md · 99 lines

How it starts

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

AKM Repo Notes

Workflow

  • Runtime and tooling are Bun-first. Use bun install.
  • CI runs bun run check, which is bun run lint && bunx tsc --noEmit && bun run test:unit && bun run test:integration.
  • Before committing, run bunx biome check --write src/ tests/. Repo guidance prefers the write-capable Biome pass, not just bun run lint.
  • Build with bun run build. It compiles src/** only into dist/; dist/tests should never appear.
  • Prefer focused verification with bun test tests/<file>.test.ts. bun run check:changed runs a small set of output/contract suites (output-baseline, registry-search, show-argv-entrypoint, output-shapes-unit) plus bun run lint and bunx tsc --noEmit.

Architecture

  • This is a CLI-only package. There is no public API, no barrel exports, and no exports map. src/cli.ts is the thin dispatcher; command implementations live under src/commands/, mostly in per-family directories (src/commands/read/, src/commands/improve/, src/commands/sources/, src/commands/env/, src/commands/tasks/, src/commands/agent/, src/commands/proposal/, src/commands/health/, src/commands/lint/), with a handful of standalone *-cli.ts files (e.g. config-cli.ts, workflow-cli.ts, migrate-cli.ts, registry-cli.ts) still at the top level.
  • If you touch providers, refs, search/show behavior, config, or output shaping, read docs/architecture/architecture.md first. tests/contracts/ pins active contracts and is meant to catch contract drift.
  • Supported source providers are locked to filesystem, git, website, and npm. Do not add context-hub; do not reintroduce openviking.
  • SourceProvider is exactly { name, kind, path, sync? }. All providers materialize files to local disk.
  • Asset refs are [bundle//]conceptId[#fragment], where conceptId is subdir-qualified within its bundle (e.g. skills/code-review, memories/vpn-note, knowledge/api-guide, env/prod). Durable state stores the fully-qualified bundle//conceptId; the short bundle-omitted form is input sugar resolved against defaultBundle, then the remaining bundles in installation-priority order. Source locators like github:owner/repo are for akm bundle add, not for asset addressing. The old [origin//]type:name grammar is gone (the frozen migrator in scripts/akm-migrate/migrate/ is the only place it survives).
  • show is local-index only: resolve through the FTS index, then read from disk. No per-provider show exists.
  • Registry results are opt-in, stay separate from normal stash hits, and live in registryHits, never hits.
  • All write-target branching by source.kind belongs in src/core/write-source.ts.
  • Write-target resolution order is --target -> defaultWriteTarget -> working stash (defaultBundle); there is no fallback to the first writable source.
  • writable defaults to true on filesystem and false on git / website / npm; writable: true on website or npm is rejected at config load.
  • Treat enabled: false as inert across content reads, writes, indexing, and execution. Explicit bundle lifecycle commands may still update a named disabled bundle without activating it. Never infer the default/trusted bundle from array position; carry bundle identity and default status explicitly.
  • scheduler.enabled is this host's list of scheduled refs (bundle//tasks/x) in memory; on disk it is written in the {kind, ref, sourceId} shape 0.9.16 reads (schedulerEnabledOnDisk, src/core/config/config.ts) until no supported release is strict about it. Removing a bundle drops its refs. A config without the list means "keep what is installed": the first task sync/setup/enable/disable/add after an upgrade takes the akm-written native rows as the choice and writes it (enabledRefsFromInstalled, src/tasks/activation-config.ts). An explicit list, empty or not, is never second-guessed. There are no grants, source identities or fire-time checks.
  • extends may share portable policy, but host authority stays local: sources/defaults, registries, scheduler/execution/experimental state, credentials, executable argv/workspace, publication policy, and credential-bearing network connections must not be inherited. Bundle-relative chains require physical (realpath) containment.
  • Executable asset frontmatter may request a tool subset but cannot set child workspace, environment, or opaque runtime; tool requests are capped by local execution.allowedTools and must be enforceable by the selected lowerer.
  • Harnesses are thin, replaceable internals (core principle 10, docs/architecture/akm-core-principles.md) and are registered in one place (core principle 2): each registers once in HARNESS_REGISTRY, and core code imports the registry, not a harness. Don't spread harness-specific code or concepts into akm core.
  • Unsafe CLI overrides name one risk. Use --allow-insecure-transport only for plain HTTP and --allow-dangerous-env-keys only for reviewed process-hijacking environment keys; do not add a combined bypass.

Read the full file on GitHub · 99 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. 3d ago Changed · +102 tokens per session cdf871211023
  2. 4d ago Changed · +1 lines · +29 tokens per session 262ac1571b87
  3. 5d ago Changed · -41 tokens per session e8398287e5a6
  4. 20d ago Changed · -47 tokens per session 089ca8f1ddac
  5. 23d ago Changed · +53 tokens per session ae3b05ab5802
  6. 27d ago Changed · +1 lines · +163 tokens per session d3292c0e562a
  7. 28d ago Changed · +7 lines · +366 tokens per session b6e69a87d044
  8. 1mo ago Changed · +48 tokens per session 4a2d88090404
  9. 1mo ago Changed · +30 lines · +1,178 tokens per session 244852d06735
  10. 1mo ago First seen · 60 lines · 2,755 tokens per session scan A c96ba2da30b9

Subscribe to this mod's changes

akm AGENTS.md is an instructions file published in the GitHub repository itlackey/akm (67 stars, last pushed today), licensed MPL-2.0. It adds 4,606 tokens to every session, about $0.0184 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). 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