AGENTS

A set of default guidelines for Rust files that implement Tauri commands, which connect a desktop application's interface to Rust code. It recommends keeping command files focused on input handling and orchestration while placing business logic and database work in separate modules.

In plain words
What is it for?
Use it when editing Tauri command modules to decide where command parsing, service logic, SQLite queries, external integrations, and helper types should live.
Why use it?
It helps keep command entrypoints small and makes business rules, database access, integrations, and data types easier to maintain.

Command

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 commands/haojing8312/workclaw/agents
Clone the repo
git clone --depth 1 https://github.com/haojing8312/WorkClaw
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 996 The whole file, excluding the scripts and references it only reads on demand.
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 $0.00000 $0.00996
Opus 5 $0.00000 $0.00498
Sonnet 5 $0.00000 $0.00199
Haiku 4.5 $0.00000 $0.00100

Measured 2d ago against content hash de8bb86ef121, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

AGENTS 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 2d 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.

apps/runtime/src-tauri/src/commands/AGENTS.md · 88 lines

How it starts

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

Rust Commands AGENTS.md

Scope

  • This file applies to apps/runtime/src-tauri/src/commands/.
  • Follow the closer rules here when editing command modules or adding new command-adjacent submodules.

Goal

  • Keep Tauri command files as entrypoints, not as long-term homes for business logic, SQL, or provider protocols.

What Belongs In Root Command Files

  • Tauri command function signatures
  • command input parsing
  • response shaping for the frontend contract
  • obvious orchestration handoff to service, repo, gateway, or sibling helper modules
  • small compatibility glue that must stay visible at the entrypoint

What Should Move Out

  • long SQL blocks
  • branching business policy
  • normalization and validation flows shared by multiple commands
  • external platform protocol handling
  • large helper type clusters once they crowd out the command entrypoint

Preferred Submodules

  • <domain>/service.rs: business rules and orchestration
  • <domain>/repo.rs: SQLite reads and writes
  • <domain>/gateway.rs or adapter.rs: external integration logic
  • <domain>/types.rs: internal DTOs and helper types

Use these as defaults, not dogma. Explain deviations before editing.

Reference Split

  • employee_agents is the current reference split for giant Rust command files.

  • Before designing a new command split, inspect:

    • src/commands/employee_agents.rs
    • src/commands/employee_agents/types.rs
    • src/commands/employee_agents/group_management.rs
    • src/commands/employee_agents/group_run_entry.rs
    • src/commands/employee_agents/memory_commands.rs
    • src/commands/employee_agents/tauri_commands.rs
  • Reuse that pattern of:

    • thin root command file
    • focused child modules by use case or responsibility
    • explicit service / repo / command-helper boundaries
    • no giant replacement child file without a clear concern boundary
  • openclaw_plugins is the current reference split for giant plugin or integration command files.

  • Before designing a split for a command that mixes runtime state, setup, installation, and external host probing, inspect:

    • src/commands/openclaw_plugins.rs
    • src/commands/openclaw_plugins/tauri_commands.rs
    • src/commands/openclaw_plugins/runtime_service.rs
    • src/commands/openclaw_plugins/settings_service.rs
    • src/commands/openclaw_plugins/setup_service.rs
    • src/commands/openclaw_plugins/install_repo.rs
    • src/commands/openclaw_plugins/install_service.rs
    • src/commands/openclaw_plugins/plugin_host_service.rs
    • src/commands/openclaw_plugins/installer_session.rs
    • src/commands/openclaw_plugins/tests.rs
  • Reuse that pattern of:

    • thin root command file
    • command wrappers separated from setup, runtime, install, and host probing concerns
    • explicit service / repo / command-helper boundaries
    • tests moved out of the root file once the root starts crowding out entrypoint logic

Read the full file on GitHub · 88 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. 2d ago First seen · 88 lines · 0 tokens per session scan A de8bb86ef121

Subscribe to this mod's changes

AGENTS is a command published in the GitHub repository haojing8312/WorkClaw (140 stars, last pushed 3mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 996 tokens. 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.