main-sync
Inspect and safely align one Git repository's canonical main checkout with its fetched origin default branch.
Skill by maheen-ejaz
Chalk Labs
Need help deploying main-sync?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/maheen-ejaz-main-sync
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/main-sync
What's inside
- Skill name
main-sync- Description
- Inspect and safely align one Git repository's canonical main checkout with its fetched origin default branch. Invoke explicitly with `/skill:main-sync [repository path]`.
- License
- MIT
- Instructions
- 22 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Main checkout health and sync Use only when explicitly invoked as `/skill:main-sync [repository path]`. If no path is supplied, use the current working directory. Operate on one repository per invocation; do not scan the workspace or guess a repository path. ## Rules - Diagnose before changing anything. Fetching remote-tracking metadata with `git fetch --no-prune origin` is allowed for this explicit sync request; never prune. - Identify the repository root, then resolve the *live* default branch and HEAD SHA with `git ls-remote --symref origin HEAD`; do not trust a possibly stale local `origin/HEAD` alias. Fetch the exact advertised branch into its `refs/remotes/origin/<branch>` ref and verify that fetched SHA still matches the live remote HEAD before presenting a change. If the branch or SHA keeps moving, stop and report it. Do not print the remote URL. - If the live default cannot be resolved unambiguously, stop and ask the user how to resolve that; never assume `main` or `master`. - Identify the worktree actually checked out on the live default branch, its `HEAD`, upstream, complete porcelain status including untracked files, and any merge/rebase/cherry-pick/revert in progress. - If the canonical checkout is clean and exactly equals its fetched default ref, report that no action is needed. - If it is clean and strictly behind only, use the structured `ask_user_question` tool to offer: (1) fast-forward this exact checkout to the displayed fetched SHA, (2) inspect incoming commits first, or (3) leave it unchanged. Recommend the fast-forward. After approval, fetch and resolve the live default again; if its branch or SHA changed, ask again. Otherwise revalidate the exact path, branch, `HEAD`, clean status, and no in-progress operation immediately before `git merge --ff-only`. - If dirty, never stash, reset, checkout, clean, or overwrite. Show changed paths and use `ask_user_question` to offer inspecting the diff to form a preservation plan (recommended), or leaving it unchanged. Do not offer a destructive cleanup as a resolution. - If ahead or diverged, show the local-only and remote-only commits and offer to inspect them and propose a reconciliation plan, or preserve the checkout unchanged. Do not merge, rebase, reset, or force-align automatically. - If the invoked directory is not the canonical default-branch worktree, identify the canonical path and offer to inspect it or leave it alone; do not switch the current checkout. Ask before any action on another exact path. - On fetch errors, wrong branch, in-progress Git state, missing upstream, or ambiguous identity, stop and use `ask_user_question` to offer safe diagnosis or cancellation. Every question must present concrete consequences; if no safe mutation is available, the choices must remain read-only. ## Completion After any approved fast-forward, verify that the same worktree is clean and its `HEAD` exactly equals the target SHA. Report the path, branch, old/new `HEAD`, and outcome. If approval is cancelled or checks no longer match, make no change and report why.
From maheen-ejaz/pi-agent-config, MIT.
More from maheen-ejaz/pi-agent-config
- 0.529score
bb-cli
maheen-ejaz
Use this when controlling bb.
SkillBFreshness: BClaude Code +9 - 0.526score
repo-audit
maheen-ejaz
Run an explicit user-invoked repository audit in daily, weekly, or report mode against any repository.
SkillBFreshness: BClaude Code +9 - 0.524score
tdd
maheen-ejaz
Run strict test-driven development only when the user explicitly invokes the skill using Pi's `/skill:tdd` syntax.
SkillBFreshness: BClaude Code +9 - 0.521score
infisical-credential-access
maheen-ejaz
Automatically govern credential-backed work through repository-declared Infisical runners.
SkillBFreshness: BClaude Code +9 - 0.521score
linear-ticket-delivery
maheen-ejaz
Deliver one explicitly identified Linear ticket through implementation, merge, release, and production validation.
SkillBFreshness: BClaude Code +9 - 0.521score
worktree-retire
maheen-ejaz
Inventory Git worktrees and guide explicit, safe retirement of one verified worktree.
SkillBFreshness: BClaude Code +9 - 0.521score
linear-ticket-operations
maheen-ejaz
Automatically standardize every Linear issue read, search, create, edit, comment, metadata, relation, archive, unarchive, or delete operation with…
SkillBFreshness: BClaude Code +9 - 0.521score
i-have-adhd
maheen-ejaz
Shape output for a reader with ADHD: lead with the next action, number multi-step work, restate state across turns, suppress tangents, give specific time…
SkillBFreshness: BClaude Code +9 - 0.516score
resolving-merge-conflicts
maheen-ejaz
Resolve a real Git merge or rebase conflict by preserving the intended behavior from both sides.
SkillBFreshness: BClaude Code +9 - 0.516score
wayfinder
maheen-ejaz
Create a bounded decision map for a huge, foggy effort without starting implementation.
SkillBFreshness: BClaude Code +9 - 0.516score
writing-for-agents
maheen-ejaz
Write concise agent-facing instructions with clear triggers, ownership, and completion criteria.
SkillBFreshness: BClaude Code +9 - 0.516score
grilling
maheen-ejaz
Resolve a material product or implementation decision through a one-question-at-a-time interview.
SkillBFreshness: BClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Sep 24, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/maheen-ejaz/pi-agent-config
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from maheen-ejaz
- 0.529score
bb-cli
maheen-ejaz
Use this when controlling bb.
SkillBFreshness: BClaude Code +9 - 0.526score
repo-audit
maheen-ejaz
Run an explicit user-invoked repository audit in daily, weekly, or report mode against any repository.
SkillBFreshness: BClaude Code +9 - 0.524score
tdd
maheen-ejaz
Run strict test-driven development only when the user explicitly invokes the skill using Pi's `/skill:tdd` syntax.
SkillBFreshness: BClaude Code +9 - 0.521score
infisical-credential-access
maheen-ejaz
Automatically govern credential-backed work through repository-declared Infisical runners.
SkillBFreshness: BClaude Code +9 - 0.521score
i-have-adhd
maheen-ejaz
Shape output for a reader with ADHD: lead with the next action, number multi-step work, restate state across turns, suppress tangents, give specific time…
SkillBFreshness: BClaude Code +9 - 0.521score
linear-ticket-operations
maheen-ejaz
Automatically standardize every Linear issue read, search, create, edit, comment, metadata, relation, archive, unarchive, or delete operation with…
SkillBFreshness: BClaude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get main-sync running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
main-sync skill. Agent Mart. https://agentmart.dev/skills/maheen-ejaz-main-sync (last updated 2026-10-24)