claude-code-dotfiles: Instructions file for Claude Code

CLAUDE.md

claude-code-dotfiles CLAUDE.md is an instructions file for Claude Code from flasherses/claude-code-dotfiles. It costs 1,368 tokens per session, scanned B, original, MIT.

A general instruction file for Claude Code that defines personal development preferences, communication language, coding style, workflow, and actions that require permission. Claude Code is an AI coding assistant that follows repository instructions.

In plain words
What is it for?
Use it when working in the claude-code-dotfiles repository and you need its conventions for language, code style, project workflow, tools, file locations, or restricted actions.
Why use it?
It gives the assistant consistent rules for how to communicate and modify code. It also marks sensitive actions, such as changing environment files or deleting files, as requiring confirmation.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: reads .claude/ paths; mentions CLAUDE.md.

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

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /home/user/path.

Reuse

Borrowing it

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

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 claude-code-dotfiles CLAUDE.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/flasherses/claude-code-dotfiles/claude-md"><img src="https://agentmods.dev/badge/instructions/flasherses/claude-code-dotfiles/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,368 This file is loaded in full into every session.
When invoked 1,368 The same file — it is already loaded in full.
Security scan B 1 finding. 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.01368 $0.01368
Opus 5.5 $0.00547 $0.00547
Sonnet 5.5 $0.00274 $0.00274
Haiku 4.5 $0.00137 $0.00137

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

Security

Grade B, and why

claude-code-dotfiles CLAUDE.md scanned grade B with 1 finding 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

- 修改 `~/.claude/settings.json` 或任何 `.env` 文件
CLAUDE.md · 110 lines

How it starts

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

CLAUDE.md — Universal Engineering Template

Personal Preferences

  • OS: OS (e.g., Windows 11 / macOS 15 / Ubuntu 24)
  • Shell: SHELL (e.g., PowerShell / bash / zsh)
  • Editor: EDITOR (e.g., VS Code / IDEA / Neovim)
  • Primary Language: LANG (e.g., Java / Python / TypeScript / Go)
  • Path Convention: PATH_CONVENTION (forward slash / recommended for portability)

Language & Communication

  • 中文为主要沟通语言,代码、技术术语、CLI 命令保持英文
  • 直接简洁,不寒暄。用表格做对比时表头用中文
  • 解释用 WHY 而非 WHAT — 告诉我为什么这样做,不要描述代码本身做了什么
  • 给出明确建议而非选项列表("推荐 X,因为 Y" 而非 "A 可以、B 也行")

Coding Style

  • 不写废话注释 — 代码自解释,只写 WHY 不写 WHAT
  • 不过度抽象 — 3 行重复好过一个不成熟的抽象
  • 不引入未使用的依赖
  • 优先级: 安全 > 正确性 > 性能 > 可读性 > 简洁
  • 不写 feature flag、不写向后兼容 shim — 直接改代码
  • 不做过度的错误处理 — 只处理系统边界(用户输入、外部 API),不处理内部不可能发生的场景
  • 遵循项目现有命名约定。布尔变量用 is_ / has_ / should_ 前缀

Forbidden Zones

以下操作必须先问再动:

  • 修改 ~/.claude/settings.json 或任何 .env 文件
  • git commit / git push / git rebase
  • 全局安装 npm/pip 包
  • 删除文件 — 优先重命名为 .deprecated 后缀
  • 修改当前工作目录外的文件

Development Workflow

需求分析 → 开发文档 → 测试文档 → 实施代码。每阶段确认后才进入下一阶段。

适用范围:新增功能、重构、线上风险修复、数据库/API/权限相关改动必须走完整四阶段。小型文档修改、格式修正、注释修正、一次性脚本、配置示例调整可简化为:确认范围 → 修改 → 自检。

三种工作模式

模式 触发条件 目录 阶段数
Feature 用户可见新功能 docs/features/<YYYY-MM-DD>-<slug>/ 1→2→3→4
Change 重构/基础设施/权限升级 docs/changes/<YYYY-MM-DD>-<slug>/ 1→2→4
Hotfix 线上紧急修复 docs/changes/<YYYY-MM-DD>-hotfix-<slug>/ 定位→修复→验证
Reference 项目参考/规范/手册/踩坑记录 docs/reference/ 无(直接撰写)

四阶段产出路径

阶段 产出 文件路径
1. 需求分析 PM对齐问题清单(可选) docs/features/<date>-<slug>/00-questions.md
2. 开发文档 设计文档 docs/features/<date>-<slug>/01-design.md
3. 测试文档 测试用例 + 自测清单 + 测试脚本 02-test-cases.md + 03-自测清单.md + 04-test.ps1
4. 实施代码 测试报告 + 自测报告 05-测试报告.md + 06-自测报告.md

Read the full file on GitHub · 110 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. 2mo ago First seen · 110 lines · 1,368 tokens per session scan B e18782cdcc17

Subscribe to this mod's changes

claude-code-dotfiles CLAUDE.md is an instructions file published in the GitHub repository flasherses/claude-code-dotfiles (6 stars, last pushed 3mo ago), licensed MIT. It adds 1,368 tokens to every session, about $0.0055 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

claude-code-dotfiles CLAUDE.md compared with instructions from other repositories

claude-code-dotfiles CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
claude-code-dotfiles CLAUDE.mdflasherses/claude-code-dotfilesInstructions file63mo agoMITB1,368Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,685GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode model-prompts.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA2,022GitHub Copilot