release-guard
Release Guard Skill
Core Rules (NEVER VIOLATE)
- Releases ONLY from main after PR merge.
- ALL CI jobs must COMPLETE + SUCCESS. NO queued jobs.
- Verify branch protection requires status checks.
- Version MUST match tag before creating release (cargo-dist requirement).
Activation Steps
- PR Check: Ask for PR# if needed. Run
gh pr view $PR_NUM --json state,baseRefName. Must: state=CLOSED, baseRefName=main. - Branch:
git branch --show-current+gh repo view --json default_branch. Fail if not main. - CI:
gh run list --branch main --limit 5 --json status,conclusion. ALL: completed + success. Log/screenshot. - Clean:
git status(clean working dir). - Version Check (CRITICAL):
grep '^version =' Cargo.tomlmust match tag (without 'v' prefix).
Fail Response
🚫 BLOCKED: [Exact violation]
Fix:
- Merge PR to main
- Wait CI: gh run list --branch main
- git checkout main && git pull
- BUMP VERSION in Cargo.toml FIRST (must match tag)
Re-run task.
Version Mismatch Example (v0.1.22 Incident)
Tag: v0.1.22 pushed at commit 05c0481
Cargo.toml version: 0.1.21 (MISMATCH!)
Result: cargo-dist failed: "This workspace doesn't have anything for dist to Release!"
Fix: ALWAYS bump version BEFORE pushing tag.
Use: cargo release patch|minor|major (handles atomically)
Pass: Safe Release
- Semver check:
cargo semver-checks check-release --workspace(ADR-034) - Tag: vMAJOR.MINOR.PATCH (semantic).
- Prefer:
cargo release patch|minor|major(ADR-034) - Fallback:
gh release create v1.2.3 --generate-notes --target main - Confirm before execute.
Examples
- User: "Create release from develop PR #199" → BLOCK: Wrong branch.
- User: "Tag v1.0.0 after PR #199" → Check PR/CI/branch → Proceed if pass.
Progressive disclosure: For CI details, see ci-reference.md if needed.
## Best Practices Applied
- **Description**: Keyword-rich for matching ("release", "tag").
- **allowed-tools**: Read + Bash wildcards (gh/git CLI). Install `gh`.[2]
- **Structure**: Essential in SKILL.md; link supports (add `ci-reference.md` for details).
- **Load/Test**: Restart Claude Code. Ask "What Skills available?". Test: "Create release PR #199".
More from d-o-hub/rust-self-learning-memory
loop-agent
Execute workflow agents iteratively for refinement and progressive improvement until quality criteria are met. Use when tasks require repetitive refinement, multi-iteration improvements, progressive optimization, or feedback loops until convergence.
51web-search-researcher
Research topics using web search and content fetching to find accurate, current information. Use when you need modern information, official documentation, best practices, technical solutions, or comparisons beyond your training data.
46perplexity-researcher-reasoning-pro
Highest level of research and reasoning capabilities for complex decision-making with significant consequences, strategic planning, technical architecture decisions, multi-stakeholder problems, or high-complexity troubleshooting requiring expert-level judgment and sophisticated reasoning chains. Prioritizes actively maintained repositories and validates website sources for 2025 relevance.
44context-retrieval
Retrieve relevant episodic context from memory for informed decision-making. Use when you need past episodes, patterns, or solutions to similar tasks.
44rust-code-quality
Perform comprehensive Rust code quality reviews against best practices for async Rust, error handling, testing, and project structure
43codebase-analyzer
Analyze implementation details, trace data flow, explain technical workings, locate files, and consolidate codebases. Use when you need to understand HOW code works, find file locations, or assess technical debt.
40