Borrowing it
Nothing to install: this file belongs to juanjiTech/jframe. 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/juanjiTech/jframe/main/CLAUDE.mdgit clone --depth 1 https://github.com/juanjiTech/jframeWrote 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/juanjitech/jframe/claude-md)<a href="https://agentmods.dev/instructions/juanjitech/jframe/claude-md"><img src="https://agentmods.dev/badge/instructions/juanjitech/jframe/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/juanjitech/jframe/claude-md"><img src="https://agentmods.dev/badge/instructions/juanjitech/jframe/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.02981 | $0.02981 |
| Opus 5.5 | $0.01192 | $0.01192 |
| Sonnet 5.5 | $0.00596 | $0.00596 |
| Haiku 4.5 | $0.00298 | $0.00298 |
Grade A, and why
jframe 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 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 — 246 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md — jframe 项目 Agent 开发指南
渐进式阅读(先少后多)
| 任务 | 先读 | 需要时再读 |
|---|---|---|
| 改现有模块实现 | mod/<name>/ + 对照 mod/example/ |
docs/stdao.md / skill jframe-module-dev 的 references/ |
| 新建模块 | skill jframe-module-design + go run . create |
docs/di-reference.md、design references/ |
| 查可 Load 类型 | docs/di-reference.md |
对应 mod/<infra>/mod.go |
| 架构 / CLI | docs/usage.md |
docs/module-implementation.md |
不要一上来通读全部 Skills references。
项目概述
jframe 是一个基于模块化内核的 Go 应用脚手架框架。所有功能以 kernel.Module 为单位组织,通过依赖注入容器 (inject/v2) 在模块间传递依赖,实现零耦合。
仓库: github.com/juanjiTech/jframe
Go 版本: 1.23+
入口: main.go → cmd.Execute() → Cobra 子命令
核心架构
模块系统
所有功能都封装为 kernel.Module(定义在 core/kernel/module.go)。
Module 接口:
Name() string — 唯一标识符,同时作为配置 YAML key
Config() any — 返回配置结构体指针,nil 表示无配置
PreInit(*Hub) / Init(*Hub) / PostInit(*Hub) / Load(*Hub) — 4 个顺序初始化阶段
Start(*Hub) — 在独立 goroutine 中运行(长驻任务)
Stop(*sync.WaitGroup, context.Context) — 优雅关闭(并发执行,必须 defer wg.Done())
生命周期执行顺序:
- Config 反序列化(遍历所有模块)
- PreInit(遍历所有模块)— 创建资源,Map 到 DI 容器
- Init(遍历所有模块)— 校验依赖
- PostInit(遍历所有模块)— 跨模块装配
- Load(遍历所有模块)— 注册路由、启用插件
- Start(每个模块一个 goroutine)— 长驻服务
所有模块必须嵌入 kernel.UnimplementedModule,这是 gRPC 风格的前向兼容模式(mustEmbedUnimplementedModule() 未导出方法强制嵌入)。
依赖注入 (DI)
基于 github.com/juanjiTech/inject/v2,一个反射驱动的类型映射容器。
Hub 结构体(core/kernel/module.go:10)包装了 inject.Injector + *zap.SugaredLogger,传入每个生命周期方法。
核心 DI 操作:
hub.Map(&value)— 注册依赖(按指针类型作为 key),一个类型只能存一个值hub.Load(&variable)— 获取依赖(必须检查 error)hub.Invoke(func(dep Type) { ... })— 函数参数自动注入hub.Value(reflect.Type)— 底层按类型直接查找
重要规则:
- Map 总是传指针:
hub.Map(&db)不是hub.Map(db) - Load 只能获取已被其他模块 Map 过的类型
- 同类型只能存一个值,需要多个相同类型用包装结构体区分
- 内核在所有模块之前 Map 了
*net.Listener和cmux.CMux
配置系统
全局配置: conf/vars.go 的 GlobalConfig 结构体,通过 conf.Get() 获取。
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 Changed · +3 lines · +139 tokens per session 84bed40dc6ff
- 2mo ago First seen · 243 lines · 2,842 tokens per session scan A 97f7ead92adb
jframe CLAUDE.md is an instructions file published in the GitHub repository juanjiTech/jframe (4 stars, last pushed 4d ago), licensed Apache-2.0. It adds 2,981 tokens to every session, about $0.0119 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-08-31.
jframe CLAUDE.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| jframe CLAUDE.mdjuanjiTech/jframe | Instructions file | 4 | 4d ago | Apache-2.0 | A | 2,981 | Claude Code |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | yesterday | 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 |