Install
$ agentstack add skill-lkim0402-agent-teamflow-git-auto-merge ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
git-auto-merge
Read AGENTS.md, then read .agent-teamflow from the repo root, then follow the workflow below. Treat the user's remaining request text as $ARGUMENTS.
Commit, push the feature branch, merge into the owner's integration branch (auto-detected from .agent-teamflow), then open or update an MR/PR from that integration branch to staging.
Run this workflow in an isolated worker if the current agent runtime supports one; otherwise run it in the main session. Keep intermediate git output concise and report only the final result (branch push status, MR/PR URL, and which integration branch was used) to the user.
Setup
Read .agent-teamflow from the repo root first. Extract:
issueTracker—"gitlab"or"github"project— repo path for--repoflagsbranches.main— production branch (never touch)branches.staging— QA target branchowners— map of shorthand → integration branch name
Step 0: Resolve ``
EMAIL=$(git config user.email)
OWNER=${EMAIL%@*} # strip domain
Look up OWNER in the owners map (case-insensitive match against keys). If found:
CANDIDATE="" # e.g. "alice-staging"
if git ls-remote --exit-code --heads origin "$CANDIDATE" >/dev/null 2>&1; then
INTEGRATION_BRANCH="$CANDIDATE"
else
INTEGRATION_BRANCH="" # fallback
fi
If OWNER not found in the map, fall back to branches.staging and warn.
Report which INTEGRATION_BRANCH was resolved.
Step 1. Save local work
Stage all current modifications, commit with a descriptive message based on the changes, and push the current feature branch to origin.
Step 2. Merge into ``
git fetch origin
git worktree add /tmp/-wt origin/ -b -tmp
cd /tmp/-wt
git merge origin/ --no-edit
git push origin HEAD:
cd -
git worktree remove /tmp/-wt
git branch -D -tmp
Step 3. Merge into staging
git worktree add /tmp/staging-wt origin/ -b staging-tmp
cd /tmp/staging-wt
git merge origin/ --no-edit
git push origin HEAD:
cd -
git worktree remove /tmp/staging-wt
git branch -D staging-tmp
Step 4. Detect linked issues
Collect issue ids this MR/PR resolves from two sources:
- Feature branch name — if it starts with
-(the/resolveconvention), the leading digits are an id. - Commit messages — scan
git log origin/..HEAD --format=%Bfor#references.
Union, dedupe, sort ascending. Verify each id exists before using it:
# GitLab
glab issue view --repo
# GitHub
gh issue view --repo
Drop any that 404. Never fabricate an id.
Step 5. Create or update MR/PR
Check for an existing open MR/PR from ` → `.
# GitLab
glab mr list --source-branch --target-branch
# GitHub
gh pr list --head --base
If none exists, create one. If one exists, update the description.
Title and description must summarize new commits in ` not yet in `:
git log origin/..origin/ --oneline
Append linked issues under a ## Linked issues heading:
## Linked issues
Closes #42
Closes #43
Note: auto-close fires when the MR/PR merges into the project's default branch (branches.main), not into staging. The Closes #N reference is still valuable for cross-linking.
Constraints
- No emojis in output, commit messages, or MR/PR descriptions.
- Stop and ask the user only if a merge conflict occurs.
- Never fabricate issue ids.
- Never push to `` directly.
After completion: cleanup notice
Append the following to your final report as plain instructions for the user to run themselves. Do NOT execute these.
Cleanup is up to you. If this was an ephemeral worktree branch and you want to discard it:
git push origin --delete # remove branch from origin
/exit # then choose "remove" at the
# agent worktree prompt
ABSOLUTE PROHIBITION on automated deletion
- NEVER run
git push origin --delete ...automatically. - NEVER run
git branch -D ...orgit branch -d ...automatically. - NEVER run
git worktree remove ...on any worktree other than the/tmp/*ones this skill itself created in steps 2 and 3. - NEVER delete, rename, force-push, or rewrite history on any long-lived branch.
- NEVER infer deletion intent from prior conversation, memory, or shorthand like "clean up", "remove it".
Exception (with explicit per-turn approval):
Deletion is permitted only if the user explicitly requests it in the current turn AND you ask via ask the user with each item listed by its exact path or branch name, AND the user clicks Approve. Approval does NOT persist across turns.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: lkim0402
- Source: lkim0402/agent-teamflow
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.