在 Manus 中运行任何 Skill
一键导入
一键导入
一键在 Manus 中运行任何 Skill
开始使用status
星标1
分支0
更新时间2026年1月26日 14:56
Show sync status and pending changes
安装
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
SKILL.md
readonly菜单
Show sync status and pending changes
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Interactive setup wizard for GitHub sync
Pull latest configuration from GitHub
Push configuration changes to GitHub
Show current sync configuration
Open GitHub sync repository page in browser
基于 SOC 职业分类
| name | status |
| description | Show sync status and pending changes |
Show current sync status and any pending changes.
/claude-github-sync:status
| Item | Path | Description |
|---|---|---|
| Config file | ~/.claude/sync-config.json | Sync configuration (repo URL, setup method) |
| Git remote | ~/.claude/.git/config | Primary check - git origin remote URL |
| Git repo | ~/.claude/.git/ | Must exist for sync to be initialized |
| Sync settings | ~/.claude/settings.sync.json | Shared settings (synced to GitHub) |
| Local settings | ~/.claude/settings.local.json | Machine-specific settings (gitignored) |
| Merged output | ~/.claude/settings.json | Auto-merged result of sync + local |
Execute:
echo "📊 Claude GitHub Sync Status"
echo "============================"
cd ~/.claude
# Check if git repo exists
if [ ! -d ".git" ]; then
echo ""
echo "❌ Not initialized"
echo ""
echo "Run one of:"
echo " /claude-github-sync:setup - Interactive setup (recommended)"
echo " /claude-github-sync:init <url> - Manual setup"
exit 0
fi
echo ""
echo "🔐 Authentication:"
if command -v gh &>/dev/null; then
if gh auth status --hostname github.com &>/dev/null 2>&1; then
echo " ✅ GitHub CLI authenticated"
gh auth status --hostname github.com 2>&1 | grep "Logged in" | head -1 | sed 's/^/ /'
else
echo " ⚠️ GitHub CLI not authenticated"
echo " Run: gh auth login"
fi
else
echo " ⚠️ GitHub CLI not installed (optional but recommended)"
echo " Install: brew install gh"
fi
echo ""
echo "🌐 Remote Repository:"
REPO_URL=$(git remote get-url origin 2>/dev/null)
if [ -n "$REPO_URL" ]; then
echo " URL: $REPO_URL"
# Check if repo is accessible (if gh available)
if command -v gh &>/dev/null; then
REPO_PATH=$(echo "$REPO_URL" | sed -E 's|.*github.com[:/]||' | sed 's|\.git$||')
if gh repo view "$REPO_PATH" &>/dev/null 2>&1; then
echo " ✅ Repository accessible"
# Get repo visibility
VISIBILITY=$(gh repo view "$REPO_PATH" --json isPrivate --jq 'if .isPrivate then "private" else "public" end' 2>/dev/null)
[ -n "$VISIBILITY" ] && echo " Visibility: $VISIBILITY"
else
echo " ❌ Repository not accessible (check permissions)"
fi
fi
else
echo " ❌ Not configured"
fi
echo ""
echo "📝 Local Changes:"
CHANGES=$(git status --short 2>/dev/null)
if [ -n "$CHANGES" ]; then
echo "$CHANGES" | head -10 | sed 's/^/ /'
TOTAL=$(echo "$CHANGES" | wc -l | tr -d ' ')
[ "$TOTAL" -gt 10 ] && echo " ... and $((TOTAL - 10)) more"
else
echo " ✅ No pending changes"
fi
echo ""
echo "🔄 Sync Status:"
BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo "main")
echo " Branch: $BRANCH"
# Check if we're ahead/behind remote
git fetch origin "$BRANCH" --quiet 2>/dev/null
AHEAD=$(git rev-list --count "origin/$BRANCH..HEAD" 2>/dev/null || echo "?")
BEHIND=$(git rev-list --count "HEAD..origin/$BRANCH" 2>/dev/null || echo "?")
if [ "$AHEAD" = "0" ] && [ "$BEHIND" = "0" ]; then
echo " ✅ In sync with remote"
elif [ "$AHEAD" != "?" ] && [ "$BEHIND" != "?" ]; then
[ "$AHEAD" != "0" ] && echo " ⬆️ $AHEAD commit(s) ahead (run: /claude-github-sync:push)"
[ "$BEHIND" != "0" ] && echo " ⬇️ $BEHIND commit(s) behind (run: /claude-github-sync:pull)"
else
echo " ⚠️ Unable to determine sync status"
fi
echo ""
echo "📜 Recent Commits:"
git log --oneline -3 2>/dev/null | sed 's/^/ /' || echo " No commits yet"
Report result to user.