Github repo setup
Practical open-source agent skills with working examples, validation, and guides for first-time users and technical operators
npx -y skills add fullREFIT/skills --skill github-repo-setupAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 11 days oldThe repository was created 11 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Repository-agnostic setup agent that clones, inspects, installs, and smoke-tests any GitHub repository using the repo's own manifests rather than assumptions. Detects language stack (Node, Python, Rust, Go, Ruby, Deno, Bun, Docker) from lockfiles, aligns toolchains via version managers (nvm, pyenv, rustup, asdf, mise), installs with the correct package manager, handles .env setup, runs a minimum smoke test, and produces structured phase reports. Optimized for macOS arm64 with Homebrew, nvm, pyenv, and 1Password CLI; branches for Linux and Windows. Use when setting up a cloned repository, evaluating a new GitHub project, reproducing an environment, or onboarding a codebase. MANDATORY TRIGGERS: github repo setup, clone and install, repo setup, set up repository, install this repo, set up this project, onboard codebase, reproduce environment, new repo, fresh repo, get this repo running, set up dev environment, repo install, universal setup, github setup.
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
12.8 KB, as published. Nobody here has run it
GitHub Repo Setup
Clone, reconnaissance, install, configure, and smoke-test any GitHub repository on the current machine. Detect what the repo provides before installing. Verify what's already present before installing fresh. Install only what's missing. Never assume.
Table of Contents
- Inputs
- Phase 0 — Preflight
- Phase 1 — Reconnaissance
- Phase 2 — Install Directory
- Phase 3 — Toolchain Alignment
- Phase 4 — Dependency Install
- Phase 5 — Environment Configuration
- Phase 6 — Smoke Test
- Phase 7 — Productionization Boundary
- Phase 8 — Final Report
- Operating Rules
- Reference Files
Inputs
Required:
- Repository URL — HTTPS or SSH GitHub URL
Optional (leave blank to auto-detect):
- Install directory override
- Branch or tag override
- Skip-phase list (comma-separated phase numbers — rarely used)
Execute the phases in order. Do not skip reconnaissance. Do not install anything before reading the repo's own instructions. If a phase fails, stop and report — do not improvise past a failure.
Phase 0 — Preflight
Detect host OS and report which branch the skill is executing on: macOS / Linux / Windows. All inline command examples in later phases assume macOS; adjust syntax for other OSes.
Run the stack detection script:
bash scripts/detect-stack.sh
If the script is unavailable, run the equivalent checks manually — see references/phase-details.md Phase 0 section for the full command list.
Output a compact table with columns: Tool | Installed? | Version. Mark missing tools with MISSING. Do not fail the phase on missing tools — later phases decide which ones matter for this repo.
Phase 1 — Reconnaissance
Do not install dependencies yet. Clone shallowly to a temp location only if the repo metadata cannot be read via the GitHub API. Prefer gh api or raw file fetches over full clones for this phase.
Read and summarize:
- README.md — what does the project do? What setup steps are documented?
- Dependency manifests —
package.json,pnpm-lock.yaml,yarn.lock,package-lock.json,pyproject.toml,requirements.txt,Pipfile,Cargo.toml,go.mod,Gemfile,composer.json,deno.json,bun.lockb - Containerization —
Dockerfile,docker-compose.yml,devcontainer.json - Task runners —
Makefile,justfile,Taskfile.yml,package.jsonscripts - Environment config —
.env.example,.env.template,.envrc,config/directory - CI hints —
.github/workflows/*.ymloften reveal the real install and test commands - Version pins —
.nvmrc,.node-version,.python-version,.tool-versions,rust-toolchain.toml - Repo-provided launchers —
scripts/,bin/, orshortcuts/folders with existing runners
Output the Recon Report using the template at assets/recon-report-template.md. Fill in every section. If a section has no content, write none detected — do not omit the section.
Decision gate: If the Recon Report's GAPS / AMBIGUITIES section contains entries that affect install or run behavior, stop and ask the user to clarify. Do not proceed with assumptions that could install the wrong toolchain.
For manifest-to-action mappings (which lockfile means which installer), read references/phase-details.md Phase 4 section.
Phase 2 — Install Directory
Determine install directory:
- If the user provided an override, use it.
- Otherwise default to
$HOME/GitHub/<owner>/<repo>on macOS/Linux,$env:USERPROFILE\GitHub\<owner>\<repo>on Windows. - If the directory exists and contains the same cloned repo (remote URL matches), run
git pullinstead of re-cloning. - If the directory exists but is a different repo or not a git repo, stop and ask — do not overwrite.
Canonical implementation:
OWNER_REPO=$(echo "$REPO_URL" | sed -E 's#.*github.com/([^/]+/[^/.]+).*#\1#')
DIR="$HOME/GitHub/$OWNER_REPO"
if [ -d "$DIR/.git" ]; then
EXISTING=$(git -C "$DIR" config --get remote.origin.url)
if echo "$EXISTING" | grep -q "$OWNER_REPO"; then
echo "Repo already cloned — pulling latest..."
git -C "$DIR" pull
else
echo "ERROR: $DIR exists but points to a different repo ($EXISTING). Stopping."
exit 1
fi
else
mkdir -p "$(dirname "$DIR")"
git clone "$REPO_URL" "$DIR"
fi
cd "$DIR"
If a branch or tag override was provided, git checkout after clone.
Phase 3 — Toolchain Alignment
Use the version pins detected in Phase 1. Prefer version managers over global installs.
.nvmrcorengines.nodein package.json →nvm install && nvm use. If nvm isn't loaded in the shell, source it first:source "$HOME/.nvm/nvm.sh"..python-versionor Python constraint in pyproject.toml →pyenv install -s <version> && pyenv local <version>.rust-toolchain.toml→ rustup auto-respects it; runrustup showto confirm..tool-versions(asdf/mise) → if asdf or mise is installed, runasdf installormise install; otherwise read the file and install each pin via its native manager.
Do not globally upgrade Node, Python, or Rust. Repo pins are project-local.
If a required language runtime is missing entirely (e.g., no Go installed but the repo needs Go), install via Homebrew on macOS (brew install go) or the official installer on Linux/Windows. Report what was installed.
For cross-platform version-manager commands and shell-sourcing edge cases, read references/phase-details.md Phase 3 section.
Phase 4 — Dependency Install
Use the package manager the lockfile specifies. Lockfile wins over README when they disagree — a repo with pnpm-lock.yaml but a README that says npm install is a README bug, not an install instruction.
Quick mapping:
| Detected | Command |
|---|---|
package-lock.json | npm ci (fall back to npm install if lockfile mismatch — report the mismatch) |
pnpm-lock.yaml | pnpm install --frozen-lockfile |
yarn.lock | yarn install --frozen-lockfile |
bun.lockb | bun install |
requirements.txt | Prefer uv pip install -r requirements.txt; fall back to python3 -m pip install -r requirements.txt if uv unavailable |
pyproject.toml (poetry) | poetry install |
pyproject.toml (uv/pep 621) | uv sync |
Pipfile | pipenv install |
Cargo.toml | cargo build (often deferred to run phase unless README says otherwise) |
go.mod | go mod download |
Gemfile | bundle install |
For Python, prefer a project-local virtualenv. If the repo doesn't define one, create .venv via uv venv or python3 -m venv .venv, then activate before installing.
For Docker-based repos with docker-compose.yml, the install step may be docker compose build — follow the README.
Full decision tree including Poetry vs uv detection, lockfile mismatch handling, and container-based workflows lives in references/phase-details.md Phase 4 section.
Phase 5 — Environment Configuration
If .env.example or .env.template exists and no .env is present, copy the template:
[ -f .env.example ] && [ ! -f .env ] && cp .env.example .env
Print the list of env vars the user needs to fill in, grouped by category (credentials, ports, feature flags). Do not generate fake values.
If op (1Password CLI) is installed, offer — but do not execute without confirmation — a templated .env.1p.tpl pattern. See references/phase-details.md Phase 5 section for the 1Password integration pattern.
Stop here if any required env var is unfilled. Do not start the app with placeholder values.
Phase 6 — Smoke Test
Run the minimum command that proves the install worked. In priority order:
npm test/pnpm test/yarn test/bun test— if a test script exists and doesn't require external servicesnpm run build/pnpm build— if the repo is a buildable appmake check/make test— if a Makefile exposes one- The repo's documented "start" command plus a health-check URL (e.g.,
curl -f http://localhost:3000/health) — only if the app starts cleanly without long-running prerequisites
If no smoke test is feasible without the user filling in secrets, say so and move on. Do not fabricate success. Sycophantic confirmation at this phase is the most common failure mode — see references/troubleshooting.md for recognition patterns.
Phase 7 — Productionization Boundary
Do not generate any of the following unless the user explicitly asks for them:
- Desktop shortcuts (
.lnk,.desktop,.app) - Windows
.batlaunchers when the repo already providespackage.jsonscripts or a Makefile - Context menu entries, Automator actions, or shell aliases
- systemd services, launchd plists, or Docker Compose overrides
README_SETUP.mdor any rewrite of the project's own documentation
These are productionization steps, not setup. They belong to user workflow preferences, not to a universal setup flow. If the user asks for them explicitly, ask which platform and which entry points, then generate — but not before.
Phase 8 — Final Report
Output the final report using the template at assets/final-report-template.md. Fill in every section honestly. "Issues encountered" should be populated with anything the agent noticed but handled non-fatally (lockfile mismatches, skipped smoke test, missing optional env vars).
Stop. Do not suggest follow-up automation. The user decides what comes next.
Operating Rules
These are invariant across all phases. Violating any one is a failure mode.
- Never install without first completing Phase 1 recon.
- Never assume a toolchain. Read the manifests.
- Never overwrite an existing
.envor clone directory. - Never fabricate test output, env values, or success messages.
- Stop on ambiguity. If the repo's setup is non-obvious, ask before guessing.
- Prefer repo-provided scripts over generating new ones. If
make devexists, use it. Do not write a.batequivalent. - Version managers over global installs. Use
nvm,pyenv,rustup,asdf,misebeforebrew install nodeorpip install --global. - Report, don't narrate. Output the structured reports at each phase. Don't explain what's about to run; run it and report the result.
Full rationale for each rule lives in references/agent-operating-rules.md.
Reference Files
| File | Purpose |
|---|---|
references/phase-details.md | Expanded per-phase guidance: stack detection details, lockfile-to-installer mapping, version manager edge cases, 1Password integration pattern |
references/troubleshooting.md | Common failure modes with recognition patterns and fixes |
references/agent-operating-rules.md | The eight operating rules with rationale and the failure mode each prevents |
scripts/detect-stack.sh | Deterministic Phase 0 preflight — produces the stack detection table |
assets/recon-report-template.md | Phase 1 output template |
assets/final-report-template.md | Phase 8 output template |
Read the appropriate reference file when deeper context is needed. Do not duplicate their content into the main workflow.