Communitygithub.com

remocn-setup

Remotion プロジェクトを `npx shadcn add @remocn/<name>` に対応させます:@remocn レジストリを components.json に追加し、`@/*` パスを tsconfig.json に、同じエイリアスを remotion.config.ts に設定します。最初の remocn コンポーネントがプロジェクトにインストールされる前に、または shadcn add や Remotion バンドラーが remocn インポートを解決できない場合に使用します。

remocn-setup とは?

このスキルは、Remotion プロジェクトに remocn コンポーネントをインストールするための準備を自動化します。shadcn init は Remotion プロジェクトを認識せず、Remotion のバンドラーは tsconfig のパスを読み取らないため、手動で3つの設定ファイルを編集する必要があります。このスキールは、components.json に @remocn レジストリを追加し、tsconfig.json に `@/*` パスエイリアスを設定し、remotion.config.ts にバンドラー用のエイリアスを追加します。各ステップは冪等に設計されており、既存の設定は保持されます。サポートプラットフォームは Remotion プロジェクトのセットアップで、ファイルツール(例:ファイルの読み書き)を使用して実行されます。プロジェクトルートを引数として受け取り、パッケージ.json の確認から始め、remocn コンポーネントのインポートが正しく解決されるようにします。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/augustusday/auto-edicao/tree/HEAD/skills/remocn-setup

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

Remotion プロジェクトを remocn に対応させる

プロジェクトルート: $ARGUMENTS (空の場合はカレントフォルダ)

shadcn init は Remotion プロジェクトを拒否します (「サポートされているフレームワークを検出できませんでした」)。また Remotion のバンドラーは tsconfig のパスを読み取りません。そのため、新しいプロジェクトでは最初のコンポーネントが導入される前に、3つの小さな編集が必要です。ファイルツールを使って、この順序で自分で行ってください。プロジェクトに既にある手順はスキップしてください。

0. プロジェクトを確認する

プロジェクトルートの package.json を読んでください。

  • package.json がない場合: 停止してその旨を伝えてください。
  • dependencies または devDependencies に remotion がない場合: Remotion プロジェクトではありません。停止してその旨を伝えてください。 remocn-video スキルは npx create-video@latest --yes --blank <folder> でプロジェクトを作成します。

ユーザーが既に持っているプロジェクトでは、以下の手順で触れるファイルをリストアップし、編集する前に確認を求めてください。

1. components.json

  • 存在しない場合: 以下の内容で正確に作成してください。

    {
      "$schema": "https://ui.shadcn.com/schema.json",
      "style": "new-york",
      "rsc": false,
      "tsx": true,
      "tailwind": { "config": "", "css": "", "baseColor": "neutral", "cssVariables": false },
      "aliases": {
        "components": "@/components",
        "utils": "@/lib/utils",
        "ui": "@/components/ui",
        "lib": "@/lib",
        "hooks": "@/hooks"
      },
      "registries": { "@remocn": "https://remocn.dev/r/{name}.json" }
    }
    
  • 存在するが registries["@remocn"] がない場合: registries に "@remocn": "https://remocn.dev/r/{name}.json" を追加してください。必要に応じてオブジェクトを作成してください。他のフィールドはすべてそのままにしてください。

  • 既に @remocn がある場合: そのままにしてください。

