serejaris/corp-new
Use when creating, verifying, or registering a private corp-* department repository for a founder or company operating system, including local repo setup, GitHub repository creation or cloning, safe synchronization, and registration in an HQ Markdown file.
npx skills add https://github.com/serejaris/personal-corp-skills --skill corp-new
Create or verify a private corp-* department repository and register it in a local HQ Markdown file.
After approval, this skill may create a local folder, initialize git, create a private GitHub repository, clone an existing repository, commit a minimal README, push committed work, fetch from origin, and edit one HQ table row.
Stop and ask for explicit approval after the dry-run summary before any create, clone, commit, push, or HQ edit.
Resolve configuration in this order: explicit user request, environment variables, project instructions, then documented defaults.
Required values from the user or project config:
| Value | Env var | Default |
|---|---|---|
| Department label | DEPARTMENT_LABEL | ask the user |
| Department domain | DEPARTMENT_DOMAIN | ask the user |
| GitHub owner or org | GITHUB_OWNER | ask the user |
| Local repositories root | CORP_REPOS_ROOT | ~/Documents/GitHub |
| HQ Markdown file | HQ_FILE | ask the user |
| Repository prefix | REPO_PREFIX | corp- |
Optional values:
DEPARTMENT_TABLE_HEADING: heading or marker near the department table.DEPARTMENT_SLUG: explicit slug override.Ask before making changes if the department label, department domain, GITHUB_OWNER, or HQ_FILE cannot be resolved. Repositories are private by design; do not offer public visibility unless the user explicitly overrides the skill's safety model.
Before creating or editing anything:
git --version
gh auth status
gh api user --jq '.login'
test -d "$CORP_REPOS_ROOT"
test -f "$HQ_FILE"
Reject unsafe targets:
HQ_FILE;^corp-[a-z0-9][a-z0-9-]*$ unless the user explicitly overrides;Report this before the dry run:
Local folder: exists | missing | conflict
GitHub repo: exists | missing | inaccessible
HQ row: exists | missing | ambiguous
Proposed action: create | clone | register | update existing row | verify only
Before making changes, show a short summary:
Department: <Human label>
Slug: <corp-slug>
Local path: <CORP_REPOS_ROOT>/<corp-slug>
GitHub repo: <GITHUB_OWNER>/<corp-slug>
HQ file: <HQ_FILE>
HQ row: | <Human label> | `<local path>`; [GitHub](https://github.com/<GITHUB_OWNER>/<corp-slug>) | <domain> |
Stop here and ask for explicit approval. Continue only after the user approves the proposed mutations.
<REPO_PREFIX><domain> as the slug.Media, Legal, Analytics.media assets and publishing workflows.test -d "$CORP_REPOS_ROOT/$SLUG".gh repo view "$GITHUB_OWNER/$SLUG" --json name,visibility,url,sshUrl,defaultBranchRef.rg -n "$SLUG|$DEPARTMENT_LABEL" "$HQ_FILE".$CORP_REPOS_ROOT/$SLUG.gh repo create "$GITHUB_OWNER/$SLUG" --private --source "$CORP_REPOS_ROOT/$SLUG" --remote origin --push.
README.md, commit, create the private GitHub repo, and push.git -C "$CORP_REPOS_ROOT/$SLUG" fetch origin.git -C "$CORP_REPOS_ROOT/$SLUG" status --short --branch.| <Human label> | \<local path>\; GitHub | <domain> |
PRIVATE.gh repo view.When bootstrapping an empty department repo, use a small neutral README:
# <Department Name>
Owner repository for <department domain>.
## Scope
- <primary responsibility>
- <secondary responsibility>
## Source of truth
This repository owns department-specific workflows and artifacts. Cross-department routing lives in the HQ file.
Report only verified facts:
Created or verified: <GITHUB_OWNER>/<SLUG>
Visibility: PRIVATE
Local path: <path>
GitHub: <url>
Default branch: <branch>
HQ row: <exact row>
Skipped: <anything intentionally left untouched>
This skill manages department repository registration. Product claims, pricing, secrets, billing evidence, customer data, and operational runbooks belong in the appropriate owner repository and must not be copied into the HQ index.
Take serejaris/corp-new from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.