Skip to content
Back to skills

Husbandry

ASecurity

Perform evidence-led maintenance and refactoring while preserving required behaviour. Use for cleanup, migration, and reducing an identified maintenance burden.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 13, 2026
ai-agentsrefactoringapi

Works with

  • api

Security analysis

A100/100

Pro scans all 12 files and shows the line behind each finding

Scanned October 13, 2026

npx -y skills add IamK77/Skill --skill husbandry --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Husbandry?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Husbandry
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/iamk77-husbandry/badge)](https://www.skillsdirectory.com/skills/iamk77-husbandry)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: husbandry
description: "Perform evidence-led maintenance and refactoring while preserving required behaviour. Use for cleanup, migration, and reducing an identified maintenance burden."
argument-hint: "[system / module to maintain & evolve]"
metadata:
  kind: sop
---

<!--
Copyright 2026 IamK77 — Licensed under the Apache License, Version 2.0.
See ./LICENSE and ./NOTICE · https://www.apache.org/licenses/LICENSE-2.0
-->

# husbandry

Perform evidence-led maintenance and refactoring while preserving required behaviour. Use for cleanup, migration, and reducing an identified maintenance burden.

## Inputs

Target maintenance problem; behaviour that must remain; current tests; dependency and compatibility constraints; rollback requirements.

## Run record

Use checklist 0.5 or newer for this SOP. Reading or reloading the skill must not reset work. For a new task, run `checklist init "${CLAUDE_SKILL_DIR}" --new --path "/absolute/project"`; retain its returned ID as `RUN`. For existing work, use `checklist resume "$RUN"`, then `checklist show --run "$RUN"`. Outside Claude, replace the skill-directory variable with this directory’s actual path.

Commands below record work after it is done. Replace evidence placeholders with concise artifact locations and observations. Manual confirmations are not independent proof; a sensor pass covers only the command and inputs it observed. `verify` does not close a stage; `advance` checks that its required readings are fulfilled. Use `report --run "$RUN"` for the retained history.

## Procedure

### locate

Locate the actual maintenance burden in code and change history. Decide what is intentionally preserved and what can change; separate cleanup from feature work.

Record these artifacts after doing the work:

- Concrete code or change evidence identifies the maintenance problem.
  `checklist check locate burden --run "$RUN" --evidence "<artifact and observation>"`
- Preserved behaviour and compatibility boundaries are explicit.
  `checklist check locate invariants --run "$RUN" --evidence "<artifact and observation>"`

When this stage is fulfilled: `checklist advance locate --run "$RUN"`.

### change

Add a characterization test where coverage is insufficient. Make small coherent changes, remove superseded paths, and run the tests that protect the boundary.

Record these artifacts after doing the work:

- Characterization or regression tests protect the affected behaviour.
  `checklist check change safety --run "$RUN" --evidence "<artifact and observation>"`
- The intended simplification is implemented without unexplained parallel paths.
  `checklist check change refactor --run "$RUN" --evidence "<artifact and observation>"`

When this stage is fulfilled: `checklist advance change --run "$RUN"`.

### handoff

Inspect the final diff for accidental behavioural changes and document migration or rollback steps where needed.

Record these artifacts after doing the work:

- Before/after verification results and any gaps are recorded.
  `checklist check handoff verification --run "$RUN" --evidence "<artifact and observation>"`
- Consumers can adopt or roll back the change with known limitations.
  `checklist check handoff migration --run "$RUN" --evidence "<artifact and observation>"`

When this stage is fulfilled: `checklist advance handoff --run "$RUN"`.

## Branches

If the change exposes an unresolved product decision, pause for that decision rather than hiding it in a refactor. Broad rewrites require evidence that a smaller coherent change is insufficient.

If an input or permission is missing, name the blocker and leave the relevant item pending. A changed requirement may need a new run; an accepted checklist edit uses `resume "$RUN" --refresh` and requires fresh readings. To abandon work, use `checklist reset --run "$RUN" --reason "<reason>"`; history is retained.

## Completion

A maintainable change with preserved-behaviour evidence and a clear migration boundary.

After all required work and stage closures is recorded, use `checklist done --run "$RUN"`. This archives the result without deleting its history; it does not authorise any external action.

## Reference shelf

Open the technique relevant to the current step. These notes provide concrete methods and examples, not additional phases; this entrypoint defines the run's completion conditions.

- [Maintenance decisions grounded in change cost](references/agent-era-shifts.md)
- [Choose a maintenance change for an observed cost](references/decision-tree.md)
- [From a reported symptom to a retained regression](references/defect-management.md)
- [Retire obsolete paths without losing necessary knowledge](references/knowledge-legacy-and-retirement.md)
- [Name the kind of change and its preserved contract](references/maintenance-types-and-stance.md)
- [Preserve behaviour while changing structure](references/refactoring.md)
- [Make a maintenance tradeoff inspectable](references/technical-debt.md)
- [Maintain compatibility through a dependency or API change](references/versioning-and-dependencies.md)

Files in this skill

  • .checklist.yml958 B
  • LICENSE11.1 KB
  • NOTICE630 B
  • SKILL.md5 KB
  • references/agent-era-shifts.md1.4 KB
  • references/decision-tree.md1.1 KB
  • references/defect-management.md1.2 KB
  • references/knowledge-legacy-and-retirement.md1.3 KB
  • references/maintenance-types-and-stance.md1.1 KB
  • references/refactoring.md1.3 KB
  • references/technical-debt.md1.1 KB
  • references/versioning-and-dependencies.md1.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.