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/batch_release.py

View on GitHub
#!/usr/bin/env python3
"""
Release tool for the wicked-garden unified plugin.

Since the repo is a single plugin, this script releases from the repo root.
The --changed flag checks if there are any changes since the last tag.

Usage:
    python batch_release.py --changed              # Release if changed
    python batch_release.py --changed --dry-run    # Preview release
    python batch_release.py --bump patch           # Force bump type

Examples:
    python batch_release.py --changed --dry-run
    python batch_release.py --bump minor
"""

import argparse
import json
import subprocess
import sys
from pathlib import Path
from typing import Dict, List, Optional

# Add scripts directory to path for imports
script_dir = Path(__file__).parent
sys.path.insert(0, str(script_dir))

from release import ReleaseManager
from semver import SemVer


def get_repo_root() -> Path:
    """Get the git repo root."""
    result = subprocess.run(
        ["git", "rev-parse", "--show-toplevel"],
        capture_output=True, text=True, check=True,
    )
    return Path(result.stdout.strip())


def has_changes_since_tag(repo_root: Path) -> Dict:
    """Check if the unified plugin has changes since its last release tag."""
    rm = ReleaseManager(str(repo_root))
    last_tag = rm.get_last_tag()
    current_version = rm.get_current_version()
    plugin_name = rm.get_plugin_name()

    if last_tag:
        # Check for changes since last tag (excluding .claude/ dev tools)
        result = subprocess.run(
            ["git", "diff", "--name-only", last_tag, "HEAD", "--",
             str(repo_root / "commands"),
             str(repo_root / "agents"),
             str(repo_root / "skills"),
             str(repo_root / "hooks"),
             str(repo_root / "scripts"),
             str(repo_root / "scenarios"),
             str(repo_root / ".claude-plugin"),
             ],
            capture_output=True, text=True,
        )
        changed_files = [f for f in result.stdout.strip().split("\n") if f.strip()]
    else:
        # No tag = never released
        changed_files = ["(never released)"]

    if changed_files:
        return {
            "name": plugin_name,
            "path": str(repo_root),
            "current_version": current_version,
            "last_tag": last_tag,
            "changed_files": len(changed_files),
        }

    return None


def run_release(plugin_path: str, bump: Optional[str], dry_run: bool) -> Dict:
    """Run release.py for the plugin."""
    cmd = [sys.executable, str(script_dir / "release.py"), plugin_path]
    if bump:
        cmd.extend(["--bump", bump])
    if dry_run:
        cmd.append("--dry-run")

    result = subprocess.run(cmd, capture_output=True, text=True)
    return {
        "returncode": result.returncode,
        "stdout": result.stdout,
        "stderr": result.stderr,
    }


def main():
    parser = argparse.ArgumentParser(description="Release the wicked-garden plugin")
    parser.add_argument("--changed", action="store_true", help="Release only if changed since last tag")
    parser.add_argument("--bump", choices=["major", "minor", "patch"], help="Force bump type")
    parser.add_argument("--dry-run", action="store_true", help="Preview without changes")
    parser.add_argument("--json", action="store_true", help="Output as JSON")

    args = parser.parse_args()
    repo_root = get_repo_root()

    # Check for changes
    if args.changed:
        target = has_changes_since_tag(repo_root)
        if not target:
            if args.json:
                print(json.dumps({"targets": [], "message": "No changes since last release."}))
            else:
                print("No changes since last release.")
            return
    else:
        rm = ReleaseManager(str(repo_root))
        target = {
            "name": rm.get_plugin_name(),
            "path": str(repo_root),
            "current_version": rm.get_current_version(),
            "last_tag": rm.get_last_tag(),
            "changed_files": -1,
        }

    # In JSON mode, output only valid JSON and exit
    if args.json:
        print(json.dumps({
            "targets": [target],
            "dry_run": args.dry_run,
            "bump": args.bump,
        }, indent=2))
        return

    # Show plan
    tag_info = target["last_tag"] or "(never tagged)"
    files_info = f", {target['changed_files']} files changed" if target["changed_files"] >= 0 else ""

    print(f"\n{'DRY RUN: ' if args.dry_run else ''}Release Plan")
    print("=" * 60)
    print(f"Plugin: {target['name']}")
    print(f"Current version: v{target['current_version']} (since: {tag_info}{files_info})")
    if args.bump:
        print(f"Forced bump: {args.bump}")
    print()

    # Execute release
    result = run_release(target["path"], args.bump, args.dry_run)

    if result["returncode"] == 0:
        print(result["stdout"])
        if not args.dry_run:
            print(f"\nDon't forget: git push --tags")
    else:
        print(f"FAILED: {result['stderr']}", file=sys.stderr)
        sys.exit(1)


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