Installer l'utilitaire git-cliff

VérifiéPrudence

Vérifie la présence de git-cliff et télécharge la version adaptée à la plateforme dans ./tools/git-cliff.

Spar Skills Guide Bot
DevOpsDébutant
18/08/2026
Claude Code
#git-cliff#changelog#tool-install#onscript#github-releases

Recommandé pour

Synthèse automatique

Vérifie la présence de l'utilitaire git-cliff et, s'il manque, télécharge depuis GitHub la version correspondant à l'OS et à l'architecture puis la décompresse dans ./tools/git-cliff.

Points forts

  • Idempotent : détecte une installation existante (copie locale ou PATH) et affiche sa version sans rien retélécharger
  • Installation locale au projet, sans droits administrateur et sans modification du système
  • Détection automatique de l'OS et de l'architecture, avec recherche de l'archive par suffixe de triplet pour ignorer les fichiers .sha512 et .sig
  • Option --force pour forcer la mise à jour vers la dernière release

Limites

  • Nécessite un accès réseau à GitHub et peut échouer sur un quota d'API anonyme (403) ou derrière un proxy
  • Suppose un environnement OneScript et une plateforme disposant d'un build publié dans la release
  • N'installe que l'outil : la génération du journal des modifications relève du skill changelog-generate
Quand l'utiliser

À utiliser lorsque changelog-generate signale que git-cliff est introuvable, lors de la configuration d'une nouvelle machine ou d'un runner CI, ou sur demande explicite d'installation ou de mise à jour.

Quand l'éviter

À ne pas utiliser pour produire un changelog, ni dans un environnement sans accès à GitHub où le binaire doit être fourni manuellement.

Analyse de sécurité

Prudence
Score qualité84/100

The intent is clearly benign and narrowly scoped: fetch the git-cliff release archive for the current platform, unpack it into `./tools/git-cliff` inside the project, and never touch the system, PATH or admin rights — which is a genuinely lower-risk install pattern than `.deb`/`.rpm`. Nevertheless it is a network-and-execute skill: it pulls an unpinned binary from the internet and runs it with no integrity check, and the script that does the work is not included for review. That places it in "caution" (powerful tools used for a legitimate purpose) rather than "safe" or "risky"; there is no obfuscation, exfiltration, destructive command or safety-disabling content.

Points d'attention
  • •Downloads a prebuilt third-party binary from GitHub releases and then makes it executable and runs it (`chmod +x`, `git-cliff --version`) without verifying a checksum or signature — even though the release publishes `.sha512` and `.sig` assets the doc explicitly mentions.
  • •Always resolves and installs the *latest* release; no version pinning, so the artifact executed varies between runs and cannot be reproduced or frozen in CI (supply-chain / drift risk).
  • •Requires outbound network access to `api.github.com` and `github.com`; the only mitigation for API rate limiting / proxies is advisory text, and there is no authenticated or mirror fallback.
  • •The referenced implementation file `scripts/git-cliff-install.os` is not part of this submission, so the actual download, extraction, URL construction and error-handling logic cannot be audited from the SKILL.md alone.
  • •The doc states no confirmation prompt is needed ("Спрашивать ничего не нужно"), only an advisory warning before a network fetch + binary execution.
Comment cette analyse est faite

Exemples

Install on a new machine
git-cliff isn't found — please install it for this project so I can generate a changelog.
Force an update
Update git-cliff to the latest release in ./tools/git-cliff, even if an older version is already there.
Run the slash command
/git-cliff-install

name: git-cliff-install description: Проверяет наличие утилиты git-cliff и при необходимости скачивает подходящую под текущую платформу версию в ./tools/git-cliff. Нужна навыку changelog-generate.

Навык: Установка утилиты git-cliff (git-cliff-install)

Назначение

Скрипт scripts/git-cliff-install.os обеспечивает наличие утилиты git-cliff — генератора журнала изменений из истории коммитов, необходимого навыку changelog-generate. Скрипт проверяет, установлена ли утилита, и при её отсутствии скачивает последний релиз проекта orhun/git-cliff, подходящий под текущую ОС и архитектуру, и распаковывает его в ./tools/git-cliff.

Особенность семейства: это один из навыков проекта, обращающихся в интернет за сторонним бинарником (наряду с sqlcmd-install и bsl-ls-install). Берётся архив, а не системный пакет .deb / .rpm: распаковка не требует прав администратора и не меняет систему за пределами каталога проекта.

Когда применять

  • Навык changelog-generate сообщил, что утилита git-cliff не найдена.
  • Первичная настройка окружения на новой машине или CI-раннере.
  • Пользователь просит установить или обновить git-cliff.
  • Вызвана команда /git-cliff-install.

НЕ применять для генерации журнала изменений — это навык changelog-generate. Этот навык только устанавливает инструмент.

Обязательный диалог перед запуском скрипта

Параметры не требуются: платформа и версия релиза определяются автоматически. Спрашивать ничего не нужно. Стоит предупредить пользователя, что операция обращается в сеть (GitHub) и скачивает несколько мегабайт.

Запуск

Из корня репозитория (предпочтительно через PowerShell — корректная кириллица в выводе):

oscript .claude/skills/git-cliff-install/scripts/git-cliff-install.os

Необязательный аргумент:

  • --force — переустановить, даже если git-cliff уже найден (например, чтобы обновиться до свежего релиза).

