Borrowing it
Nothing to install: this file belongs to rcieri/glab-tui. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/rcieri/glab-tui/main/AGENTS.mdgit clone --depth 1 https://github.com/rcieri/glab-tuiWrote 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.
[](https://agentmods.dev/instructions/rcieri/glab-tui/agents-md)<a href="https://agentmods.dev/instructions/rcieri/glab-tui/agents-md"><img src="https://agentmods.dev/badge/instructions/rcieri/glab-tui/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.
<a href="https://agentmods.dev/instructions/rcieri/glab-tui/agents-md"><img src="https://agentmods.dev/badge/instructions/rcieri/glab-tui/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.26610 | $0.26610 |
| Opus 5.5 | $0.10644 | $0.10644 |
| Sonnet 5.5 | $0.05322 | $0.05322 |
| Haiku 4.5 | $0.02661 | $0.02661 |
Grade A, and why
glab-tui AGENTS.md scanned grade A with 2 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 3d 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
* [update.rs](src/utils/update.rs): GitHub releases self-updater with multi-target Linux asset selection. Talks to GitHub through `curl` (never `gh`, so GitLab-only installs can update) and verifies the archive against t Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
* [subprocess.rs](src/backend/subprocess.rs): `subprocess::output(&mut Command, input)` — the one way to run a `gh`/`glab` call: pipes stdout/stderr, writes `input` to stdin, and kills the child once it outlives `command How it starts
The opening of the file, as written. The whole thing — 566 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AI Agent Instructions for glab-tui
Welcome, AI Agent! This document contains essential context, architectural guidelines, and coding standards for navigating and contributing to glab-tui. Please adhere to these rules when analyzing the codebase, writing new features, or refactoring.
1. Project Overview
glab-tui is a Terminal User Interface (TUI) for managing GitLab and GitHub repositories.
Instead of implementing full REST/GraphQL API clients, glab-tui shells out to the official glab and gh CLIs under the hood.
- Primary Language: Rust (Edition 2024)
- TUI Framework:
ratatui(v0.30.1) - Syntax Highlighting:
syntect(v5,parsing+default-syntaxes+regex-fancyfeatures) - Markdown Rendering:
pulldown-cmark(v0.13.0, GFM tables/code/lists) - Async Runtime:
tokio(v1.38, full) - Async Traits:
async-trait(v0.1.92) - CLI Parsing:
clap(v4, derive) - Terminal Handling:
crossterm(v0.29) - Clipboard:
arboard(v3.6) - Config/Themes:
toml(v1.1) crate; config at~/.config/glab-tui/config.toml - YAML:
serde-saphyr(v1.1,deserializeonly) — parsesworkflow_dispatchinputs from GitHub workflow files. It replaced the deprecatedserde_yaml. serde-saphyr 1.2+ needs Rust 1.89, so the MSRV-aware resolver holds it at 1.1. - Process & Session Handling:
libc(v0.2) — Unix setsid for background commands & signal masking during terminal handoff - Package:
glab-tui-crate(binary:glab-tui; current versionv0.9.4)
Dual-Engine Architecture
The application detects whether the current repository is hosted on GitHub or GitLab and instantiates either a GlabBackend or GhBackend. Detection is centralized in git_helpers::detect_backend(remote_url, override_kind) (src/git_helpers.rs): github.com remotes (with or without www. prefix) resolve to GitHub; other hosts are probed with gh auth status --active --hostname <host> and glab auth status --hostname <host>, defaulting to GitLab when neither/both respond. Without an origin remote (e.g. -r owner/repo outside a checkout), git_helpers::detect_backend_without_remote applies the same rule to gh auth status --active / glab auth status with no hostname. A repo-local backend = "github" | "gitlab" config override always takes precedence — set it for SSH aliases or hosts serving both platforms. Always route backend detection through detect_backend; do not reimplement inline github.com string matching. Both backends implement the Backend trait (src/backend/mod.rs). The domain layer (src/domain/) calls backend methods through GitlabClient (src/domain/client.rs). Runtime backend identification is available via the BackendKind enum (BackendKind::GitLab / BackendKind::GitHub) which also provides host-aware terminology through BackendKind::term().
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.
- 3d ago Changed · +3 lines · +720 tokens per session 006f7fda7804
- 8d ago Changed 5a98a9b68196
- 10d ago Changed · +37 tokens per session 56f4162a6adf
- 15d ago Changed · +6 lines · +933 tokens per session e59dbb664851
- 17d ago Changed · +3 lines · +374 tokens per session ed76c906dd86
- 18d ago Changed · +23 lines · +2,426 tokens per session 09ff25baaa0c
- 19d ago First seen · 531 lines · 22,120 tokens per session scan A 50136746cd0b
glab-tui AGENTS.md is an instructions file published in the GitHub repository rcieri/glab-tui (272 stars, last pushed yesterday), licensed MIT. It adds 26,610 tokens to every session, about $0.1064 per session on Opus 5.5. A static security scan graded it A with 2 findings (makes network calls, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-19.
glab-tui AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| glab-tui AGENTS.mdrcieri/glab-tui | Instructions file | 272 | yesterday | MIT | A | 26,610 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | yesterday | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |