openhermit AGENTS.md

A set of working rules for coding agents in the OpenHermit repository. It covers how to change code, update documentation, run tests, and write commits.

In plain words
What is it for?
It is for guiding incremental code changes, preserving clear module boundaries, updating README.md and docs, running npm run typecheck and npm test when needed, and writing concise English commit messages.
Why use it?
It reduces inconsistent changes and makes the agent check the relevant tests and documentation before calling work complete.

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/hcf-studios/openhermit/agents-md
Clone the repo
git clone --depth 1 https://github.com/HCF-STUDIOS/openhermit

Made for: Codex, OpenCode.

Per session 549 This file is loaded in full into every session.
When invoked 549 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.00549 $0.00549
Opus 5 $0.00275 $0.00275
Sonnet 5 $0.00110 $0.00110
Haiku 4.5 $0.00055 $0.00055

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

Security

Grade A, and why

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

AGENTS.md · 59 lines

How it starts

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

OpenHermit Workspace Rules

This file defines baseline collaboration rules for agents working in this repository.

General

  • Prefer small, incremental changes over large rewrites unless the task explicitly requires a redesign.
  • Keep behavior changes aligned with the current documented architecture before introducing new abstractions.
  • When changing a core flow, update the corresponding docs in README.md and docs/ in the same branch.
  • Do not preserve legacy compatibility unless the user explicitly asks for it.

Code Changes

  • Prefer clear module boundaries over oversized files.
  • Reuse existing helpers and shared abstractions before introducing new patterns.
  • Keep internal state and external state clearly separated.
  • Avoid adding hidden fallback paths that make behavior harder to reason about.

Testing

  • Run relevant tests after meaningful code changes.
  • For broad refactors or runtime changes, run:
    • npm run typecheck
    • npm test
  • Do not claim a fix is complete if the affected tests were not run.

Commits

  • Use English commit messages.
  • Keep commit messages concise and descriptive.
  • Prefer the format: <type>: <summary>
  • Common types:
    • feat
    • fix
    • refactor
    • test
    • docs
    • chore
  • Keep unrelated changes in separate commits.
  • Commit only after tests relevant to the change pass.

Database Migrations

  • Schema source of truth: packages/store/src/schema.ts (drizzle-orm).
  • Migrations live at packages/store/drizzle/ and are applied automatically at gateway boot via runMigrations() (tracked in the drizzle.__drizzle_migrations table).
  • To change schema: edit schema.ts, then from packages/store/:
    DATABASE_URL=... npx drizzle-kit generate --name <short_desc>
    
    Review the generated SQL, commit schema.ts + drizzle/000N_*.sql + drizzle/meta/ together.
  • Never apply schema changes by hand-running psql against dev/prod. Manual SQL bypasses the migration tracker, so the next boot will try to re-apply and fail. If you must hotfix prod, also insert a matching row into drizzle.__drizzle_migrations so the runner stays in sync.
  • drizzle/_legacy/ holds pre-rebaseline SQL for historical reference only — do not edit.

Read the full file on GitHub · 59 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. 2d ago First seen · 59 lines · 549 tokens per session scan A b6165b6d653c

Subscribe to this mod's changes

openhermit AGENTS.md is an instructions file published in the GitHub repository HCF-STUDIOS/openhermit (53 stars, last pushed 11d ago), licensed MIT. It adds 549 tokens to every session, about $0.0027 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.

Related

Other instructions, from other repositories

open-managed-agents AGENTS.md

Instructions for openma-ai/open-managed-agents, covering agents guide, core concepts, agent, session and environment.

openma-ai/open-managed-agents · 6,178 tokens

awesome-agent-infrastructure CLAUDE.md

Instructions for backblaze-labs/awesome-agent-infrastructure, covering claude.md — awesome-agent-infrastructure, what this list is, scope and files, schema, workflow, rules.

backblaze-labs/awesome-agent-infrastructure · 370 tokens

kungfu copilot-instructions.md

Copilot instructions for kungfu-systems/kungfu: Read and follow AGENTS.md before proposing or running changes. It is the shared agent router for this repository, including the canonical Shifu development and build entrypoint.

kungfu-systems/kungfu · 45 tokens

kungfu CLAUDE.md

Claude Code instructions for kungfu-systems/kungfu: Read and follow AGENTS.md before working in this repository. It routes both product use and contribution work to the repository sources of truth, including the requirement that development and build tasks enter through Shifu.

kungfu-systems/kungfu · 54 tokens

ai-platform-engineering AGENTS.md

Instructions for caipe-io/ai-platform-engineering, covering agent instructions, project structure, find the canonical implementation, documentation and docs & spec rules.

caipe-io/ai-platform-engineering · 1,712 tokens

semantix CLAUDE.md

Instructions for Gnosil/semantix, covering 项目规则(claude code) and 1. 改动须经用户过目;由 claude 提交到分支 + pr,用户 review 后合并.

Gnosil/semantix · 301 tokens