ai-canvas: Instructions file for Claude Code

CLAUDE.md

ai-canvas CLAUDE.md is an instructions file for Claude Code from laoluojuhai/ai-canvas. It costs 7,787 tokens per session, scanned A, original, MIT.

Repository instructions for an AI design tool built with TypeScript. They tell Claude Code how to plan, build, test, review, and document changes.

In plain words
What is it for?
Use them when asking Claude Code to change the AI-Canvas repository, especially for task planning, test-first development, type checks, testing, reviews, and documentation updates.
Why use it?
They give the coding agent project-specific rules, so it can follow the expected workflow and verification steps instead of guessing.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions Claude Code; mentions Gemini CLI.

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

Reuse

Borrowing it

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

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 ai-canvas CLAUDE.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/laoluojuhai/ai-canvas/claude-md"><img src="https://agentmods.dev/badge/instructions/laoluojuhai/ai-canvas/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 7,787 This file is loaded in full into every session.
When invoked 7,787 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.07787 $0.07787
Opus 5 $0.03893 $0.03893
Sonnet 5 $0.01557 $0.01557
Haiku 4.5 $0.00779 $0.00779

Measured 10d ago against content hash 5e3b0ad37099, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

ai-canvas 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 10d 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 · 699 lines

How it starts

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

CLAUDE.md

本文件为 Claude Code (claude.ai/code) 在此代码仓库中工作时提供指导。

项目概述

AI-Canvas 是一个 AI 原生设计工具,使用 TypeScript 构建。项目提供类型安全、语义驱动、可逆的设计文档系统,完整集成 MCP(Model Context Protocol)协议供 AI 助手使用。

开发流程规范

全流程概览

需求 → 澄清 → 计划 → 实现 → 评审 → 验证 → 交付
阶段 动作 子代理 产出
需求 理解用户意图 Explore 需求理解
澄清 提问消除歧义 Plan 明确需求
计划 3个方案 → spec.md architect + planner spec.md
实现 TDD: 测试先行 tdd-guide 代码 + 测试
评审 代码 + 安全审查 code-reviewer + security-reviewer 审查报告
验证 typecheck + test build-error-resolver 通过验证
交付 提交 + 文档对齐 + 经验回写 - 完成提交

1. 任务管理

制定计划 → 更新 TASKS.md → 按任务执行 → 自动提交 → 推送远端

任务文件: TASKS.md - 追踪所有开发任务和里程碑

2. Plan Mode 工作流程

  1. 进入 Plan Mode
  2. "给我3个方案,从最简单开始"
  3. 选方案后:"写个 spec.md,包含需求、技术栈"
  4. 审核 spec
  5. 退出 Plan Mode 开始执行
  6. 先写测试,后写代码
  7. 变更完成后对齐相关文档
  8. 问题修复成功后,补充本次可复用的开发经验

3. 验证流程

阶段 命令 检查项
提交前 corepack pnpm typecheck TypeScript 类型检查
推送前 corepack pnpm test typecheck + 单元测试
CI corepack pnpm build typecheck + test + 构建

3.1 共享开发经验

以下经验与 README.mdGemini.md 保持一致,修改时必须同步三份文档:

  • 命令写法统一使用 corepack pnpm ...
  • 包级验证统一使用 corepack pnpm --filter <package> ...
  • 依赖其他包声明产物的包,先构建依赖包,再执行包级 typecheck / test
  • 文档里的数量和能力说明必须以代码为准,避免手填数字漂移
  • 打开或收紧 CI 质量门禁前,先本地验证当前基线
  • 多 Registry 发布必须 fail fast,不能接受登录静默失败
  • 测试修复优先使用类型收窄和接口对齐,避免扩大 as any
  • 功能、命令、流程、工具数量变更时,同步 README.mdCLAUDE.mdGemini.md
  • 每次问题修复成功后,都要把可复用的经验记录到开发文档,至少同步 CLAUDE.mdGemini.md
  • Node 是联合类型,只有 FrameNodeGroupNodechildren,访问前必须用类型守卫 hasChildren()
  • SizeValue 是联合类型(fixed/fill-container/fit-content/percentage),只有 type === "fixed" 才有 value 属性
  • BindingRef 的属性名是 name(不是 binding),参考 packages/core/src/types/ref.ts
  • 品牌类型(NodeId/PageId)交叉转换需要 as unknown as TargetType,不能直接 as
  • 异步函数调用结果取属性时注意优先级:(await fn()).prop 而非 await fn().prop
  • OffscreenCanvas 在 Node.js 测试环境不可用,需要在 vitest setup 中提供 polyfill
  • Playwright E2E 测试文件(e2e/*.spec.ts)需要在 vitest 配置中排除,避免被 vitest 误收集

Read the full file on GitHub · 699 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. 10d ago First seen · 699 lines · 7,787 tokens per session scan A 5e3b0ad37099

Subscribe to this mod's changes

ai-canvas CLAUDE.md is an instructions file published in the GitHub repository laoluojuhai/ai-canvas (1 stars, last pushed 5mo ago), licensed MIT. It adds 7,787 tokens to every session, about $0.0389 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-31.

Related

Other instructions, from other repositories

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens