一键导入
dual-repo-publish
Use this skill when the user wants one-shot commit-and-push sync for Career Pilot to Gitee master and GitHub main with Conventional Commits.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use this skill when the user wants one-shot commit-and-push sync for Career Pilot to Gitee master and GitHub main with Conventional Commits.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use this skill when the user wants to write, rewrite, validate, or improve Git commit messages using Conventional Commits. Helps classify changes, split mixed work into logical commits, choose scopes, detect breaking changes, and produce clear commit messages in the format type(scope): description.
Use this skill to perform pre-commit checks including sensitive data scanning, large file detection, code quality validation, and test reminders before creating Git commits.
Use this skill when changing mock interview session creation, question flow, answer submission, follow-up logic, review output, or session lifecycle behavior.
Use this skill when working on the master-resume workflow from file upload through Markdown editing, persistence, and downstream structured reuse.
Use this skill when changing the contract and workflow that connects saved jobs, match data, tailored resume generation, retry state, download, and interview handoff.
Use this skill when changing FastAPI routes, schemas, services, models, prompts, or migrations in the Career Pilot backend.
| name | dual-repo-publish |
| description | Use this skill when the user wants one-shot commit-and-push sync for Career Pilot to Gitee master and GitHub main with Conventional Commits. |
Use this skill when the user asks to:
This skill is repository-specific for career-pilot.
origin/master and GitHub github/main on the same commit after a successful runBefore executing this skill, ensure:
git --version)git remote -v shows origin and github)This skill assumes these remotes are already configured:
origin -> Gitee -> push target mastergithub -> GitHub -> push target mainDo not guess other remotes or branch names unless the user explicitly changes the workflow.
AGENTS.mddocs/codex-workspace.mddocs/git-sync-workflow.md.agents/skills/git-commit-convention/SKILL.mdBefore executing the main workflow, perform these checks:
# Check if remotes are accessible
git ls-remote origin HEAD --quiet 2>/dev/null && echo "Gitee: OK" || echo "Gitee: FAILED"
git ls-remote github HEAD --quiet 2>/dev/null && echo "GitHub: OK" || echo "GitHub: FAILED"
# Verify credentials are valid
git fetch origin --dry-run 2>&1 | head -5
git fetch github --dry-run 2>&1 | head -5
# Check if local branch is ahead/behind/diverged
git rev-list --left-right --count HEAD...origin/master 2>/dev/null || echo "Cannot compare with origin/master"
git rev-list --left-right --count HEAD...github/main 2>/dev/null || echo "Cannot compare with github/main"
# Warn about files > 10MB
git diff --cached --numstat | awk '$1 > 10485760 || $2 > 10485760 {print "Large file detected: " $3}'
When this skill is triggered, use this flow by default:
git status --shortnothing to commit and stop without pushing.agents/skills/git-commit-convention/SKILL.md to generate the commit messagegithub/main is an ancestor of local HEAD before pushingHEAD:master to originHEAD:main to githubHEAD, origin/master, and github/main resolve to the same commit hashDefault behavior is fully automatic once the user asks to submit and sync.
.agents/skills/git-commit-convention/SKILL.md as the source of truth for commit classification and wordingIf the flow cannot complete cleanly, stop and report the exact blocker.
git status --short is empty, do not create an empty commitgithub/main is not an ancestor of local HEAD, stop before any pushorigin/master succeeds and push to github/main fails, report a partial-sync stateHEAD commit hash and the observed remote branch headsDetection: After push, origin/master matches HEAD but github/main does not.
Recovery steps:
Record the partial sync state:
echo "Partial sync detected at $(date)"
echo "Local HEAD: $(git rev-parse HEAD)"
echo "Gitee: $(git rev-parse origin/master)"
echo "GitHub: $(git rev-parse github/main 2>/dev/null || echo 'N/A')"
Analyze GitHub failure reason from error output
Common fixes:
Retry only GitHub push:
git push github HEAD:main
If retry fails repeatedly, report partial-sync state and wait for user decision
Detection: Push fails with 401/403 errors or "Authentication failed".
Recovery steps:
Identify which remote failed:
For HTTPS remotes, check credential helper:
git config --get credential.helper
Guide user to update credentials:
~/.git-credentials or credential helperAfter credentials updated, retry failed push
Detection: Connection timeouts, "Could not resolve host", or "Connection refused".
Recovery steps:
Test connectivity:
curl -I https://gitee.com 2>/dev/null | head -1
curl -I https://github.com 2>/dev/null | head -1
Check proxy settings if behind corporate firewall:
git config --get http.proxy
git config --get https.proxy
Wait and retry, or ask user about proxy configuration
Detection: Push fails with "File too large" or similar error.
Recovery steps:
Identify large files:
git ls-files | xargs -I {} sh -c 'stat -f%z "$@" 2>/dev/null || stat -c%s "$@"' _ {} | awk '$1 > 10485760 {print}'
Options:
.gitignore if should not be committedAmend commit if needed and retry
On success, report:
origin/master was updatedgithub/main was updatedHEAD, origin/master, and github/main matchUse the narrowest set of Git checks that proves the sync:
git status --short
git rev-parse HEAD origin/master github/main
| Task | Command |
|---|---|
| Check status | git status --short |
| View remotes | git remote -v |
| Test Gitee connectivity | git ls-remote origin HEAD |
| Test GitHub connectivity | git ls-remote github HEAD |
| Verify sync | git rev-parse HEAD origin/master github/main |
| Check divergence | git merge-base --is-ancestor github/main HEAD |
| Retry GitHub push | git push github HEAD:main |
| Retry Gitee push | git push origin HEAD:master |
When generating commit messages:
git-commit-convention skill! or BREAKING CHANGE: footerExample workflow:
User: "提交代码"
→ Check working tree
→ Analyze changes (backend AI client updates)
→ Generate message: "feat(backend): integrate codex2gpt AI provider"
→ Stage files
→ Create commit
→ Push to both remotes
→ Verify sync