gaze-fix

gaze-fix is a command for coding agents from unbound-force/gaze. It costs 57 tokens per session (1,661 once invoked), scanned A, original, Apache-2.0.

A command that either starts the project's active implementation workflow or generates missing tests and documentation for Go functions flagged by Gaze, a code-quality analysis tool.

In plain words
What is it for?
Use it to generate tests, add test checks, write documentation, split functions before testing, or implement the current Speckit or OpenSpec change.
Why use it?
It reduces the manual work of finding poorly tested or documented functions and choosing the correct project workflow.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/unbound-force/gaze/gaze-fix
Clone the repo
git clone --depth 1 https://github.com/unbound-force/gaze

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 gaze-fix

README.md
[![agentmods](https://agentmods.dev/badge/commands/unbound-force/gaze/gaze-fix.svg)](https://agentmods.dev/commands/unbound-force/gaze/gaze-fix)
Your own site
<a href="https://agentmods.dev/commands/unbound-force/gaze/gaze-fix"><img src="https://agentmods.dev/badge/commands/unbound-force/gaze/gaze-fix.svg" alt="Measured on agentmods" height="20"></a>
Per session 57 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,661 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00057 $0.01661
Opus 5 $0.00028 $0.00830
Sonnet 5 $0.00011 $0.00332
Haiku 4.5 $0.00006 $0.00166

Measured 5d ago against content hash 10d4a98bd729, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

gaze-fix 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 5d 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.

.opencode/commands/gaze-fix.md · 187 lines

How it starts

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

Description

Dual-mode command. Without arguments, detects the active implementation workflow (Speckit or OpenSpec) and runs it. With arguments, performs batch remediation — reads gaze analysis data, identifies functions needing tests or documentation, and generates compilable fixes via the gaze-test-generator agent.

Usage

/gaze fix                        # auto-detect workflow and implement
/gaze fix [package-pattern]      # batch test generation
/gaze fix --strategy=add_tests [pattern]
/gaze fix --top=5 [pattern]
/gaze fix --dry-run [pattern]

Options

Option Description
[pattern] Go package pattern (default: ./...)
--strategy=X Filter to one strategy: add_tests, add_assertions, add_docs, decompose_and_test
--top=N Process only the top N functions by CRAP score
--dry-run Show what would be generated without writing files

Instructions

When no arguments are provided

Detect the active workflow and delegate to the corresponding implementation command:

  1. Check for a Speckit feature branch: Run .specify/scripts/bash/check-prerequisites.sh --json --paths-only from the repo root. If it succeeds and returns a FEATURE_DIR with a tasks.md, this is a Speckit strategic workflow. Read the full contents of .opencode/commands/speckit.implement.md and execute its instructions directly — follow the implementation workflow it describes.

  2. Check for an OpenSpec active change: Look for directories under openspec/changes/ (excluding archive/) that contain a tasks.md file. If one exists, this is an OpenSpec tactical workflow. Validate branch: Run git rev-parse --abbrev-ref HEAD. The current branch must be opsx/<change-name> where <change-name> matches the detected change directory name. If not on the correct branch, STOP with error:

    "OpenSpec change <name> detected but you are on branch <current-branch>. Run: git checkout opsx/<name>"

Read the full file on GitHub · 187 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. 5d ago First seen · 187 lines · 57 tokens per session scan A 10d4a98bd729

Subscribe to this mod's changes

gaze-fix is a command published in the GitHub repository unbound-force/gaze (2 stars, last pushed yesterday), licensed Apache-2.0. It adds 57 tokens to every session and 1,661 once invoked, about $0.0003 per session on Opus 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-31.