Skip to content

fix: warn when global Claude skills shadow project Remotion skills - #12025

Merged
samohovets merged 5 commits into
remotion-dev:mainfrom
CreedTech:fix/warn-shadowed-project-skills
Oct 29, 2026
Merged

samohovets merged 5 commits into
remotion-dev:mainfrom
CreedTech:fix/warn-shadowed-project-skills

Conversation

@CreedTech

@CreedTech CreedTech commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Claude Code prefers personal skills over project skills when the names match. A global remotion-best-practices installed long ago silently replaces the version-matched copy that a new project ships with. The project copy never appears in the skill list.

This PR warns about that in two places:

 create-video
   installSkills
+  warn if a global Claude Code skill replaces a project Remotion skill

 remotion studio
   findEntryPoint
+  warn if a global Claude Code skill replaces a project Remotion skill
   startStudio

The check:

globalSkills = $CLAUDE_CONFIG_DIR/skills, or ~/.claude/skills when unset
for each remotion-* skill in <project>/.claude/skills
  skip unless both copies have a SKILL.md
  skip if both SKILL.md files have the same version:
  collect the name
warn about the collected names
any filesystem error: skip the warning, never block startup

Example warning:

Claude Code uses the global skill remotion-best-practices from ~/.claude/skills and ignores this project's copy. Update or remove the global copy. If installed with "npx skills add -g", it is a symlink to ~/.agents/skills.

Fixes #11809.

Evidence

The issue reproduces with Claude Code 2.1.312. A project had .claude/skills -> ../.agents/skills, and a global skill with the same name had a different marker. Claude listed and invoked only the global copy.

With CLAUDE_CONFIG_DIR set, Claude reads personal skills from $CLAUDE_CONFIG_DIR/skills and ignores ~/.claude/skills.

Scenario Result
Studio, global and project versions differ Warns
Studio, same version: No warning
Studio, CLAUDE_CONFIG_DIR without the skill No warning
Studio, CLAUDE_CONFIG_DIR with the skill Warns and names that directory
Studio, project .claude/skills is a file Starts normally
Studio, global skills is a file Starts normally
create-video interactive flow with an old global remotion-best-practices Warns after installing skills; project is still created

@remotion/cli and create-video build and lint. detect-outdated-remotion-skills.test.ts passes.

Merge Danger

Door: Two-way. The change only adds warnings and does not modify project or global files.

Blast Radius: CLI output for remotion studio and create-video. The warning appears only when a global Claude Code skill replaces a project remotion-* skill with a different or missing version.

@vercel

vercel Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
bugs Ready Ready Preview Oct 29, 2026 5:51pm UTC
remotion Ready Ready Preview Oct 29, 2026 5:51pm UTC

Request Review

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ No critical issues — one consistency nit inline.

Reviewed changes

  • Studio startup warning (packages/cli/src/studio.ts): on remotion studio, compares the project and global .claude/skills directories and warns for every entry in the canonical remotionSkillNames list that exists in both.
  • create-video warning (packages/create-video/src/init.ts): after installing skills, scans the project .claude/skills directory and warns for entries that also exist globally.

Both checks correctly target .claude/skills for the Claude Code shadowing described in #11809, and the "project !== global" guard avoids a self-shadow warning when the project root is the home directory.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using deepseek-v4.1-flash | 𝕏

Comment thread packages/create-video/src/init.ts Outdated
.readdirSync(projectSkills)
.filter(
(name) =>
name.startsWith('remotion-') &&

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The two new checks use different rules for what counts as a Remotion skill: studio.ts filters on the canonical remotionSkillNames list, while this one accepts any directory whose name starts with remotion-. A user-authored project skill such as remotion-ads that happens to exist globally would be reported as "the global Remotion skill", and the two entry points can disagree on the same project. Matching on remotionSkillNames here too (or a shared local constant, since create-video can't pull in @remotion/studio-server) would keep the detection in sync.

@CreedTech CreedTech Oct 6, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated Studio in 1be37a8 to use the same remotion- scan as create-video, so the two paths now agree. I kept custom names in scope because a global skill with the same name will still shadow the project's copy.

@CreedTech

Copy link
Copy Markdown
Contributor Author

Hi @samohovets, could you review this when you have time? I fixed the Studio and create-video mismatch raised in the review, and CI is green.

@CreedTech

Copy link
Copy Markdown
Contributor Author

Hi @samohovets, could you review this when you have time? I fixed the Studio and create-video mismatch raised in the review, and CI is green.

@JonnyBurger can you review this please

@samohovets samohovets left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this matches #11809. Some notes:

  1. Read the global dir from CLAUDE_CONFIG_DIR when it's set. Claude Code loads personal skills from there instead of ~/.claude.
  2. Wrap the check in try/catch. If .claude/skills is a file, readdirSync throws and Studio won't start.
  3. Maybe skip the warning when both SKILL.md files have the same version:. Otherwise people who keep their global skills current see it on every Studio start.
  4. The message says global skills load "before" project skills, which sounds like both load. The global copy wins and the project copy is ignored. It's also worth mentioning ~/.agents/skills, because npx skills add -g installs there and only symlinks into ~/.claude/skills.

@samohovets samohovets self-assigned this Oct 29, 2026
@samohovets
samohovets merged commit aa3a43f into remotion-dev:main Oct 29, 2026
18 checks passed

This branch was successfully deployed

2 active deployments
Preview – remotion — 06081034 Deployed Oct 29, 2026 by vercel[bot]
Preview – bugs — 06081034 Deployed Oct 29, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Warn when a global Remotion skill shadows the project's copy in Claude Code

2 participants