Skip to content

mikeparcewski/wicked-garden / .claude/skills/releasing

release

Verified

Release management and versioning toolkit for the wicked-garden plugin. Automates changelog generation, semantic versioning, and version bumping from git history. Use when preparing releases, generating changelogs, or managing plugin versions.

FileKindSize
SKILL.mdskill md5.3 KB
scripts/batch_release.pyscript5.0 KB
scripts/changelog.pyscript4.5 KB
scripts/release.pyexecutablescript20.3 KB
scripts/semver.pyscript4.1 KB

scripts/changelog.py

View on GitHub
#!/usr/bin/env python3
"""
Generate changelog from git commit history.

Usage:
    python changelog.py <component-path> [--since <tag>] [--format <format>]

Formats:
    markdown (default), json, plain
"""

import subprocess
import re
import sys
import json
from datetime import datetime
from typing import List, Dict, Any


def get_commits_since(tag: str = None) -> List[Dict[str, str]]:
    """Get commits since specified tag or all commits."""
    if tag:
        cmd = ["git", "log", f"{tag}..HEAD", "--pretty=format:%H|%s|%an|%ai"]
    else:
        cmd = ["git", "log", "--pretty=format:%H|%s|%an|%ai"]

    try:
        result = subprocess.run(cmd, capture_output=True, text=True, check=True)
        return parse_commits(result.stdout)
    except subprocess.CalledProcessError as e:
        print(f"Error: Failed to get git commits: {e}", file=sys.stderr)
        return []


def parse_commits(output: str) -> List[Dict[str, str]]:
    """Parse git log output into structured commits."""
    commits = []
    for line in output.strip().split('\n'):
        if not line:
            continue
        parts = line.split('|')
        if len(parts) == 4:
            commits.append({
                'hash': parts[0],
                'message': parts[1],
                'author': parts[2],
                'date': parts[3]
            })
    return commits


def categorize_commit(message: str) -> str:
    """Categorize commit by type."""
    if re.search(r'(BREAKING CHANGE|!):', message):
        return 'breaking'
    elif message.startswith('feat'):
        return 'feature'
    elif message.startswith('fix'):
        return 'fix'
    elif message.startswith('docs'):
        return 'docs'
    elif message.startswith('test'):
        return 'test'
    elif message.startswith('refactor'):
        return 'refactor'
    else:
        return 'chore'


def generate_markdown(commits: List[Dict[str, str]], version: str = "Unreleased") -> str:
    """Generate markdown changelog."""
    lines = [f"## [{version}] - {datetime.now().strftime('%Y-%m-%d')}", ""]

    categories = {
        'breaking': ('Breaking Changes', []),
        'feature': ('Features', []),
        'fix': ('Bug Fixes', []),
        'docs': ('Documentation', []),
        'test': ('Tests', []),
        'refactor': ('Refactoring', []),
        'chore': ('Chores', [])
    }

    for commit in commits:
        category = categorize_commit(commit['message'])
        categories[category][1].append(commit)

    for cat_key, (cat_name, cat_commits) in categories.items():
        if cat_commits:
            lines.append(f"### {cat_name}")
            for commit in cat_commits:
                short_hash = commit['hash'][:7]
                lines.append(f"- {commit['message']} ({short_hash})")
            lines.append("")

    return "\n".join(lines)


def generate_json(commits: List[Dict[str, str]], version: str = "Unreleased") -> str:
    """Generate JSON changelog."""
    categorized = {}

    for commit in commits:
        category = categorize_commit(commit['message'])
        if category not in categorized:
            categorized[category] = []
        categorized[category].append(commit)

    output = {
        "version": version,
        "date": datetime.now().isoformat(),
        "changes": categorized
    }

    return json.dumps(output, indent=2)


def generate_plain(commits: List[Dict[str, str]], version: str = "Unreleased") -> str:
    """Generate plain text changelog."""
    lines = [f"{version} - {datetime.now().strftime('%Y-%m-%d')}", ""]

    for commit in commits:
        lines.append(f"  - {commit['message']} ({commit['hash'][:7]})")

    return "\n".join(lines)


def main():
    if len(sys.argv) < 2:
        print("Usage: python changelog.py <component-path> [--since <tag>] [--format <format>]")
        sys.exit(1)

    component_path = sys.argv[1]
    since_tag = None
    output_format = "markdown"

    # Parse arguments
    for i, arg in enumerate(sys.argv[2:]):
        if arg == "--since" and i + 2 < len(sys.argv):
            since_tag = sys.argv[i + 3]
        elif arg == "--format" and i + 2 < len(sys.argv):
            output_format = sys.argv[i + 3]

    # Get commits
    commits = get_commits_since(since_tag)

    if not commits:
        print("No commits found.")
        sys.exit(0)

    # Generate changelog
    if output_format == "json":
        print(generate_json(commits))
    elif output_format == "plain":
        print(generate_plain(commits))
    else:
        print(generate_markdown(commits))


if __name__ == "__main__":
    main()
rea-changelog-updatemorluto/reaPrepare or rewrite REA release changelogs and GitHub release notes from pinned Git history, with verified contributor thanks and Release Please synchronization.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
academy-guideanthropics/skillsStop 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, and use cases from Claude Academy (academy.claude.com), Anthropic's learning hub. Trigger on: "how do I", "how can I", "getting started with", "what can Claude do", "teach me", "learn to use"; questions about artifacts, projects, skills, plugins, connectors, MCP; requests about rolling Claude out to a team, class, or organization; and any ask for training materials, onboarding content, or learning resources. Use it when the user is learning how to use a feature or product — not when they are mid-task and just want the task done. This skill composes with other skills: after consulting product documentation to answer how a Claude feature works, also check here for a matching course or tutorial — a docs-grounded answer and an Academy recommendation belong together. Only recommend on a strong match; never invent Academy content.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
claude-apianthropics/skillsReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER — read BEFORE opening the target file; don't skip because it "looks like a one-liner" — whenever: the prompt names Claude/Anthropic in any form (Claude, Anthropic, Fable, Opus, Sonnet, Haiku, `anthropic`, `@anthropic-ai`, `claude-*`, `us.anthropic.*`, `[1m]`); the user asks about an LLM (pricing/model choice/limits/caching) — never answer from memory; OR the task is LLM-shaped with provider unstated (agent/MCP/tool-definition/multi-agent/RAG/LLM-judge/computer-use; generate/summarize/extract/classify/rewrite/converse over NL; debugging refusals/cutoffs/streaming/tool-calls/tokens). SKIP only when another provider is being worked on (overrides all triggers): OpenAI/GPT/Gemini/Llama/Mistral/Cohere/Ollama named in the query; OR `grep -rE 'openai|langchain_openai|google.generativeai|genai|mistralai|cohere|ollama'` over the project hits (run this grep FIRST if no provider named — don't Read the file).Stars: 198kUpdated Claude CodeCodexUnverifiedInstall
doc-coauthoringanthropics/skillsGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.Stars: 198kUpdated Claude CodeCodexVerifiedInstall