Skip to main content

signal-pr

Stage all changes, commit, push, then open a pull request. Title and body are generated from the diff and commit history. Use when user types /signal-pr, "open a PR", "create pull request", "ship a PR", or "make a PR". Requires gh CLI.

Aller à l'installation

Informations de source

Dépôt
mattbaconz/signal
Dernière activité de la source
1 mai 2026 à 08:29
Langue détectée de SKILL.md
anglais
Étoiles
10
Forks
0

Options d'installation

Le prompt qui vérifie d'abord la source est sélectionné par défaut. Vous pouvez passer à une commande directe ou télécharger une copie locale.

Vérifiez les fichiers source

Lisez SKILL.md et les fichiers associés affichés par SkillsMP avant de décider de l'installer.

Explorateur de fichiers
4 fichiers

Affichage de SKILL.md

SKILL.md
Instructions source · Aperçu en lecture seule
name
signal-pr
description
Stage all changes, commit, push, then open a pull request. Title and body are generated from the diff and commit history. Use when user types /signal-pr, "open a PR", "create pull request", "ship a PR", or "make a PR". Requires gh CLI.
signal_bundle_version
0.4.0
# ⚡ signal-pr — Commit + Push + PR One command. Stages, commits, pushes, opens a PR. Done. --- ## Invocation Triggers Activate when user says any of: - `/signal-pr` - `"open a PR"`, `"create pull request"`, `"ship a PR"`, `"make a PR"` - `"commit push and PR"`, `"PR this"` ## Slash command behavior If the user's message is **only** `/signal-pr` (optionally with flags like `--dry`, `--draft`, or `--pr-draft`), treat that as **execute now**. - Do **not** stop after acknowledging the skill. - Do **not** ask for confirmation unless the user explicitly requested review mode. - Immediately run the ordered steps below in the same turn. - Respect `--dry`, `--draft`, and `--pr-draft` exactly as defined in this file. --- ## Behavior (Ordered Steps) 1. **Run signal-push logic** — stages, commits, pushes. See `signal-push/SKILL.md` for complete push behavior. 2. **Generate PR title** - Derived from commit message(s) - Single commit: use commit message as-is - Multiple commits: synthesize a title covering the change set - Max 72 chars, same rules as commit messages 3. **Generate PR body** using this exact template: ``` ## Changes - {change 1} - {change 2} ## Type {feat|fix|refactor|chore|docs|test|style|perf} Closes #{issue_number} ``` - Changes: bullet list derived from diff, grouped by type. No fluff. - Issue number: extracted from branch name if present (e.g. `feat/PROJ-123-thing` → `Closes #123`) - Omit `Closes #` line if no issue number detectable 4. **Open the PR** ```bash gh pr create --title "{title}" --body "{body}" ``` 5. **Report** ``` ✓ feat(auth): add JWT refresh token rotation [3 files, +47/-12] ✓ pushed → origin/feat/jwt-refresh ✓ PR opened → https://github.com/org/repo/pull/142 ``` --- ## PR Body Template ```markdown ## Changes - {change 1} - {change 2} ## Type {feat|fix|refactor|...} Closes #{issue_number if detectable from branch name} ``` **Rules:** - Changes are imperative phrases, max 80 chars each: "add JWT refresh token rotation" - Group by type if multiple types present (feat changes, then fix changes, etc.) - No prose, no explanation, no "this PR introduces" - No emoji --- ## Flags | Flag | Behavior | |---|---| | `--draft` | Show generated commit message and PR body, **do not commit, push, or create PR** | | `--dry` | Explain what would happen — touch nothing | | `--pr-draft` | Create the PR in GitHub draft state (passes `--draft` to `gh pr create`) | **`--draft` output:** ``` Draft commit message: feat(auth): add JWT refresh token rotation Draft PR title: feat(auth): add JWT refresh token rotation Draft PR body: ## Changes - add refresh token endpoint - add token rotation logic ## Type feat Closes #47 Run /signal-pr to confirm. ``` --- ## Output Format ``` ✓ feat(auth): add JWT refresh token rotation [3 files, +47/-12] ✓ pushed → origin/feat/jwt-refresh ✓ PR opened → https://github.com/org/repo/pull/142 ``` --- ## Edge Cases | Situation | Behavior | |---|---| | `gh` not installed | `✗ gh CLI required — install from cli.github.com` | | Not authenticated with `gh` | `✗ gh not authenticated — run: gh auth login` | | PR already exists for branch | `✗ PR already open for this branch → {url}` | | Push fails | Stop at push error, do not attempt PR creation | | Nothing to commit | `∅ nothing to commit` — stop | | Detached HEAD | `✗ cannot push in detached HEAD — checkout a branch first` | --- ## Script ```bash bash .agents/skills/signal-pr/scripts/pr.sh [--draft] [--dry] [--pr-draft] ["custom message"] ``` ```powershell powershell -NoProfile -ExecutionPolicy Bypass -File "$env:USERPROFILE\.agents\skills\signal-pr\scripts\pr.ps1" [--draft] [--dry] [--pr-draft] ["custom message"] ``` The script wraps `push` (`push.sh` / `push.ps1`) and adds the `gh pr create` step. PR title and body are generated by the agent and passed as arguments or via heredoc. --- ## Eat Your Own Cooking Output must comply with SIGNAL compression rules if SIGNAL is active: - No preamble before the commit/push/PR lines - One line per action - If something goes wrong: one line, TMPL:bug format
Voir sur GitHub