$npx -y skills add transilienceai/communitytools --skill github-workflowGitHub workflow automation — branching, committing, pushing, pull requests, issues, and code review. Use when asked to commit, push, create PRs/branches/issues, or manage git workflow.
| 1 | # GitHub Workflow |
| 2 | |
| 3 | Automate the full GitHub development lifecycle: branches, commits, pushes, PRs, issues, and code review. |
| 4 | |
| 5 | ## Quick Start |
| 6 | |
| 7 | 1. User requests a git action (commit, PR, branch, push, issue) |
| 8 | 2. Check repo state: `git status`, `git branch`, `git log --oneline -5` |
| 9 | 3. Execute the appropriate workflow below |
| 10 | 4. Confirm result to user |
| 11 | |
| 12 | ## Workflows |
| 13 | |
| 14 | ### 1. Branching |
| 15 | |
| 16 | ```bash |
| 17 | # Create feature branch from main |
| 18 | git checkout main && git pull origin main |
| 19 | git checkout -b <type>/<name> |
| 20 | # Types: feature/, bugfix/, docs/, refactor/, test/, chore/ |
| 21 | ``` |
| 22 | |
| 23 | - Always branch from up-to-date `main` |
| 24 | - Use conventional naming: `feature/add-jwt-testing`, `bugfix/fix-port-detection` |
| 25 | |
| 26 | ### 2. Committing |
| 27 | |
| 28 | ```bash |
| 29 | # Stage specific files (never git add -A blindly) |
| 30 | git add <file1> <file2> |
| 31 | # Commit with conventional format |
| 32 | git commit -m "type(scope): description" |
| 33 | ``` |
| 34 | |
| 35 | - **Types**: `feat`, `fix`, `docs`, `refactor`, `test`, `chore` |
| 36 | - Message focuses on **why**, not what |
| 37 | - Never commit `.env`, credentials, or secrets |
| 38 | - See [reference/commit-conventions.md](reference/commit-conventions.md) |
| 39 | |
| 40 | ### 3. Pushing |
| 41 | |
| 42 | ```bash |
| 43 | # First push (set upstream) |
| 44 | git push -u origin <branch-name> |
| 45 | # Subsequent pushes |
| 46 | git push |
| 47 | ``` |
| 48 | |
| 49 | - Never force-push to `main`/`master` without explicit user approval |
| 50 | - If push is rejected, `git pull --rebase` first |
| 51 | |
| 52 | ### 4. Pull Requests |
| 53 | |
| 54 | ```bash |
| 55 | # Create PR linking to issue |
| 56 | gh pr create --title "Short title < 70 chars" --body "$(cat <<'EOF' |
| 57 | ## Summary |
| 58 | - What changed and why |
| 59 | |
| 60 | ## Test plan |
| 61 | - [ ] How to verify |
| 62 | |
| 63 | Fixes #<issue-number> |
| 64 | EOF |
| 65 | )" |
| 66 | ``` |
| 67 | |
| 68 | - Title < 70 chars, details in body |
| 69 | - Always link to issue: `Fixes #N` or `Closes #N` |
| 70 | - See [reference/pr-workflow.md](reference/pr-workflow.md) |
| 71 | |
| 72 | ### 5. Issues |
| 73 | |
| 74 | ```bash |
| 75 | gh issue create --title "type: description" --body "$(cat <<'EOF' |
| 76 | ## Problem |
| 77 | What needs to change |
| 78 | |
| 79 | ## Proposed solution |
| 80 | How to fix it |
| 81 | |
| 82 | ## Acceptance criteria |
| 83 | - [ ] Criteria 1 |
| 84 | EOF |
| 85 | )" |
| 86 | ``` |
| 87 | |
| 88 | ### 6. Code Review |
| 89 | |
| 90 | ```bash |
| 91 | # Review a PR |
| 92 | gh pr view <number> |
| 93 | gh pr diff <number> |
| 94 | gh pr checks <number> |
| 95 | # Comment or approve |
| 96 | gh pr review <number> --approve |
| 97 | gh pr review <number> --comment --body "feedback" |
| 98 | ``` |
| 99 | |
| 100 | ## Reference |
| 101 | |
| 102 | - [commit-conventions.md](reference/commit-conventions.md) — Commit message format and examples |
| 103 | - [pr-workflow.md](reference/pr-workflow.md) — PR creation, review, and merge workflow |
| 104 | - [branch-strategy.md](reference/branch-strategy.md) — Branching model and naming conventions |
| 105 | |
| 106 | ## Critical Rules |
| 107 | |
| 108 | - **NEVER** force-push to main/master without explicit user approval |
| 109 | - **NEVER** commit secrets, `.env` files, or credentials |
| 110 | - **NEVER** use `git add -A` without reviewing what's staged |
| 111 | - **NEVER** skip pre-commit hooks (`--no-verify`) unless user explicitly asks |
| 112 | - **NEVER** amend published commits — create new commits instead |
| 113 | - **ALWAYS** use conventional commit format: `type(scope): description` |
| 114 | - **ALWAYS** link PRs to issues |
| 115 | - **ALWAYS** check `git status` before committing |
| 116 | - **ALWAYS** pull before pushing to avoid conflicts |
| 117 | - **ALWAYS** create branches from up-to-date main |