Org roles vs repo roles: an org member is either Owner (full control: billing, all repos, members) or Member (no access until granted on a specific repo). Keep devs as Member, not Owner.
| Setting | Where | Recommended | Why |
|---|---|---|---|
| Allow forking of private repos | Org Settings → Member privileges | Off | No use case for a closed team project |
| Pages creation | Org Settings → Member privileges | Off | Not hosting a public site through this org |
| App access requests | Org Settings → Member privileges | Members only | No outside collaborators in this setup |
| Role | Can do | Use for |
|---|---|---|
| Read | Clone/pull, view & comment | Outside viewers — not your devs |
| Triage | Manage issues/PRs, no code push | PM/QA roles |
| Write | Push code, branches, open/merge PRs | Backend & frontend devs — use this |
| Maintain | Write + some repo settings | A lead dev who isn't full admin |
| Admin | Everything incl. delete/visibility | You (org owner), for now |
Practical setup: both devs = org Member + repo role Write on the one shared repo. Nothing higher.
Dev workflow: clone repo (defaults to staging) → work in your own folder (`frontend/` or `backend/`) → commit → push directly to staging (`git push origin staging`, no feature branch or PR needed) → once staging is tested and verified, admin opens a PR from staging into main and merges it themselves.
Confirmed directly against GitHub's API: on the Free plan, GitHub blocks ALL forms of branch protection (classic rules AND Rulesets) on PRIVATE repositories — even basic force-push blocking. Returns: “Upgrade to GitHub Pro or make this repository public to enable this feature.” Applies to org-owned private repos too.
| Option | Cost | Result |
|---|---|---|
| A. Upgrade to GitHub Team | ~$4/user/month | Real enforcement: required PR + approval, blocked direct/force pushes |
| B. Stay Free, process only | $0 | No technical block — team agrees by convention only admin merges to main |
Both the org invite and the repo collaborator invite must be individually accepted by the invited person.
CLAUDE.md at the repo root.# Project: <project name> This file is read automatically by Claude Code whenever someone works in this repo. Everyone follows the same rules below. ## Branching rules - staging is the default branch and the testing stage. Devs push their work directly to staging — no personal feature branch or PR needed for this step. - main is the live/production branch. It is only updated by the admin promoting from staging via a pull request, once staging has been tested and verified to work. - Never push or merge directly into main — this is the only hard rule. The promotion to main always goes through a pull request opened and merged by the admin. - If asked to "deploy", "go live", or "merge to main" — stop and confirm with the admin first. Do not do this automatically.
CLAUDE.md is not a security control. It only influences Claude Code's own behavior when someone uses it cooperatively. It does NOT stop a human (or an AI told to ignore it) from editing/deleting CLAUDE.md itself, or from pushing straight to main directly — a Write collaborator can still technically do both on the Free plan, since there is no branch protection enforcing it. The only way to actually close that gap technically is the GitHub Team plan upgrade. Treat CLAUDE.md as a convenience for AI-assisted work, not a replacement for real branch protection. This is still not the final CLAUDE.md; it is still missing the content of this project; however, it only mentions what's required for the repo to be organized without paying for the team organization subscription
.claude/settings.json → commit this one. Shared, team-wide permission baseline..claude/settings.local.json → do NOT commit. Personal overrides, add to .gitignore.{
"permissions": {
"allow": [
"Bash(git status:*)", "Bash(git diff:*)", "Bash(git log:*)",
"Bash(git branch:*)", "Bash(git fetch:*)",
"Bash(npm install:*)", "Bash(npm run:*)", "Bash(npm test:*)"
],
"deny": [
"Bash(git push --force:*)",
"Bash(git push origin main)", "Bash(git push origin main:*)",
"Bash(git reset --hard:*)", "Bash(rm -rf:*)"
]
}
}
.claude/skills/<name>/SKILL.md--- name: promote-to-staging description: Workflow for getting finished work into the staging branch. Use when a developer has finished a feature/fix and needs it in the project. --- This skill is for the frontend and backend developers. `staging` is the testing branch — push directly to it. No personal feature branch or pull request is needed for this step. 1. Make your changes inside your own folder (`frontend/` or `backend/`). 2. Commit your changes. 3. Push directly to `staging`: `git push origin staging`. **The only hard rule: never push or merge into `main`.** That branch is admin-only — if asked to deploy, go live, or merge into `main`, refuse and say that's the admin's job, not yours.
CLAUDE.md, .claude/settings.json, and .claude/skills/ are all committed and shared. Only .claude/settings.local.json stays personal and gitignored.
gh): cli.github.com, or winget install –id GitHub.cli -egh auth login → protocol HTTPS → log in via browsergh auth refresh -h github.com -s admin:orggh repo clone <org>/<repo># Clone gh repo clone ORG/REPO project-folder # Create and push the staging branch with initial structure git checkout -b staging git add -A git commit -m "Initial structure" git push origin staging # Open a PR from staging into main gh pr create --base main --head staging --title "..." --body "..." # Set staging as the default branch gh repo edit ORG/REPO --default-branch staging # Invite a user to the org (needs admin:org scope) gh api orgs/ORG/invitations -F invitee_id=<user_id> -f role="direct_member" # Add a user as a Write collaborator on the repo gh api repos/ORG/REPO/collaborators/USERNAME -X PUT -f permission="push"