git-repo
GitHub Repository Creation
Create new GitHub repositories by adding OpenTofu modules to the github-infrastructure repo.
Workflow
1. Gather Parameters
Collect from the user:
| Parameter | Required | Default | Notes |
|---|---|---|---|
name |
Yes | - | kebab-case, e.g. my-new-repo |
description |
Yes | - | One-line description |
visibility |
No | private |
private or public |
is_template |
No | false |
true for template repos |
default_branch |
No | main |
Branch to protect (main or master) |
extra_branches |
No | [] |
Additional branches to protect |
status_checks |
No | ["Claude Code Review", "CodeRabbit", "Lint"] |
CI checks to require |
category |
No | infer | Projects, Specs, Infrastructure, or Templates |
Category inference: name ends with -spec → Specs; ends with -template → Templates; contains infrastructure, ci-, org- → Infrastructure; else → Projects.
2. Clone to Temp Directory
WORK_DIR=$(mktemp -d)
git clone --depth 1 git@github.com:OlechowskiMichal/github-infrastructure.git "$WORK_DIR/github-infrastructure"
cd "$WORK_DIR/github-infrastructure"
git checkout -b feat/add-<repo-name>
All subsequent file operations happen inside $WORK_DIR/github-infrastructure.
3. Create Module Files
Create tofu/repositories/<repo-name>/ with three files. Use the exact templates from references/templates.md.
4. Update Root Module
tofu/main.tf — Add under the correct category comment (# Projects, # Specs, # Infrastructure, # Templates):
module "<module_name>" {
source = "./repositories/<repo-name>"
}
Module name: replace hyphens and dots with underscores, strip leading dots.
tofu/outputs.tf — Add to both repositories and branch_protections outputs under the same category:
# In repositories:
"<repo-name>" = module.<module_name>.repository
# In branch_protections:
"<repo-name>" = module.<module_name>.branch_protection
5. Commit, Push, and Create PR
cd "$WORK_DIR/github-infrastructure"
tofu -chdir=tofu fmt -recursive
git add tofu/
git commit -m "feat: add <repo-name> repository"
git push -u origin feat/add-<repo-name>
gh pr create --title "feat: add <repo-name> repository" --body "Add OpenTofu module for <repo-name>"
6. Clean Up
[ -n "$WORK_DIR" ] && [ -d "$WORK_DIR" ] && rm -rf "$WORK_DIR"
Report the PR URL to the user.
OPA Policy Requirements
CI will reject violations. These are mandatory:
vulnerability_alerts = truedelete_branch_on_merge = trueallow_merge_commit = falseallow_squash_merge = truehas_wiki = falsehas_projects = falsehas_issues = true- Branch protection with
required_status_checksandrequired_pull_request_reviews allows_force_pushes = false,allows_deletions = false- At least 1 approving review
github_branch_protection.extrablock always present (even withfor_each = toset([]))lifecycle { prevent_destroy = true }on repository resourcearchive_on_destroy = true
More from molechowski/claude-skills
res-price-compare
Polish market product price comparison: 20+ shops, shipping costs, manufacturer vs seller warranty, B2B/statutory warranty analysis, stock status, distribution chain. Export TXT/XLSX/HTML. Use when: looking for a product to buy, price comparison, where to buy cheapest. Triggers: cena, porównaj, gdzie kupić, najtaniej, sklep, price compare, best price, kup, ile kosztuje.
36doc-vault-project
Manage multi-note research projects in Obsidian vault with phased subdirectory structure (concept, research, design, implementation). Scaffold new projects, add component notes, track status, link existing research, promote topics to projects. Use when: creating a project, adding to a project, checking project status, linking research to a project, promoting a research topic to a full project. Triggers: project init, project add, project status, project link, project promote, create project, new project.
35res-deep
Iterative multi-round deep research with structured analysis frameworks. Use for: deep research on a topic, compare X vs Y, landscape analysis, evaluate options for a decision, deep dive into a technology, comprehensive research with cross-referencing. Triggers: deep research, compare, landscape, evaluate, deep dive, comprehensive research, which is better, should we use.
35doc-daily-digest
Process Obsidian daily notes: classify raw URLs and loose ideas, fetch content (X tweets, GitHub repos, web pages), run deep research on ideas, create structured vault notes, replace raw items with wikilinks. Orchestrates doc-obsidian, res-x, and res-deep skills. Use when: processing daily note links, digesting saved URLs into notes, turning ideas into research, daily note cleanup. Triggers: daily digest, process daily, daily links, triage daily, digest daily note.
35res-x
Fetch X/Twitter tweet content by URL and search X posts. Resolves tweet links that WebFetch cannot scrape. Use for: reading saved X/Twitter links, fetching tweet content from URLs, searching X for posts on a topic, batch-processing X links from notes. Triggers: x.com link, twitter.com link, fetch tweet, read tweet, what does this tweet say, X search, twitter search.
34doc-project
Update all project documentation in one pass: CLAUDE.md, AGENTS.md, README.md, SKILLS.md, CHANGELOG.md. Orchestrates doc-claude-md, doc-readme, doc-skills-md, and doc-changelog skills sequentially. Use when: project docs are stale, after major changes, initial project setup, sync all docs. Triggers: update all docs, update project docs, sync documentation, refresh docs, doc-project.
34