deprecate-api

$npx mdskill add remotion-dev/remotion/deprecate-api

Documents how to mark deprecated Remotion APIs in source and docs.

  • Solves the task of consistently deprecating public Remotion APIs that remain available.
  • Depends on JSDoc annotations, MDX documentation, and Remotion's documentation conventions.
  • Decides representation based on API type and whether a replacement exists.
  • Delivers clear guidance for adding deprecation annotations and documentation formatting.

SKILL.md

.github/skills/deprecate-apiView on GitHub ↗
---
name: deprecate-api
description: Reference for how deprecation of public Remotion APIs is represented in TypeScript source and documentation. Use when adding, reviewing, or discussing a deprecation of a function, component, hook, type, prop, option, or other public API that remains available.
---

# API deprecations in Remotion

Deprecation of a public API that remains available is represented in three places:

1. A JSDoc `@deprecated` annotation on the public TypeScript API.
2. Strikethrough formatting on the API's documentation heading.
3. An `info` admonition named `Deprecated` directly after that heading.

These conventions apply to functions, components, hooks, types, props, options, and other public APIs.

## TypeScript representation

The public symbol carries a JSDoc `@deprecated` annotation. The annotation states the replacement when one exists and may link to its documentation.

```ts
/**
 * @deprecated Use `newApi()` instead: https://www.remotion.dev/docs/new-api
 */
export const oldApi = () => {};
```

The annotation belongs where consumers receive it. For a re-export or compatibility alias, this is the exported symbol rather than the non-deprecated implementation.

## Documentation representation

The deprecated API name in its heading uses double-tilde strikethrough. `<AvailableFrom>` remains outside the strikethrough.

```mdx
# ~~oldApi()~~<AvailableFrom v="4.0.0" />
```

For a prop or option:

```mdx
### ~~`oldOption?`~~
```

The frontmatter `title` remains unchanged. A page that otherwise relies only on its frontmatter title has an explicit struck-through heading.

An info admonition named `Deprecated` appears directly after the heading and points to the replacement when one exists.

```mdx
:::info Deprecated
Use [`newApi()`](/docs/new-api) instead.
:::
```

## Scope

Runtime warnings, sidebar badges, release notes, removal versions, and removal behavior are not currently standardized as part of API deprecation.

Removed APIs are outside this convention. They may remain documented for migration purposes, but they no longer have a public symbol to annotate.

More from remotion-dev/remotion

SkillDescription
add-bugAdd a new Remotion bug entry to packages/bugs/api/[v].ts. Use when the user describes a bug and affected Remotion versions that should be surfaced through the bugs API.
add-cli-optionAdd a new Remotion CLI or config option by creating an AnyRemotionOption, registering CLI parsing, wiring config setters, and updating documentation. Use when adding or converting command-line flags or Remotion options.
add-effectAdd a new effect to @remotion/effects, including implementation, package exports, docs, demos, preview images, Remotion skill updates, formatting, and builds.
add-expertAdd a new expert to the Remotion experts page
add-new-packageAdd a new package to the Remotion monorepo, including package scaffolding, monorepo registration, documentation, build scripts, and release checklist updates. Use when creating a new @remotion package.
add-sfxAdd a new sound effect to @remotion/sfx
add-webcodecs-bugAdd a browser WebCodecs bug to the Remotion Mediabunny WebCodecs bugs docs page. Use when given a Chromium, WebKit, or Firefox issue URL that should be tracked in packages/docs/docs/mediabunny/webcodecs-bugs.mdx, especially when needing to look up the issue title, filing date, reporter, and resolution state before editing the MDX table.
canvas-capture-extensionRebuild, install, and reload the private Remotion Canvas Capture unpacked Chrome extension. Use when the extension needs to be restored after a Codex worktree was deleted, rebuilt after source changes, moved to its durable install directory, or reloaded in Chrome or Chrome Canary.
checkoutCheckout a requested branch or ref in the Remotion repo, rename the current task to the associated PR title when running in Codex, then install dependencies and build. Use when the user asks to checkout a ref and prepare the workspace.
convertStart the local @remotion/convert app and open it in the Codex browser. Use when the user invokes /convert or $convert, asks to launch convert.remotion.dev locally, or wants to inspect the Convert package UI.