tuicr: Instructions file for Codex

AGENTS.md

tuicr AGENTS.md is an instructions file for Codex, OpenCode from agavra/tuicr. It costs 11,090 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

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions Claude Code; mentions AGENTS.md; mentions Codex.

This is agavra/tuicr's own configuration. It tells Codex and OpenCode how to work on tuicr 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 tuicr configures →

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,481 stars · on GitHub · tuicr.dev

Reuse

Borrowing it

Nothing to install: this file belongs to agavra/tuicr. 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/agavra/tuicr/main/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/github.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/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 tuicr AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/agavra/tuicr/agents-md"><img src="https://agentmods.dev/badge/instructions/agavra/tuicr/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 11,090 This file is loaded in full into every session.
When invoked 11,090 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.11090 $0.11090
Opus 5.5 $0.04436 $0.04436
Sonnet 5.5 $0.02218 $0.02218
Haiku 4.5 $0.01109 $0.01109

Measured 2d ago against content hash aa68b1499722, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 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 · 478 lines

How it starts

The opening of the file, as written. The whole thing — 478 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.)
│   ├── coloring.rs      # Render-time syntax coloring of hunks near the viewport
│   ├── editor_target.rs # Read-only snapshots of a PR revision for `$EDITOR`
│   └── 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,
│                        # Azure DevOps PR, Gerrit change review)
│   ├── mod.rs           # Detect and parse GitHub/GitLab/Bitbucket/Azure/Gerrit remotes
│                        # (parse_any_remote_url: Bitbucket, GitLab, Azure, Gerrit, 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
│   ├── local_git.rs     # Shared `git show <sha>:<path>` blob read for all backends
│   ├── remote_comments.rs # RemoteReviewThread shape + visibility filter
│   ├── submit.rs        # Submit pipeline: preflight mapping, resolver actions,
│   │                    # InlineComment payload, build_review_body, SubmitEvent
│   ├── gitea/           # Gitea backend via `tea` CLI
│   │   ├── mod.rs       # GiteaTeaBackend: ForgeBackend impl
│   │   ├── tea.rs       # TeaCommandRunner: spawn `tea api -i`, read HTTP status off stderr
│   │   └── models.rs    # JSON parsing for Gitea REST v1 responses
│   ├── 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
│   ├── azure/           # Azure DevOps backend via REST (PAT) or `az rest`
│   │   ├── mod.rs       # AzureDevOpsBackend export
│   │   ├── az.rs        # ForgeBackend impl, AzHttp transports, remote/target parsing
│   │   └── models.rs    # Azure DevOps REST 7.1 response models
│   └── gerrit/          # Gerrit backend via the Gerrit REST API (no CLI exists)
│       ├── mod.rs       # GerritBackend export
│       ├── api.rs       # ForgeBackend impl, GerritHttp transport, remote/target parsing
│       └── models.rs    # Gerrit REST response models (ChangeInfo, CommentInfo)
│
├── 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
    ├── theme_picker.rs  # :theme runtime picker modal (live preview, / filter)
    ├── comment_panel.rs # Comment input dialog, confirm dialog
    └── styles.rs        # Color constants and style helper functions

Read the full file on GitHub · 478 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 Changed · +2 lines · +137 tokens per session aa68b1499722
  2. 7d ago Changed · +3 lines · +282 tokens per session de29a7cbf153
  3. 9d ago Changed · +1 lines · +32 tokens per session b60a5f9cda9b
  4. 12d ago Changed · +56 tokens per session 2a2c8a9975da
  5. 15d ago Changed · +65 tokens per session 13293fa5b2b2
  6. 17d ago Changed · +5 tokens per session d63b58efa780
  7. 19d ago Changed · +61 tokens per session 2f600d872372
  8. 20d ago Changed · +1 lines · +188 tokens per session ee420208189d
  9. 21d ago Changed · +3 lines · +338 tokens per session ea247eb4e06e
  10. 1mo ago First seen · 468 lines · 9,926 tokens per session scan A 80eac3013bb7

Subscribe to this mod's changes

tuicr AGENTS.md is an instructions file published in the GitHub repository agavra/tuicr (3,481 stars, last pushed 3d ago), licensed MIT. It adds 11,090 tokens to every session, about $0.0444 per session on Opus 5.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

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 · 9,715 tokens

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,461 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, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 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,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,731 tokens

deepseek-harness AGENTS.md

AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.

deepseek-ai/deepseek-harness · 4,261 tokens