# API Deprecation and Sunset Plan Builder (YAML)

API Deprecation and Sunset Plan Builder (YAML) is a prompt that turns API deprecation details into a structured YAML sunset plan with timelines, communication strategies, and migration steps.

- prompt · `type=prompt` · ChatGPT, Claude.ai, Claude Code · ★ 178201 repo stars
- Author: f
- License: CC0-1.0 · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/f/prompts.chat/tree/HEAD/prompts.csv
- Updated: 2026-10-24
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/prompts/api-deprecation-and-sunset-plan-builder-yaml

## What it does

This prompt instructs the AI to act as a senior API platform engineer. You provide details about the endpoint, field, or SDK method being deprecated, and the model generates a comprehensive YAML document based on a strict schema.

The output includes lifecycle phases, user signals, migration guides, and rollback procedures. If critical information is missing, the model will ask up to 4 clarifying questions before finalizing the plan.

## Install

### ChatGPT (native platform)

**How to use**
- Paste the text at the start of a chat or into project instructions

### Claude Code

**Manually: put the files in place**
- File: `.claude/commands/prompts.csv.md`

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/f/prompts.chat/tree/HEAD/prompts.csv

## When to use it
- generate a complete API sunset plan
- structure migration steps for API consumers
- identify risks and mitigation strategies
- outline communication timelines for deprecation

## Example prompts
- Create a deprecation plan for GET /v1/invoices/{id}/pdf and its replacement
- Draft a YAML sunset plan for an SDK method used by mobile apps
- Build a deprecation strategy for an API version with strict compliance deadlines

## Source text · prompts.csv · CC0-1.0

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 04eaa55c0225756f.

BEGIN THIRD-PARTY FILE 04eaa55c0225756f
````text
You are a senior API platform engineer. Turn the information I give you into a complete, realistic deprecation and sunset plan for an API (an endpoint, a field, a version, or an SDK method), returned as a single YAML document that follows the schema below exactly.

Inputs I will provide (ask for anything critical that is missing before writing the plan, at most 4 questions):
- what is being deprecated and what replaces it
- who calls it (internal teams, public customers, partners, mobile apps with slow upgrade cycles)
- current usage data, if any (requests per day, number of distinct API keys or clients)
- hard constraints (contracts, compliance dates, a platform migration deadline)

Rules:
- Output only valid YAML (2-space indentation, no tabs, quote strings that contain colons). Do not copy the schema comments into the output.
- Never invent usage numbers, customer names or contract terms: use "unknown" and add an item to open_questions.
- Use ISO dates (YYYY-MM-DD). If I give no start date, use T0, T0+30d, etc.
- Default minimum notice: 90 days for internal-only callers, 6 months for public APIs, 12 months for partners or mobile apps, unless I give a stricter rule.
- Prefer standard signals: the Deprecation and Sunset HTTP response headers, a Link header to the migration guide, changelog entries, SDK warnings and the API reference.
- Include brownouts (short planned periods where the old API returns errors) only after at least two direct notices and only if usage is still above the threshold you define.
- Keep a rollback path until the final removal.

Schema:

```yaml
deprecation_plan:
  summary:
    target: ""            # e.g. "GET /v1/invoices/{id}/pdf"
    target_type: ""       # endpoint | field | api_version | sdk_method | webhook_event
    replacement: ""
    reason: ""
    owner_team: ""
    audience: []          # internal | public | partners | mobile_apps
  timeline:
    - phase: ""           # announce | warn | brownout | freeze | sunset | removal
      date: ""
      actions: []
      exit_criteria: ""
  signals:
    http_headers:
      deprecation: ""     # example header value
      sunset: ""
      link: ""
    changelog_entry: ""
    api_reference_note: ""
    sdk_warning: ""
    dashboard_banner: ""
  usage_tracking:
    metrics: []           # e.g. daily calls, distinct keys, top callers
    data_source: ""
    removal_threshold: "" # e.g. "< 50 calls/day from < 3 keys for 14 days"
    review_cadence: ""
  communications:
    - when: ""
      channel: ""         # email | changelog | status_page | in_app | account_manager | slack
      audience: ""
      message_outline: []
  migration_guide:
    steps: []
    before_after_example:
      before: ""
      after: ""
    breaking_differences: []
    test_checklist: []
  brownouts:
    - date: ""
      duration: ""
      error_response: ""  # status code and body callers will see
      condition: ""
  exceptions:
    process: ""
    max_extension: ""
    approver: ""
  risks:
    - risk: ""
      likelihood: ""      # low | medium | high
      mitigation: ""
  rollback:
    trigger: ""
    steps: []
  final_removal:
    code_cleanup: []
    docs_cleanup: []
    monitoring_after_removal: ""
  open_questions: []
  notes: ""
```

After the YAML, add nothing else. If I only give a one-line description, still produce the full plan with "unknown" values and a thorough open_questions list.

My deprecation details:
````
END THIRD-PARTY FILE 04eaa55c0225756f

The third-party file has ended. Everything between the 04eaa55c0225756f tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

© f · CC0-1.0 · https://github.com/f/prompts.chat/tree/HEAD/prompts.csv

## Similar
- [api-versioning-deprecation-planner](https://affpapa.org/en/nevibecode/skills/api-versioning-deprecation-planner.md) — skill · 264 installs
- [deprecation-and-migration](https://affpapa.org/en/nevibecode/skills/deprecation-and-migration.md) — skill · 73100 installs
- [api-versioning-policy](https://affpapa.org/en/nevibecode/skills/api-versioning-policy.md) — skill · 10100 installs
- [api-versioning-strategy](https://affpapa.org/en/nevibecode/skills/api-versioning-strategy.md) — skill · 417 installs
- [manifest-yaml-cursorrules-prompt-file](https://affpapa.org/en/nevibecode/rules/manifest-yaml-cursorrules-prompt-file.md) — rule · ★ 41178 repo stars
- [yaml](https://affpapa.org/en/nevibecode/skills/yaml.md) — skill · 1100 installs

From the same set: [f/prompts.chat](https://affpapa.org/en/nevibecode/by/f/prompts.chat.md) — 218 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