2. tsconfig.json の @/* パス

remocn コンポーネントは互いに @/ 経由でインポートするため、TypeScript がそれを解決できる必要があります。tsconfig.json にはコメントや末尾カンマが含まれている場合があります。そのまま編集し、それらを保持してください。

エイリアスフォルダ、つまり @/ が指すフォルダ(プロジェクトルートからの相対パス)を特定してください。これは手順3で必要です。

  • compilerOptions.paths["@/*"] が存在する場合: ファイルはそのままにしてください。エイリアスフォルダは、最初のエントリから末尾の /* を除いたものです (./src/* → src)。compilerOptions.baseUrl が設定されている場合はそれに基づいて解決され、そうでない場合は tsconfig.json のフォルダを基準に解決されます。
  • ファイルに extends があり、独自の paths がない場合: ローカルの paths は継承されたマップをマージではなく置き換えます。拡張先の設定 (1レベル、相対パスのみ) を開いてください。その設定に @/* がある場合は、両方のファイルをそのままにし、親フォルダを基準に解決してエイリアスフォルダをそこから取得してください。ない場合は編集せず、ユーザーにパスが定義されている場所に "@/*": ["./src/*"] を追加するように伝え、エイリアスフォルダとして src を使用してください。
  • それ以外の場合: compilerOptions.paths に "@/*": ["./src/*"] を追加し、必要に応じて paths を作成し、既存のエントリは保持してください。baseUrl が . 以外の場合は、代わりに baseUrl からの相対パスで src へのパスを記述してください。エイリアスフォルダは src です。
  • tsconfig.json がない場合: 作成しないでください。エイリアスフォルダは src です。

3. remotion.config.ts の @ エイリアス

バンドラーにも同じエイリアスが必要です。プロジェクトルートで remotion.config.ts、次に remotion.config.js を探してください。ファイルに既に withRemocnAlias が含まれている場合は、そのままにしてください。

エイリアスのターゲットは path.join(process.cwd(), "<エイリアスフォルダ>")、またはエイリアスフォルダがプロジェクトルート自体の場合は process.cwd() です。

  • 設定ファイルがない場合: 以下のブロックとインポートを含む remotion.config.ts を作成してください。
  • remotion.config.ts が存在する場合: 先頭に import path from "node:path"; と import { Config } from "@remotion/cli/config"; を追加してください(まだインポートされていない場合)。その後、ファイルの末尾にブロックを追加してください。
  • remotion.config.js が存在する場合: 型アノテーションなしで同じブロックを追加してください (const withRemocnAlias = (config) => ({ ... }) と config.resolve?.alias ?? {})。また、不足している場合は同じ2つのインポートを追加してください。
// remocn components import each other through the "@/" alias in components.json.
// Bundlers don't read tsconfig paths, so the alias is resolved here as well.
// Both overrides are deliberate: the Remotion CLI applies overrideBundlerConfig
// with webpack and rspack alike, while Remocn Studio's preview reads only
// overrideWebpackConfig. Both run from the project root, which process.cwd()
// points at.
const withRemocnAlias = <C extends { resolve?: object }>(config: C): C => ({
  ...config,
  resolve: {
    ...config.resolve,
    alias: {
      ...((config.resolve as { alias?: object } | undefined)?.alias ?? {}),
      "@": path.join(process.cwd(), "src"),
    },
  },
});
// overrideBundlerConfig only exists in newer Remotion 4 releases.
if (typeof Config.overrideBundlerConfig === "function") {
  Config.overrideBundlerConfig(withRemocnAlias);
}
Config.overrideWebpackConfig(withRemocnAlias);

path.join(process.cwd(), "src") を、上記で特定したエイリアスターゲットに置き換えてください(異なる場合)。

4. 報告

ユーザーに、各手順で何を実行したかを数行で伝えてください:作成、変更、またはそのままにしたか、さらに手動で追加する必要があるものがある場合はそれも伝えてください。その後、npx shadcn@latest add @remocn/<name> がプロジェクトで動作します。

Individual skills in this repo

This repo contains 3 individual skills — each has its own dedicated page.

auto-edicao

Edita Reels, Shorts e TikToks verticais de ponta a ponta, conversando - corta o bruto, trata o áudio, monta cenas de motion em Remotion e entrega o vídeo medido e revisado. Orquestra as skills video-use (transcrição, cortes, legendas, grade) e remocn (componentes de animação para Remotion) e acrescenta o processo, os formatos, o padrão de qualidade e as armadilhas técnicas que as duas não cobrem. Use sempre que o usuário quiser editar, cortar, legendar, animar ou finalizar um vídeo vertical, montar um vídeo só com voz e motion, fazer uma mini-aula ou um vídeo com prints e telas, ajustar áudio, loudness ou trilha, renderizar com Remotion, ou revisar a qualidade de um vídeo, mesmo que não cite video-use, remocn nem Remotion. Exemplos - "edita esse vídeo pra mim", "corta os silêncios e põe legenda", "faz um reels com a minha narração e animações", "o áudio ficou baixo", "renderiza em pedaços que o disco está acabando", "revisa esse vídeo antes de eu postar".

remocn

Pick, install and compose remocn components: ready-made Remotion animations, transitions, backgrounds, captions, UI primitives and video templates from a shadcn registry. Use when building a video or scene out of prebuilt parts (product demo, launch, changelog, intro, social clip), adding an animation, transition or background to a Remotion project, or choosing between components. Activate for polished Remotion video work even when remocn isn't named. Works alongside the Remotion skills: questions about the Remotion API itself (interpolate, spring, Sequence, rendering, config) belong to them, not to this skill.

remocn-video

Make a complete Remotion video from a short brief with remocn components: pick the archetype, plan a storyboard with frame budgets, install the components, compose the scenes, check the render and point to Remocn Studio for tuning and export. Use when the user asks for a whole video (product demo, launch, feature announcement, changelog, OSS showcase, CLI demo, testimonials, year in review, pricing, logo bumper), not a single component.

関連スキル