post-removal-sweep

Verifies complete removal of code patterns through multi-variant grep searches across codebases.

Updated Mar 30, 2026
One-click install
npx skills add https://github.com/ZaxbyHub/ragappv3 --skill post-removal-sweep-zaxbyhub
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: post-removal-sweep
Source: https://github.com/ZaxbyHub/ragappv3/tree/main/.opencode/skills/generated/post-removal-sweep
Command: npx skills add https://github.com/ZaxbyHub/ragappv3 --skill post-removal-sweep-zaxbyhub

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When you remove a hardcoded default, deprecated function, or config property, leftover references often survive in fallbacks, migrations, tests, and docs, causing subtle bugs and stale behavior. This Skill enforces an exhaustive sweep so no remnant of the removed pattern remains in any code path. ## Core Features & Use Cases - Pattern Derivation Guide: Maps a removed value to all its possible forms, including direct assignments, fallback operators (.get(), ??, ||), SQL defaults, string literals, backfills, and import references. - Seven-Step Sweep Procedure: Covers multi-variant grep searches, config and environment files, database schemas and migrations, documentation, test assertions, leftover imports, and a final CI verification run. - Use Case: After removing a hardcoded vault_id = 1 default from a Python/TypeScript app, run the sweep to catch surviving references like record.get("vault_id", "1"), DEFAULT 1 in a migration, and test assertions expecting the old value. ## Quick Start After removing a code pattern, ask the AI to run a post-removal sweep for all remaining references to that pattern across the backend, frontend, docs, and config files.

Frequently Asked Questions about post-removal-sweep

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I make sure a removed code pattern has no leftover references?▼

Run a multi-variant grep sweep covering direct assignments, fallback operators like .get() and ??, SQL DEFAULT clauses, string literals, and imports. Then check config files, migrations, tests, and documentation, and confirm CI passes.

How to find all references to a deleted function or property?▼

Grep for the exact property and function names across all source extensions, plus import and require statements in Python and TypeScript. Each variant should be run separately rather than combined into one regex, since different usages need different patterns.

What files should I check after removing a hardcoded default value?▼

Check source code, .env and environment templates, docker-compose files, CI workflow YAML, database schemas and migrations, seed data, test assertions and fixtures, and README or docs describing the old behavior.

Why combine multiple grep patterns instead of one regex when refactoring?▼

A single regex misses usage variants because removed values appear as assignments, fallbacks, string literals, SQL defaults, and backfill calls. Running each variant separately ensures every category of reference is caught.

When is a code removal sweep considered complete?▼

The sweep is complete when all search patterns return zero matches in production code, documentation and config files are updated, tests asserting old behavior are fixed or deleted, and the full CI suite passes.