.claude/skills/codemie-worktree/SKILL.md
Manages git worktrees including listing, creating, removing, and switching between worktrees. Use when the user mentions creating worktrees, create a work tree, create worktree, new worktrees, parallel branches, or working on multiple branches simultaneously. CRITICAL - PROACTIVE BRANCH PROTECTION - Before starting ANY development work (implementing features, fixing bugs, writing code, making changes), check the current branch. If on main/master branch, IMMEDIATELY suggest creating a feature branch worktree to prevent accidental commits to main. This is mandatory for all development requests.
npx skillsauth add codemie-ai/codemie-code git-worktreeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill helps you manage git worktrees efficiently. Git worktrees allow you to check out multiple branches simultaneously in different directories, which is useful for:
MANDATORY RULE: Before starting ANY development work, always check the current branch to prevent accidental commits to main/master.
Trigger this workflow proactively when the user requests ANY development task:
Check Current Branch
git branch --show-current
If on main/master/develop branch
[branch-name] branch. To protect the main branch from accidental commits, I recommend creating a feature branch worktree for this work."If User Agrees (or automatically proceed)
feat/user-authentication)fix/login-error)refactor/auth-module)perf/optimize-queries)docs/api-guide)style/eslint-fixes)test/auth-coverage)chore/update-deps)ci/github-actions)build/webpack-config)If User Declines
[branch-name] branch. Please be careful with commits."When creating a feature branch worktree:
# 1. Get repository name
REPO_NAME=$(basename "$(git rev-parse --show-toplevel)")
# 2. Get and sanitize branch name
BRANCH_NAME="feat/new-feature" # User provided or generated with commitlint prefix
SANITIZED_BRANCH=$(echo "$BRANCH_NAME" | sed 's/\//-/g')
# 3. Build worktree path
WORKTREE_PATH="../${REPO_NAME}-wt-${SANITIZED_BRANCH}"
# 4. Create worktree with new branch
git worktree add -b "$BRANCH_NAME" "$WORKTREE_PATH" main
# 5. Switch to the worktree
cd "$WORKTREE_PATH"
User: "Let's add a new authentication feature"
Assistant checks branch: git branch --show-current → returns "main"
Assistant responds:
"⚠️ You're currently on the main branch. To protect the main branch from accidental commits, I recommend creating a feature branch worktree for this work.
Would you like me to create a feature branch worktree? I can name it feat/authentication or you can suggest a different name."
User: "Yes, use feat/auth"
Assistant executes:
REPO_NAME=$(basename "$(git rev-parse --show-toplevel)")
BRANCH_NAME="feat/auth"
SANITIZED_BRANCH="feat-auth"
WORKTREE_PATH="../${REPO_NAME}-wt-feat-auth"
git worktree add -b "$BRANCH_NAME" "$WORKTREE_PATH" main
cd "$WORKTREE_PATH"
Assistant confirms: "✓ Created and switched to feature branch worktree at ../myproject-wt-feat-auth. Ready to implement the authentication feature."
Worktrees should be created as sibling directories with a clear naming pattern:
Pattern: ../<repo-name>-wt-<branch-name>
Example: For a repo named "MyProject" with branch "feat/new-login":
/Users/username/source/myproject/ # Main repo
/Users/username/source/myproject-wt-feat-new-login/ # Worktree
Note: Branch names follow commitlint conventional commit types (feat/, fix/, refactor/, etc.)
Show all existing worktrees with their paths and branches:
git worktree list
Example output:
/Users/username/source/myproject c5b174796b4 [main]
/Users/username/source/myproject-wt-feat-auth def5378 [feat/new-login]
/Users/username/source/myproject-wt-fix-crash ghi9022 [fix/button-crash]
When creating worktrees, automatically use the naming convention:
For existing branches:
git worktree add ../<repo-name>-wt-<sanitized-branch-name> <branch-name>
For new branches:
git worktree add -b <new-branch-name> ../<repo-name>-wt-<sanitized-branch-name> <base-branch>
Note: Branch names with slashes (e.g., feature/new-login) should be sanitized by replacing / with - for the directory name.
Examples:
# Checkout existing feature branch
git worktree add ../myproject-wt-feat-auth feat/auth
# Create new feature branch from main
git worktree add -b feat/new-payment ../myproject-wt-feat-new-payment main
# Create bugfix worktree
git worktree add -b fix/critical-bug ../myproject-wt-fix-critical-bug main
When you're done with a worktree:
# Remove worktree (must not have uncommitted changes)
git worktree remove ../<repo-name>-wt-<branch-name>
# Force remove even with uncommitted changes
git worktree remove --force ../<repo-name>-wt-<branch-name>
Clean up worktree metadata for manually deleted directories:
git worktree prune
Relocate an existing worktree (maintaining naming convention):
git worktree move <old-path> <new-path>
Prevent accidental deletion:
git worktree lock <path>
git worktree unlock <path>
When creating worktrees, the skill should:
/ with - for the path../<repo-name>-wt-<sanitized-branch-name>Example logic:
REPO_NAME=$(basename "$(git rev-parse --show-toplevel)")
BRANCH_NAME="feature/new-login"
SANITIZED_BRANCH=$(echo "$BRANCH_NAME" | sed 's/\//-/g')
WORKTREE_PATH="../${REPO_NAME}-wt-${SANITIZED_BRANCH}"
git worktree add "$WORKTREE_PATH" "$BRANCH_NAME"
<repo-name>-wt-<branch-name> patternIf you get an error that a worktree already exists for a branch, you can:
git worktree list to find where it isIf removal fails due to a lock:
git worktree unlock <path>
git worktree remove <path>
If worktrees were manually deleted:
git worktree prune
Remember to replace / with - when creating directory names from branch names like feature/new-login → feature-new-login.
When you ask me to:
git worktree list<repo-name>-wt-X naming patternExample 1: User says "Let's add a login feature"
git branch --show-current → "main"feat/login worktreeExample 2: User says "Fix the broken button"
git branch --show-current → "main"fix/broken-button worktreeExample 3: User says "Refactor the authentication module"
git branch --show-current → "feat/dashboard"This skill automatically applies the naming convention to keep your workspace organized, especially when managing multiple repositories in the same parent directory. The proactive branch protection ensures you never accidentally commit to protected branches.
tools
Work with Microsoft 365 services via the Graph API — emails, calendar events, SharePoint sites (read and write), Teams chats and channel messages, OneDrive files, OneNote notebooks, Planner task boards, Microsoft To Do task lists, AI meeting insights (Copilot recap), contacts, and org chart. Use this skill whenever the user asks about their emails, inbox, unread messages, meetings, calendar, Teams messages or chats, channel messages, SharePoint documents, OneDrive files, OneNote notes or notebooks, Planner plans or tasks, "my tasks", to-do lists, action items, meeting summaries, colleagues, manager, direct reports, or any personal/organizational Microsoft data. Invoke proactively any time the user mentions Outlook, Teams, SharePoint, OneDrive, OneNote, Planner, Microsoft To Do, or wants to interact with their Microsoft 365 account. The skill uses a local Node.js CLI (msgraph.js) that handles authentication, token caching, and all API calls.
tools
CodeMie Analytics expert — use this skill whenever the user asks about CodeMie usage data, AI adoption metrics, user leaderboards, CLI insights, spending, LiteLLM costs, token usage, or wants to build a dashboard/report from CodeMie or LiteLLM APIs. Also triggers for: "who uses CodeMie most", "show me AI analytics", "get spending data", "generate a report", "leaderboard", "cost analysis", "LiteLLM customer info", "enrich CSV with costs", "top performers", "AI champions", "tier distribution", or any custom analytics query against the platform. Always use this skill when CodeMie analytics, reporting, or cost data is involved.
tools
Manage CodeMie platform assets (assistants, workflows, datasources, integrations, skills, users, assistant-categories) directly from CLI using CodeMie SDK. Use when user says "create assistant", "list workflows", "update datasource", "delete assistant", "show my assistants", "get workflow details", "manage integrations", "create integration", "list integrations", "list llm models", "list embedding models", "list skills", "get skill", "create skill", "update skill", "delete skill", "publish skill", "import skill", "export skill", "attach skill", "list assistant categories", "get assistant category", "create assistant category", "delete assistant category", "who am i", "current user", "my profile", "user info", or any request to manage CodeMie platform resources. NOTE: For analytics requests (usage analytics, summaries, spending, users activity, leaderboards, etc.) use the codemie-analytics skill instead.
development
Build static HTML pages, reports, dashboards, and mockups that match the CodeMie UI design system. Use this skill whenever the user asks to create an HTML report, dashboard, analytics page, status page, data visualization page, or any static HTML document that should look like the CodeMie/EPAM AI/Run product. Also use it when the user says "make it look like CodeMie", "use the style guide", "dark-themed report", "CodeMie styles", or references the style-guide directory. Trigger for any HTML output task in a project that includes the style-guide folder. IMPORTANT: This skill MUST be used for ALL HTML generation requests — whenever a user asks for an HTML report, HTML analysis output, HTML dashboard, HTML visualization, or any HTML document. Claude must always use this skill to generate HTML in CodeMie styles to ensure consistent, professional, branded output across all HTML artifacts.