okp: Instructions file for Codex

AGENTS.md

okp AGENTS.md is an instructions file for Codex, OpenCode from talesofai/okp. It costs 1,441 tokens per session, scanned A, original, MIT.

Project instructions for the Open Knowledge Protocol, a system for storing and sharing structured knowledge through a web API, command-line tool, and agent skills. The project uses Go and PostgreSQL, a database commonly used for application data.

In plain words
What is it for?
Working on the Open Knowledge Protocol’s Go services, PostgreSQL models, API endpoints, command-line interface, middleware, search, import, and export features.
Why use it?
They explain the codebase’s architecture and conventions before an agent changes it. This reduces confusion about which layer handles storage, business rules, HTTP requests, or command-line access.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions AGENTS.md.

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

Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/talesofai/okp/agents-md"><img src="https://agentmods.dev/badge/instructions/talesofai/okp/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,441 This file is loaded in full into every session.
When invoked 1,441 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.01441 $0.01441
Opus 5.5 $0.00576 $0.00576
Sonnet 5.5 $0.00288 $0.00288
Haiku 4.5 $0.00144 $0.00144

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

Security

Grade A, and why

okp 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 1mo 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 · 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.

AGENTS.md — Project Conventions for okp

Overview

Open Knowledge Protocol (okp) — open structured knowledge for people and agents. PostgreSQL-backed storage with API/CLI/Skills access surfaces.

Tech Stack

  • Backend: Go 1.26+, chi v5 (router), GORM v2 (ORM), pgx (PG driver)
  • Database: PostgreSQL — 唯一存储层,无 Redis/缓存依赖
  • CLI: cobra (命令行框架),与 API 共享 service 层
  • Skills: 纯 Markdown 指令文件,同构于 lark-* skill 模式

Architecture

cmd/api/          — HTTP API 入口
cmd/cli/          — CLI 入口(开发者工具 + 脚本集成)

internal/
  config/         — 环境变量配置
  model/          — GORM 数据模型(Concept, Link, Revision)
  store/          — 数据库初始化和连接管理
  handler/        — HTTP handlers(6 端点 + health + domains list)
  service/        — 业务逻辑(CRUD, search, lint, export)
  middleware/     — HTTP 中间件(auth token, logging, recovery)

skills/
  okp-import/      — 导入 skill(面向领域 owner 的 agent)
    references/   — 各 type 的 concept 模板和 golden examples
  okp-search/      — 搜索 skill(面向消费 agent)
  embed.go         — go:embed shim,供 CLI `okp skills install` 内嵌安装

API 端点

PUT    /api/v1/concepts/*              — upsert(L1 硬门禁在此校验;concept ID 含 /,用 catch-all 通配)
DELETE /api/v1/concepts/*              — 删除 concept + links + revisions
POST   /api/v1/concepts:batch          — 批量 upsert
GET    /api/v1/concepts                — list/search(domain/type/tag/status/q)
GET    /api/v1/concepts/*              — 单取
GET    /api/v1/links/*                 — 出链 + 反向引用(links 拆为独立顶层资源)
PUT    /api/v1/links/*                 — 替换概念的出链
GET    /api/v1/domains/{domain}/export — OKF bundle 导出(NDJSON 概念流,由客户端本地渲染文件树)
GET    /api/v1/domains/{domain}/activity — 日粒度创建、更新和成功知识读取请求(默认 30 天,最多 365 天)
GET    /api/v1/domains                 — 领域清单(concept 数及聚合 created_at/updated_at)
PUT    /api/v1/domains/{domain}        — 创建/更新 README、schema、visibility
DELETE /api/v1/domains/{domain}        — 级联删除 domain 全部数据
POST   /api/v1/domains/{domain}/invites — 生成邀请码(max_uses 0 = 不限次数,1-100 为次数上限)
GET    /api/v1/health                  — 健康检查

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. 1mo ago Changed · +2 lines · +55 tokens per session 88758484c528
  2. 2mo ago First seen · 97 lines · 1,386 tokens per session scan A 5f0dbab5f5e1

Subscribe to this mod's changes

okp AGENTS.md is an instructions file published in the GitHub repository talesofai/okp (5 stars, last pushed 1mo ago), licensed MIT. It adds 1,441 tokens to every session, about $0.0058 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-31.

Related

okp AGENTS.md compared with instructions from other repositories

okp AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
okp AGENTS.mdtalesofai/okpInstructions file51mo agoMITA1,441Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode