dsh-global-rules: Instructions file for Codex

AGENTS.md

dsh-global-rules AGENTS.md is an instructions file for Codex, OpenCode from badai147/dsh-global-rules. It costs 978 tokens per session, scanned A, original, MIT.

Repository instructions for a plugin that reads and writes a user's global AGENTS.md file through a settings page. AGENTS.md is a file containing instructions for coding agents; the guide also documents the plugin's structure and manual verification steps.

In plain words
What is it for?
Use it when working on this plugin to understand its API routes, settings page, packaging, restart requirements, and manual way to verify changes.
Why use it?
It gives coding agents the project rules they need before editing, including where the file lives, how the host and client are separated, and which checks are deliberately absent.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

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

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 dsh-global-rules AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/badai147/dsh-global-rules/agents-md"><img src="https://agentmods.dev/badge/instructions/badai147/dsh-global-rules/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 978 This file is loaded in full into every session.
When invoked 978 The same file — it is already loaded in full.
Security scan A 1 finding. 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.00978 $0.00978
Opus 5.5 $0.00391 $0.00391
Sonnet 5.5 $0.00196 $0.00196
Haiku 4.5 $0.00098 $0.00098

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

Security

Grade A, and why

dsh-global-rules AGENTS.md scanned grade A with 1 finding 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 20d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- The route is authenticated: an unauthenticated `curl` returns 401/403 by design — use DevTools.
AGENTS.md · 76 lines

How it starts

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

AGENTS.md

Agent-facing guide to this repository. Complements README.md and CONTRIBUTING.md — do not duplicate them.

Project overview

dsh-global-rules is a DeepSeek Harness (DSH) plugin: a settings page that reads and writes the user-global instruction file $DSH_HOME/AGENTS.md (default ~/.dsh/AGENTS.md) over the host's /api Fetch channel. Two halves, no shared code:

  • lib/index.js — Host, plain Node ESM. Registers GET/POST /api/global-rules through ctx.connection.fetch.register (256 KiB body cap).
  • lib/client.js — Client, hand-written window.__ModuleLoader__ bundle. Registers the settings.section page.
  • cordis.patch.yml — bundle patch inserting the global-rules layer.
  • package.json — dsh.bundle.patch, dsh.client.inject, files.

Build, test, lint

There is no toolchain, deliberately: no dependencies, no build step, no linter, and no scripts in package.json. Do not add one. Verify by hand instead:

dsh plugin --profile web add .   # run from the repo root; relative specs resolve against the invocation dir

Restart dsh web, then open Settings → 全局规则.

  • Host change (lib/index.js): restart dsh web.
  • Client change (lib/client.js): reload the page — the host re-reads a bundle whose mtime or size changed. Restart if the old UI persists.
  • Display metadata (icon.svg, locale/*.json): reload the page and reopen Plugins; both are read per list request. A new exports subpath still needs a dsh web restart — Node caches each package's exports map for the life of the process.

node test.js runs a zero-dependency self-check (dictionary parity plus the slot/locale registration shape) with no package script. It is not published to npm.

Manual test checklist: CONTRIBUTING.md.

Code style

  • Match the file you edit: lib/index.js uses 2-space indentation, lib/client.js uses tabs.
  • Source comments and JSDoc are English. User-facing panel strings come from the global-rules locale namespace registered through ctx.locale.register(ns, { zh, en }) — add a key to both dictionaries, never a literal string in the render tree.
  • Conventional Commits (feat, fix, docs, ci, chore), subject in Chinese or English, one logical change per commit. Branch off main.

Read the full file on GitHub · 76 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. 20d ago Changed · +3 lines · +74 tokens per session ed70be9e8638
  2. 1mo ago Changed · +4 lines · +67 tokens per session 84ded4f313ca
  3. 1mo ago First seen · 69 lines · 837 tokens per session scan A b3ae08336c2e

Subscribe to this mod's changes

dsh-global-rules AGENTS.md is an instructions file published in the GitHub repository badai147/dsh-global-rules (15 stars, last pushed 20d ago), licensed MIT. It adds 978 tokens to every session, about $0.0039 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-30.

Related

dsh-global-rules AGENTS.md compared with instructions from other repositories

dsh-global-rules AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
dsh-global-rules AGENTS.mdbadai147/dsh-global-rulesInstructions file1520d agoMITA978Codex, 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