CLAUDE.md@by-scenario/chrome-extension claudeA
CLAUDE.md@by-scenario/chrome-extension is agent-read markdown (claude) from overseastelegramaliterateperson865/awesome-claude-md.
Indexed from public GitHub and served as immutable, content-addressed versions. Install it pinned to an exact SHA-256 with the mdr CLI, and every file is verified against the hash recorded here before it reaches your agent. The deterministic audit below grades the latest version, and the same file always earns the same grade.
What the file says
# Chrome Extension 项目规范(Manifest V3)
## 项目结构
- `manifest.json` - 扩展清单(Manifest V3)
- `src/background/` - Service Worker;`src/content/` - Content Script
- `src/popup/` - 弹出页 UI;`src/options/` - 设置页;`src/shared/` - 共享代码
- `assets/` - 图标(16/32/48/128px)和静态资源
## Service Worker vs Content Script
- Service Worker 是事件驱动的,无法持久运行,禁止依赖全局变量保持状态
- 状态持久化必须用 `chrome.storage`,监听事件在顶层注册
- 网络请求拦截使用 `chrome.declarativeNetRequest`(非 `webRequest`)
- Content Script 运行在隔离 JS 环境但共享页面 DOM,操作前检查元素存在性
- CSS 防污染:使用 Shadow DOM 或高特异性选择器加唯一前缀
- Content Script 禁止直接调用大部分 `chrome.*` API,通过 message passing 委托
## 消息传递(Message Passing)
- 使用 `chrome.runtime.sendMessage` / `onMessage` 在各上下文间通信
- 长连接用 `chrome.runtime.connect` 建立 port
- 消息格式统一:`{ type: string, payload: unknown }`,按 `type` 路由分发
- 异步响应时 `onMessage` listener 必须 `return true`
## Storage API 使用
- `storage.local` 本地存储上限 10MB;`storage.sync` 跨设备同步,单项 8KB / 总量 100KB
- 用户配置用 `sync`(跨设备),缓存数据用 `local`
- 监听变更:`chrome.storage.onChanged.addListener((changes, area) => {})`
## 权限声明
- 只声明最小权限集,优先用 `optional_permissions` 按需授权
- `host_permissions` 精确匹配域名,避免 `<all_urls>`;优先用 `activeTab`
- 权限变更会触发扩展禁用,升级时注意兼容性
## 常用命令
```bash
…Read the whole file at its exact version.
How to install
mdr add overseastelegramaliterateperson865/awesome-claude-md/by-scenario/chrome-extension/CLAUDE.md@git:20260320.9b01acamdr add overseastelegramaliterateperson865/awesome-claude-md/by-scenario/chrome-extension/CLAUDE.md@sha256:fbe0feb1f3b3114aPin to a label to follow the author's releases, or to a sha256 to freeze the exact bytes forever. Either way the resolved hash is written to mdr.lock, and mdr install reproduces it on any machine.
[](https://markdownregistry.com/a/art_2wloarlltlfrdq5y)
1 badge views in 30 days
Versions
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| git:20260320.9b01aca latest | 2026-03-20 | 9b01aca | 2,557 B | A | view · diff |
| git:20260320.fcf2609 | 2026-03-20 | fcf2609 | 1,892 B | A | view |
Audit of the latest version
- pass: Size between 200 bytes and 200 KB (2557 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
overseastelegramaliterateperson865/awesome-claude-md · 3 stars · license MIT · pushed 2026-09-23 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_2wloarlltlfrdq5y GET https://markdownregistry.com/api/v1/resolve?ref=overseastelegramaliterateperson865/awesome-claude-md/by-scenario/chrome-extension/CLAUDE.md GET https://markdownregistry.com/api/v1/blob/fbe0feb1f3b3114a50a51ca85e6d405e458a68ee00a25efeed5c71bdad3e5f91
Your agent does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
More from overseastelegramaliterateperson865/awesome-claude-md
Every file in overseastelegramaliterateperson865/awesome-claude-md