tuicr AGENTS.md

tuicr AGENTS.md is an instructions file for Codex, OpenCode from agavra/tuicr. It costs 8,017 tokens per session, scanned A, original, MIT.

Repository instructions for tuicr, a Rust terminal application and library for reviewing code changes. They describe its project structure, review sessions, comments, file filters, version updates, and related components.

In plain words
What is it for?
Use them when changing the terminal review interface, review storage, comments, file filtering, editor integration, update checks, or supported version-control backends.
Why use it?
They help an agent navigate the code-review tool without confusing its terminal interface, library code, and version-control integrations. They also explain where key behaviour is implemented.

Instructions file for CodexOpenCode

About the project

tuicr is a terminal interface for reviewing code changes, with Vim-style navigation, inline comments, and review tracking. It is used to inspect uncommitted changes, commit ranges, or pull requests from GitHub, GitLab, and Bitbucket, and can export reviews or markdown. Its catalogue entries provide instructions and a skill for working with the tool.

agavra/tuicr · 3,029 stars · on GitHub · tuicr.dev

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

Made for: Codex, OpenCode.

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 tuicr AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/agavra/tuicr/agents-md.svg)](https://agentmods.dev/instructions/agavra/tuicr/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/agavra/tuicr/agents-md"><img src="https://agentmods.dev/badge/instructions/agavra/tuicr/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 8,017 This file is loaded in full into every session.
When invoked 8,017 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.08017 $0.08017
Opus 5 $0.04008 $0.04008
Sonnet 5 $0.01603 $0.01603
Haiku 4.5 $0.00802 $0.00802

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

Security

Grade A, and why

tuicr 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 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.

AGENTS.md · 427 lines

How it starts

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

AGENTS.md - tuicr

This document serves two purposes:

  1. Help coding agents understand the tuicr codebase structure
  2. Explain how to interpret review feedback generated by tuicr

Project Structure

tuicr is a Rust terminal UI application and library for code reviews. Here's the module structure:

src/
├── lib.rs               # Public crate surface: ReviewStore, session/comment types, core modules
├── main.rs              # Entry point, event loop, action dispatch
├── config/
│   └── mod.rs           # User config loading (XDG on Unix, %APPDATA% on Windows)
├── app.rs               # Application state (App struct, InputMode, etc.)
│   └── file_filter.rs   # File-tree include/exclude regex filters + `/` path search
├── error.rs             # Error types (TuicrError enum)
├── editor.rs            # External $EDITOR command construction and launch helpers
├── review_store.rs      # Library API for session listing/loading and shared comment insertion
├── review_cli.rs        # Non-interactive `tuicr review` subcommands over ReviewStore
├── update.rs            # Public update facade
├── update/
│   ├── check.rs         # Lightweight crates.io version checks for the TUI badge
│   ├── install.rs       # `tuicr update` orchestration, release verification, and runtime adapter
│   └── install/         # Install detection, archive extraction, replacement, and focused tests
├── tuicrignore.rs       # .tuicrignore loader + diff file filtering (gitignore-style patterns)
├── theme/
│   └── mod.rs           # Theme palette definitions + bundled/local theme resolution
│
├── vcs/                 # VCS abstraction layer
│   ├── mod.rs           # detect_vcs(): auto-detect VCS (jj first, then git, then hg)
│   ├── traits.rs        # VcsBackend trait, VcsInfo, VcsType, CommitInfo
│   ├── diff_parser.rs   # Strict, count-driven hunk parser over structured FilePatch values
│   ├── git/             # Git backend selector (libgit2 by default, CLI for sparse/opt-in)
│   │   ├── mod.rs       # GitBackend wrapper, backend preference, repo mode detection
│   │   ├── cli.rs       # Git CLI backend used for sparse checkouts and backend = "cli"
│   │   ├── raw.rs       # Exact `git diff --raw -z --patch` metadata/patch adapter
│   │   ├── libgit2.rs   # libgit2-backed implementation used for normal Git repos by default
│   │   ├── repository.rs # CommitInfo, get_recent_commits()
│   │   ├── diff.rs      # get_working_tree_diff(), get_commit_range_diff()
│   │   └── context.rs   # fetch_context_lines() for gap expansion
│   ├── hg/              # Mercurial backend (always compiled)
│   │   └── mod.rs       # HgBackend: uses hg CLI, parses with diff_parser::Hg
│   └── jj/              # Jujutsu backend (always compiled)
│       └── mod.rs       # JjBackend: uses jj CLI, parses with diff_parser::GitStyle
│
├── forge/               # Remote forge integration (GitHub PR, GitLab MR, Bitbucket PR review)
│   ├── mod.rs           # Detect and parse GitHub/GitLab/Bitbucket remotes
│                        # (parse_any_remote_url: Bitbucket, then GitLab, then GitHub)
│   ├── traits.rs        # ForgeBackend trait, ForgeRepository, PullRequestTarget,
│   │                    # PullRequestDetails, PullRequestInfo, PrSessionKey,
│   │                    # CreateReviewRequest, GhCreateReviewResponse, ForgeFileLinesRequest
│   ├── pr_open.rs       # Async pr-open flow: build session from details + diff
│   ├── selector.rs      # Review target selector state (Local | Pull Requests tabs)
│   ├── context.rs       # Remote context expansion via ForgeBackend::fetch_file_lines
│   ├── remote_comments.rs # RemoteReviewThread shape + visibility filter
│   ├── submit.rs        # Submit pipeline: preflight mapping, resolver actions,
│   │                    # InlineComment payload, build_review_body, SubmitEvent
│   ├── github/          # GitHub backend via `gh` CLI
│   │   ├── mod.rs       # GitHubGhBackend: ForgeBackend impl
│   │   ├── gh.rs        # GhCommandRunner: spawn `gh`, parse output, error mapping
│   │   ├── models.rs    # JSON parsing for `gh` REST + GraphQL responses
│   │   ├── pr_info.rs   # Extended `gh pr view --json` parsing for PR description panel
│   │   ├── review_threads.rs # GraphQL query for existing review threads
│   │   ├── review_metadata.rs # GraphQL review commit metadata for since-last-review scoping
│   │   └── submit.rs    # build_review_payload, create_review wiring
│   ├── gitlab/          # GitLab backend via `glab` CLI
│   │   ├── mod.rs       # GitLabGlabBackend export
│   │   ├── glab.rs      # ForgeBackend impl and glab command runner
│   │   └── models.rs    # GitLab API response models
│   └── bitbucket/       # Bitbucket Cloud backend via `bkt` CLI (no Data Center)
│       ├── mod.rs       # BitbucketBktBackend export
│       ├── bkt.rs       # ForgeBackend impl and bkt command runner
│       └── models.rs    # Bitbucket Cloud REST 2.0 response models
│
├── model/
│   ├── mod.rs
│   ├── comment.rs       # Comment, CommentType (Note/Suggestion/Issue/Praise)
│   ├── diff_types.rs    # DiffFile, DiffHunk, DiffLine, FileStatus, LineOrigin
│   └── review.rs        # ReviewSession, FileReview (the persisted review state)
│
├── input/
│   ├── mod.rs
│   ├── keybindings.rs   # Action enum, map_key_to_action() for each InputMode
│   └── mode.rs          # InputMode enum definition (unused, defined in app.rs)
│
├── persistence/
│   ├── mod.rs
│   └── storage.rs       # save_session, load_session, manifest-backed session lookups
│
├── output/
│   ├── mod.rs
│   └── markdown.rs      # export_to_clipboard(): generate markdown, copy to clipboard
│
└── ui/
    ├── mod.rs
    ├── app_layout.rs    # Main render function, file list, diff view with inline comments
    ├── pr_info_panel.rs # PR description panel (status, reviewers, checks, body)
    ├── comment_navigator.rs # Sidebar comment index for jumping local/remote comments
    ├── status_bar.rs    # Header, status bar, command line rendering
    ├── help_popup.rs    # Help overlay (? key)
    ├── summary_popup.rs # :summary view of pending local-draft comments
    ├── comment_panel.rs # Comment input dialog, confirm dialog
    └── styles.rs        # Color constants and style helper functions

Read the full file on GitHub · 427 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 · 427 lines · 8,017 tokens per session scan A eec573d21220

Subscribe to this mod's changes

tuicr AGENTS.md is an instructions file published in the GitHub repository agavra/tuicr (3,029 stars, last pushed 2d ago), licensed MIT. It adds 8,017 tokens to every session, about $0.0401 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.