onedev: Instructions file for Codex

AGENTS.md

onedev AGENTS.md is an instructions file for Codex, OpenCode from theonedev/onedev. It costs 565 tokens per session, scanned A, original, MIT.

Project instructions for OneDev, a software-development platform and code repository. They define commit-message rules, protect generated translation files, and describe local development commands.

In plain words
What is it for?
Use them when working on OneDev to start the server, build changed classes, monitor reload errors, and follow repository-specific file and commit rules.
Why use it?
They prevent unwanted AI attribution in commits, accidental edits to generated files, and confusion about how to run or compile the project.

Instructions file for CodexOpenCode

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

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

About the project

OneDev is a self-hosted development platform that brings Git repositories, continuous integration and delivery, issue tracking, Kanban boards, package hosting, and workspaces into one system. It is for teams that manage software development and delivery on their own infrastructure.

theonedev/onedev · 15,343 stars · on GitHub · onedev.io

Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/theonedev/onedev/agents-md"><img src="https://agentmods.dev/badge/instructions/theonedev/onedev/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 565 This file is loaded in full into every session.
When invoked 565 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.00565 $0.00565
Opus 5.5 $0.00226 $0.00226
Sonnet 5.5 $0.00113 $0.00113
Haiku 4.5 $0.00056 $0.00056

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

Security

Grade A, and why

onedev 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 · 56 lines

What it actually says

Project Instructions

Do not add Co-authored-by: or other co-author / AI attribution footers to commit messages unless the user explicitly asks for them. If such a trailer is injected into a commit you just created (and it is not pushed), rewrite the commit message to remove it before finishing.

Never modify generated translation files, including any Translation_*.java files and files under server-core/src/main/java/io/onedev/server/web/translation/. Translation files are generated automatically.

Do not add tests for trivial or minor changes unless the user explicitly asks for them.

Do not run Maven after changing files unless the user explicitly asks for it.

Prefer field injection over constructor injection wherever possible for @Singleton services and Wicket components/pages.

Service Permission Contract: Public service methods that check a user's permissions must accept the user's Subject instead of a User for those checks. A Subject parameter signals permission checks; without one, the method runs without permission checks. Internal methods may accept User and leave authorization to their callers. Document any exception explicitly on the method.

Open Session in View: A single Wicket request cycle is normally handled within a single Hibernate session. OneDev opens the session at the start of the request cycle and closes it afterwards.

Hibernate Session Isolation: Do not share Hibernate-loaded entity objects across Hibernate sessions. For example, a project loaded by ID during Wicket page initialization must not be reused in a link's onClick listener, which runs in another request cycle and Hibernate session. Store the project ID instead, and load the project again using that ID in the listener's session.

Wicket Serialization Safety: Wicket pages, behaviors, and components are serialized to disk after a request is processed. Their serialized state must not contain any Hibernate entities. Store Hibernate entities either in transient fields or in detachable Wicket models, and detach those models in the onDetach() method of the relevant page, behavior, or component.

Use the bean editor for settings UI whenever possible. Style UI appropriately to look polished and consistent with other pages. Prefer existing CSS classes from Bootstrap or base.css whenever possible.

Users may continue privileged work in an existing session after their privileges are revoked. Revoked privileges must be denied in a new session. Do not report continued access within the existing session as a security bug or require immediate revocation within that session.

Run ./dev.sh prod from repository root to start dev server if you want to do some tasks with the live instance. Make sure to stop it by running ./dev.sh stop after tasks are finished.

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 Changed · +24 lines · +269 tokens per session 32857555177e
  2. 20d ago Changed · +3 lines · +21 tokens per session ceeaeb33f5ea
  3. 28d ago Changed · +5 lines · +51 tokens per session f301c06fd181
  4. 1mo ago Changed · +3 lines · +25 tokens per session 3176b36c25a1
  5. 1mo ago Changed · +3 lines · +18 tokens per session 151b527dcbb7
  6. 2mo ago First seen · 18 lines · 181 tokens per session scan A 5914f5022c5d

Subscribe to this mod's changes

onedev AGENTS.md is an instructions file published in the GitHub repository theonedev/onedev (15,343 stars, last pushed yesterday), licensed MIT. It adds 565 tokens to every session, about $0.0023 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

onedev AGENTS.md compared with instructions from other repositories

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