nexus-repository-setup
Mission
Create a new GitHub repository using the organization's standard template. This ensures consistent structure, CI, labels, and branch protection across all repos.
Workflow
Get the org name:
probe action show <action-id> --jsonExtract
org.github_orgfrom the output. Use this as<org>in all commands.Create the repo from the org's template:
gh repo create <org>/<repo-name> --template <org>/nexus-template --public- Use a short, descriptive repo name derived from the project title.
- Always use
--template <org>/nexus-template— never create repos from scratch.
Clone and customize:
gh repo clone <org>/<repo-name> cd <repo-name>Replace Placeholders — update all
nexus-templatereferences with the actual repo name:File Changes README.mdReplace nexus-templatewith repo name, update description.github/settings.ymlUpdate name:anddescription:docs/setup.mdUpdate references to nexus-templateskills/<repo-name>/SKILL.mdRename folder to actual repo name, update all content Update Logo:
The template includes a placeholder logo
.github/nexus-template.png. Replace it:- Temporary: Rename
nexus-template.pngto<repo-name>.pngas a placeholder - Final: Create your actual 128px PNG logo and save as
.github/<repo-name>.png - Update
README.mdto reference the correct logo file
# Rename placeholder first git mv .github/nexus-template.png .github/<repo-name>.png # Update README.md to point to <repo-name>.png- Temporary: Rename
Configure Tech Stack — fill in the TODOs for your technology stack:
File Stack-Specific Changes .github/workflows/ci.ymlUncomment/setup your toolchain (Node, Rust, Python, Go, Deno) .husky/pre-pushAdd test/build commands .github/dependabot.ymlUncomment and configure your package ecosystem .gitignoreAdd stack-specific patterns The
.husky/pre-commithook is pre-configured to enforce the Nexus commit policy (.github/nexus-commit-policy.md). Do not replace it — add stack-specific lint commands to.husky/pre-pushinstead. See references/hook-examples.md.The commit policy can be customized per repo by editing
.github/nexus-commit-policy.md. See references/commit-policy.md.Update CODEOWNERS (if needed):
Default is
@<org>/zoe. This requires the org to have a GitHub team namedzoe. Change if different ownership is required:# .github/CODEOWNERS * @<org>/<team-name>Update Documentation:
Remove template-specific files:
docs/setup.md— this is only for setting up from the template, remove after customization
Create user-facing docs in
docs/:getting-started.md— installation and first stepscommands.md— CLI commands or API referencearchitecture.md— technical architecture overviewexamples.md— usage examples
Update
docs/README.mdindex to:- Remove the link to
setup.md - Add links to your new project-specific docs
Write Repo-Specific Skill:
Replace the placeholder
skills/<repo-name>/SKILL.mdwith actual guidance:- Tech stack details
- Project architecture
- Development commands (build, test, lint)
- Agent-specific guidelines and pitfalls
Install Dependencies & Setup Hooks:
# Install your package manager dependencies npm install # or cargo, pip, go mod, etc. # Initialize husky (if using Node.js) npx husky initFirst Commit:
git add . git commit -m "chore: initial setup from nexus-template" git push -u origin mainApply Branch Protection:
After first push to
main, apply branch protection via the API (free tier — does not require paid GitHub Team plan):gh api repos/<org>/<repo-name>/branches/main/protection \ -X PUT \ -f "enforce_admins=false" \ -f "required_pull_request_reviews[required_approving_review_count]=0" \ -f "required_pull_request_reviews[dismiss_stale_reviews]=true" \ -f "required_pull_request_reviews[require_code_owner_reviews]=true" \ -f "restrictions=null" \ -f "allow_force_pushes=false" \ -f "allow_deletions=false"This sets:
- No force pushes to main
- No branch deletions
- PR required before merge
- CODEOWNERS review required (from
.github/CODEOWNERS) - Stale reviews dismissed on new pushes
- Admins can bypass (org owner override via
enforce_admins=false)
Note: This uses the branch protection endpoint available on all GitHub plans. Do NOT use rulesets (
/repos/.../rulesets) — that requires a paid GitHub Team plan.
Probe Commands
# Actions
probe action show <id> --json # Get org.github_org
# GitHub
gh repo create <org>/<name> --template <org>/nexus-template --public
gh repo clone <org>/<name>
gh api repos/<org>/<name>/branches/main/protection -X PUT ...
References
- Target structure — expected repo layout after setup
- Hook examples — pre-push examples by stack
- Commit policy — how the Nexus commit policy hook works
- Labels and inheritance — template labels and org-inherited files
Checklist
Before considering setup complete:
- Repository created from
<org>/nexus-template -
README.mdupdated with actual project name and description -
.github/settings.ymlhas correct name/description - Logo renamed from
nexus-template.png→<repo-name>.png(temp) or replaced with actual logo -
README.mdlogo reference updated -
skills/<repo>/SKILL.mdrenamed and customized -
.github/dependabot.ymlconfigured for package ecosystem -
.github/workflows/ci.ymlconfigured for tech stack -
.husky/pre-commit— commit policy hook intact (do not replace) -
.husky/pre-pushhas appropriate test/build commands -
.github/nexus-commit-policy.mdreviewed, repo-specific rules added if needed -
.gitignorehas stack-specific patterns -
docs/setup.mdremoved (template-specific) -
docs/getting-started.mdor equivalent created - Dependencies installed and
package.json/Cargo.toml/etc. configured - First commit pushed to main
- Branch protection applied
- All TODO comments in files addressed or removed
Quality
- Always use the template — never create repos from scratch.
- Replace all placeholders — no
nexus-templatereferences should remain. - Apply branch protection — do this after the first push to main.
- Keep the
tasklabel — it's required by org issue templates. - Always verify husky hooks are executable:
chmod +x .husky/*
Boundaries
- Do not write project code — this skill only sets up the repo structure.
- Do not create issues or PRs — that's for other skills.
- Do not modify the template itself — use it as-is.