fe: Instructions file for Codex

AGENTS.md

fe AGENTS.md is an instructions file for Codex, OpenCode from n9e/fe. It costs 1,878 tokens per session, scanned A, original, Apache-2.0.

A project instruction file describing coding rules for the n9e/fe frontend, including formatting and temporary-form handling.

In plain words
What is it for?
Use it when editing the frontend, especially forms, temporary containers, TypeScript narrowing, and formatting.
Why use it?
It keeps changes consistent with the project's conventions and helps avoid stale form state or unsupported type checks.

Instructions file for CodexOpenCode

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

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

View source ↗ n9e/fe
Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/n9e/fe/agents-md"><img src="https://agentmods.dev/badge/instructions/n9e/fe/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,878 This file is loaded in full into every session.
When invoked 1,878 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.01878 $0.01878
Opus 5.5 $0.00751 $0.00751
Sonnet 5.5 $0.00376 $0.00376
Haiku 4.5 $0.00188 $0.00188

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

Security

Grade A, and why

fe 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 6d 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 · 47 lines

How it starts

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

Codex Instructions

  • After making code changes, do not run npm run build or npx tsc unless the user explicitly asks for it.
  • If verification is useful, prefer lighter checks that are relevant to the changed files, or ask before running expensive project-wide commands.
  • After modifying source files, run ./node_modules/.bin/prettier --write on the changed files and verify them with ./node_modules/.bin/prettier --check before delivery. Follow .prettierrc.json; do not leave formatting-only violations in changed files.
  • Prefer native type-checking APIs over lodash for type narrowing: use Array.isArray instead of _.isArray, typeof x === 'number' instead of _.isNumber, x == null instead of _.isNil, etc. Lodash type guard functions are not recognized by TypeScript when @types/lodash is unavailable, leaving unknown types un-narrowed.

页面修改原则

  • 所有页面修改都要检查视觉美观与周边协调,包括按钮间距、水平/垂直对齐、颜色、图标与文字的实际可见间距;不能只检查控件外框或功能是否可用。
  • 提示浮窗按内容调整宽度:不超过 20 个字的短句尽量保持一行,避免过窄造成无意义换行;长文案与窄视口仍须合理换行,不能溢出屏幕。背景与箭头使用系统 Tooltip 的主题、颜色及透明度,与“筛选”旁的提示一致,不单独硬编码不透明背景。
  • 所有修改都要控制影响范围,优先采用页面或组件局部作用域;检查相关状态、共用组件调用方与集成入口,避免修复一处却让其他位置回归,并完成与改动相关的验证。

React Router Routes and Deployment Prefixes

  • This project uses React Router's basename for subpath deployments. Use Router-provided paths for in-app routes. For example, with a /flashcat basename, useLocation().pathname and React Router's history.location.pathname are /dial-analysis, while window.location.pathname or global location.pathname is the full browser path /flashcat/dial-analysis.
  • When building in-app navigation, calling React Router's history.push or history.replace, or preserving the current route, use Router-relative paths such as useLocation() or history.location. Do not use global location.pathname as a Router path or prepend basename to a Router path; either can duplicate the prefix and produce a URL such as /flashcat/flashcat/polaris.
  • useLocation() is a snapshot for the current render. If an asynchronous callback needs the latest path or query string when it runs, read history.location from the corresponding Router history instead of relying on a stale value captured by a closure.
  • Use window.location or global location only when browser-level URL semantics are needed, such as a full-page navigation, reload, or generating a browser URL that includes the deployment prefix. Their paths have different semantics from Router paths. The native History API on window.history is also different from React Router's history.
  • For copied, shared, saved, or custom-generated URLs, first distinguish a Router path, an app-relative URL, and a fully qualified URL. Use the existing URL helpers (getAppBaseUrl and addAppBasePrefix in src/utils/appUrl.ts) instead of concatenating basePrefix ad hoc. The helper leaves absolute URLs untouched and avoids duplicating an existing prefix.
  • $local_url is a fully qualified app base URL, including origin and deployment prefix. After expanding it, do not prepend basePrefix again. Likewise, window.location.pathname already includes the browser prefix, while useLocation().pathname does not.
  • The Vite prefix plugin rewrites recognized URL sinks such as direct window.open calls; it does not rewrite URLs copied to the clipboard, displayed in inputs, stored in config/data objects, or passed through custom components. Handle those values explicitly with the URL helpers.

Read the full file on GitHub · 47 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. 6d ago Changed · +17 lines · +793 tokens per session c60929805d1a
  2. 9d ago Changed · +10 lines · +482 tokens per session 325f1121f52e
  3. 14d ago Changed · +7 lines · +244 tokens per session 79d02a3ed22e
  4. 1mo ago Changed · +1 lines · +60 tokens per session 2767e40dc5f1
  5. 1mo ago First seen · 12 lines · 299 tokens per session scan A 50cf08635a34

Subscribe to this mod's changes

fe AGENTS.md is an instructions file published in the GitHub repository n9e/fe (308 stars, last pushed today), licensed Apache-2.0. It adds 1,878 tokens to every session, about $0.0075 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-09-01.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 9,715 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,461 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,750 tokens

deepseek-harness AGENTS.md

AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.

deepseek-ai/deepseek-harness · 4,261 tokens