Borrowing it
Nothing to install: this file belongs to rhett-lee/nim_duilib. 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/rhett-lee/nim_duilib/main/CLAUDE.mdgit clone --depth 1 https://github.com/rhett-lee/nim_duilibWrote 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/rhett-lee/nim_duilib/claude-md)<a href="https://agentmods.dev/instructions/rhett-lee/nim_duilib/claude-md"><img src="https://agentmods.dev/badge/instructions/rhett-lee/nim_duilib/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/rhett-lee/nim_duilib/claude-md"><img src="https://agentmods.dev/badge/instructions/rhett-lee/nim_duilib/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.01475 | $0.01475 |
| Opus 5.5 | $0.00590 | $0.00590 |
| Sonnet 5.5 | $0.00295 | $0.00295 |
| Haiku 4.5 | $0.00147 | $0.00147 |
Grade A, and why
nim_duilib 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 — 106 lines — stays where its author put it; the contents beside it link to each section on GitHub.
nim_duilib - 跨平台 C++ UI 库
项目概述
nim_duilib 是基于 Skia 渲染引擎的跨平台 C++ UI 框架,采用 XML 描述界面布局 + C++ 控制逻辑的开发模式。
- 支持平台: Windows (7/10/11+), Linux, macOS (12+), FreeBSD
- 渲染引擎: Skia (CPU/OpenGL)
- 构建工具: CMake + Visual Studio / GCC / Clang
- C++ 标准: C++20(
cmake/duilib_bin.cmake:6-7强制CMAKE_CXX_STANDARD 20,MSVC 工程为stdcpp20,不要用低于 C++20 的语法假设)
项目结构
nim_duilib/
├── duilib/ # 核心库源码
│ ├── Core/ # 窗口、控件基类、事件、管理器
│ ├── Control/ # UI控件(Button, Label, RichEdit, TreeView...)
│ ├── Box/ # 容器控件(VBox, HBox, ListBox, TabBox...)
│ ├── Layout/ # 布局引擎(HLayout, VLayout, GridLayout...)
│ ├── Animation/ # 动画系统
│ ├── Image/ # 图片处理(PNG/SVG/GIF/WEBP/APNG/Lottie/PAG)
│ ├── Render/ # 渲染接口
│ ├── RenderSkia/ # Skia渲染实现
│ ├── Utils/ # 工具类(WinImplBase.h→WindowImplBase 类, FilePath...)
│ ├── CEFControl/ # CEF浏览器集成
│ └── WebView2/ # WebView2控件
├── examples/ # 示例程序
├── docs/ # 完整文档
├── bin/resources/ # 主题资源(XML布局、图片、字体)
├── build/ # 构建脚本和解决方案
└── cmake/ # CMake配置
开发模式(XML + C++)
XML 布局文件
- 位置:
bin/resources/themes/default/<skin_folder>/<skin_file>.xml - 全局资源:
bin/resources/themes/default/global.xml(字体、颜色、通用样式) - 编码: UTF-8
C++ 代码三件套
每个窗口通常需要三个文件:
- MainThread - 继承
ui::FrameworkThread,负责初始化和创建窗口 - MainForm.h/cpp - 继承
ui::WindowImplBase,实现窗口逻辑 - XML布局文件 - 描述界面结构和样式
关键代码模式
初始化全局资源:
// 推荐写法:自动处理平台差异(Windows 取 exe 同目录的 resources/,
// macOS 取 .app bundle 内的 Resources/),不要手工拼 "\\"
ui::FilePath resourcePath = ui::GlobalManager::GetResourceRootPath(false);
ui::GlobalManager::Instance().Startup(ui::LocalFilesResParam(resourcePath));
发布时切换到 ZIP / 嵌入 EXE 资源,详见 .claude/skills/nim-duilib-resource-pack.md。
创建窗口:
MainForm* window = new MainForm();
window->CreateWnd(nullptr, ui::WindowCreateParam(_T("WindowTitle"), true));
window->PostQuitMsgWhenClosed(true);
window->ShowWindow(ui::kSW_SHOW_NORMAL);
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 · +10 tokens per session 2842e54b5b1e
- 1mo ago Changed · +8 lines · +304 tokens per session e8afefa8861f
- 2mo ago First seen · 98 lines · 1,161 tokens per session scan A 6045ec2c0e21
nim_duilib CLAUDE.md is an instructions file published in the GitHub repository rhett-lee/nim_duilib (337 stars, last pushed yesterday), licensed MIT. It adds 1,475 tokens to every session, about $0.0059 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-30.
nim_duilib CLAUDE.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| nim_duilib CLAUDE.mdrhett-lee/nim_duilib | Instructions file | 337 | yesterday | MIT | A | 1,475 | 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 | 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 |