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.
curl -O https://raw.githubusercontent.com/n9e/fe/main/CLAUDE.mdgit clone --depth 1 https://github.com/n9e/feWrote 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/n9e/fe/claude-md)<a href="https://agentmods.dev/instructions/n9e/fe/claude-md"><img src="https://agentmods.dev/badge/instructions/n9e/fe/claude-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/n9e/fe/claude-md"><img src="https://agentmods.dev/badge/instructions/n9e/fe/claude-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.02346 | $0.02346 |
| Opus 5.5 | $0.00938 | $0.00938 |
| Sonnet 5.5 | $0.00469 | $0.00469 |
| Haiku 4.5 | $0.00235 | $0.00235 |
Grade A, and why
fe CLAUDE.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 9d 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.
This is a copy
91% identical to copilot-instructions — 31 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 117 lines — stays where its author put it; the contents beside it link to each section on GitHub.
N9E 前端项目
目录速览
src/
├── components/ # 通用 UI 与业务无关的基础组件
├── pages/ # 路由页面
├── plus/ # Plus 扩展(datasource、parcels 等,路径别名 plus:/*)
├── plugins/ # 数据源等插件化功能(含 Explorer/Dashboard 等)
├── store/ # Zustand 等状态
├── services/ # 接口与领域服务
├── utils/ # 工具函数
├── routers/ # 路由配置
├── theme/ # 主题与 CSS 变量(如 variable.css)
├── locales/ # 国际化资源
├── assets/ # 静态资源
├── types/ # 全局类型
├── App.tsx
└── main.tsx
技术栈与风格
- TypeScript + React Hooks;优先函数组件,避免 class 组件。
- 组件 Props 使用
interface显式声明,避免any。 - 遵循仓库既有格式与 Prettier 配置;改动保持最小范围,不重写无关模块。
- 修改源码后,必须依据根目录
.prettierrc.json对改动文件执行./node_modules/.bin/prettier --write,并在交付前执行./node_modules/.bin/prettier --check;不得遗留仅格式问题。 - 不臆测接口或业务逻辑;上下文不足时说明缺口或反问。
- 数据转换函数必须保持幂等性(相同输入多次调用产生相同输出),如果函数会修改入参对象,首行使用
_.cloneDeep(values)保护原始引用不被污染。 - 同一组件中应避免多次调用同一有副作用的转换函数,优先提取变量复用计算结果。
- 类型收窄优先使用原生接口:用
Array.isArray代替_.isArray,用typeof x === 'number'代替_.isNumber,用x == null代替_.isNil,以此类推。lodash 的类型守卫函数在缺少@types/lodash时不会被 TypeScript 识别为类型守卫,导致unknown类型无法收窄。
React Router 路由与部署前缀
- 项目使用 React Router 的
basename支持子路径部署。应用内路由路径应使用 Router 提供的路径:例如部署前缀为/flashcat时,useLocation().pathname和 React Routerhistory.location.pathname是/dial-analysis,而window.location.pathname/ 全局location.pathname是浏览器完整路径/flashcat/dial-analysis。 - 构造应用内跳转、调用 React Router 的
history.push/history.replace,或保留当前路由路径时,使用 Router 的相对路径(如useLocation()或history.location)。不要把全局location.pathname直接当作 Router 路径,也不要给 Router 路径手动再拼basename,否则可能出现/flashcat/flashcat/polaris这样的重复前缀。 useLocation()是当前渲染对应的路由快照。异步请求等延迟回调需要读取执行时的最新路径或查询串时,使用对应 Router history 的history.location,避免使用闭包中的旧值覆盖后来更新的路由状态。- 只有确实需要浏览器完整 URL(例如整页跳转、刷新或生成带部署前缀的浏览器级地址)时才使用
window.location/ 全局location;注意它们与 Router 的路由路径语义不同。window.history的原生 History API 也不等同于 React Router 的history。 - 构造复制、分享、保存或自定义组件使用的 URL 时,先区分 Router 路径、应用相对 URL 和完整 URL;优先复用
src/utils/appUrl.ts的getAppBaseUrl/addAppBasePrefix,不要随手拼接basePrefix。这些 helper 会避免重复前缀,并让绝对 URL 保持原样。 $local_url已包含协议、域名和部署前缀;替换后不要再给结果加前缀。Vite 前缀插件只处理它识别的浏览器 URL 接收点,不会处理复制到剪贴板、显示在输入框、存入对象或经自定义组件传递的 URL;这些场景需要显式构造。
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.
- 9d ago Changed · +9 lines · +513 tokens per session 6a59562cc1bb
- 14d ago Changed · +7 lines · +298 tokens per session 4eacc375b654
- 1mo ago Changed · +1 lines · +60 tokens per session b64f1c757f34
- 1mo ago First seen · 100 lines · 1,475 tokens per session scan A 4315bbd1bd61
fe CLAUDE.md is an instructions file published in the GitHub repository n9e/fe (308 stars, last pushed today), licensed Apache-2.0. It adds 2,346 tokens to every session, about $0.0094 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 91% identical to copilot-instructions, differing in 31 lines, and is treated as a copy.
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).
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.
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).
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.
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).
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.