moltis CLAUDE.md

moltis CLAUDE.md is an instructions file for coding agents from moltis-org/moltis. It costs 6,226 tokens per session, scanned A, original, MIT.

Repository instructions for coding agents working on Moltis, a Rust version of OpenClaw. They cover code structure, testing, security checks, dependencies, configuration changes, and release work.

In plain words
What is it for?
Use them when adding Rust features, crates, configuration fields, tests, or modules in Moltis. They also guide file organization and release-related checks.
Why use it?
They give the agent project-specific rules that are easy to miss when changing a large Rust codebase. This helps keep new code consistent and prevents common build, validation, and security mistakes.

Instructions file

About the project

Moltis is a persistent personal agent server written in Rust that runs on hardware controlled by its user. It provides an AI agent with sandboxed command execution, model-provider connections, memory, voice, scheduling, messaging integrations, browser automation, and MCP tools. Its catalogue add-ons extend the agent’s workflows and available tools.

moltis-org/moltis · 2,845 stars · on GitHub · moltis.org

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/moltis-org/moltis/claude-md
Clone the repo
git clone --depth 1 https://github.com/moltis-org/moltis

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 moltis CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/moltis-org/moltis/claude-md.svg)](https://agentmods.dev/instructions/moltis-org/moltis/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/moltis-org/moltis/claude-md"><img src="https://agentmods.dev/badge/instructions/moltis-org/moltis/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 6,226 This file is loaded in full into every session.
When invoked 6,226 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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.06226 $0.06226
Opus 5 $0.03113 $0.03113
Sonnet 5 $0.01245 $0.01245
Haiku 4.5 $0.00623 $0.00623

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

Security

Grade A, and why

moltis 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 6d 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 · 534 lines

How it starts

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

CLAUDE.md

Rust version of openclaw (docs, code). All code must have tests with high coverage. Always check for security.

Cargo Features

Enable new feature flags by default in crates/cli/Cargo.toml (opt-out, not opt-in):

[features]
default = ["foo", ...]
foo = ["moltis-gateway/foo"]

Workspace Dependencies

Add new crates to [workspace.dependencies] in root Cargo.toml, reference with { workspace = true }. Never add versions directly in crate Cargo.toml. Use latest stable crates.io version.

Config Schema and Validation

When adding/renaming fields in MoltisConfig (crates/config/src/schema.rs), also update build_schema_map() in crates/config/src/validate.rs. New enum variants for string-typed fields need updates in check_semantic_warnings().

Rust Style and Idioms

  • File size limit: 1,500 lines. CI enforces this via scripts/check-file-size.sh. Split large files into modules by domain. Existing oversize files are allowlisted for incremental decomposition.
  • Do not add implementation code to mod.rs or lib.rs. Keep those files for module wiring, exports, and crate setup, move real logic into dedicated sibling modules.
  • Use traits for behaviour boundaries. Prefer generics for hot paths, dyn Trait for heterogeneous/runtime dispatch.
  • Derive Default when all fields have sensible defaults.
  • Use concrete types (struct/enum) over serde_json::Value wherever shape is known.
  • Match on types, never strings. Only convert to strings at serialization/display boundaries.
  • Prefer From/Into/TryFrom/TryInto over manual conversions. Ask before adding manual conversion paths.
  • DRY cross-crate types: When two crates need the same enum/struct, define it once in the lower-level crate and re-export via pub type Alias = other_crate::Type from the higher-level one. Never duplicate enums across crates or round-trip through strings (parse(&id.to_string())) to convert between mirror types.
  • Prefer streaming over non-streaming API calls.
  • Run independent async work concurrently (tokio::join!, futures::join_all).
  • Never use block_on inside async context.
  • Forbidden: Mutex<()> / Arc<Mutex<()>> — mutex must guard actual state.
  • Use anyhow::Result for app errors, thiserror for library errors. Propagate with ?.
  • Never .unwrap()/.expect() in production. Workspace lints deny these. Use ?, ok_or_else, unwrap_or_default, unwrap_or_else(|e| e.into_inner()) for locks.
  • Use time crate (workspace dep) for date/time — no manual epoch math or magic constants like 86400.
  • Prefer chrono only if already imported in the crate; default to time for new code.
  • Prefer crates over subprocesses (std::process::Command). Use subprocesses only when no mature crate exists.
  • Prefer guard clauses (early returns) over nested if blocks.
  • Prefer iterators/combinators over manual loops. Use Cow<'_, str> when allocation is conditional.
  • Keep public API surfaces small. Use #[must_use] where return values matter.

Read the full file on GitHub · 534 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. 6d ago First seen · 534 lines · 6,226 tokens per session scan A e661ed65922c

Subscribe to this mod's changes

moltis CLAUDE.md is an instructions file published in the GitHub repository moltis-org/moltis (2,845 stars, last pushed 2d ago), licensed MIT. It adds 6,226 tokens to every session, about $0.0311 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.