gaze: Command for Claude Code

.opencode/commands/gaze-fix.md

gaze-fix is a command for Claude Code, OpenCode 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 for Claude CodeOpenCode

Written for OpenCode and Claude Code: installed under .opencode/, but also a Claude Code command (commands/*.md). Also seen: mentions OpenCode.

This is unbound-force/gaze's own configuration. It tells Claude Code and OpenCode how to work on gaze 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 gaze configures →

Reuse

Borrowing it

Nothing to install: this file belongs to unbound-force/gaze. 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/unbound-force/gaze/main/.opencode/commands/gaze-fix.md
Clone the repo
git clone --depth 1 https://github.com/unbound-force/gaze

Made for: Claude Code, 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 gaze-fix

README.md
[![agentmods](https://agentmods.dev/badge/commands/unbound-force/gaze/gaze-fix/github.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/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 gaze-fix

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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. 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.00057 $0.01661
Opus 5.5 $0.00023 $0.00664
Sonnet 5.5 $0.00011 $0.00332
Haiku 4.5 $0.00006 $0.00166

Measured 9d ago against content hash 10d4a98bd729, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 9d 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. 1mo ago Changed · +1 lines ff0c71289a6d
  2. 2mo 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 (4 stars, last pushed yesterday), licensed Apache-2.0. It adds 57 tokens to every session and 1,661 once invoked, about $0.0002 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-31.

Related

gaze-fix compared with commands from other repositories

gaze-fix next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
gaze-fixunbound-force/gazeCommand4yesterdayApache-2.0A57Claude Code, OpenCode
golang-development:testgeoffjay/claude-pluginsCommand81y agoMITA23Claude Code
python-scaffoldacaprino/daodanCommand94d agoMITA64Claude Code
gopher-featcar12o/claude-workflowsCommand28mo agoMITA32Claude Code
comprehensive-unit-testing-with-pytestoimiragieo/agent-studioCommand453mo agononeA16Claude Code
go-testbcefghj/forks-collectionCommand57mo agononeA8Claude Code, OpenCode
go-testraja21068/AutoResearchCommand25mo agoMITA8Claude Code