ci-pub
Audit code health, propose semantic version bumps, and verify package publication readiness.
How do I install this agent skill?
npx skills add https://github.com/venhdev/zenforge --skill ci-pubIs this agent skill safe to install?
- Gen Agent Trust Hubpass
The skill facilitates the release process for Dart and Flutter packages by performing preflight checks, version proposals, and manifest updates. It enforces human-in-the-loop gates for all mutations and publication actions. It uses standard development tools and retrieves metadata from the official pub.dev registry.
- Socketpass
No alerts
- Snykwarn
Risk: MEDIUM · 1 issue
What does this agent skill do?
ci-pub — Automated Release Preflight & Publication Engine
Operating Invariants
- Pre-Mutation Gate: Present version candidates and halt turn immediately; forbid modifying manifests, changelogs, or git history without affirmative human authorization.
- Autonomous Upload Boundary: Confine execution strictly to local preflight audit, manifest updates, and dry-run verification; forbid uploading packages, pushing tags, or publishing autonomously.
- Atomic History Integrity: Stage manifest, changelog, and workflow updates strictly within a single release commit (or amend HEAD); forbid detached chore commits or unanchored release tags.
Execution Protocol
Phase 1: Environment & Publishing Setup Discovery
- Publishing Strategy & CI Audit:
- Inspect
.github/workflows/for existing release/publish workflows (e.g.publish.yml,release.yml). Identify configured trigger mechanisms: tag-driven OIDC (refs/tags/*), manual dispatch (workflow_dispatch), or absent (terminal/cmd driven). - CI Seeding Gate (If No CI Configured): If
.github/workflows/lacks a publish workflow, highlight that no automated CI was detected and offer to seed one fromreferences/workflow-single.ymlorreferences/workflow-workspace.yml(to be committed atomically with the release). - Read repository publishing documentation and runbooks (
doc/runbooks/*publish*.md,docs/*release*.md,CONTRIBUTING.md) to extract project-specific release invariants and packaging constraints.
- Inspect
- Topology & Member Mapping:
- Single Package: Root
pubspec.yamlwithoutworkspace:directive. - Pub Workspace: Root
pubspec.yamlcontainsworkspace:(requires Dart SDK^3.6.0, rootpublish_to: none). Rundart pub workspace list(orfvm dart pub workspace list) to identify candidate member packages and map topological dependency order.
- Single Package: Root
- Remote & Local Version Baseline:
- Query pub.dev API (
curl -s https://pub.dev/api/packages/<pkg>) to resolve Remote Live Version (or markUNPUBLISHEDif 404). - Read Local Manifest Version (
grep '^version:' <pubspec.yaml>). - Compare Remote vs Local to baseline the proposal: unbumped (
Local == Remote), pre-bumped in working tree (Local > Remote), or initial release (UNPUBLISHED).
- Query pub.dev API (
Phase 2: Preflight Quality Gate
Run formatting (dart format --output=none --set-exit-if-changed .), analyzer checks (dart analyze --fatal-infos), changelog readiness, and test suites across the target release scope. If any verification fails, report diagnostics and halt immediately.
Phase 3: Version Proposal & Turn-Halt Gate
- Assess changeset scope across the target package(s) (breaking, feat, fix).
- Present release proposal:
- Single Package: Propose recommended SemVer candidate grounded against remote baseline (and optional pre-release preview if applicable).
- Pub Workspace: Present Release Matrix listing affected packages in topological order, Remote Live vs Local version, proposed version, and downstream constraint cascades.
- CI Workflow Addition: If user elected in Phase 1 to seed a publish workflow, include
.github/workflows/publish.ymlin the proposed changeset.
- Halt turn immediately for version selection and human authorization.
Phase 4: Manifest Mutation, Dry-Run Verification & Handoff
- Manifest & Changelog Synchronization: Upon user approval, synchronize versions across target
pubspec.yamlmanifests, per-packageCHANGELOG.mdfiles, and seed.github/workflows/publish.yml(if requested). - Atomic Release Commit: Stage updated files and amend HEAD (
git commit --amend --no-edit) or create an atomic release commit (git commit -m "chore(release): publish packages [...]"). - Last Verification (Dry-Run): Execute package manager publication dry-run sequentially in topological order:
- Single Package:
dart pub publish --dry-run - Pub Workspace:
dart pub -C <package_dir> publish --dry-runfor each approved package. - If errors, warnings, or archive leaks occur, supply exact failure diagnostics and halt immediately.
- Single Package:
- Publication Readiness Report & Tailored Handoff:
- Present dry-run confirmation and topological release sequence.
- Tailor handoff instructions to the publishing setup aligned in Phase 1:
- CI-Driven (Tag Push): Deliver exact Git tag commands matching the repo's tag pattern (e.g.
v<version>for single,<package>-v<version>for workspace) pointing to the release commit SHA, and tag push commands. - Terminal/CMD: Deliver direct publish commands (
dart pub publish/dart pub -C <package_dir> publishin topological order, noting the 120s pub.dev CDN propagation window; seereferences/pub-workspace-workflow.md).
- CI-Driven (Tag Push): Deliver exact Git tag commands matching the repo's tag pattern (e.g.
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/venhdev/zenforge/ci-pub">View ci-pub on skillZs</a>