code-assistant AGENTS.md

Repository instructions for a Rust application that helps AI agents perform coding tasks, including its structure and test commands.

In plain words
What is it for?
Use them when developing or testing the command-line application, agent core, tools, language-model integration, web layer, or other Rust packages.
Why use it?
They show how the Rust components fit together and which checks confirm that code builds, is formatted, passes tests, and meets lint rules.

Instructions file for CodexOpenCode

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/stippi/code-assistant/agents-md
Clone the repo
git clone --depth 1 https://github.com/stippi/code-assistant

Made for: Codex, OpenCode.

Per session 3,889 This file is loaded in full into every session.
When invoked 3,889 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 $0.03889 $0.03889
Opus 5 $0.01945 $0.01945
Sonnet 5 $0.00778 $0.00778
Haiku 4.5 $0.00389 $0.00389

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

Security

Grade A, and why

code-assistant AGENTS.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 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.

AGENTS.md · 284 lines

How it starts

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

Repository Guidance

This file provides guidance to AI agents when working with code in this repository. Additional documentation is available in the docs folder if needed.

Essential Commands

Building and Development

  • cargo check - Test if the project compiles
  • cargo check --tests - Test if the tests compile
  • cargo test - Run all tests
  • cargo fmt --all -- --check - Check code formatting
  • cargo clippy --all-targets --all-features -- -D warnings - Run linter

Testing Specific Components

  • cargo test --package code-assistant - Test wiring binary
  • cargo test --package code_assistant_core - Test domain layer
  • cargo test --package agent_core - Test agent core
  • cargo test --package tools_core - Test tool framework
  • cargo test --package llm - Test LLM integration
  • cargo test --package web - Test web functionality

Architecture Overview

This is a Rust-based tool for AI-assisted code tasks with multiple operational modes.

Crate Layers

Layer 0 (generic):    llm  command_executor  pty_session  fs_explorer  sandbox  web  git  terminal  terminal_output
Layer 1 (generic):    tools_core        — tool trait, registry, render, spec, permissions
                      mcp_client        — MCP client mode: wraps MCP server tools as registry tools (rmcp SDK)
Layer 2 (generic):    agent_core        — agent loop, hook traits, dialect trait, AgentUi trait
Layer 3 (domain):     code_assistant_core — sessions, SessionService, event stream, UiEvent,
                                           tool impls, dialects (xml/caret), plugins, sub-agents
Layer 4 (frontends):  ui_gpui  ui_terminal  ui_acp  mcp_server
Layer 5 (binary):     code_assistant    — CLI, config, feature-gated frontend wiring

The binary feature-gates gpui-frontend, terminal-frontend, acp-frontend, and mcp-server (all default). A --no-default-features build produces a headless binary without gpui.

Key Entry Points

  • Agent loop: crates/agent_core/src/runtime.rs
  • Domain agent wrapper: crates/code_assistant_core/src/agent/runner.rs
  • Tool trait & registry: crates/tools_core/src/
  • Tool implementations: crates/code_assistant_core/src/tools/
  • Tool dialects (xml/caret): crates/code_assistant_core/src/tool_dialects/
  • Plugins/hooks: crates/code_assistant_core/src/plugins/
  • Session management: crates/code_assistant_core/src/session/
  • GPUI frontend: crates/ui_gpui/src/
  • Terminal frontend: crates/ui_terminal/src/
  • MCP server: crates/mcp_server/src/
  • MCP client: crates/mcp_client/src/ (config loading/registration binding: crates/code_assistant_core/src/tools/mcp.rs)
  • ACP frontend: crates/ui_acp/src/

Read the full file on GitHub · 284 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 · 284 lines · 3,889 tokens per session scan A fdc984253b6f

Subscribe to this mod's changes

code-assistant AGENTS.md is an instructions file published in the GitHub repository stippi/code-assistant (179 stars, last pushed 5d ago), licensed MIT. It adds 3,889 tokens to every session, about $0.0194 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.