How can I make Codex worktrees inherit local IntelliJ .idea settings from my repo?

When Codex creates a worktree from my repo, can I make it copy my local .idea folder from the original repo into the new worktree?

My .idea folder is mostly ignored by git, but I want Codex worktrees to keep IntelliJ run configurations and project settings.

What is the recommended way to do this?

remove it from .gitignore?

or create a skill that tells it copy the .idea folder from your main directory?