flutter-ai-harness: Instructions file for Claude Code

CLAUDE.md

flutter-ai-harness CLAUDE.md is an instructions file for Claude Code from bladeofgod/flutter-ai-harness. It costs 5,892 tokens per session, scanned C, original, MIT.

A project instruction set for a Flutter application, a cross-platform app framework, with shared packages and native Android and iOS code. It defines the project’s architecture, technology choices, folder layout, and development rules.

In plain words
What is it for?
Use it before changing the Flutter app, shared packages, Android or iOS code, data layers, navigation, storage, networking, or tests.
Why use it?
It gives contributors the constraints needed to add features consistently without introducing incompatible libraries, structures, or business code.

Instructions file for Claude Code

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

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

Reuse

Borrowing it

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

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/bladeofgod/flutter-ai-harness/claude-md.svg)](https://agentmods.dev/instructions/bladeofgod/flutter-ai-harness/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/bladeofgod/flutter-ai-harness/claude-md"><img src="https://agentmods.dev/badge/instructions/bladeofgod/flutter-ai-harness/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 5,892 This file is loaded in full into every session.
When invoked 5,892 The same file — it is already loaded in full.
Security scan C 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.05892 $0.05892
Opus 5 $0.02946 $0.02946
Sonnet 5 $0.01178 $0.01178
Haiku 4.5 $0.00589 $0.00589

Measured yesterday against content hash 8ac404dde330, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade C, and why

flutter-ai-harness CLAUDE.md scanned grade C 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 yesterday.

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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- 不执行 `rm -rf` 等破坏性命令。
CLAUDE.md · 297 lines

How it starts

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

Flutter AI Harness 项目契约

本文件是仓库的权威工程契约。修改代码或文档前必须先读。其他工具入口可以摘要本文件,但不得覆盖本文件的规则。

项目目标

本仓库是一套 AI 原生工程 Harness,也是一套有明确架构取向的 Flutter 混合应用工作区。AI Agent 和开发者共同使用相同的架构规则、任务产物、执行命令与质量门禁。

仓库分两个阶段建设:

  1. 建立中立的 Harness 和仓库边界。
  2. 通过 Harness 设计并实现全新 Demo,让任务卡、Review、App 文档和项目 Memory 从真实工作中自然产生。

不得从其他应用复制业务代码、凭据、历史任务或私有依赖到本仓库。

技术栈

Flutter

  • Flutter 3.41.9 / Dart 3.11
  • 状态管理与轻量 DI:GetX 精简版 fork(公开 Git 源,固定 Commit)
  • 路由:go_router ^15.1.2
  • 网络:dio ^5.7.0 + Protocol Buffers ^6.0.0
  • 本地存储:drift ^2.20.0 + flutter_secure_storage ^9.2.2
  • 不可变数据:Freezed ^3.0.0
  • JSON 序列化:json_serializable ^6.9.0
  • 测试:flutter_test + mocktail ^1.0.4 + integration_test
  • Monorepo 编排:Melos

原生平台

  • Android:Kotlin / Gradle
  • iOS:Swift / Xcode / CocoaPods

Demo 固定采用本节技术栈,不在产品设计或任务拆解阶段重新选型。依赖在首个真实消费者出现时加入所属 Package 并锁定兼容版本,不为填充清单引入未使用依赖。

仓库结构

app/
├── apps/demo/
└── packages/
    ├── app_core/
    ├── app_data/
    ├── app_ui/
    ├── app_features/
    ├── app_media/
    └── app_media_capture_bridge/

工作区随 Demo 实施逐步形成。不得为了填充目录而预先创建没有真实需求的业务抽象。

架构不变量

  1. Domain Entity 或明确的 Value Object 是数据适配层进入业务层以及业务公共 API 之间唯一允许传递的数据类型。

  2. app_core 只能定义并处理传输中立的 Request、Response、Failure 和不透明 Payload,不得定义、import 或解析具体 Fixture Payload、Proto Message 或数据库 Row;这些具体类型及其解析必须留在 app_data,不得进入 Feature、Controller 或 UI。MediaResourceId 是唯一批准的聚焦基础设施 ID 例外:它只提供传输中立的闭合格式校验,不包含路径、URI、Native handle、文件行为或业务规则;Store、Resolver、媒体 metadata 和预览 API 不得继续下沉到 app_core

  3. 每个包只定义自己需要的接口,不建立中央万能契约包。

  4. 依赖方向保持单向。下图中 A -> B 表示 Package A 可以 import Package B:

    apps/demo -> app_features, app_data, app_ui
    app_features -> app_data, app_core, app_ui, app_media, app_media_capture_bridge
    app_media -> app_core, app_ui
    app_media_capture_bridge -> 不依赖其他 Workspace Package
    app_data -> app_core
    app_core / app_ui -> 不依赖其他 Workspace Package
    
  5. Feature 不得 import 其他 Feature 的内部实现。

  6. 业务抽象接口放在 app_features/lib/api/,具体实现放在对应 feature_xxx/api/;跨 Feature 交互只依赖抽象接口,并由统一 Registry 绑定实现。

  7. app_data 提供 Domain Entity、LocalDataSource、确定性 Fixture 及其 Transport,以及协议或持久化出现后的 Mapper/Adapter;不得承载页面、Controller 或 Feature 业务编排。

  8. 壳工程只负责模块与回调装配,不得 import Feature 实现类。

  9. Controller 通过构造函数接收必需 API。服务定位器只允许出现在装配点或显式全局服务中。

  10. 只有在确实降低复杂度或保护真实边界时才新增抽象。

  11. Native Consumer 直接依赖对应 Native Module;Flutter Consumer 通过聚焦的 Dart Client 和 Android/iOS Bridge Adapter 委托同一 Module。Host 只负责装配和注册,Native Module 不依赖 Flutter。

Read the full file on GitHub · 297 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. yesterday Changed · +8 lines · +496 tokens per session 8ac404dde330
  2. 7d ago First seen · 289 lines · 5,396 tokens per session scan C 50eae0c6ff3e

Subscribe to this mod's changes

flutter-ai-harness CLAUDE.md is an instructions file published in the GitHub repository bladeofgod/flutter-ai-harness (113 stars, last pushed 4d ago), licensed MIT. It adds 5,892 tokens to every session, about $0.0295 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

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,182 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

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

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