dscode: Instructions file for Codex

AGENTS.md

dscode AGENTS.md is an instructions file for Codex, OpenCode from creativedswork/dscode. It costs 2,232 tokens per session, scanned C, original, MIT.

A set of instructions for a TypeScript project, written partly in Chinese, with rules for coding, documentation diagrams, and visual design work. It includes a pre-flight checklist that must be answered before changing files.

In plain words
What is it for?
Use it when modifying the project's TypeScript, HTML, CSS, SVG, layouts, or Mermaid diagrams. Mermaid is a text format for maintainable diagrams such as flowcharts and sequence diagrams.
Why use it?
It helps an agent decide when a change needs a design review and keeps code, diagrams, and file structure consistent.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/creativedswork/dscode/agents-md"><img src="https://agentmods.dev/badge/instructions/creativedswork/dscode/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,232 This file is loaded in full into every session.
When invoked 2,232 The same file — it is already loaded in full.
Security scan C 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.02232 $0.02232
Opus 5.5 $0.00893 $0.00893
Sonnet 5.5 $0.00446 $0.00446
Haiku 4.5 $0.00223 $0.00223

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

Security

Grade C, and why

dscode AGENTS.md scanned grade C 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 2mo 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf release/artifacts
AGENTS.md · 186 lines

How it starts

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

AGENTS.md

本文件供 AI Agent 快速理解项目结构。

⛔ Pre-Flight Checklist(每次写文件前必答)

在调用 write_file / edit / overwrite_file 之前,回答以下问题:

# 问题 如果是 → 操作
1 本次变更是否涉及 .css / .html / .svg 的样式或布局? → 走视觉设计流程
2 本次变更是否新增/重排/删除 HTML 元素或组件? → 走视觉设计流程
3 用户是否使用了以下动词:设计、美化、重设计、改样式、调布局、重新排布、改颜色、改字体、改间距、改卡片? → 走视觉设计流程
4 用户是否要求「参考某个 skill 的美学」或「按 xx 风格」? → 走视觉设计流程

视觉设计流程(三步,不可跳过):

Step 1: Open Design 生成/获取视觉参考(mcp__open-design__create_project → start_run → poll get_run → get_artifact)
Step 2: taste-skill 把关实现质量(加载 design-taste-frontend 或对应 skill)
Step 3: 写代码实现

特例豁免(仅以下情况可跳过 Step 1–2):

  • 纯逻辑修复(JS/TS bug fix,不涉及 UI)
  • 纯内容替换(改文字不改样式)
  • 已在当前 session 内完成过 Step 1–2 的同主题变更

编码规范

  • TypeScript strict,2 spaces,semicolons,named exports,camelCase
  • 文件 ≤300 行,一个文件一个职责
  • 详见 docs/STYLE.md

文档绘图

架构图、流程图和时序图统一使用 Markdown 内嵌 Mermaid,不提交截图代替可维护的 图表源码。

  • 架构和依赖关系使用 flowchart LR 或 flowchart TB
  • 调用链和跨组件交互使用 sequenceDiagram
  • 生命周期使用 stateDiagram-v2
  • 节点 ID 使用稳定的 ASCII 标识,展示文本可以使用中文
  • 复杂模块使用 subgraph 分层,每张图只表达一个主要关系
  • 避免 Mermaid 中的 HTML、Emoji、主题 CSS 和依赖特定渲染器的扩展语法
  • 修改图表后检查方向、节点归属、箭头语义以及代码块闭合

示例:

flowchart LR
    UI["UI adapter"] --> Coordinator["SessionSwitchCoordinator"]
    Coordinator --> SessionManager
    Coordinator --> AgentSupervisor

图像识别

支持 Vision 模型代理和 OCR 识别图片。不要以"我是文本模型"为由拒绝处理图片。

视觉设计

任何涉及可见布局、样式、组件呈现的变更(修改 CSS、新增/重排 HTML 元素、调整视觉层次、设计 card/prototype/page),禁止直接写代码——必须先通过 Open Design(mcp__open-design__*)获取或创建视觉参考。 设计分两层:视觉方向由 Open Design 提供,实现质量由 taste-skill(design-taste-frontend)保证。视觉决策经 explore→propose 流程沉淀为 change 的 design.md + prototype 后方可实施。docs/prototypes/ 仅是暂存区:apply 完成后按 prototype-workflow 逐文件决定 archive 或 delete,archive 阶段将长期资产移入按日期和 change 分组的归档目录。Session 00MRIZMZQJ 是 HTML 原型→视觉迭代→实现的标准案例。

Web 前端

修改 Web UI 前必读 openspec/specs/web-frontend/spec.md。禁止引入第三方组件库(Material UI、Ant Design 等),必须使用 web/src/index.css 的 --color-* token。视觉流程遵循上方「视觉设计」节。

Read the full file on GitHub · 186 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. 2mo ago First seen · 186 lines · 2,232 tokens per session scan C 25b79baa1bca

Subscribe to this mod's changes

dscode AGENTS.md is an instructions file published in the GitHub repository creativedswork/dscode (11 stars, last pushed 1mo ago), licensed MIT. It adds 2,232 tokens to every session, about $0.0089 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

dscode AGENTS.md compared with instructions from other repositories

dscode AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
dscode AGENTS.mdcreativedswork/dscodeInstructions file111mo agoMITC2,232Codex, 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