glab-tui: Instructions file for Codex

AGENTS.md

glab-tui AGENTS.md is an instructions file for Codex, OpenCode from rcieri/glab-tui. It costs 26,610 tokens per session, scanned A, original, MIT.

Project instructions for glab-tui, a terminal-based interface for managing GitLab and GitHub repositories. They explain the project structure, Rust code standards, and how it uses the official `glab` and `gh` command-line tools.

In plain words
What is it for?
They help agents navigate the codebase, understand its Rust and terminal-interface components, and make changes consistently.
Why use it?
They give a coding agent the repository context and rules it should follow before changing code. This reduces the risk of breaking the project's architecture or using the wrong interface to Git hosting services.

Instructions file for CodexOpenCode

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

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

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/rcieri/glab-tui/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/rcieri/glab-tui

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 glab-tui AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/rcieri/glab-tui/agents-md/github.svg)](https://agentmods.dev/instructions/rcieri/glab-tui/agents-md)
Your own site
<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.

agentmods 80×15 button for glab-tui AGENTS.md

Your own site · 80×15
<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>
Per session 26,610 This file is loaded in full into every session.
When invoked 26,610 The same file — it is already loaded in full.
Security scan A 2 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.26610 $0.26610
Opus 5.5 $0.10644 $0.10644
Sonnet 5.5 $0.05322 $0.05322
Haiku 4.5 $0.02661 $0.02661

Measured 3d ago against content hash 006f7fda7804, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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
AGENTS.md · 566 lines

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-fancy features)
  • 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, deserialize only) — parses workflow_dispatch inputs from GitHub workflow files. It replaced the deprecated serde_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 version v0.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().

Read the full file on GitHub · 566 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. 3d ago Changed · +3 lines · +720 tokens per session 006f7fda7804
  2. 8d ago Changed 5a98a9b68196
  3. 10d ago Changed · +37 tokens per session 56f4162a6adf
  4. 15d ago Changed · +6 lines · +933 tokens per session e59dbb664851
  5. 17d ago Changed · +3 lines · +374 tokens per session ed76c906dd86
  6. 18d ago Changed · +23 lines · +2,426 tokens per session 09ff25baaa0c
  7. 19d ago First seen · 531 lines · 22,120 tokens per session scan A 50136746cd0b

Subscribe to this mod's changes

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.

Related

glab-tui AGENTS.md compared with instructions from other repositories

glab-tui AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
glab-tui AGENTS.mdrcieri/glab-tuiInstructions file272yesterdayMITA26,610Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode