tfenv: Instructions file for Codex

AGENTS.md

tfenv AGENTS.md is an instructions file for Codex, OpenCode from tfutils/tfenv. It costs 3,018 tokens per session, scanned A, original, MIT.

Repository instructions for tfenv, a Bash tool that lets developers install and switch between Terraform versions. Terraform is software for defining and managing cloud and infrastructure resources with code.

In plain words
What is it for?
Use it when modifying tfenv scripts, libraries, tests, documentation, or CI-related files.
Why use it?
It gives coding agents the project structure, standards, dependencies, and required workflow before they change the repository.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md.

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

About the project

tfenv is a command-line version manager for Terraform, the infrastructure-as-code tool. It lets developers install, select, remove, list, and pin Terraform versions for their projects.

tfutils/tfenv · 4,991 stars · on GitHub

Reuse

Borrowing it

Nothing to install: this file belongs to tfutils/tfenv. 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/tfutils/tfenv/master/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/tfutils/tfenv

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/tfutils/tfenv/agents-md/github.svg)](https://agentmods.dev/instructions/tfutils/tfenv/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/tfutils/tfenv/agents-md"><img src="https://agentmods.dev/badge/instructions/tfutils/tfenv/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 tfenv AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/tfutils/tfenv/agents-md"><img src="https://agentmods.dev/badge/instructions/tfutils/tfenv/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,018 This file is loaded in full into every session.
When invoked 3,018 The same file — it is already loaded in full.
Security scan A 1 finding. 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.03018 $0.03018
Opus 5.5 $0.01207 $0.01207
Sonnet 5.5 $0.00604 $0.00604
Haiku 4.5 $0.00302 $0.00302

Measured 2mo ago against content hash 5ee2cb5714d6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

tfenv AGENTS.md scanned grade A with 1 finding 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 2mo 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.

- **Minimal dependencies:** bash, curl, grep/ggrep, sort, unzip
AGENTS.md · 326 lines

How it starts

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

Agent Guidelines for tfutils/tfenv

Master context document for AI coding agents contributing to this repository. Every agent MUST read this file before starting work.


Project Overview

tfenv is a Terraform version manager written in Bash, modelled after rbenv. ~2.5k LOC across bin/, lib/, libexec/, test/, and share/.

  • Language: Bash (no shellcheck — deliberate choice; see ADR-0003)
  • Default branch: master
  • Current release: v3.2.0 (April 2026)
  • Maintainer: Mike Peachey / Jaz (@Zordrak)
  • Minimal dependencies: bash, curl, grep/ggrep, sort, unzip
  • License: MIT

Repository Structure

bin/              Entry points (terraform shim, tfenv command)
lib/              Shared libraries sourced by multiple scripts
libexec/          Subcommands (tfenv-install, tfenv-use, etc.)
test/             Integration tests (download real Terraform binaries)
share/            Static assets (HashiCorp PGP keys)
.github/          CI workflows, agent definitions, issue templates
  agents/         Agent definition files (.agent.md)
  instructions/   Auto-loaded coding standards
  ISSUE_TEMPLATE/ Structured issue forms
docs/
  adr/            Architecture Decision Records

Core Principles

1. Standalone Script Execution

Every libexec/ script contains its own boilerplate for resolving TFENV_ROOT and sourcing helpers. This is intentional — each script must be executable in isolation. Do NOT refactor this into a shared loader. See ADR-0002.

2. Worktree-First

ALL code changes MUST happen in a git worktree under .worktrees/. The main working tree is shared by all agents and the human — modifying it directly risks conflicts. .worktrees/ is gitignored.

# Create a worktree for your work
git worktree add .worktrees/fix-123 -b fix/123-description master

# Do all work inside the worktree
cd .worktrees/fix-123

# Clean up when done (after PR is created)
cd /path/to/main/tree
git worktree remove .worktrees/fix-123

Read the full file on GitHub · 326 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. 2mo ago First seen · 326 lines · 3,018 tokens per session scan A 5ee2cb5714d6

Subscribe to this mod's changes

tfenv AGENTS.md is an instructions file published in the GitHub repository tfutils/tfenv (4,991 stars, last pushed 4mo ago), licensed MIT. It adds 3,018 tokens to every session, about $0.0121 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

tfenv AGENTS.md compared with instructions from other repositories

tfenv AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
tfenv AGENTS.mdtfutils/tfenvInstructions file5.0k4mo agoMITA3,018Codex, OpenCode
plan-forge naming.instructions.mdsrnichols/plan-forgeInstructions file62d agoMITA1,453GitHub Copilot
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot