From rubio-standards
Scaffolds a new or existing repo against Rubio-Enterprises standards. Use when the user wants to bootstrap a fresh repo or adopt the standards in an existing one. After onboarding, use `/audit-standards` for ongoing compliance checks.
How this skill is triggered — by the user, by Claude, or both
Slash command
/rubio-standards:onboard-repoThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
This task list is a deliberate elaboration of spec §10.1's 4-step sketch (lines 1874–1877). The spec assumes the operator has already initialised git and created a remote; the elaboration adds a git-init fallback (step 2) and a remote-creation fallback (step 6) so `/onboard-repo` works on a fresh empty directory. The added `allowed-tools` (`git init *`, `git remote add *`, `git remote get-url *...
This task list is a deliberate elaboration of spec §10.1's 4-step sketch (lines 1874–1877). The spec assumes the operator has already initialised git and created a remote; the elaboration adds a git-init fallback (step 2) and a remote-creation fallback (step 6) so /onboard-repo works on a fresh empty directory. The added allowed-tools (git init *, git remote add *, git remote get-url *, git rev-parse *, gh repo create *) cover those steps.
Each step below corresponds to ONE shell command (or one tool call). Step 2's git-init sequence chains four commands with && and runs under Bash(bash *) (the broad permission), not the narrower Bash(git init *) etc.; the narrow permissions exist for cases where the agent issues each command separately.
Detect if the repo already has .copier-answers.yml. If yes, output a message explaining the repo is already onboarded and that /audit-standards is the appropriate next step; stop processing — do not proceed to step 2.
Detect if git rev-parse --git-dir succeeds. If not, initialise via bash -c 'git init -b main && echo "# $(basename "$PWD")" > README.md && git add README.md && git commit -m "chore: initial commit"' (one shell, runs under Bash(bash *)).
Run copier copy --vcs-ref=template/v1 gh:Rubio-Enterprises/standards . with prompted answers (project_name, archetype, tier, is_fork, is_mcp_server if archetype is ts-cli).
Per-archetype manifest bootstrap (the template no longer ships package.json / pyproject.toml per Pattern A — the audit layer owns them). The npm pkg set scripts below are not arbitrary: they mirror ${CLAUDE_PLUGIN_ROOT}/schemas/package-json.schema.json, which CI's reusable audit.yml enforces via check-jsonschema — scripts.lint + scripts.test are REQUIRED, scripts.e2e is required iff @playwright/test is a dependency, and bin is required iff rubio.is_mcp_server is true. If is_fork: true: the upstream manifest is preserved (Pattern D / _skip_if_exists) and release-please artifacts are not rendered — do NOT npm init / uv init or run the npm pkg set patch over the upstream package.json (it overwrites upstream-owned script fields); add only the missing REQUIRED scripts, and resolve any standards-file conflicts with git checkout --ours. Based on the chosen archetype:
ts-library / ts-web / ts-web-angular / ts-cli → run npm init -y, then patch with the standards-required scripts: npm pkg set scripts.lint="biome check ." scripts.test="vitest run --reporter=junit --outputFile=reports/unit/junit.xml" scripts.build="tsc -p tsconfig.json". For ts-cli / ts-web also add scripts.e2e="playwright test --reporter=junit" (ts-web-angular omits e2e — Angular consumers run e2e via their own tooling). For ts-library, set npm pkg set private=false. Add devDeps: npm install --save-dev @biomejs/biome @commitlint/cli @commitlint/config-conventional typescript vitest @vitest/coverage-v8. For ts-cli / ts-web also @playwright/test. (ts-web-angular carries the same Biome devDep set; ESLint/Prettier may coexist per the copier.yml archetype note but are not enforced by the standards floor.)ts-service → same scripts.lint / scripts.test / scripts.build + Biome devDeps as the ts-* set, but it is a long-running container-deployed service, NOT an npm CLI: do NOT set a bin field and do NOT private=false. Add scripts.e2e + @playwright/test ONLY when has_e2e=true (services with no browser surface omit e2e).py-library / py-cli / py-service → run uv init --no-readme --no-pin-python, then patch pyproject.toml to add dependency-groups.dev = ["pytest>=8", "pytest-cov>=5", "pyright>=1.1.385", "ruff>=0.7"] and [tool.pytest.ini_options] per the standards. Then run uv lock to produce uv.lock (required — check.sh errors on pyproject.toml without a lockfile).py-script → loose-scripts archetype: do NOT uv init / uv lock (a uv.lock is forbidden for py-script). Bootstrap requirements.txt + .python-version + the ruff.toml floor instead — there is no packaged project to lock.go-* / rust-* → the template still ships go.mod / Cargo.toml (these are NOT in _skip_if_exists — they're tiny declarations Copier can author; archetype-owned, not consumer-owned).deno-cli → native Deno tooling, NOT npm: do NOT npm init. The template ships deno.json; produce deno.lock via deno cache / deno task as needed. The Biome / vitest / npm devDep set does not apply.swift-mac / swift-ios / swift-mac-ios → a Swift package/app: no npm/uv bootstrap. The floor is .swiftformat + .swiftlint.yml (template-rendered) and uses_release_please=false. Skip the manifest bootstrap.content → no manifest bootstrap, and the archetype is DEFINED by the ABSENCE of a language manifest. check.sh CONTENT-NO-TOOLCHAIN (Tier-0) HARD-FAILS if any of package.json / pyproject.toml / go.mod / Cargo.toml / deno.json[c] / requirements.txt / tsconfig.json / Package.swift / *.xcodeproj is present. Do NOT npm init / uv init. If a pre-existing language manifest is present (the ground-truth skill marketplaces prd-skills / infra-skills carry a package.json + devDeps), git rm it so check.sh passes — the deliverable is the docs/marketplace content, not a toolchain. Copier defaults uses_release_please=false for content. Skip ahead to step 5.bare → no manifest bootstrap; the archetype is defined by the absence of a language toolchain. Cross-cutting files render unchanged. Skip ahead to step 5.AGENTS.md / CLAUDE.md (all archetypes). AGENTS.md is the source of truth and CLAUDE.md must be a symlink to it (check.sh AGENTS-MD-PRESENT + CLAUDE-MD-SYMLINK). Copier renders the pair and preserves the symlink via _preserve_symlinks: true, but on an EXISTING repo carrying a plain regular CLAUDE.md, copier's _skip_if_exists will NOT overwrite it — so the symlink rule fails until you reconcile it by hand: if there is no AGENTS.md, git mv CLAUDE.md AGENTS.md && ln -s AGENTS.md CLAUDE.md; if AGENTS.md is already canonical, fold any unique CLAUDE.md content into it then rm CLAUDE.md && ln -s AGENTS.md CLAUDE.md. This matches /audit-standards' CLAUDE-MD-SYMLINK remediation.
Run bash ${CLAUDE_PLUGIN_ROOT}/scripts/check.sh to verify the scaffold.
Detect if a remote origin exists (git remote get-url origin). If not: prompt the user for a target GitHub owner (default: Rubio-Enterprises) and visibility (default: --private per CLAUDE.md). Then run gh repo create <owner>/$(basename "$PWD") <visibility-flag> --source=. --remote=origin --push, substituting the confirmed visibility flag (--private, --public, or --internal). The only thing on main at this point is the seed README.md commit from step 2 — the standards-adoption work lands on the feature branch in step 7, so the NEVER-push-to-main rule is honoured.
Create branch chore/onboard-standards, git add -A, commit with message chore: adopt rubio-enterprises standards, push, and open a PR with gh pr create --base main --title "chore: adopt rubio-enterprises standards".
After scaffolding is complete and the PR is created, tell the user:
"Onboarding complete. Run /audit-standards for a full compliance check —
it covers pin-currency (WF-02/WF-03), managed-content drift (MD-NN/RP-NN),
and spec-file rules that onboarding does not verify."
NEVER:
main (always use the chore/onboard-standards branch + PR flow in step 7). The seed README.md commit from step 2 IS allowed on main because it is the bootstrap-empty-repo prerequisite for gh repo create --push in step 6.<owner> and visibility (the Rubio-Enterprises org default is --private per CLAUDE.md).Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub rubio-enterprises/standards --plugin rubio-standards