macrotechtitan/macrotechtitan-replit-skills-help/replit-github-sync
Claude Code and agent skill by macrotechtitan/macrotechtitan-replit-skills-help
- community
Checking that the SKILL.md file is still in the repository.
Pull latest changes from GitHub (MacroTechTitan/optima-quant master) and rebuild the Optima Quant frontend. Use when the user asks to pull from GitHub, sync latest code, rebuild the dashboard, or says the dashboard is showing old code.
Install
npx vskill@latest install macrotechtitan/macrotechtitan-replit-skills-help/replit-github-syncSKILL.md
The same SKILL.md was published earlier as macrotechtitan/macrotechtitan-replit-skills-help/replit-github-sync.
GitHub Sync — Optima Quant
Critical Environment Facts
- No `origin` remote is configured in this Replit environment. All GitHub sync MUST go through the GitHub REST API.
- Sandbox blocks destructive git commands:
rm -f .git/index.lock,git reset --hard,git rebase,git restore, etc. will be rejected by the sandbox. - Stale lock files (
.git/index.lock) causegit statusto fail with a sandbox protection error — work around this by using the REST API approach instead of native git pull. - This is a pnpm workspace — never run
npm installinside an artifact subdirectory. Usepnpmfrom the workspace root. - Frontend runs as a Vite dev server (HMR) — there is no static
dist/build in development.npm run buildrequires aPORTenv var and is only for production deploys. Just restart the workflow after writing files. - Repo:
MacroTechTitan/optima-quant, branch:master - GitHub connection: use
listConnections('github')incode_executionto get theaccess_token.
Step-by-Step Workflow
Step 1 — Check current local state
Note the local HEAD SHA. If git status fails due to index.lock, proceed to REST API approach.
Step 2 — Get GitHub master HEAD via REST API
Run in code_execution:
Step 3 — Find changed files between local HEAD and GitHub HEAD
Run in code_execution:
If there are multiple new commits, repeat for each parent SHA.
Step 4 — Fetch and write changed files
For each changed/added file, fetch content from GitHub and write locally:
Store content in globalThis to pass between code_execution blocks.
Skip these files when pulling: .replit, replit.nix, .env, anything in client/ (if present).
Step 5 — Fix missing imports in App.tsx (if updated)
After writing App.tsx, check routes vs imports. Common gaps that GitHub may have:
SimulatorPage from "@/pages/simulator"ScannerPage from "@/pages/scanner"ApiClientsPage from "@/pages/api-clients"
Always check src/pages/ locally (ls artifacts/optima-quant/src/pages/) and ensure every page referenced in routes is imported.
Step 6 — Verify new pages exist locally; pull from GitHub if missing
If pages referenced in App.tsx don't exist locally, fetch them from GitHub (step 4 pattern).
Step 7 — Restart the frontend workflow (NOT build)
HMR picks up all file changes. No build step needed in development.
Step 8 — Confirm pages in browser
Take screenshots of:
/changelog(public, no auth)/pricing(public, no auth)/tycoon,/metatrader,/data(redirect to login — confirm no 404)
Adding origin Remote (optional, if git pull is needed)
If the sandbox git operations become available, you can add origin:
Then git fetch origin (read-only, allowed). Do NOT use `git reset --hard` — it's blocked. Instead write files manually via the REST API approach above.
Pushing Changes to GitHub
Use the REST API blob→tree→commit→PATCH pattern (see existing push scripts or code_execution history). Never use git push directly.
Common Issues & Fixes
| Symptom | Cause | Fix | |
|---|---|---|---|
git status fails with sandbox error | Stale .git/index.lock | Use REST API approach; don't try to rm the lock | |
| Routes return 404 on prod | Router not mounted in routes/index.ts | Add router.use(newRouter) and restart API workflow | |
npm install fails with catalog: error | Wrong package manager in pnpm workspace | Use pnpm --filter @workspace/optima-quant install | |
npm run build fails with PORT error | Vite requires PORT env var for build | Don't build in dev; just restart the dev server workflow | |
| New pages show login instead of content | Expected — authenticated routes require login | Confirm no 404; 302→login is correct | |
| App.tsx has undefined component errors | Missing imports for pages used in routes | Add the import lines manually before writing the file |
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingreplit-github-sync/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/macrotechtitan/macrotechtitan-replit-skills-help/replit-github-sync)