Files
Adrien Clerbois 541d8f0499 Add gitmoji skill and gitmoji-setup agent (#2355)
* Add gitmoji skill and gitmoji-setup agent

Adds two complementary artifacts for the gitmoji commit convention
(https://gitmoji.dev):

- skills/gitmoji: generates gitmoji commit messages from a diff, staged
  changes, or a change description. Message-only by design (never runs
  git commands), with disambiguation rules and a full reference table of
  the 75 official gitmojis generated from the official gitmojis.json.
- agents/gitmoji-setup: sets up gitmoji tooling in a repository. Audits
  the existing hook manager and commit convention, then installs either
  a non-interactive prepare-commit-msg prefill hook (default, works in
  GUI clients and CI), the gitmoji-cli interactive picker, or commitlint
  enforcement, without clobbering existing hooks.

Generated README indexes updated via npm start.

* Use local commitlint binary instead of npx in verify step

Addresses the package-exec-command finding from the PR risk scan: the
verification example now calls the locally installed
./node_modules/.bin/commitlint rather than npx, which could fetch and
execute a package on the fly.

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Address Copilot review feedback

- Quote the agent description in single quotes per AGENTS.md convention
- Resolve the effective hooks directory via git rev-parse --git-path
  hooks for both audit and installation, instead of hard-coding
  .git/hooks (core.hooksPath, linked worktrees)
- Correct the prefill-hook compatibility claim: it prefills only when
  the message editor opens and silently no-ops for -m/-F, GUI message
  boxes, and CI
- Match the official gitmoji set explicitly when detecting an existing
  emoji, instead of treating any non-ASCII start as one
- Drop .txt from the docs heuristic (it shadowed requirements.txt) and
  remove the dependency-manifest fallback entirely: filenames cannot
  distinguish upgrade/add/remove/pin/downgrade
- Restrict gitmoji -i to repos whose effective hooks dir is .git/hooks;
  wire the picker through the hook manager otherwise
- Merge gitmoji into an existing commitlint config instead of
  overwriting commitlint.config.mjs
- Fix the verification sequence: clean starting state, non-colliding
  scratch file, abort by clearing the editor, explicit unstage/remove/
  switch-back/branch-delete cleanup
- Skill: ask the user for commit history instead of running git log,
  honoring the message-only contract

* Address second round of Copilot review feedback

- Pair the prefill hook with a commit-msg guard: prefilling an empty
  COMMIT_EDITMSG defeats git abort-on-empty-message, so an untouched
  prefill would create a commit named only with the emoji. The guard
  rejects messages that contain nothing but the prefilled gitmoji.
- Extract the gitmoji alternation into a GITMOJI_RE variable shared by
  both hooks.
- Document the commitlint-config-gitmoji format mismatch: it enforces
  the hybrid <gitmoji> type(scope?): subject format and rejects the
  plain gitmoji format produced by Options A/B and the gitmoji skill.
  Option C now asks the team to choose a format first, and the
  verification example uses a valid hybrid message.

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-07-27 14:23:20 +10:00

4.6 KiB
Raw Permalink Blame History

Gitmoji Reference

The complete official gitmoji list from gitmoji.dev, in the order shown on the site. Each entry maps an emoji (and its :shortcode:) to the intent of the change it represents.

Emoji Shortcode Use for
🎨 :art: Improve structure / format of the code.
:zap: Improve performance.
🔥 :fire: Remove code or files.
🐛 :bug: Fix a bug.
🚑 :ambulance: Critical hotfix.
:sparkles: Introduce new features.
📝 :memo: Add or update documentation.
🚀 :rocket: Deploy stuff.
💄 :lipstick: Add or update the UI and style files.
🎉 :tada: Begin a project.
:white_check_mark: Add, update, or pass tests.
🔒 :lock: Fix security or privacy issues.
🔐 :closed_lock_with_key: Add or update secrets.
🔖 :bookmark: Release / Version tags.
🚨 :rotating_light: Fix compiler / linter warnings.
🚧 :construction: Work in progress.
💚 :green_heart: Fix CI Build.
⬇️ :arrow_down: Downgrade dependencies.
⬆️ :arrow_up: Upgrade dependencies.
📌 :pushpin: Pin dependencies to specific versions.
👷 :construction_worker: Add or update CI build system.
📈 :chart_with_upwards_trend: Add or update analytics or track code.
♻️ :recycle: Refactor code.
:heavy_plus_sign: Add a dependency.
:heavy_minus_sign: Remove a dependency.
🔧 :wrench: Add or update configuration files.
🔨 :hammer: Add or update development scripts.
🌐 :globe_with_meridians: Internationalization and localization.
✏️ :pencil2: Fix typos.
💩 :poop: Write bad code that needs to be improved.
:rewind: Revert changes.
🔀 :twisted_rightwards_arrows: Merge branches.
📦 :package: Add or update compiled files or packages.
👽 :alien: Update code due to external API changes.
🚚 :truck: Move or rename resources (e.g.: files, paths, routes).
📄 :page_facing_up: Add or update license.
💥 :boom: Introduce breaking changes.
🍱 :bento: Add or update assets.
:wheelchair: Improve accessibility.
💡 :bulb: Add or update comments in source code.
🍻 :beers: Write code drunkenly.
💬 :speech_balloon: Add or update text and literals.
🗃️ :card_file_box: Perform database related changes.
🔊 :loud_sound: Add or update logs.
🔇 :mute: Remove logs.
👥 :busts_in_silhouette: Add or update contributor(s).
🚸 :children_crossing: Improve user experience / usability.
🏗️ :building_construction: Make architectural changes.
📱 :iphone: Work on responsive design.
🤡 :clown_face: Mock things.
🥚 :egg: Add or update an easter egg.
🙈 :see_no_evil: Add or update a .gitignore file.
📸 :camera_flash: Add or update snapshots.
⚗️ :alembic: Perform experiments.
🔍 :mag: Improve SEO.
🏷️ :label: Add or update types.
🌱 :seedling: Add or update seed files.
🚩 :triangular_flag_on_post: Add, update, or remove feature flags.
🥅 :goal_net: Catch errors.
💫 :dizzy: Add or update animations and transitions.
🗑️ :wastebasket: Deprecate code that needs to be cleaned up.
🛂 :passport_control: Work on code related to authorization, roles and permissions.
🩹 :adhesive_bandage: Simple fix for a non-critical issue.
🧐 :monocle_face: Data exploration/inspection.
⚰️ :coffin: Remove dead code.
🧪 :test_tube: Add a failing test.
👔 :necktie: Add or update business logic.
🩺 :stethoscope: Add or update healthcheck.
🧱 :bricks: Infrastructure related changes.
🧑‍💻 :technologist: Improve developer experience.
💸 :money_with_wings: Add sponsorships or money related infrastructure.
🧵 :thread: Add or update code related to multithreading or concurrency.
🦺 :safety_vest: Add or update code related to validation.
✈️ :airplane: Improve offline support.
🦖 :t-rex: Code that adds backwards compatibility.

Source: gitmojis.json — 75 gitmojis.