MR
Mayur Rathi
@github
⭐ 34.1k GitHub stars

Gitmoji Setup

Gitmoji Setup is an code AI skill with a core value of Sets up gitmoji (https://gitmoji. It helps developers solve real-world problems in the code domain, boosting efficiency, automating repetitive tasks, and optimizing workflows.

Sets up gitmoji (https://gitmoji.dev) commit tooling in a repository — audits the existing hook manager and commit convention, then installs the right option without clobbering existing hooks. Default

Last verified on: 2026-08-02

Quick Facts

Category code
Works With Claude, GitHub Copilot
Source github/awesome-copilot
Stars ⭐ 34.1k
Last Verified 2026-08-02
Risk Level Low
mkdir -p ./skills/gitmoji-setup && curl -sfL https://raw.githubusercontent.com/github/awesome-copilot/main/skills/gitmoji-setup/SKILL.md -o ./skills/gitmoji-setup/SKILL.md

Run in terminal / PowerShell. Requires curl (Unix) or PowerShell 5+ (Windows).

Skill Content

# Gitmoji Setup Agent


You are an expert in git tooling and commit conventions. Your job is to equip a repository with [gitmoji](https://gitmoji.dev/) commit tooling — safely, without breaking the hooks and conventions already in place. You set up the *tooling*; for generating individual commit messages on demand, point users to the `gitmoji` skill instead.


---


Core Workflow


Step 1: Audit the Repository


Before proposing anything, gather facts:


bash
# Current commit convention (emojis already? shortcodes? conventional commits?)
git log --oneline -15

# Hook manager in use
ls .husky 2>/dev/null            # husky
cat lefthook.yml 2>/dev/null     # lefthook
cat .pre-commit-config.yaml 2>/dev/null  # pre-commit framework

# Effective hooks directory — never assume .git/hooks: core.hooksPath may
# point elsewhere, and .git is a file (not a directory) in linked worktrees
hooks_dir=$(git rev-parse --git-path hooks)
ls "$hooks_dir" 2>/dev/null | grep -v '\.sample$'

# Existing prepare-commit-msg hook (never overwrite it blindly)
cat "$hooks_dir/prepare-commit-msg" 2>/dev/null

# Existing commitlint configuration (needed before Option C)
ls commitlint.config.* .commitlintrc* 2>/dev/null
grep -l '"commitlint"' package.json 2>/dev/null

Also note the package manager (`package.json`, `pnpm-lock.yaml`, ...) and whether the team commits from GUI clients (VS Code source control, GitKraken) — ask if unclear, because it determines which option is viable.


Step 2: Recommend One Option


| Option | What it does | Choose when |

|--------|--------------|-------------|

| **A. Prefill hook** *(default)* | Non-interactive `prepare-commit-msg` hook that prefills a *suggested* emoji the user can edit | Prefills when the commit message editor opens (`git commit` without `-m`/`-F`); silently no-ops for `-m`/`-F`, GUI message boxes, and CI — it never blocks or breaks any client. Recommend unless the user explicitly wants a picker |

| **B. gitmoji-cli picker** | `gitmoji -i` installs an interactive emoji picker at commit time | Team commits exclusively from a terminal and wants to choose the emoji every time |

| **C. commitlint enforcement** | `commitlint` + `commitlint-config-gitmoji` rejects commits that don't match the **hybrid** `<gitmoji> type(scope?): subject` format | Team wants the convention *enforced* **and** accepts the gitmoji + Conventional Commits hybrid format (stricter than plain gitmoji — see the warning in the Option C section) |


State your recommendation and the reason in one or two sentences, then confirm with the user before modifying anything.


Step 3: Install Without Clobbering


**Golden rule: never overwrite an existing hook.** Integrate with whatever manages hooks in this repo:


- **Plain git hooks**: always resolve the effective hooks directory first — `hooks_dir=$(git rev-parse --git-path hooks)` — and use it for both inspection and installation; a hook written to a hard-coded `.git/hooks` is silently ignored when `core.hooksPath` points elsewhere. If `$hooks_dir/prepare-commit-msg` exists, append the gitmoji logic (or chain to a separate script); otherwise create it there and `chmod +x` it. If the effective directory is the unversioned default (`.git/hooks`), offer to move hooks to a versioned directory with `core.hooksPath` so the team shares them.

- **husky**: add or extend `.husky/prepare-commit-msg`.

- **lefthook**: add a `prepare-commit-msg` entry in `lefthook.yml` pointing to a script in the repo.

- **pre-commit framework**: add a local hook with `stages: [prepare-commit-msg]`.


#### Option A — Reference prefill hook


Adapt paths and heuristics to the repository (branch naming scheme, test layout, manifest files). The script suggests an emoji only when confident, skips merges/amends, and never touches a message that already has one:


sh
#!/bin/sh
# prepare-commit-msg — prefill a suggested gitmoji (non-interactive)
MSG_FILE=$1
SOURCE=$2

# Only prefill when the message editor will open (plain `

🎯 Best For

  • Claude users
  • GitHub Copilot users
  • Software engineers
  • Development teams
  • Tech leads

💡 Use Cases

  • Code quality improvement
  • Best practice enforcement

📖 How to Use This Skill

  1. 1

    Install the Skill

    Copy the install command from the Terminal tab and run it. The SKILL.md file downloads to your local skills directory.

  2. 2

    Load into Your AI Assistant

    Open Claude or GitHub Copilot and reference the skill. Paste the SKILL.md content or use the system prompt tab.

  3. 3

    Apply Gitmoji Setup to Your Work

    Open your project in the AI assistant and ask it to apply the skill. Start with a small module to verify the output quality.

  4. 4

    Review and Refine

    Review AI suggestions before committing. Run tests, check for regressions, and iterate on the skill output.

❓ Frequently Asked Questions

Is Gitmoji Setup compatible with Cursor and VS Code?

Yes — this skill works with any AI coding assistant including Cursor, VS Code with Copilot, and JetBrains IDEs.

Do I need specific dependencies for Gitmoji Setup?

Check the install command and Works With section. Most code skills only require the AI assistant and your codebase.

How do I install Gitmoji Setup?

Copy the install command from the Terminal tab and run it. The skill downloads to ./skills/gitmoji-setup/SKILL.md, ready to use.

Can I customize this skill for my team?

Absolutely. Edit the SKILL.md file to add team-specific instructions, examples, or workflows.

⚠️ Common Mistakes to Avoid

Skipping validation

Always test AI-generated code changes, even for simple refactors.

Missing dependency updates

Check if the skill requires updated dependencies or new packages.

🔗 Related Skills