validate-and-fix

validate-and-fix is a skill for Claude Code, Codex, Cursor from openshift/lightspeed-agentic-operator. It costs 57 tokens per session (810 once invoked), scanned A, original, Apache-2.0.

A repository validation workflow that runs Go tests, Go's code checks, and an API configuration linter, while fixing only simple formatting, import, and test-maintenance problems.

In plain words
What is it for?
Use it after making changes to verify the project, catch formatting or import mistakes, and identify failures in tests or API configuration.
Why use it?
It separates small fixable issues from real logic failures and repeats the checks until they pass or a genuine problem needs attention.

Skill for Claude CodeCodexCursor

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 skills/openshift/lightspeed-agentic-operator/validate-and-fix
Any agent
npx skills add openshift/lightspeed-agentic-operator --skill validate-and-fix
Clone the repo
git clone --depth 1 https://github.com/openshift/lightspeed-agentic-operator

Made for: Claude Code, Codex, Cursor.

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 validate-and-fix

README.md
[![agentmods](https://agentmods.dev/badge/skills/openshift/lightspeed-agentic-operator/validate-and-fix.svg)](https://agentmods.dev/skills/openshift/lightspeed-agentic-operator/validate-and-fix)
Your own site
<a href="https://agentmods.dev/skills/openshift/lightspeed-agentic-operator/validate-and-fix"><img src="https://agentmods.dev/badge/skills/openshift/lightspeed-agentic-operator/validate-and-fix.svg" alt="Measured on agentmods" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 810 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 $0.00057 $0.00810
Opus 5 $0.00028 $0.00405
Sonnet 5 $0.00011 $0.00162
Haiku 4.5 $0.00006 $0.00081

Measured 3d ago against content hash 27acb20112f7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

validate-and-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 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.

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.

.cursor/skills/validate-and-fix/SKILL.md · 105 lines

How it starts

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

Validate & Auto-Fix

Run the project validation pipeline, auto-fix trivial issues, and re-run until green or a real failure is found.

Rules

  • This repository has no root Makefile for tests; use go test ./... from the repo root (not operator Makefile conventions from other repos).
  • Never modify production logic to fix a test. Only fix test expectations, imports, formatting.
  • Never skip or delete a failing test.
  • Stop after 3 auto-fix cycles to avoid loops.
  • Report real failures clearly; do not attempt speculative fixes.

Step 1: Run Unit Tests

go test ./... -count=1 2>&1 | tail -80

If all pass, proceed to Step 3 (vet / fmt). If failures occur, classify each failure (see Step 2).

Step 2: Classify and Fix Failures

For each failure, determine its type:

Auto-fixable (fix immediately, then re-run Step 1):

Type Fix
Test expects old constant value Update assertion to match new value
Test uses renamed function Update function name in test
Import error from refactor Update import path
Missing cleanup in test Add cleanup or use existing cleanup helpers

Real failures (do not auto-fix):

  • Logic errors in production code
  • Assertion failures reflecting actual behavior regressions
  • Reconciliation loop failures
  • Context cancellation issues
  • Failures in code you did not modify

For real failures: report the test name, file, error message, and stop.

Step 3: go vet and formatting

go vet ./... 2>&1 | tail -40
go fmt ./...

Fix straightforward vet issues (unused vars in tests, etc.) and re-run.

Step 4: API module — kube API linter (when API types changed)

If files under api/v1alpha1/ (or other api/ packages) were touched, run the custom kube API linter from the repo root:

golangci-lint custom
cd api && GOWORK=off ../bin/golangci-lint-kube-api-linter run --config ../.golangci-kal.yml ./...

See CLAUDE.md in the repo for details. Fix reported issues or stop if they need design discussion.

Read the full file on GitHub · 105 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 First seen · 105 lines · 57 tokens per session scan A 27acb20112f7

Subscribe to this mod's changes

validate-and-fix is a skill published in the GitHub repository openshift/lightspeed-agentic-operator (10 stars, last pushed 4d ago), licensed Apache-2.0. It adds 57 tokens to every session and 810 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.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens

chat-perf

Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.

microsoft/vscode · 51 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens