components-version-badge
БесплатноБез исполняемых скриптовНе проверенVersion badge with build-info tooltip (version, commit, changelog). Use when adding version display to app header/footer for Next.js, Nuxt, SvelteKit, Vite…
от laurigates★ 61 звезда на GitHubОб этом скилле
/components:version-badge
Implement a version badge component that displays version number, git commit, and recent changelog in a tooltip.
When to Use This Skill
| Use this skill when... | Use version-badge-pattern instead when... |
|---|---|
| Adding a version badge end-to-end to an existing app via slash command | Studying the pattern, data flow, and accessibility checklist before adapting it manually |
| You want auto-detection of framework, styling, and UI library with file edits applied | You need full reference implementations for React, Vue 3, Svelte, or plain CSS variants |
Implementing the default header placement with --check-only / --location flags |
Composing the changelog-parser script and build-pipeline wiring into a custom workflow |
Context
- Framework config: !
find . -maxdepth 1 \( -name "next.config.*" -o -name "nuxt.config.*" -o -name "svelte.config.*" -o -name "vite.config.*" \) - Package manager: !
find . -maxdepth 1 \( -name "package.json" -o -name "bun.lockb" -o -name "pnpm-lock.yaml" \) - Styling: !
find . -maxdepth 1 \( -name "tailwind.config.*" -o -name "postcss.config.*" \) - UI library: !
find . -maxdepth 1 -name "components.json" - Changelog: !
find . -maxdepth 1 -name 'CHANGELOG.md' - Version: !
find . -path '*/package.json' -maxdepth 2 -exec jq -r '.version // "unknown"' {} +
Parameters
--check-only: Analyze project and show what would be implemented without making changes--location <header|footer|custom>: Specify component placement (default: header)
Overview
This command adds a version display to your application with:
- Trigger element:
v1.43.0 | 004ddd9(version + abbreviated commit) - Tooltip: Full build info (version, commit, timestamp, branch) + recent changelog entries
- Build-time processing: Zero runtime overhead
Tech Stack Detection
Detect the project's tech stack from the values in Context:
Framework:
- Next.js:
next.config.jsornext.config.mjsornext.config.ts - Nuxt:
nuxt.config.tsornuxt.config.js - SvelteKit:
svelte.config.js - Vite + React:
vite.config.*+ React in dependencies - Vite + Vue:
vite.config.*+ Vue in dependencies - Create React App:
react-scriptsin dependencies - Plain React: React in dependencies without specific framework
- Next.js:
Styling:
- Tailwind CSS:
tailwind.config.*or@tailwindin CSS - CSS Modules:
.module.cssfiles - styled-components: In dependencies
- Emotion:
@emotion/*in dependencies - Plain CSS: Fallback
- Tailwind CSS:
UI Library:
- shadcn/ui:
components.jsonwith shadcn config - Radix UI:
@radix-ui/*in dependencies - Headless UI:
@headlessui/*in dependencies - None: Use native implementation
- shadcn/ui:
Execution
Execute this version badge implementation workflow:
Step 1: Analyze project
Read package.json to identify dependencies. Check for framework config files, styling configuration, and existing component patterns.
Step 2: Create changelog parser script
Create a build-time script that parses CHANGELOG.md:
Location: scripts/parse-changelog.mjs (or appropriate location)
// Script should:
// 1. Read CHANGELOG.md
// 2. Extract last 2 versions with their changes
// 3. Categorize changes (feat, fix, perf, breaking)
// 4. Output as JSON for NEXT_PUBLIC_CHANGELOG (or equivalent)
Change type icons:
| Type | Icon | Description |
|---|---|---|
| feat | sparkles | New feature |
| fix | bug | Bug fix |
| perf | zap | Performance improvement |
| breaking | warning | Breaking change |
Limits:
- Max 3 features per version
- Max 2 other changes per version
- Last 2 versions only
Step 3: Configure build pipeline
Based on framework, add build-time environment variables:
Next.js (next.config.mjs):
const buildInfo = {
version: process.env.npm_package_version || 'dev',
commit: process.env.VERCEL_GIT_COMMIT_SHA || process.env.GITHUB_SHA || 'local',
branch: process.env.VERCEL_GIT_COMMIT_REF || process.env.GITHUB_REF_NAME || 'local',
buildTime: new Date().toISOString(),
};
export default {
env: {
NEXT_PUBLIC_BUILD_INFO: JSON.stringify(buildInfo),
// NEXT_PUBLIC_CHANGELOG set by parse-changelog.mjs
},
};
Vite (vite.config.ts):
export default defineConfig({
define: {
'import.meta.env.VITE_BUILD_INFO': JSON.stringify(buildInfo),
},
});
Step 4: Create component
Create the version badge component appropriate for the detected framework:
Component structure:
src/components/
version-badge/
version-badge.tsx # Main component
version-badge.css # Styles (if not using Tailwind)
index.ts # Export
Features to implement:
- Trigger display:
- Version number from build info
- Abbreviated commit SHA (7 chars)
- Subtle styling:
text-[10px] text-muted-foreground/60 - Hover brightening fo
Установить components-version-badge в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
GlobGrepReadWriteEditBash(find *)AskUserQuestionTodoWriteFAQ
Что делает скилл components-version-badge?
Version badge with build-info tooltip (version, commit, changelog). Use when adding version display to app header/footer for Next.js, Nuxt, SvelteKit, Vite, React, Vue, or Svelte.
Как установить скилл components-version-badge?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл components-version-badge запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic