| name | github-submission-discipline |
| description | Use before committing, amending, pushing, force-pushing, or merging public GitHub PRs from shared AI-agent accounts. Prevents AI attribution leakage while allowing real human Co-authored-by trailers, and prevents multi-agent branch overwrite incidents through fetch/log comparison and single-owner recovery. |
| allowed-tools | Bash(git *) Bash(gh *) Bash(rg *) Bash(grep *) |
GitHub Submission Discipline
Hard Rules
- No AI attribution in public commits or PR bodies. Remove generated-by banners, model names, AI-agent names, and vendor noreply addresses.
- Human Co-authored-by trailers are allowed when they identify a real contributor. Use them to distinguish shared-account submissions, for example
Co-authored-by: Alice <alice@apecloud.com> or the team-accepted plain form Co-authored-by: Alice alice@apecloud.com. Never use a Co-authored-by line for Claude, Codex, an AI agent, a bot, or a vendor noreply address.
- Check every commit body, not only the latest. Squash and amend can keep old body text.
- Fetch before force-push.
--force-with-lease protects only against the last fetched remote tip, not a teammate push you never fetched.
- Compare local and remote commit chains before pushing shared PR branches.
- One recovery owner at a time. When a branch was overwritten, stop parallel fixes and let one person rebuild the chain.
- Dropped commit owner verifies content. The owner of the dropped work checks the recovered diff, not only the person who rebuilt the branch.
When To Invoke
Use this skill when:
- Creating a commit for a public GitHub repo.
- Amending or squashing a PR.
- Pushing or force-pushing a branch other agents may touch.
- Reviewing a PR for merge readiness.
- Recovering from a missing commit, unexpected rebase, or force-push race.
Pre-Push Checks
Run before any push:
git fetch origin
git log --oneline --decorate --graph --max-count=12 HEAD
git log --oneline --decorate --graph --max-count=12 origin/$(git branch --show-current) 2>/dev/null || true
git log origin/main..HEAD --format='%H' | while read c; do
git show -s --format='%B' "$c" | grep -Ei 'Generated with|Anthropic|Claude|Codex|OpenAI|AI agent|🤖|noreply@anthropic|noreply@openai|noreply@codex|bot' && {
echo "AI attribution found in $c" >&2
exit 1
}
git show -s --format='%B' "$c" \
| grep -Ei '^Co-authored-by:' \
| grep -Ei 'Anthropic|Claude|Codex|OpenAI|AI agent|🤖|noreply|bot' && {
echo "AI Co-authored-by trailer found in $c" >&2
exit 1
}
done
Also inspect the PR body before requesting review:
gh pr view --json body --jq .body | grep -Ei 'Generated with|Anthropic|Claude|Codex|OpenAI|AI agent|🤖|noreply@anthropic|noreply@openai|noreply@codex' && exit 1
Commit Message Pattern
Use a normal human commit:
docs: add probe soft-failure skill
Summarize what changed and why.
Do not add model signatures, generated-by sections, or AI co-author trailers.
If a shared account needs to distinguish the real human contributor, add a human-only trailer:
Co-authored-by: Alice <alice@apecloud.com>
Only use a real contributor name and email. Do not add this line for AI tools, runtime names, or generic agent identities.
Shared Branch Push Protocol
Before force-pushing:
git fetch origin
- Compare
HEAD vs remote branch.
- Confirm the commits you expect are present.
- Use
git push --force-with-lease.
- Immediately re-read remote tip:
git ls-remote origin "$(git branch --show-current)"
If the remote contains work you did not expect, stop and coordinate. Do not overwrite.
Recovery Protocol
If a commit disappeared:
- Freeze branch writes.
- Identify remote tip before and after the bad push.
- Reconstruct the intended chain in one local checkout.
- Ask each dropped-commit owner to verify their diff is present.
- Push once with
--force-with-lease.
- Run the attribution grep again across the final chain.
Closeout Language
Good:
Submission check passed: PR body clean; commits origin/main..HEAD clean for AI attribution; any Co-authored-by trailers identify real human contributors; local chain matches remote tip after fetch; pushed with force-with-lease.
Bad:
Looks clean.
Related Docs
docs/addon-github-submission-discipline-guide.md