gitk-go: Instructions file for Codex

AGENTS.md

gitk-go AGENTS.md is an instructions file for Codex, OpenCode from thiagokokada/gitk-go. It costs 835 tokens per session, scanned A, original, MIT.

Project instructions for coding agents contributing to the gitk-go Go application.

In plain words
What is it for?
Making Git, GUI, concurrency, and embedded-asset changes while checking them with Go tests, formatting, and static analysis.
Why use it?
They define the project's testing, formatting, code-organization, naming, and documentation expectations so changes fit the existing codebase.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

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

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 gitk-go AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/thiagokokada/gitk-go/agents-md"><img src="https://agentmods.dev/badge/instructions/thiagokokada/gitk-go/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 835 This file is loaded in full into every session.
When invoked 835 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.00835 $0.00835
Opus 5.5 $0.00334 $0.00334
Sonnet 5.5 $0.00167 $0.00167
Haiku 4.5 $0.00084 $0.00084

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

Security

Grade A, and why

gitk-go 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 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.

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 · 48 lines

What it actually says

Automation Notes

This project occasionally uses AI assistance. To keep contributions consistent, agents should follow these rules:

  1. Keep UI logic testable. Add pure helpers near their owner and cover them with unit tests.
  2. Treat cmd and internal/gui as UI orchestration layers. Core Git behavior belongs in internal/git.
  3. Use go test ./..., go fmt, and go vet ./... before sending changes whenever the environment allows it.
  4. README and AGENTS should stay ASCII-only and concise.
  5. Keep lines under 120 characters (enforced by golangci-lint).
  6. If a function returns multiple values of the same type, use named return values.
  7. Dot imports are only allowed for modernc.org/tk9.0.
  8. Describe sandbox or permission issues observed while running commands so maintainers can reproduce locally, but ignore nice(5) failed: operation not permitted.
  9. Keep GUI assets (icons, images, etc.) inside internal/gui/assets and reference them there when using go:embed.
  10. Group related controller/state fields into dedicated structs instead of leaving long flat structs.
  11. When working with mutexes, prefer defer mu.Unlock() immediately after locking unless there is a strong reason not to.
  12. Prefer slog/log instead of log for logging.
  13. Prefer tests co-located with the implementation (e.g. internal/gui/filter_test.go for filter.go) instead of creating per-feature test filenames.
  14. Always run tests with GOCACHE set to avoid sandbox issues: env GOCACHE="$PWD/.gocache" go test ./....
  15. Avoid abstraction-only wrappers. Add methods when they encode behavior, enforce invariants, or coordinate multiple fields. Prefer package functions over methods when no receiver state is used.
  16. Keep Tk widget construction, bindings, tag names, dialogs, menu setup, and widget guards in internal/gui/view.
  17. Keep controller code focused on service calls, async scheduling, persistence, status text, and model/view coordination. Do not leave direct widget field checks in controllers when a view helper can own them.
  18. Keep pure state transitions, selection policy, diff view models, and display preparation in internal/gui/model.
  19. Do not duplicate constants or helpers across internal/gui, model, and view; promote one owner instead.
  20. Prefer typed modernc.org/tk9.0 APIs over tkutil.Evalf. Use Evalf only when the wrapper lacks the needed Tk subcommand or behavior.
  21. Do not remove an Evalf workaround or XXX comment by inspection alone. Reproduce the GUI path or add focused coverage that proves the replacement behaves the same.
  22. Keep unavoidable Evalf calls narrow and documented at the call site, including why the typed wrapper is not sufficient.
  23. Do not amend or rewrite existing commits unless the user explicitly asks for history rewriting.
  24. Model-owned maps should be initialized by their state constructors when nil does not represent a real lifecycle state. Tests should use those constructors instead of relying on raw zero values.
  25. Required Tk widget assumptions only hold after view.App.Build. Startup code may activate themes before build, but widget-specific style refreshes must run after widgets are constructed.
  26. Treat initialized commit entries as value data. git.Entry should own a git.Commit value, and GUI/model collections should use []git.Entry unless nil is a real lifecycle state.
  27. Keep backend stream internals pointer-based when useful, but reject nil commits at the service boundary before creating entries. Model helpers should use hash/index validity checks for recoverable missing-row cases.
  28. Do not add helper functions that only restate direct field access, such as wrapping entry.Commit.Hash, unless they enforce an invariant or coordinate more than one field.
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 · 48 lines · 835 tokens per session scan A 2537905dbea8

Subscribe to this mod's changes

gitk-go AGENTS.md is an instructions file published in the GitHub repository thiagokokada/gitk-go (121 stars, last pushed 2mo ago), licensed MIT. It adds 835 tokens to every session, about $0.0033 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

gitk-go AGENTS.md compared with instructions from other repositories

gitk-go AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
gitk-go AGENTS.mdthiagokokada/gitk-goInstructions file1212mo agoMITA835Codex, 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