jframe: Instructions file for Claude Code

CLAUDE.md

jframe CLAUDE.md is an instructions file for Claude Code from juanjiTech/jframe. It costs 2,981 tokens per session, scanned A, original, Apache-2.0.

A project guide for jframe, a modular Go application framework whose features are organized as modules and whose dependencies are shared through a dependency-injection container.

In plain words
What is it for?
Use it when adding or modifying jframe modules, configuration, dependency wiring, lifecycle methods, commands, routes, or long-running services.
Why use it?
It gives coding agents the project’s architecture, startup order, and dependency rules so they can change code without breaking how modules connect or shut down.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md.

This is juanjiTech/jframe's own configuration. It tells Claude Code how to work on jframe 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 jframe configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/juanjiTech/jframe/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/juanjiTech/jframe

Made for: Claude Code.

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 jframe CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/juanjitech/jframe/claude-md/github.svg)](https://agentmods.dev/instructions/juanjitech/jframe/claude-md)
Your own site
<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.

agentmods 80×15 button for jframe CLAUDE.md

Your own site · 80×15
<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>
Per session 2,981 This file is loaded in full into every session.
When invoked 2,981 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.02981 $0.02981
Opus 5.5 $0.01192 $0.01192
Sonnet 5.5 $0.00596 $0.00596
Haiku 4.5 $0.00298 $0.00298

Measured 1mo ago against content hash 84bed40dc6ff, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

CLAUDE.md · 246 lines

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())

生命周期执行顺序:

  1. Config 反序列化(遍历所有模块)
  2. PreInit(遍历所有模块)— 创建资源,Map 到 DI 容器
  3. Init(遍历所有模块)— 校验依赖
  4. PostInit(遍历所有模块)— 跨模块装配
  5. Load(遍历所有模块)— 注册路由、启用插件
  6. 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() 获取。

Read the full file on GitHub · 246 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. 1mo ago Changed · +3 lines · +139 tokens per session 84bed40dc6ff
  2. 2mo ago First seen · 243 lines · 2,842 tokens per session scan A 97f7ead92adb

Subscribe to this mod's changes

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.

Related

jframe CLAUDE.md compared with instructions from other repositories

jframe CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
jframe CLAUDE.mdjuanjiTech/jframeInstructions file44d agoApache-2.0A2,981Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode