Skip to content
Skills Library
Programming · Testing

safe-code-change

/safe-code-change

After a code change, find affected tests, update them to match new behavior, then run the full validation pipeline once. Use when the user has made or asked for a code change and wants to make sure nothing is broken.

Licence
Apache-2.0
Last repository change
26.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What it does and when to use it

After a code change, find affected tests, update them to match new behavior, then run the full validation pipeline once. Use when the user has made or asked for a code change and wants to make sure nothing is broken.

Original author description

After a code change, find affected tests, update them to match new behavior, then run the full validation pipeline once. Use when the user has made or asked for a code change and wants to make sure nothing is broken.

How it works

  1. Rules
  2. Step 1: Identify What Changed
  3. Step 2: Find Affected Tests
  4. Step 3: Analyze Impact on Tests
  5. Step 4: Update Tests
  6. Step 5: Done
Original SKILL.md headings · 51 lines, 244 words
SKILL.md preview
---
name: safe-code-change
description: After a code change, find affected tests, update them to match new behavior, then run the full validation pipeline once. Use when the user has made or asked for a code change and wants to make sure nothing is broken.
disable-model-invocation: true
---

# Safe Code Change

After a code change is made, find and fix affected tests before running validation.

## Rules

- The code change is already done. Do not modify production code.
- Only update tests to match the new behavior, not the other way around.
- Do not reformat or lint-fix during test updates. Save that for validation.
- If a test change is ambiguous (unclear what the new expected behavior is), ask the user.

## Step 1: Identify What Changed

```bash
git diff --name-only
git diff --stat
```

List the modified production files (ignore test files, configs, docs).

## Step 2: Find Affected Tests

Search for imports of changed functions/classes across all test files:

```bash
rg "from ols\.<changed_module> import" tests/
```

## Step 3: Analyze Impact on Tests

For each affected test file, check whether the change breaks existing tests:

1. **Signature changes** — function renamed, parameters added/removed/reordered.
2. **Behavior changes** — return value, side effects, exceptions differ.
3. **Removed code** — tests for deleted functions/classes need removal.
4. **New code** — consider whether new tests are needed (ask user if unclear).

## Step 4: Update Tests

Apply minimal fixes to each affected test:

- Update function names, parameters, expected values.
- Add `async`/`await` and `@pytest.mark.asyncio` if sync changed to async.
- Remove tests for deleted functionality.
- Do not add new tests unless the user asks.

## Step 5: Done

Report what was updated. The user can invoke validate-and-fix when ready.

Versions

The database has no other skills named safe-code-change.

Database snapshot: 13.11.2026 · package version 134a88ac557a (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 95docs-update
    Assess documentation impact and update affected docs for a code, API, config, or operator workflow change. Use when a change affects documented behavior, when asked to update stale docs or reconcile docs with code, or when a decision or status recorded in plans or ADRs changed.…
  • 90run
    Run the project's tests (Vitest, Jest, or node:test) safely and report results; run only the tests affected by uncommitted changes. Use when the user asks to run tests, check whether a change broke anything, or verify a Lambda handler or CDK stack.
  • 90test-running
    Discover and run tests that provide meaningful evidence for a code change. Use after implementation, before handoff or commit, or when the user asks to validate behavior.
  • 95python-test-updater
    Updates Python test code to work with new versions of the code being tested. Use when Claude needs to: (1) Update tests after code changes, (2) Fix broken tests due to signature changes, (3) Update assertions to match new behavior, (4) Add test cases for new functionality, (5)…
  • 100orch-change-feature
    Orchestrate altering an existing, working feature to new desired behavior — update its tests to the new spec, change the implementation to match, review, and gated commit. Use when behavior is not broken but should be different.
  • 95docs-update
    Assess documentation impact and update affected docs for a code, API, config, or operator workflow change. Use when a change affects documented behavior, when asked to update stale docs or reconcile docs with code, or when a decision or status recorded in plans or ADRs changed.…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.