Borrowing it
Nothing to install: this file belongs to vikiboss/r2-web. 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/vikiboss/r2-web/main/AGENTS.mdgit clone --depth 1 https://github.com/vikiboss/r2-webWrote 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/vikiboss/r2-web/agents-md)<a href="https://agentmods.dev/instructions/vikiboss/r2-web/agents-md"><img src="https://agentmods.dev/badge/instructions/vikiboss/r2-web/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/vikiboss/r2-web/agents-md"><img src="https://agentmods.dev/badge/instructions/vikiboss/r2-web/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.01644 | $0.01644 |
| Opus 5.5 | $0.00658 | $0.00658 |
| Sonnet 5.5 | $0.00329 | $0.00329 |
| Haiku 4.5 | $0.00164 | $0.00164 |
Grade A, and why
r2-web 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 1mo 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.
How it starts
The opening of the file, as written. The whole thing — 138 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
本文档为本仓库提供开发指南。
项目速览
R2 Web — 纯客户端 Cloudflare R2 存储桶文件管理器,零构建、零框架、零后端。
核心特性 文件上传、目录浏览、文件预览、文件操作、图片压缩、PWA、多语言(zh/zh_TW/en/ja)、浅色/深色主题、多选批量操作。
快速启动
npx serve src
# 或
python3 -m http.server 5500 --directory src
代码地图
快速定位表
| 任务 | 文件 |
|---|---|
| 修改文件名模板逻辑 | src/js/utils.js — applyFilenameTemplate |
| 修改图片压缩逻辑 | src/js/upload-manager.js — compressFile |
| 添加 i18n 文案 | src/js/i18n.js — const I18N |
| 修改按钮样式 | src/css/components.css — .btn |
| 添加设计 Token | src/css/tokens.css |
| 修改 R2 API 操作 | src/js/r2-client.js |
| 修改文件浏览逻辑 | src/js/file-explorer.js |
| 修改上传管理逻辑 | src/js/upload-manager.js |
| 多选批量操作逻辑 | src/js/file-explorer.js — toggleSelect / selectAll / clearSelection |
工具函数列表
以下函数定义在 src/js/utils.js,供各模块导入:
t(key, vars)— i18n 翻译(来自src/js/i18n.js)applyFilenameTemplate(tpl, file)— 文件名模板处理,占位符:[name]、[ext]、[hash:N]、[date:FORMAT]、[timestamp]、[uuid]、/compressFile(file, config, onStatus)— 图片压缩(定义在upload-manager.js)- PNG 特殊处理:直接优化缓冲区,不重新编码
- 自适应逻辑:压缩后更大则使用原文件
项目结构
r2-web/
├── readme.md — 项目说明、使用指南
├── package.json — 依赖声明(仅用于类型提示)
├── jsconfig.json — JSDoc 类型检查配置
└── src/ — 源码目录(即部署目录)
├── index.html — 应用外壳、import map、对话框模板
├── main.js — 入口(仅 new App())
├── manifest.json — PWA 配置
├── style.css — 样式主入口(仅导入 css 子目录)
├── js/ — 业务逻辑模块
│ ├── app.js — 主协调器
│ ├── config-manager.js — 配置持久化、Base64 分享
│ ├── r2-client.js — S3 API 客户端
│ ├── ui-manager.js — 主题、Toast、对话框、Tooltip
│ ├── file-explorer.js — 目录导航、排序、分页、缩略图
│ ├── upload-manager.js — 上传、文件名模板、图片压缩
│ ├── file-preview.js — 图片/视频/音频/文本预览
│ ├── file-operations.js — 重命名、复制、移动、删除
│ ├── i18n.js — 多语言(zh/zh_TW/en/ja)
│ ├── constants.js — 常量
│ └── utils.js — 工具函数
└── css/ — 样式模块(CSS Layers)
├── reset.css — CSS Reset
├── tokens.css — 设计 Token(定义所有变量)
├── base.css — 全局基础样式
├── layout.css — 布局容器
├── components.css — 通用 UI 组件
├── utilities.css — 工具类
└── animations.css — 动画与过渡
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.
- 1mo ago First seen · 138 lines · 1,644 tokens per session scan A 6af8912ebac4
r2-web AGENTS.md is an instructions file published in the GitHub repository vikiboss/r2-web (498 stars, last pushed 1mo ago), licensed MIT. It adds 1,644 tokens to every session, about $0.0066 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-16.
r2-web AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| r2-web AGENTS.mdvikiboss/r2-web | Instructions file | 498 | 1mo ago | MIT | A | 1,644 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | today | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |