assets/skills/feature/deprecate/SKILL.md
Deprecation workflow for safely removing features or code. Use when deprecating, removing features, sunsetting functionality, or when user says "deprecate", "remove feature", "sunset", "phase out", "delete feature".
npx skillsauth add phuthuycoding/moicle feature-deprecateInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Safely sunset a feature, API, or module without breaking users. Built around a timeline (T-90 → T+30) and the principle that announce → warn → migrate → remove → monitor.
IDENTIFY → PLAN → MIGRATE → REMOVE → VERIFY
↓ ↓ ↓ ↓ ↓
announce warn migrate remove monitor
(T-90) (T-60) (T-30) (T-0) (T+30)
Read ~/.claude/architecture/ddd-architecture.md + stack doc to understand layer impact before any deprecation.
| Strategy | When | Timeline | |----------|------|----------| | Soft | Internal API, replacement available, low usage | Announce → warn → migrate → remove (1–3 months) | | Hard | Security issue, breaking infra change | Announce + remove fast (days to weeks, with mitigation) | | Versioned | Public API, breaking change | Run v1 + v2 side-by-side, sunset v1 over months/years |
Goal: know what you're removing and who depends on it.
# adapt per stack
grep -rn "{symbol}" --include="*.{ext}" .
# for APIs, check access logs:
{log_query for endpoint hits over last 30/90 days}
## Deprecation Analysis: {target}
### What
- Type: {feature / API / class / method / module}
- Location: {file:line(s)}
- Reason: {security / consolidation / better alternative / cost / etc.}
### Replacement
- {New API / pattern, with migration mapping}
- OR: {no replacement — rationale}
### Usage
- Internal callers: {list with team contacts}
- External callers (last 30d): {N requests / N unique tokens}
- Docs referencing it: {list}
### Impact
- Layers affected: {domain / application / infra}
- Severity: {breaking / non-breaking}
- Estimated migration effort per consumer: {hours}
Goal: lock the timeline and the communication plan.
| Phase | Date | Action | |-------|------|--------| | T-90 | {date} | Announce deprecation (changelog + email + docs banner) | | T-60 | {date} | Add runtime warning (log / response header) | | T-30 | {date} | Hard warning (UI banner / error in non-prod) | | T-0 | {date} | Remove. Return 410 Gone for APIs | | T+30 | {date} | Remove deprecation code itself, archive docs |
Adjust based on strategy: hard = days, public API = months/quarters.
Goal: make consumers stop using the deprecated thing.
Pick the language idiom — show what is deprecated, when it goes away, and what to use instead.
/** @deprecated Removed on {date}. Use `newFunction()`. See {link}. */
export function oldFunction() { ... }
// Deprecated: removed on {date}. Use NewFunction instead. See {link}.
func OldFunction() { ... }
/**
* @deprecated since 2.0.0, removed in 3.0.0. Use newMethod(). See {link}.
*/
public function oldMethod() { ... }
@Deprecated('Removed on {date}. Use newWidget(). See {link}.')
class OldWidget { ... }
Deprecation: true + Sunset: {RFC 3339 date} + Link: <docs>; rel="deprecation"deprecated.endpoint.called with caller identityGoal: delete the deprecated thing safely.
410 Gone (NOT 404 — different meaning) with migration link in bodyGoal: confirm clean removal.
## Deprecation Complete: {target}
### Timeline
- Announced: {date}
- Removed: {date}
- Verified: {date}
### Outcome
- Consumers migrated: {N/N}
- Errors post-removal: {0 / N — explanation}
- Replacement adoption: {%}
### Cleanup
- [x] Code removed
- [x] Tests removed
- [x] Docs removed
- [x] DB columns dropped (in {migration})
- [x] Deprecation infra cleaned
@deprecated with no date and no replacement. Always include both.| When | Use |
|------|-----|
| Adding the replacement first | /feature-new |
| Restructuring the code that uses the deprecated thing | refactor |
| Documenting the migration guide | /docs-write |
| Reviewing the removal PR | /review-pr |
| Phase | Agent | Purpose |
|-------|-------|---------|
| IDENTIFY | @refactor | Dependency analysis |
| IDENTIFY | @code-reviewer | Find all usages |
| PLAN | @clean-architect | Migration strategy |
| PLAN | @api-designer | API versioning |
| PLAN | @docs-writer | Deprecation notice + migration guide |
| MIGRATE | Stack-specific dev agent | Code changes |
| VERIFY | @test-writer | Migration tests |
| VERIFY | @code-reviewer | Final review |
development
Test-Driven Development workflow. Use when doing TDD, writing tests first, or when user says "tdd", "test first", "test driven", "red green refactor".
development
Thorough pull request review workflow with architecture compliance checks. Use when reviewing pull requests, checking code changes, or when user says "review pr", "check pr", "review code", "pr review", "review pull request".
development
Review local branch changes for architecture compliance, conventions, and code quality before pushing/PR. Stack-aware — detects the project stack and applies the matching rules. Use when user says "review changes", "review branch", "check branch", "check changes", "review my code", "review before pr".
testing
DDD architecture compliance review with automated checks and review loop. Use when user says "architect-review", "architecture review", "review architecture", "check architecture", "review ddd", "ddd review".