bl-submit

Submit git-branchless stack as PRs - create branches and push to remote

9 stars

Best use case

bl-submit is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Submit git-branchless stack as PRs - create branches and push to remote

Teams using bl-submit should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/bl-submit/SKILL.md --create-dirs "https://raw.githubusercontent.com/jpoutrin/product-forge/main/plugins/git-workflow/skills/bl-submit/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/bl-submit/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How bl-submit Compares

Feature / Agentbl-submitStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Submit git-branchless stack as PRs - create branches and push to remote

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# /bl-submit - Git-Branchless PR Submission

**Category:** Git Workflow

Submit commits from your stack as pull requests. Creates branches, pushes to remote, and guides stacked PR configuration.

## Usage

```
/bl-submit [options]
```

## Options

| Option | Description |
|--------|-------------|
| (none) | Submit current commit (creates branch if needed) |
| `--all` | Create branches and submit entire stack |
| `--update` | Update all existing PR branches |
| `<name>` | Specify branch name for current commit |

## Examples

```bash
# Submit current commit with auto-generated branch name
/bl-submit

# Submit current commit with custom branch name
/bl-submit pr/user-authentication

# Submit entire stack (creates branches for all commits)
/bl-submit --all

# Update all existing PRs after changes
/bl-submit --update
```

## Execution

This command delegates to the `bl-submit-expert` agent:

```
Task(subagent_type="git-workflow:bl-submit-expert",
     prompt="Execute submit: <options>")
```

## Execution Instructions

1. **Verify Prerequisites**
   - Check git-branchless is installed
   - Check remote is configured

2. **Show Current State**
   - Run `git sl` to display stack with branches
   - Identify commits without branches

3. **Execute Submission**
   - For single: Create branch at current commit, push
   - For all: Navigate stack, create branches, push each
   - For update: Force-push all existing branches

4. **Guide PR Configuration**
   - Explain stacked PR base branches
   - Provide table of branch → base relationships

5. **Confirm Result**
   - Show branches on remote
   - Display final state with `git sl`

## Interactive Flow

```
User: /bl-submit pr/user-auth

Agent: Submitting current commit...

Current position:
● def5678 feat: add user authentication

Creating branch...
git switch -c pr/user-auth

Pushing to remote...
git submit -c @

✓ Branch pr/user-auth pushed to origin

◆ abc1234 (main) initial commit
┃
● def5678 (ᐅ pr/user-auth) feat: add user authentication

You can now create a PR on GitHub:
  Base: main
  Compare: pr/user-auth
```

```
User: /bl-submit --all

Agent: Submitting entire stack (3 commits)...

◆ abc1234 (main) initial commit
┃
◯ def5678 feat: add User class
┃
◯ ghi9012 feat: add validation
┃
● jkl3456 feat: add repository

[1/3] Creating branch at "feat: add User class"...
  git switch -c pr/user-class
  git submit -c @
  ✓ pr/user-class pushed

[2/3] Creating branch at "feat: add validation"...
  git switch -c pr/validation
  git submit -c @
  ✓ pr/validation pushed

[3/3] Creating branch at "feat: add repository"...
  git switch -c pr/repository
  git submit -c @
  ✓ pr/repository pushed

◆ abc1234 (main) initial commit
┃
◯ (pr/user-class) feat: add User class
┃
◯ (pr/validation) feat: add validation
┃
● (ᐅ pr/repository) feat: add repository

All 3 branches pushed!

Create stacked PRs on GitHub:
┌─────────────────┬──────────────────┐
│ Branch          │ Base Branch      │
├─────────────────┼──────────────────┤
│ pr/user-class   │ main             │
│ pr/validation   │ pr/user-class    │
│ pr/repository   │ pr/validation    │
└─────────────────┴──────────────────┘
```

```
User: /bl-submit --update

Agent: Updating all PR branches...

Branches to update:
  - pr/user-class
  - pr/validation
  - pr/repository

Running git submit...

  pr/user-class:   abc123 → def456 (force-pushed)
  pr/validation:   ghi789 → jkl012 (force-pushed)
  pr/repository:   mno345 → pqr678 (force-pushed)

All 3 PR branches updated.
GitHub PRs will show new changes automatically.
```

## Stacked PRs Guide

When you submit a stack, you create **stacked PRs** on GitHub:

```
Commit Stack          GitHub PRs
─────────────         ──────────
pr/repository    →    PR #3: base = pr/validation
     ↓
pr/validation    →    PR #2: base = pr/user-class
     ↓
pr/user-class    →    PR #1: base = main
     ↓
    main
```

**Important:** On GitHub, set each PR's base branch to its parent branch, not `main`. This ensures reviewers see only the diff for that specific commit.

**After a PR is merged:**
1. GitHub may auto-update child PR base branches
2. Locally, run `/bl-sync --after-merge` to clean up
3. Then `/bl-submit --update` to push changes

## Error Handling

| Error | Resolution |
|-------|------------|
| No remote configured | `git remote add origin <url>` |
| "Skipped - not on remote" | Use `/bl-submit` (creates with `-c`) |
| Branch already exists | Delete old: `git branch -D <name>` |
| Force-push rejected | Check repo branch protection |
| Detached HEAD | Creates branch automatically |

Related Skills

zod

9
from jpoutrin/product-forge

Zod schema validation patterns and type inference. Auto-loads when validating schemas, parsing data, validating forms, checking types at runtime, or using z.object/z.string/z.infer in TypeScript.

typescript-import-style

9
from jpoutrin/product-forge

Merge-friendly import formatting (one-per-line, alphabetical). Auto-loads when writing TypeScript/JavaScript imports to minimize merge conflicts in parallel development. Enforces consistent grouping and sorting.

setup-mcp-auth

9
from jpoutrin/product-forge

Configure authentication for an existing FastMCP server

fastmcp

9
from jpoutrin/product-forge

FastMCP TypeScript framework patterns for MCP servers. Auto-loads when building MCP servers, creating tools/resources/prompts, implementing authentication, configuring transports, or working with FastMCP in TypeScript.

add-mcp-tool

9
from jpoutrin/product-forge

Add a new tool to an existing FastMCP server with guided configuration

add-mcp-resource

9
from jpoutrin/product-forge

Add a new resource or resource template to an existing FastMCP server

plan-with-team

9
from jpoutrin/product-forge

Validate plan file ownership

privacy-compliance

9
from jpoutrin/product-forge

GDPR, CCPA, and privacy compliance guidance for data protection. Use when handling personal data, implementing consent management, or ensuring regulatory compliance across jurisdictions.

oauth

9
from jpoutrin/product-forge

OAuth 2.0 and OpenID Connect implementation patterns. Use when implementing authentication, authorization flows, or integrating with OAuth providers like Google, GitHub, or custom identity providers.

mcp-security

9
from jpoutrin/product-forge

Use when securing MCP servers, preventing prompt injection, implementing authorization, validating user input, or building secure multi-agent pipelines. Provides 5-layer defense architecture patterns.

rag-cag-security

9
from jpoutrin/product-forge

Security patterns for RAG and CAG systems with multi-tenant isolation. Use when building retrieval-augmented or cache-augmented generation systems that require tenant isolation, access control, and secure data handling.

chunking-strategies

9
from jpoutrin/product-forge

Document chunking strategies for RAG systems. Use when implementing document processing pipelines to determine optimal chunking approaches based on document type and retrieval requirements.