Что делает скрипт (по шагам)

  1. Определяет корень репозитория (git rev-parse --show-toplevel).
  2. Ищет git-cliff: сначала локальную копию ./tools/git-cliff/git-cliff(.exe), затем утилиту в PATH. Если найдена и не указан --force — сообщает версию и завершается с кодом 0 (навык идемпотентен).
  3. Определяет ОС и архитектуру и выбирает платформенный триплет: x86_64-pc-windows-msvc, x86_64-unknown-linux-gnu, aarch64-apple-darwin и т. п.
  4. Запрашивает последний релиз через GitHub API и находит ссылку на нужный ассет.
  5. Скачивает архив во временный каталог и распаковывает в ./tools/git-cliff (ZIP — штатными средствами OneScript, .tar.gz — утилитой tar, затем chmod +x).
  6. Проверяет работоспособность: запускает git-cliff --version и печатает версию.

Почему ассет ищется по триплету, а не по точному имени

Имена ассетов git-cliff содержат номер версии (git-cliff-2.13.1-x86_64-pc-windows-msvc.zip), поэтому предсказать имя файла заранее нельзя. Скрипт ищет ассет, имя которого заканчивается на <триплет><расширение>.

Проверка именно окончания принципиальна: рядом с каждым архивом в релизе лежат файлы .tar.gz.sha512 и .tar.gz.sig с тем же триплетом в имени — поиск по вхождению подстроки выбрал бы файл подписи вместо архива.

Для платформ, где в релизе несколько вариантов, выбор зафиксирован: Windows — msvc (не gnu), Linux — gnu (не musl).

Интерпретация результатов

  • Exit code 0 — git-cliff доступен (был установлен ранее либо установлен сейчас). Сообщить пользователю расположение и версию; можно переходить к changelog-generate.
  • Exit code 1, ошибка сети / GitHub API — показать сообщение скрипта. Типичные причины: нет доступа в интернет, корпоративный прокси, код 403 из-за исчерпанного лимита анонимных запросов к GitHub API. Предложить повторить позже либо скачать релиз вручную и положить исполняемый файл в ./tools/git-cliff.
  • Exit code 1, платформа не определена — сборки для текущей ОС или архитектуры нет в релизе; предложить ручную установку.
  • Exit code 1, ассет не найден в релизе — изменился состав релиза git-cliff; проверить список файлов на странице релизов и при необходимости скорректировать скрипт.
  • Exit code 1, утилита не запускается после распаковки — проверить права на файл и совместимость сборки с платформой.

Ограничения

  • Требует доступа в интернет к api.github.com и github.com.
  • Ставит утилиту ТОЛЬКО в каталог проекта (./tools/git-cliff), не в систему и не в PATH; каталог добавлен в .gitignore и не коммитится.
  • Всегда ставит последний релиз — закрепление конкретной версии не предусмотрено.
  • Для Linux/macOS требуется tar в PATH (входит в состав этих ОС).
  • Не генерирует журнал изменений и не читает cliff.toml — это забота навыка changelog-generate.

Состояние проверки

Проверено на живом окружении 05.08.2026 (Windows, x86_64): установка end-to-end (git-cliff 2.13.1), повторный запуск (идемпотентность, код 0), отбор ассета среди файлов .sha512 и .sig.

Не проверялось: установка на Linux и macOS (ветка tar -xzf с --strip-components=1), поведение при исчерпанном лимите GitHub API.

Du fichier au premier essai

Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.

Consulter la source et ses fichiers annexes

Ce téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.

1. Télécharger le fichier

Télécharger SKILL.md

Depuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/install-git-cliff-utility-msy76ar2/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.

Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.

mkdir -p '.skill-downloads/install-git-cliff-utility-msy76ar2' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/install-git-cliff-utility-msy76ar2/download' --output '.skill-downloads/install-git-cliff-utility-msy76ar2/SKILL.md.part' && mv '.skill-downloads/install-git-cliff-utility-msy76ar2/SKILL.md.part' '.skill-downloads/install-git-cliff-utility-msy76ar2/SKILL.md'

2. Vérifier les prérequis

Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.

Aucune section de prérequis reconnue dans ce fichier. Cela ne signifie pas qu’il est autonome : les bibliothèques, outils et accès peuvent être cités ailleurs dans le contenu ou dans le dépôt source.

Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.

3. Charger la skill

Après vérification, copiez le dossier complet dans le projet avec l’une des commandes ci-dessous, puis ouvrez une nouvelle session de l’outil. La commande s’arrête si un dossier du même nom existe déjà : comparez les fichiers avant de le remplacer.

Claude Code
test -f '.skill-downloads/install-git-cliff-utility-msy76ar2/SKILL.md' && test -s '.skill-downloads/install-git-cliff-utility-msy76ar2/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/git-cliff-install' && cp -R '.skill-downloads/install-git-cliff-utility-msy76ar2' '.claude/skills/git-cliff-install'

OpenSkills

OpenSkills doit déjà être installé. La procédure locale install/read est contrôlée avec OpenSkills 1.5.0, qui exige Node.js ≥ 20.6.0. Aucun slug du catalogue n’est résolu automatiquement.

Installation officielle d’OpenSkills
openskills install './.skill-downloads/install-git-cliff-utility-msy76ar2'

openskills read 'install-git-cliff-utility-msy76ar2'

La lecture doit afficher le contenu du fichier installé et son dossier de base. Elle ne lance ni la skill ni ses dépendances.

Pour un agent qui lit AGENTS.md, synchronisez ensuite l’index. Cette commande modifie AGENTS.md : relisez le diff avant de l’utiliser.

openskills sync

Mode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.

4. Faire un premier essai

Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :

Lis .skill-downloads/install-git-cliff-utility-msy76ar2/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.

Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.

Skills similaires