okhp3-replit-github-sync
Skill3 starsChanged 2 months agoMITView on GitHub
Recover and maintain safe GitHub synchronization for a Replit project. Use when Replit reports PUSH_REJECTED, cannot commit through its UI, or a project needs to pull, commit, reconcile, merge, or push changes to its GitHub default branch. Also activate for "Replit GitHub out of sync", "push rejected", "sync Replit to origin/main", or a safe branch-to-main squash merge. Do not use to force-push, discard unreviewed work, or bypass branch protection.
- Reads credentials
- Commits and pushes
In this repository57 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .agents/skills/vercel-react-best-practices/agents.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- architecture-decision-recordsSkill
- catalog-integritySkill
- frontend-designSkill
- okhp3-artifact-validationSkill
- okhp3-as-is-process-captureSkill
- okhp3-brand-style-registrySkill
- okhp3-capture-intakeSkill
- okhp3-chatgpt-project-migrationSkill
- okhp3-custom-gpt-builderSkill
- okhp3-custom-gpt-readinessSkill
- okhp3-decision-model-authoringSkill
- okhp3-elicitation-interviewsSkill
- okhp3-equilibrium-reviewSkill
- okhp3-evidence-standardSkill
- okhp3-future-state-strategySkill
- okhp3-gpt-skill-conversion-planSkill
- okhp3-graduation-gateSkill
- okhp3-handoff-packagingSkill
- okhp3-notion-capture-routerSkill
- okhp3-outcome-modeling-coreSkill
- okhp3-overkill-hill-brandSkill
- okhp3-process-captureSkill
- okhp3-process-gap-analysisSkill
- okhp3-process-intake-and-scopeSkill
- okhp3-project-promotionSkill
- okhp3-replit-build-in-publicSkill
- okhp3-replit-canvas-boardSkill
- okhp3-replit-design-pipelineSkill
- okhp3-replit-free-mode-autonomySkill
- okhp3-replit-multi-artifactSkill
- okhp3-replit-repl-janitorSkill
- okhp3-replit-repository-janitorSkill
- okhp3-replit-task-executorSkill
- okhp3-repository-janitorSkill
- okhp3-repository-organizerSkill
- okhp3-session-handoffSkill
- okhp3-skill-catalogerSkill
- okhp3-skill-discoverySkill
- okhp3-skill-foundrySkill
- okhp3-source-backed-researchSkill
- okhp3-thread-context-extractionSkill
- okhp3-thread-extract-chatgptSkill
- okhp3-thread-extract-claudeSkill
- okhp3-triage-and-fileSkill
- okhp3-vite-github-pagesSkill
- production-build-verificationSkill
- published-keyboard-recovery-checkSkill
- publish-health-checkSkill
- publishing-trigger-checkSkill
- static-route-validationSkill
- validation-smokeSkill
- vercel-react-best-practicesSkill
- web-design-guidelinesSkill
- okhp3-skill-promotionSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 6 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 47
Treat the Replit UI error as a symptom, not a diagnosis.
- Very specific: line 58
Default to origin/main only when that is the verified default branch.
- Very specific: line 90
Do not use a bare git pull because its merge/rebase behavior is host configuration-dependent.
- Distinctive: line 101
After every successful integration, fetch again and prove the result:
- Distinctive: line 117
When the host exposes a connected GitHub capability, use the connection the user has made available to inspect repository metadata, compare …
- Distinctive: line 123
Do not embed a connector ID, token, or account name in this portable package.
- Distinctive: line 135
If the checkout is merely behind and clean, fast-forward it.
- Distinctive: line 136
If the checkout has local commits as well, identify whether they are on the default branch or a feature branch and use the decision table …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
okhp3-replit-github-sync
OverKill Hill P³ · overkillhill.com · github.com/OKHP3
Replit's Git UI can be a useful surface, but it is not the source of truth when the workspace and GitHub disagree. This skill establishes the actual Git state, preserves local work, and uses an explicit integration path instead of retrying a rejected push until it happens to work.
It requires a Git checkout with an origin remote. A connected GitHub
capability is optional for hosted compare, pull-request, and merge actions;
local Git remains authoritative for the Replit working tree.
Scope
| In scope | Out of scope |
Diagnose one Replit checkout against origin | Multi-clone maintenance or branch cleanup |
| Commit reviewed local work, pull, and normally push | Force-push, history rewriting, or deleting refs |
| Prepare a branch PR and an approved squash merge | Bypassing required review or status checks |
| Verify GitHub and local branch alignment after sync | Solving merge conflicts without owner input |
Operating contract
Treat the Replit UI error as a symptom, not a diagnosis. Record the repository root, current branch, remotes, current status, and the default base ref before changing anything:
git status --short --branch git remote -v git symbolic-ref --quiet --short refs/remotes/origin/HEAD || true git log --oneline --decorate -8Default to
origin/mainonly when that is the verified default branch; do not silently substitutemainfor a repository with another default.- Inspect local changes before staging. Check for merge/rebase state,
conflict markers, credentials,
.envfiles, or generated output that is not clearly meant to be committed. Rungit diff --checkand show the intended commit scope. If the user has not authorized a commit, produce the review and proposed commit message, then stop. Fetch without pruning, then measure the relationship explicitly:
git fetch origin git rev-list --left-right --count HEAD...<base-ref> git log --oneline --left-right HEAD...<base-ref>The left count is local-only commits; the right count is remote-only commits. A
PUSH_REJECTEDnormally means the right side is non-zero. Do not retrygit push, use--force, or discard local files to make the error disappear.Choose the least-risk path from the actual state:
State Safe action Working tree clean; behind only git pull --ff-only origin <base>and verify.Local changes only; no remote-only commits Review, stage only the approved paths, commit, then git push origin <branch>.Local and remote have both advanced on the default branch Stop for an explicit integration decision. Prefer moving the local work to a feature branch and using a PR; never force-push shared history. Feature branch needs current base Fetch, then merge the base into the feature branch for a normal push, or rebase only with explicit authorization and a --force-with-leaseplan.Conflicts, detached HEAD, missing remote, or protection failure Do not guess a resolution. Report the exact state and smallest next action. Do not use a bare
git pullbecause its merge/rebase behavior is host configuration-dependent. Use--ff-onlyfor a pure update and an explicit merge or rebase decision for divergence.- For work that belongs on a non-default branch, push that branch and create or update a pull request targeting the verified base. A squash merge is a pull-request action, not a substitute for reconciling a rejected push. Immediately before an approved merge, verify the PR head SHA, target branch, approvals, and required checks. Merge only when the user authorizes that exact PR and strategy.
After every successful integration, fetch again and prove the result:
git fetch origin git status --short --branch git rev-list --left-right --count HEAD...<base-ref> git log -1 --oneline <base-ref>A clean status alone is insufficient: report the pushed or merged commit SHA, the verified target ref, and whether local
HEADmatches the intended remote ref. Run the project's relevant validation before claiming an app change is ready.
GitHub capability adapter
When the host exposes a connected GitHub capability, use the connection the
user has made available to inspect repository metadata, compare commits, read
PR/check state, create or update a PR, and perform an explicitly approved
merge. Confirm that the connector's repository and account match the local
origin before any write.
Do not embed a connector ID, token, or account name in this portable package. Those are host- and user-specific. If the connector is unavailable, perform local Git inspection and hand back the exact PR or merge action that requires a connected GitHub surface.
PUSH_REJECTED recovery
For the common error "the remote has commits that are not in the local repository":
- Preserve the working tree; do not reset, stash-drop, or force-push.
- Fetch
originand show the ahead/behind counts and commit subjects. - If the checkout is merely behind and clean, fast-forward it.
- If the checkout has local commits as well, identify whether they are on the default branch or a feature branch and use the decision table above.
- Resolve only user-approved conflicts. If this workflow started the merge or rebase and no subsequent user edits occurred, aborting that operation is a safe recovery option; otherwise stop and preserve the state for review.
- Push normally, then re-fetch and verify the remote contains the expected commit. A second rejection means stop and re-inspect rather than escalating to a force push.
Output contract
Return:
- verified repository root,
originURL, current branch, and base ref; - working-tree and ahead/behind state before any write;
- reviewed commit scope and every commit, push, PR, or merge actually made;
- the connector state used, or why hosted actions were not available;
- conflict/protection/authorization blockers and the smallest safe next step;
- post-action
git status, target-ref comparison, commit SHA, and relevant validation result.
About
Built by Jamie Hill · OverKill Hill P³ Published at github.com/OKHP3 Part of the OKHP3/skillz Agent Skill library. MIT License -- free to use, fork, and adapt. A nod to the source is appreciated.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

