clearjson: Instructions file for Claude Code

CLAUDE.md

clearjson CLAUDE.md is an instructions file for Claude Code from wayknow/clearjson. It costs 1,244 tokens per session, scanned A, original, MIT.

Project instructions for ClearJSON, a privacy-focused Chrome extension that displays JSON data in a readable form. They describe its code structure, design rules, tests, and related tools.

In plain words
What is it for?
Use them when changing ClearJSON code, user-interface styles, Chrome extension files, tests, or its MCP server (a tool interface for working with JSON).
Why use it?
They give a coding agent the project context and constraints needed to make changes that fit the existing extension. This reduces guesswork about architecture, styling, and validation.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: positional $N argument.

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

Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/wayknow/clearjson/claude-md"><img src="https://agentmods.dev/badge/instructions/wayknow/clearjson/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,244 This file is loaded in full into every session.
When invoked 1,244 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.01244 $0.01244
Opus 5.5 $0.00498 $0.00498
Sonnet 5.5 $0.00249 $0.00249
Haiku 4.5 $0.00124 $0.00124

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

Security

Grade A, and why

clearjson 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 · 74 lines

How it starts

The opening of the file, as written. The whole thing — 74 lines — stays where its author put it; the contents beside it link to each section on GitHub.

ClearJSON — 隐私优先的浏览器 JSON 查看器

Chrome 扩展(MV3)。v2.0.4 已上架 Chrome Web Store + Edge。

项目概览

  • 技术栈:Vanilla JS + IIFE 模块模式,零框架依赖,CSS 变量驱动主题
  • 测试:npm test(136 个单元测试,Node 原生 test runner,零外部依赖)
  • 当前状态:无技术债,所有核心 + Pro 功能已实现
  • MCP Server:clearjson-mcp/ — 7 个 JSON 工具 + 3 个许可证管理工具,已发布 npm v1.1.0(npx -y clearjson-mcp)
  • 详细状态:STATUS.md
  • 功能列表:features.md
  • Agent-First 路线:AGENT_FIRST.md

关键架构

  • 模块通过 manifest.json 的 js 数组按序加载,挂载到 window.ClearJSON 命名空间
  • 加载顺序:parser.js → tokenizer.js → themes.js → license.js → export.js → jwt.js → stream-parser.js → virtual-tree.js → tree.js → content.js
  • Pro 功能门控:ClearJSON.License.isActive()
  • 开发模式绕过 Pro:localStorage.setItem('clearjson_pro_dev', '1')
  • 本地测试服务器:node test-data/server.js(端口 8765,自动启用 Pro)
  • 许可证服务器:Cloudflare Worker + D1,域名 api.wayknow.tech/clearjson/
  • 竞品定位:替代被卖后注入广告的 JSON Formatter;商业模式:免费核心 + Pro 订阅($2.99/月 或 $19.99/年)
  • 不做:AI、JSON Diff、JSONPath 查询、高级编辑、云端同步、用户账号(注:订阅制已做,2026-08-15 起;JSON Diff/JSONPath 是 2.0 路线图)

设计系统

所有 UI 相关任务必须遵循以下规范。

Chrome 扩展约束

  • 技术栈:Vanilla HTML/CSS/JS,零框架,零构建步骤
  • 样式:全部写在 .css 文件,禁止内联 style 属性
  • Popup 窗口:最大宽度 400px,紧凑布局,无滚动条溢出
  • 图标:内联 SVG 或 PNG,禁止外部字体/图标库(CSP 限制)
  • 字体栈:system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif
  • 颜色:暗色主题为主,CSS 变量定义,支持通过 prefers-color-scheme 响应
  • 禁止:外部 CSS/JS CDN、Google Fonts、第三方 UI 库

视觉规范

  • 间距:4px 基数系统(4, 8, 12, 16, 24, 32)
  • 圆角:按钮/输入框 6px,卡片 12px,模态框 16px
  • 阴影:仅用于模态和浮动元素,0 4px 12px rgba(0,0,0,0.3)
  • 边框:1px rgba(255,255,255,0.08) 分隔线
  • 主色调:#3B82F6(操作按钮)、#10B981(成功)、#EF4444(危险)
  • 背景层级:#0F0F0F(底层)→ #1A1A1A(卡片)→ #242424(悬浮)

动画与微交互

  • 仅 CSS transition,禁止 JS 动画库
  • 时长 ≤ 200ms,使用 ease-out 或 cubic-bezier(0.4, 0, 0.2, 1)
  • 仅操作 transform 和 opacity,避免触发布局重排
  • 按钮 hover:opacity 0.8 → 1.0,或 translateY(-1px)
  • 加载状态:CSS 脉冲动画,禁止 GIF/视频
  • 尊重 prefers-reduced-motion

组件规范

  • 按钮:明确 hover/active/focus-visible 状态,focus 用 2px outline
  • 输入框:可见标签 + 错误状态,placeholder 颜色 #6B7280
  • 卡片:一致的内边距(16px),无突兀阴影
  • 图标按钮:24×24pt,aria-label 必须
  • Toast 通知:底部居中,自动消失(3s),CSS slide-up 进入

Read the full file on GitHub · 74 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 7a49653a75c3
  2. 1mo ago Changed · +3 tokens per session 80c335b09f67
  3. 2mo ago First seen · 74 lines · 1,241 tokens per session scan A 21c145e543eb

Subscribe to this mod's changes

clearjson CLAUDE.md is an instructions file published in the GitHub repository wayknow/clearjson (0 stars, last pushed 29d ago), licensed MIT. It adds 1,244 tokens to every session, about $0.0050 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

clearjson CLAUDE.md compared with instructions from other repositories

clearjson CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
clearjson CLAUDE.mdwayknow/clearjsonInstructions file029d agoMITA1,244Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file144ktodayMITA8,130Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA5,685GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file150ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA3,153GitHub Copilot
generative-ai-for-beginners AGENTS.mdmicrosoft/generative-ai-for-beginnersInstructions file124ktodayMITA2,981Codex, OpenCode