Borrowing it
Nothing to install: this file belongs to silent-rs/silent-Tiangong. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/silent-rs/silent-Tiangong/main/CLAUDE.mdgit clone --depth 1 https://github.com/silent-rs/silent-TiangongWrote 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.
[](https://agentmods.dev/instructions/silent-rs/silent-tiangong/claude-md)<a href="https://agentmods.dev/instructions/silent-rs/silent-tiangong/claude-md"><img src="https://agentmods.dev/badge/instructions/silent-rs/silent-tiangong/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.
<a href="https://agentmods.dev/instructions/silent-rs/silent-tiangong/claude-md"><img src="https://agentmods.dev/badge/instructions/silent-rs/silent-tiangong/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.01855 | $0.01855 |
| Opus 5 | $0.00928 | $0.00928 |
| Sonnet 5 | $0.00371 | $0.00371 |
| Haiku 4.5 | $0.00186 | $0.00186 |
Grade A, and why
silent-Tiangong 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.
How it starts
The opening of the file, as written. The whole thing — 188 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
项目概述
Silent-Tiangong(天工) 是全功能可扩展的 GUI + CLI + Server 个人智能终端平台,实现"可对话、可规划、可执行、可扩展、可治理、可远程"的 Agent 能力闭环。支持通过 Connector 接入各类 IM 通道远程调度,并具备图片/视频等多媒体生成能力。
- 语言: Rust (edition 2024)
- 架构: Cargo workspace 多 crate
- 前端: Tauri + React (GUI) / ratatui (TUI)
- Server: silent (HTTP/WS)
- 许可: Apache License 2.0
- 存储位置:
~/.tiangong/
常用开发命令
# 构建
cargo build --release
# 检查(快速验证)
cargo check --workspace
# Lint(严格遵守 warnings)
cargo clippy --workspace --all-targets --tests --benches -- -D warnings
# 格式化
cargo fmt
cargo fmt -- --check # 仅检查
# 依赖检查
cargo deny check --disable-fetch
# 测试
cargo nextest run --workspace
cargo nextest run --workspace --no-tests pass # 无测试时通过
# 完整检查链(提交前自动执行)
cargo fmt -- --check && cargo check --workspace && cargo clippy --workspace --all-targets --tests --benches -- -D warnings && cargo nextest run --workspace --no-tests pass
# 运行应用
cargo run --release # 桌面 UI 模式(默认)
cargo run --release -- cli # CLI 模式
当前 Core 架构
现行说明见 docs/core-architecture.md 与 docs/agent-loop-refactor/design.md。
当前 crates/tiangong-core 的执行模型是:
TiangongCore接收用户消息和控制输入;- 空闲用户消息通过
start_user_turn从最新 Session 构建TurnContext,随后创建一个 turn task; - 运行中的用户消息通过当前 task 自有命令通道发送
Command::InjectUserMessage,在该 turn 内中断活动、保存新消息并重新分析; shared_runtime只管理共享 Tokio runtime 和活跃 turn task 注册表;- 每个 turn task 持有自己的上下文和命令接收端,结束后通道随之失效;
- 当前代码不存在常驻 Agent Driver 或 Agent Inbox。
核心模块:
crates/tiangong-core/src/core/:Core 对外入口、插件装配和输入协调;crates/tiangong-core/src/shared_runtime.rs:共享 runtime 与 turn task 生命周期;crates/tiangong-core/src/react/:单轮 Agent Loop、命令、工具、压缩和收尾;crates/tiangong-core/src/turn_context.rs:单轮执行上下文;crates/tiangong-core/src/session.rs:会话消息和持久化状态;crates/tiangong-core/src/model.rs:模型客户端抽象。
审查或设计 Core 功能时必须以当前代码和上述两份现行文档为准,不得使用已经删除的 Driver/Inbox 迁移方案。
代码风格约定
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.
- 10d ago First seen · 188 lines · 1,855 tokens per session scan A 1bebd04ec651
silent-Tiangong CLAUDE.md is an instructions file published in the GitHub repository silent-rs/silent-Tiangong (26 stars, last pushed today), licensed Apache-2.0. It adds 1,855 tokens to every session, about $0.0093 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.
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.
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.
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).
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.
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).
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.