lens-git-orchestration

Executes git write operations for Lens control-repo branch topology and target-repo dev branch preparation.

Updated Apr 7, 2026
One-click install
npx skills add https://github.com/crisweber2600/Lens.Core.Src --skill lens-git-orchestration-crisweber2600
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lens-git-orchestration
Source: https://github.com/crisweber2600/Lens.Core.Src/tree/main/_bmad/lens-work/skills/lens-git-orchestration
Command: npx skills add https://github.com/crisweber2600/Lens.Core.Src --skill lens-git-orchestration-crisweber2600

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires PyYAML, and includes scripts (resource) and references (resource) components.

What problem does it solve? Managing feature branch topology, structured commits, merges, and PRs across a Lens governance repo, control repo, and target repos is error-prone when done by hand. This Skill automates all git write operations with precondition checks, structured commit messages, and audit-friendly JSON output. ## Core Features & Use Cases - Control-repo topology management: Create and push feature branches for flat or legacy 3-branch topologies, including optional contributor branches like {featureId}-dev-{username}. - Structured artifact commits: Stage and commit planning artifacts with phase-tagged messages like [plan] {featureId} — description, with optional push. - Target-repo dev branch preparation: Check out or create working branches in direct-default, feature-id, or feature-id-username modes, reporting whether a final PR is required. - PR and merge automation: Create or reuse GitHub PRs via gh CLI, merge plan branches, enforce feature_base_branch policy from repo-inventory.yaml, and publish planning docs into the governance repo. - Use Case: After finishing a planning phase, ask the agent to commit the architecture doc, merge the plan branch via PR, and publish the artifacts to governance — all executed atomically with dry-run support. ## Quick Start Ask the agent to create the feature branches for feature 'payments-auth-oauth' in the control repo and prepare the dev working branch in the target repo.

Frequently Asked Questions about lens-git-orchestration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create feature branches for a Lens control repo?

Run the create-feature-branches capability with a slug-safe feature ID. In flat topology it checks out the default branch as a no-op; in 3-branch topology it creates and pushes {featureId}, {featureId}-plan, and {featureId}-dev with upstream tracking.

How do I prepare a target repo working branch for development?

Use prepare-dev-branch with one of three modes: direct-default checks out the default branch, feature-id creates or reuses feature/{featureSlug}, and feature-id-username creates feature/{featureSlug}-{username}. It returns the working branch, base branch, and whether a final PR is required.

Does this skill support dry-run mode for git operations?

Yes, every subcommand in git-orchestration-ops.py accepts a --dry-run flag that prints all git commands without executing them. This lets you verify branch names, remotes, and commit messages before any write occurs.

What are the requirements for creating PRs in TargetProjects repos?

TargetProjects repos must have a matching entry in the governance repo-inventory.yaml with a feature_base_branch value. PRs must use that branch as base; explicit base overrides are rejected, and missing values prompt the user to set one via set-feature-base-branch.

Why does commit-artifacts fail with a branch error?

The commit must run on the topology-correct branch: the control repo default branch in flat topology, or the routed phase branch in 3-branch topology. It also fails if no files are specified, files do not exist, or there is nothing to commit.

What tools are required to run the git orchestration script?

The script requires Git 2.28 or newer and Python 3.11+ with PyYAML. PR creation and merge operations additionally require the GitHub gh CLI installed and authenticated on the PATH.