Skip to content

FrancyJGLisboa/agent-skills-platform / references/examples/github-release-briefing-skill

github-release-briefing-skill

Unverified

Create a source-linked briefing for the latest published GitHub release of a public repository. Use for engineering teams tracking a dependency release; do not use it to publish releases or change repositories.

scripts/run_pipeline.py

View on GitHub
#!/usr/bin/env python3
"""Fetch and render the latest published release for one public GitHub repository."""
from __future__ import annotations

import argparse
import json
import re
import sys
from pathlib import Path
from urllib.error import HTTPError, URLError
from urllib.request import Request, urlopen

REPOSITORY = re.compile(r"^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$")


def latest_release(repository: str) -> tuple[dict, str]:
    if not REPOSITORY.fullmatch(repository):
        raise ValueError("repository must use OWNER/REPOSITORY")
    source = f"https://api.github.com/repos/{repository}/releases/latest"
    request = Request(source, headers={"Accept": "application/vnd.github+json", "User-Agent": "agent-skills-platform-release-briefing"})
    try:
        with urlopen(request, timeout=20) as response:
            return json.load(response), source
    except HTTPError as exc:
        if exc.code == 404:
            raise ValueError("repository is unavailable or has no published release") from exc
        raise RuntimeError(f"GitHub API returned HTTP {exc.code}") from exc
    except URLError as exc:
        raise RuntimeError(f"GitHub API request failed: {exc.reason}") from exc


def render(repository: str, release: dict, source: str) -> str:
    required = ("tag_name", "published_at", "html_url")
    missing = [field for field in required if not release.get(field)]
    if missing:
        raise ValueError("GitHub response missing: " + ", ".join(missing))
    title = release.get("name") or release["tag_name"]
    return f"""# Latest release: {repository}

- Tag: {release['tag_name']}
- Title: {title}
- Published: {release['published_at']}
- Release: {release['html_url']}

This is read-only release evidence. A human still approves any dependency change.

## Live source
- GitHub API: {source}
"""


def main(argv: list[str] | None = None) -> int:
    parser = argparse.ArgumentParser()
    parser.add_argument("--repository")
    parser.add_argument("--input", type=Path)
    parser.add_argument("--output", required=True)
    args = parser.parse_args(argv)
    try:
        if bool(args.repository) == bool(args.input):
            raise ValueError("provide exactly one of --repository or --input")
        repository = args.repository or args.input.read_text(encoding="utf-8").strip()
        release, source = latest_release(repository)
        Path(args.output).write_text(render(repository, release, source), encoding="utf-8")
    except (ValueError, RuntimeError) as exc:
        print(f"ERROR: {exc}", file=sys.stderr)
        return 1
    return 0


if __name__ == "__main__":
    raise SystemExit(main())
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall