con un clic
smaqit-release-git-local
Execute git operations (commit, tag, push) for local releases
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
Execute git operations (commit, tag, push) for local releases
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional SOC
Use when manually generating or updating the canonical 3-workflow GitHub Actions CI/CD set (deploy.yml, provision.yml, post-merge-deploy.yml) for a Node.js + React application deployed to a VM via Terraform and Docker Compose. Also use when an operator invokes /cicd.generate, or when updating existing workflows to match project conventions. In `smaqit.new-greenfield-project`, the deployment agent generates workflows during Phase 5 using these patterns as reference — invoke this skill directly only when generating CI/CD outside the zero-to-prod flow. Note: `copilot-setup-steps.yml` is provided by the smaqit framework and is not generated by this skill.
Use when deploying a Node.js backend + React frontend application to a remote VM via rsync. Used in the Phase 5 dev environment sweep of `smaqit.new-greenfield-project` to validate the deployment approach locally before CI/CD. Also use as a manual fallback for direct VM deployment outside the CI/CD pipeline.
Use after any deployment to confirm the application is healthy before closing the task or proceeding. Checks the health endpoint, verifies the deployed commit SHA against the current local commit, and validates the SPA root HTTP response. Produces a PASS/FAIL report per check with a final summary. Also use when a deployment task asks to confirm success or when re-verifying after a fix.
Use when configuring a custom domain with a Let's Encrypt TLS certificate for a running nginx server. Covers DNS propagation verification, nginx server_name update, Certbot certificate issuance, HTTPS smoke tests, and auto-renewal verification. Also use when activating a purchased domain for a deployed application, setting up HTTPS post-deployment, or when a spec references INF-TOPOLOGY-004 through INF-TOPOLOGY-007 as pending TLS configuration.
Use when writing deploy stamp files (DEPLOY_SHA, DEPLOY_TIME) to the VM after a successful deployment, or when re-stamping without a full redeploy. Also use when the health endpoint returns "sha":"unknown" after deployment, when a deployed PR needs a notification comment, or when smaqit.infrastructure-deploy-rsync invokes the post-deploy stamp step. Produces DEPLOY_SHA and DEPLOY_TIME files in /opt/him/backend/ on the VM and optionally posts a deploy comment on the merged PR.
Use when validating staged files before committing to catch .env files, plaintext API keys/secrets, draft spec files on main-branch commits, and large files over 1 MB. Also use when setting up the automated git pre-commit hook via the bundled install script so checks run automatically on every commit. Produces a PASS/FAIL report per check, with filenames and matching lines listed for failures.
| name | smaqit.release-git-local |
| description | Execute git operations (commit, tag, push) for local releases |
| metadata | {"version":"0.2.0"} |
Execute all git operations required for a local release: stage changes, commit, create annotated tag, and push to remote.
Use this skill for local releases (running on a developer's machine) after all files have been prepared. This skill:
Do NOT use this skill for PR-based releases - use release-git-pr instead.
Check if there are uncommitted changes beyond release preparation files:
git status --porcelain
If working tree has changes:
If only CHANGELOG.md and version files changed:
CRITICAL: Group changes by purpose, not by file type. Each commit should represent one logical change.
Analyze all changed files:
git --no-pager diff --name-status
git status --short
Common grouping patterns:
Pattern 1: Feature + Documentation
# New feature with related docs
git add src/new_feature.js docs/api.md
git commit -m "Add new feature X"
Pattern 2: Bug Fix
# Bug fix with tests
git add src/buggy_module.js tests/buggy_module.test.js
git commit -m "Fix issue with Y"
Pattern 3: Refactoring/Reorganization
# Moved files or restructured
git add -u old_location/ # stages deletions
git add new_location/
git commit -m "Refactor: move Z to new location"
Pattern 4: Build/Infrastructure
# Build, CI/CD, or tooling changes
git add .github/workflows/ Makefile
git commit -m "Update build workflow"
Guidelines for grouping:
feat:, fix:, refactor:, docs:, chore:Example workflow with multiple commit groups:
# Group 1: Infrastructure changes
git add Makefile .github/workflows/
git commit -m "chore: update sync workflow for new structure"
# Group 2: Feature implementation
git add skills/ installer/Makefile
git add -u session-*/ task-*/ test-*/ release-*/ # stages deletions
git commit -m "refactor: consolidate skills into skills/ directory"
# Group 3: Bug fix
git add .github/workflows/post-merge-release.yml
git add -u .github/workflows/post-merge-tag.yml .github/workflows/release.yml
git add agents/smaqit.release.pr.agent.md .github/agents/ README.md
git commit -m "fix: merge workflows to resolve GITHUB_TOKEN trigger issue"
# Group 4: Documentation/support
git add .smaqit/
git commit -m "feat: add task tracking system"
# Now ready for Step 2 (release commit)
After committing work, verify clean state:
git status --porcelain # Should be empty or only show CHANGELOG/version files
Stage ONLY the release preparation changes:
git add CHANGELOG.md
If version files were updated:
git add package.json pyproject.toml installer/main.go
Verify staged changes contain ONLY release preparation:
git --no-pager diff --cached --name-status
Expected output should be minimal (2-3 files max).
Create commit with release message:
git commit -m "Release vX.Y.Z"
Verify commit was created:
git --no-pager log -1 --oneline
Create an annotated tag (not lightweight):
git tag -a vX.Y.Z -m "Release vX.Y.Z"
Why annotated tags?
Verify tag was created:
git --no-pager tag -l vX.Y.Z
Push the commit to the remote repository:
git push origin main
Replace main with current branch if different.
Push the tag to trigger release workflows:
git push origin vX.Y.Z
Important: Tag push must be separate from commit push for most CI/CD systems to detect release events.
Confirm both commit and tag are on remote:
git ls-remote --tags origin vX.Y.Z
git ls-remote origin main
Provide a summary of git operations:
success: true
commit_sha: abc123def456
tag: vX.Y.Z
branch: main
remote_url: https://github.com/owner/repo.git
Output fields:
success: Boolean indicating all operations completedcommit_sha: SHA of the release committag: The git tag created and pushedbranch: Branch that was pushed toremote_url: Remote repository URL| Error | Likely Cause | Suggested Action |
|---|---|---|
nothing to commit | Files unchanged or not staged | Verify changes were made and staged correctly |
tag 'vX.Y.Z' already exists | Tag created in previous attempt | Delete local tag: git tag -d vX.Y.Z, then retry |
rejected - non-fast-forward | Remote has commits not in local | Pull latest: git pull origin main, then retry |
Permission denied (publickey) | SSH key not configured | Configure git credentials or use HTTPS |
remote: Permission to repo denied | No push access to repository | Verify repository permissions |
fatal: tag 'vX.Y.Z' already exists on remote | Tag already pushed previously | Version conflict - check CHANGELOG.md |
Recovery steps:
If commit succeeded but tag creation failed:
# Fix the issue, then resume from Step 3
git tag -a vX.Y.Z -m "Release vX.Y.Z"
git push origin vX.Y.Z
If commit and tag succeeded but push failed:
# Fix the issue, then resume from Step 4
git pull origin main # if non-fast-forward
git push origin main
git push origin vX.Y.Z
If tag already exists locally:
git tag -d vX.Y.Z # Delete local tag
# Then retry from Step 3
release-git-pr skill instead-f) release commits or tags