Snoozer10/synthesize-skills / .agents/skills/release-sync
release-sync
VerifiedUse when detecting release semver version drift across VERSION, GEMINI.md, and package.json, maintaining CHANGELOG and README release hygiene, or atomically bumping release versions
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 2.1 KB |
| references/api.md | markdown | 1.2 KB |
| references/examples.md | markdown | 1.1 KB |
| scripts/bump.py | script | 6.8 KB |
| scripts/check.py | script | 4.5 KB |
scripts/check.py
View on GitHub"""release-sync drift gate. Stdlib only.
80/20 rule: FAIL (exit 1) only on version parity mismatch.
All other hygiene checks are WARN (exit 0, stderr warn:).
Exit codes: 0=clean, 1=version drift, 2=usage error
Usage: check.py [--json]
"""
import json
import re
import subprocess
import sys
from pathlib import Path
SEMVER_RE = re.compile(r"^\d+\.\d+\.\d+$")
if hasattr(sys.stdout, "reconfigure"):
sys.stdout.reconfigure(encoding="utf-8", errors="replace")
if hasattr(sys.stderr, "reconfigure"):
sys.stderr.reconfigure(encoding="utf-8", errors="replace")
def _find_root():
cur = Path.cwd()
for _ in range(6):
if (cur / "VERSION").exists():
return cur
if cur.parent == cur:
break
cur = cur.parent
return Path.cwd()
def _read_version(root):
p = root / "VERSION"
return p.read_text(encoding="utf-8").strip() if p.exists() else ""
def _read_gemini_version(root):
p = root / "GEMINI.md"
if not p.exists():
return ""
t = p.read_text(encoding="utf-8")
m = re.search(r'^version:\s*["\']?([^"\'\r\n]+)["\']?', t, re.MULTILINE)
return m.group(1).strip() if m else ""
def _read_package_version(root):
p = root / "package.json"
if not p.exists():
return ""
try:
return json.loads(p.read_text(encoding="utf-8")).get("version", "")
except Exception as e:
print(f"warn: package.json parse error: {e}", file=sys.stderr)
return ""
def _run_validate(root):
val_py = root / "scripts" / "validate.py"
if not val_py.exists():
return True
r = subprocess.run(
[sys.executable, str(val_py)],
cwd=str(root), capture_output=True, text=True,
encoding="utf-8", errors="replace", shell=False,
)
return r.returncode == 0
def check(root=None, as_json=False):
root = root or _find_root()
drift = False
details = {}
errors = []
warnings = []
v = _read_version(root)
gv = _read_gemini_version(root)
pv = _read_package_version(root)
# semver validity
if v and not SEMVER_RE.match(v):
errors.append(f"VERSION semver invalid: {v!r}")
drift = True
# version parity — the only FAIL condition
if v and gv and v != gv:
errors.append(f"version drift: VERSION={v} GEMINI.md={gv}")
drift = True
if v and pv and v != pv:
errors.append(f"version drift: VERSION={v} package.json={pv}")
drift = True
# validate.py gate
if not _run_validate(root):
errors.append("validate.py failed")
drift = True
# WARN-level checks (never FAIL)
p = root / "GEMINI.md"
if p.exists():
t = p.read_text(encoding="utf-8")
# last_indexed freshness
m = re.search(r'^last_indexed:\s*"([^"]+)"', t, re.MULTILINE)
if m:
from datetime import date
try:
d = date.fromisoformat(m.group(1))
age = (date.today() - d).days
if age > 90:
warnings.append(f"last_indexed {m.group(1)} stale >90d")
elif age > 30:
warnings.append(f"last_indexed {m.group(1)} {age}d old")
except Exception:
pass
# README region (warn only)
readme = root / "README.md"
if readme.exists():
rt = readme.read_text(encoding="utf-8")
if "<!-- release-sync:start -->" not in rt or "<!-- release-sync:end -->" not in rt:
warnings.append("README.md missing release-sync region")
# CHANGELOG (warn only)
cl = root / "CHANGELOG.md"
if cl.exists() and "## [Unreleased]" not in cl.read_text(encoding="utf-8"):
warnings.append("CHANGELOG.md missing ## [Unreleased]")
for w in warnings:
print(f"warn: {w}", file=sys.stderr)
for e in errors:
print(f"error: {e}", file=sys.stderr)
if as_json:
out = {
"status": "drift" if drift else "clean",
"version": v,
"gemini_version": gv,
"package_version": pv,
"errors": errors,
"warnings": warnings,
}
print(json.dumps(out, indent=2))
else:
if not drift and not warnings:
print("clean")
return 1 if drift else 0
def main(argv=None):
args = list(argv or sys.argv[1:])
as_json = "--json" in args
extra = [a for a in args if a != "--json"]
if extra:
print(f"usage error: unrecognized arguments {extra!r}", file=sys.stderr)
return 2
return check(as_json=as_json)
if __name__ == "__main__":
sys.exit(main())
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| 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: 471k | Updated | Claude CodeCodex | Verified | Install |
| 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: 198k | Updated | Claude CodeCodex | Verified | Install |
| 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: 198k | Updated | Claude CodeCodex | Unverified | Install |
| 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: 198k | Updated | Claude CodeCodex | Verified | Install |