openFrence CLAUDE.md

openFrence CLAUDE.md is an instructions file for coding agents 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

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/weiweigogo/openfrence/claude-md
Clone the repo
git clone --depth 1 https://github.com/weiweigogo/openFrence

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.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.svg" alt="Measured on agentmods" 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. Scan, not verified.
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 $0.00596 $0.00596
Opus 5 $0.00298 $0.00298
Sonnet 5 $0.00119 $0.00119
Haiku 4.5 $0.00060 $0.00060

Measured 4d ago against content hash ddbcfb3d1c33, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 4d 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. 4d 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 (69 stars, last pushed 17d ago), licensed MIT. It adds 596 tokens to every session, about $0.0030 per session on Opus 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.