refactor-archeology_skill

This skill analyzes git blame, commit history, and legacy comments to uncover rationale, constraints, and decisions guiding future refactors.
  • Shell

0

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill shotaiuchi/dotclaude --skill refactor-archeology

  • SKILL.md2.1 KB

Overview

This skill investigates code history and hidden rationale to inform safe refactoring. It synthesizes git blame, commit logs, comments, and other historical artifacts to reveal constraints and design decisions that affect change risk. The output is a focused report that highlights potential breaking points and recommends mitigation priorities.

How this skill works

The skill runs targeted git history analysis (blame, log, churn) on specified files and functions, extracts reasoning from commit messages and PR descriptions, and surfaces comments like TODO/FIXME that contain historical context. It identifies hidden constraints such as timing dependencies, platform-specific behavior, and undocumented business rules, then categorizes findings with impact ratings (Breaking, High, Medium, Low). The final report lists actionable remediation steps and preservation guidelines for safe refactoring.

When to use it

  • Before a planned refactor touching unfamiliar or long-lived code
  • When tests pass but failures appear after small changes
  • To evaluate risk after inheriting legacy code or a new module
  • When resolving flaky production incidents with unclear root causes
  • Prior to removing compatibility shims or deprecated patterns

Best practices

  • Start with git blame and trace recent and frequent authors for institutional knowledge
  • Prioritize findings marked Breaking or High before code changes
  • Cross-check commit messages with linked issues and PR descriptions for explicit rationale
  • Document discovered invariants and add tests that capture them before refactoring
  • Preserve timing or ordering semantics in tests if historical commits indicate sensitivity

Example use cases

  • Discovering a subtle ordering dependency introduced to work around an external API rate limit
  • Finding an undocumented performance optimization that tests rely on
  • Uncovering a deprecated compatibility shim left to support an old deployment target
  • Identifying frequent-churn hotspots that should be redesigned rather than refactored superficially
  • Extracting tribal knowledge from long-ago commits to avoid reintroducing regressions

FAQ

A concise report listing findings, their impact rating (Breaking/High/Medium/Low), recommended mitigations, and suggested tests or documentation to add.

How do I reduce false positives from TODO or FIXME comments?

Cross-reference comment context with commit history and associated issues; mark as low impact only after confirming no runtime dependency or linked incidents.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
refactor-archeology skill by shotaiuchi/dotclaude | VeilStrat