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.
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.
curl -O https://raw.githubusercontent.com/theonedev/onedev/main/AGENTS.mdgit clone --depth 1 https://github.com/theonedev/onedevWrote 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.
[](https://agentmods.dev/instructions/theonedev/onedev/agents-md)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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.
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.
- 2d ago Changed · +24 lines · +269 tokens per session 32857555177e
- 20d ago Changed · +3 lines · +21 tokens per session ceeaeb33f5ea
- 28d ago Changed · +5 lines · +51 tokens per session f301c06fd181
- 1mo ago Changed · +3 lines · +25 tokens per session 3176b36c25a1
- 1mo ago Changed · +3 lines · +18 tokens per session 151b527dcbb7
- 2mo ago First seen · 18 lines · 181 tokens per session scan A 5914f5022c5d
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.
onedev AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| onedev AGENTS.mdtheonedev/onedev | Instructions file | 15k | yesterday | MIT | A | 565 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | today | MIT | A | 7,461 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 5,516 | GitHub Copilot |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | today | MIT | A | 4,680 | Codex, OpenCode |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |