openFrence: Instructions file for Claude Code

CLAUDE.md

openFrence CLAUDE.md is an instructions file for Claude Code from weiweigogo/openFrence. It costs 596 tokens per session, scanned A, original, MIT.

A project instruction file for openFences, an open-source Windows desktop tool that groups and manages desktop icons, built with C++ and native Windows technology.

In plain words
What is it for?
It helps developers build, render, configure, and maintain features such as grouped icons, draggable windows, menus, settings, saved configuration, and icon extraction.
Why use it?
It explains the application structure and strict performance, resource-management, and visual-consistency rules needed for this type of desktop software.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md.

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

Reuse

Borrowing it

Nothing to install: this file belongs to weiweigogo/openFrence. 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/weiweigogo/openFrence/master/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/weiweigogo/openFrence

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/weiweigogo/openfrence/claude-md/github.svg)](https://agentmods.dev/instructions/weiweigogo/openfrence/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/weiweigogo/openfrence/claude-md"><img src="https://agentmods.dev/badge/instructions/weiweigogo/openfrence/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 openFrence CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/weiweigogo/openfrence/claude-md"><img src="https://agentmods.dev/badge/instructions/weiweigogo/openfrence/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 596 This file is loaded in full into every session.
When invoked 596 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.00596 $0.00596
Opus 5.5 $0.00238 $0.00238
Sonnet 5.5 $0.00119 $0.00119
Haiku 4.5 $0.00060 $0.00060

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

Security

Grade A, and why

openFrence 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 2mo 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 · 40 lines

What it actually says

openFences

Stardock Fences 的开源替代。Windows 桌面图标分组管理工具,使用 C++/Win32 原生构建。

核心架构

  • 语言: C++17(MSVC v141 工具链,VS2017),CMAKE_CXX_STANDARD 20
  • 窗口: Win32 原生 WS_CHILD 窗口,挂载在 explorer 的 SysListView32 桌面图标列表下
  • 渲染: Direct2D + DirectWrite + WIC,WS_EX_LAYERED + UpdateLayeredWindow 管线
  • 序列化: nlohmann/json,配置文件 %APPDATA%\openFences\config.json
  • 构建: CMake 3.20+,MSVC(VS2017 generator),x64,/MT 静态链接 CRT
  • 产物: 单 exe(~780KB),无依赖,便携运行

源文件(cpp/src/)

文件 职责
main.cpp 入口、托盘菜单、桌面图标管理、隐藏/显示调度
fence_window.cpp Fence 窗口:创建、拖拽、缩放、折叠、重命名、右键菜单
render.cpp Direct2D 渲染管线:毛玻璃(Acrylic)、边框、文字、布局
context_menu.cpp Win11 风格 Fluent 自绘菜单 + LL 钩子关闭
settings_panel.cpp 外观设置面板(背景色、标题色、对齐、字体大小等)
config.cpp 配置持久化(读写 JSON、自动保存、开机自启注册表)
icon_extract.cpp 从文件/快捷方式提取图标像素数据
menu_icons.cpp 菜单项图标的程序化光栅化(矢量字形)

构建与运行

cmake --build cpp/build --config Release --target openfences
cpp/build/Release/openfences.exe

编码约定

  • 无注释解释"做什么"(命名即文档),注释仅解释"为什么"
  • 禁止每帧/热路径上的堆分配(笔刷缓存复用 SetColor)
  • 所有 GDI/D2D/WIC 资源在窗口销毁时 RAII 释放
  • UI 统一:颜色、间距、字体等全局常量定义,禁止硬编码
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. 2mo ago First seen · 40 lines · 596 tokens per session scan A ddbcfb3d1c33

Subscribe to this mod's changes

openFrence CLAUDE.md is an instructions file published in the GitHub repository weiweigogo/openFrence (115 stars, last pushed 2mo ago), licensed MIT. It adds 596 tokens to every session, about $0.0024 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.

Related

openFrence CLAUDE.md compared with instructions from other repositories

openFrence CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
openFrence CLAUDE.mdweiweigogo/openFrenceInstructions file1152mo agoMITA596Claude 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