silent-Tiangong: Instructions file for Claude Code

CLAUDE.md

silent-Tiangong CLAUDE.md is an instructions file for Claude Code from silent-rs/silent-Tiangong. It costs 1,855 tokens per session, scanned A, original, Apache-2.0.

Project instructions for Silent-Tiangong, a Rust application that combines a desktop interface, command-line interface, server, and agent features. The project uses a Cargo workspace, which groups multiple Rust packages in one repository.

In plain words
What is it for?
Use them when working on Silent-Tiangong code, especially for running the required Rust checks, understanding its components, and following its storage and development conventions.
Why use it?
They give a coding agent the project's architecture and the commands used to build, check, format, lint, test, and run it. This reduces guesswork when making changes in a multi-package codebase.

Instructions file for Claude Code

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

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

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/silent-rs/silent-Tiangong/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/silent-rs/silent-Tiangong

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 silent-Tiangong CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/silent-rs/silent-tiangong/claude-md/github.svg)](https://agentmods.dev/instructions/silent-rs/silent-tiangong/claude-md)
Your own site
<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.

agentmods 80×15 button for silent-Tiangong CLAUDE.md

Your own site · 80×15
<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>
Per session 1,855 This file is loaded in full into every session.
When invoked 1,855 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.01855 $0.01855
Opus 5 $0.00928 $0.00928
Sonnet 5 $0.00371 $0.00371
Haiku 4.5 $0.00186 $0.00186

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

Security

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.

CLAUDE.md · 188 lines

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.mddocs/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 迁移方案。

代码风格约定

Read the full file on GitHub · 188 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 · 188 lines · 1,855 tokens per session scan A 1bebd04ec651

Subscribe to this mod's changes

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.

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