Fixes a single file by applying minimal, safe edits while running linters and tests to verify the change.

Install

mkdir -p .claude/skills/fix-file && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/18441" && unzip -o skill.zip -d .claude/skills/fix-file && rm skill.zip

Installs to .claude/skills/fix-file

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Use when you need to fix one file end-to-end: lint, test impact, and apply minimal safe changes for this project.
113 chars · catalog description✓ has a “when” trigger
Intermediate

Key capabilities

  • Identify failing behavior and minimal edit scope
  • Apply focused changes without unrelated refactors
  • Run targeted tests first, then broader checks
  • Report exactly what changed and why
  • Enforce project guardrails like no suppression patterns
  • Preserve atomic-save semantics

How it works

The skill identifies failing behavior, applies minimal changes to a target file, and validates these changes through targeted tests and broader checks.

Inputs & outputs

You give it
A target file path and a description of failing behavior
You get back
A validated, minimally changed target file and a report of changes

When to use fix-file

  • Fixing a specific linting error in a single file
  • Correcting a isolated bug detected by a unit test
  • Applying formatting changes that pass CI checks
  • Executing targeted tests after a minor logic patch

About this skill


name: fix-file description: Apply a focused, minimal-diff fix to a target file end-to-end, validating complexity, zero suppressions, linters, and targeted tests.

Fix File Skill

Goal

Apply the smallest safe fix to a target file and validate it against project invariants.

Precision Workflow

  1. Identify the failing behavior and the minimal edit scope.
  2. Apply focused changes without unrelated refactors.
  3. Ensure complexity remains < 10 and no suppressions are introduced.
  4. Run targeted linters, type checks, and unit tests.
  5. Report exactly what changed and why.

Validation Commands

poetry run python tests/tools/check_no_suppressions.py
poetry run ruff check <target_file_path>
poetry run ruff format --check <target_file_path>
poetry run flake8 <target_file_path>
poetry run pylint <target_file_path>
poetry run pytest <target_test_path>
.\run_local_pipeline.ps1

When not to use it

  • When changes are not minimal
  • When changes involve unrelated refactors
  • When adding suppression patterns

Limitations

  • The skill does not allow adding suppression patterns
  • The skill requires preserving atomic-save semantics
  • The skill enforces keeping complexity below 10

How it compares

This workflow focuses on minimal, validated changes to a single file, unlike a manual process that might introduce broader, unvalidated modifications.

Compared to similar skills

fix-file side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
fix-file (this skill)01moNo flagsIntermediate
python-testing-patterns773moReviewIntermediate
clojure-write163moNo flagsIntermediate
python-playground25moReviewBeginner

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry