ktx: Instructions file for Codex

AGENTS.md

ktx AGENTS.md is an instructions file for Codex, OpenCode from Kaelio/ktx. It costs 6,702 tokens per session, scanned A, original, Apache-2.0.

An instruction file for ktx, an open-source context layer for data agents. It defines project rules for task tracking, reading files, Python environments, testing, code cleanup, and public API changes.

In plain words
What is it for?
Use it when developing ktx, especially for Python changes, running tests or pre-commit checks, managing multi-step tasks, or changing its public interfaces.
Why use it?
It gives the coding agent the repository-specific rules needed to make safe, testable changes. It also prevents assumptions about parts of the system that this project does not contain.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: names the TodoWrite tool; mentions AGENTS.md; mentions Codex.

This is Kaelio/ktx's own configuration. It tells Codex and OpenCode how to work on ktx 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 ktx configures →

About the project

Kaelio/ktx is a context layer that helps AI agents query analytical databases using company knowledge, approved metrics, table metadata, and relationships between columns. Data teams use it to make warehouse queries more accurate and consistent with their organization's definitions. Its catalogue add-ons teach agents how to use ktx and its data-querying interfaces.

Kaelio/ktx · 1,629 stars · on GitHub · docs.kaelio.com

Reuse

Borrowing it

Nothing to install: this file belongs to Kaelio/ktx. 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/Kaelio/ktx/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/Kaelio/ktx

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/kaelio/ktx/agents-md"><img src="https://agentmods.dev/badge/instructions/kaelio/ktx/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 6,702 This file is loaded in full into every session.
When invoked 6,702 The same file — it is already loaded in full.
Security scan A 0 findings. 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.06702 $0.06702
Opus 5.5 $0.02681 $0.02681
Sonnet 5.5 $0.01340 $0.01340
Haiku 4.5 $0.00670 $0.00670

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

Security

Grade A, and why

ktx 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 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.

AGENTS.md · 594 lines

How it starts

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

ktx Development Notes

ktx is a standalone open-source context layer for data agents. These instructions apply to all agents working in this repository (Codex, Claude, Gemini, and similar tools). Do not assume an external app server, frontend, database migrations, ORPC contracts, or python-service/ layout exist here.

Critical Rules

Absolute Requirements

  • MUST: Use the active agent's task tracker for tasks with 3+ steps or complex operations (TodoWrite in Claude, update_plan in Codex).
  • MUST: Read files before editing them.
  • MUST: Complete all tracked tasks before finishing.
  • MUST: Activate .venv before running Python code when a local virtualenv exists. If no .venv exists, use uv run ... from the relevant project root.
  • MUST: After modifying Python files, run the relevant Python tests and run uv run pre-commit run --files [FILES] when a pre-commit config exists. If pre-commit cannot run because config or tool versions are missing, state that explicitly and run the closest available checks.
  • MUST: Remove dead code; do not leave commented-out code, unused wrappers, or empty directories.
  • MUST: Keep package/public API changes intentional. Do not add compatibility wrappers for old ktx names unless the user explicitly asks for a migration bridge.
  • MUST: Avoid compatibility shims for old ktx features, command shapes, configuration formats, or internal APIs. This rule does not prohibit compatibility support for third-party systems and libraries, such as Metabase version differences. Keep the ktx codebase clean instead of preserving stale ktx behavior.
  • MUST: Treat ktx as having no public users unless the user says otherwise. Legacy support is not necessary by default; prefer clean breaking changes over compatibility shims, migration bridges, or preserved stale behavior.

Absolute Prohibitions

  • MUST NOT: Use raw pip; use uv.
  • MUST NOT: Use npm or bun; use pnpm.
  • MUST NOT: Run destructive git cleanup commands (git clean, git reset --hard, git checkout .) unless the user explicitly requested that exact operation.
  • MUST NOT: Run git stash, git stash pop, git stash apply, or git stash drop without explicit user instruction. Prefer a branch plus commit when the user asks to save work in progress.
  • MUST NOT: Reintroduce external app conventions such as ORPC contracts, NestJS controllers, frontend routes, routeTree.gen.ts, or app database migration commands unless those systems are intentionally added to ktx later.

Read the full file on GitHub · 594 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. 2mo ago First seen · 594 lines · 6,702 tokens per session scan A ddb4471ec95d

Subscribe to this mod's changes

ktx AGENTS.md is an instructions file published in the GitHub repository Kaelio/ktx (1,629 stars, last pushed 15d ago), licensed Apache-2.0. It adds 6,702 tokens to every session, about $0.0268 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-30.

Related

ktx AGENTS.md compared with instructions from other repositories

ktx AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ktx AGENTS.mdKaelio/ktxInstructions file1.6k15d agoApache-2.0A6,702Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode