Przejdź do treści
Biblioteka skilli
Programowanie · Integracja z narzędziem

setup-repo-defaults

/setup-repo-defaults

Konfiguruje repozytorium do używania repo-defaults i sprawdza, czy konfiguracja jest kompletna.

Repozytorium
repo-defaults ↗
Licencja
MIT
Ostatnia zmiana repozytorium
09.11.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
1
Przestarzałość

Brak sygnałów. Repozytorium zmienione 09.11.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Konfiguruje repozytorium do używania repo-defaults i sprawdza, czy konfiguracja jest kompletna.

Oryginalny opis (EN)

Set up a repo to use repo-defaults, or check that a repo's setup is complete. Use when someone asks to set up, add, or adopt repo-defaults, or after repo-defaults is added as a submodule or a git dependency.

Jak działa

  1. Step 1, Add repo-defaults
  2. Step 2, Run init
  3. Step 3, Merge the config
  4. Step 4, Find the conflicts
  5. Step 5, Report
Sekcje z nagłówków SKILL.md, w oryginale · 51 linii, 894 słów
Podgląd SKILL.md
---
name: setup-repo-defaults
description: Set up a repo to use repo-defaults, or check that a repo's setup is complete. Use when someone asks to set up, add, or adopt repo-defaults, or after repo-defaults is added as a submodule or a git dependency.
---

# Set up repo-defaults

repo-defaults holds shared rules, config, checks, and skills. This skill wires them into the repo in the current directory. `SETUP.md` in repo-defaults lists every step by hand. This skill runs the steps that need no judgment with one command, then does the merges that do.

## Step 1, Add repo-defaults

If neither `repo-defaults/` nor `node_modules/repo-defaults` exists, ask which way to add it. Recommend the submodule, because edits to it can be tried in the repo right away:

```sh
git submodule add https://github.com/frolic/repo-defaults repo-defaults
git config submodule.recurse true
git config push.recurseSubmodules on-demand
```

## Step 2, Run init

Run `node repo-defaults/src/init.ts` from the repo root, or `pnpm exec init-repo-defaults` for the git dependency. It updates CLAUDE.md and AGENTS.md; links the skills; points `core.hooksPath` at the shared git hooks and adds a `prepare` script that sets it in each clone, unless the repo installs its hooks with simple-git-hooks, husky, or lefthook; writes `.claude/settings.json`; and creates a tsconfig.json if the repo has none. It prints what it did and what is left. Do each item it lists as left, as the steps below describe.

## Step 3, Merge the config

- **Format and lint.** If the repo has `vite.config.ts`, import `fmt` and `lint` from repo-defaults (`./repo-defaults/src/oxc.ts` or `repo-defaults/oxc`) and spread them under the repo's own settings, as `SETUP.md` shows. If the repo uses `.oxlintrc.json` and `.oxfmtrc.json` instead, copy the values from `src/oxc.ts` into them, and add the plugin path from `lint.jsPlugins`. Keep the repo's own rules and overrides after the shared ones, so they win.
- **tsconfig.** Make the repo's base tsconfig extend the strict preset, and keep the repo's own `target`, `lib`, `module`, and `moduleResolution`. Remove each option the preset already sets to the same value.
- **Hooks.** If the repo installs its hooks with simple-git-hooks, husky, or lefthook, init doesn't set `core.hooksPath` or add a `prepare` script, as SETUP.md explains, and undoes both if an earlier run set them. Call `sh repo-defaults/hooks/<name>` from each hook the tool installs, and keep any hook the repo already runs, such as `git lfs pre-push "$@"`. If the repo already has git hooks, init leaves them alone. Merge them into the shared ones: either call the repo's checks from package scripts and switch to `core.hooksPath`, or call `repo-defaults/hooks/<name>` from the repo's own hook.
- **Scripts.** The hooks and CI call these package scripts, and skip one the repo doesn't have. Add each one init lists as missing, using the repo's own tools:
  - `check:staged`: format and lint the staged files, such as `vp staged` or `lint-staged`.
  - `check`: format check, lint, and type-check without fixing.
  - `test:changed`: the tests the diff from `origin/main` affects, such as `vitest run --changed origin/main`.
  - `test`: the default suite that CI runs on `main`.
  - `test:full`: everything, including the slow tests that `test` leaves out.
- **Agent settings.** If the repo already had `.claude/settings.json`, add the `deny` rules from `templates/claude/settings.json` to it.
- **Prose test.** Add a test that runs `check` from `src/prose.ts` over the repo's Markdown and source, as `SETUP.md` shows. Skip `repo-defaults/`, `vendor/`, and generated files.
- **CI.** Copy `templates/github/workflows/` into `.github/workflows/`. If the repo already has workflows, change their triggers to `push` on `main`, `merge_group`, and `workflow_dispatch`, and drop `pull_request`. For the submodule, keep `submodules: true` on each `actions/checkout` step. Don't start a CI run to try it.
  - **Merge queue.** Run `gh api repos/<owner>/<repo>/rules/branches/main --jq '.[].type'`. The list covers rulesets only, so if `merge_queue` isn't in it, also check the branch protection rule for `main` on the Branches page under the repo's Settings. Without a merge queue, `merge_group` never fires, and a pull request reaches `main` without a CI run. Tell the person to add a ruleset for `main` with a merge queue that requires the Checks job, and link to the Rules page under the repo's Settings. Don't create the ruleset yourself.
  - **Deploys.** A workflow that runs on `merge_group` must not deploy: skip each deploy step with `if: github.event_name != 'merge_group'`, because a change in the queue isn't on `main` yet.
  - **Previews.** If a workflow deploys a preview of each pull request on `pull_request`, change it to `workflow_dispatch` on the pull request's branch, as workflow.md describes. Keep a `pull_request: closed` trigger that tears down the preview. Copy `templates/github/pr-buttons.yml` to `.github/pr-buttons.yml`, uncomment its Deploy PR preview button, and set its `workflow` to the deploy workflow's file name.

## Step 4, Find the conflicts

Read the repo's CLAUDE.md, AGENTS.md, and contributing docs, and compare each rule with the repo-defaults rule files. For each difference, decide which kind it is:

- **Repeat.** The repo states a rule that repo-defaults now holds. Delete it from the repo's file, because the import loads it.
- **Repo-specific.** The rule only makes sense in this repo. Keep it.
- **Conflict.** The two disagree, such as on semicolons or line width. Don't pick one. List it for the person.

Then run the repo's format, lint, type check, and tests. A new lint finding is expected where the shared rules are stricter. Count the findings for each rule, and fix them only if the person asks, because the fixes can touch many files.

## Step 5, Report

Reply with what was set up, the conflicts with a recommendation for each, and the count of new lint findings for each rule. Commit the setup as one change, separate from any lint fixes.

Wersje

W bazie nie ma innych skilli o nazwie setup-repo-defaults.

Migawka bazy z 13.11.2026 · wersja paczki 60f6e7e973d8 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100setup
    Konfiguruje komputer do pracy w zespołowym repozytorium GitHub: instaluje git i gh, loguje się i klonuje repozytorium.
  • 80cmk:repo-setup
    Konfiguruje lub sprawdza repozytorium pod kątem zestawu narzędzi devkit: wdrożenie, aktualizację lub weryfikację względem kontraktu.
  • 95setup-repo
    Konfiguruje repozytorium: deterministyczny gitignore, haki pre-commit oraz pliki REVIEW.md i CONTRIBUTE.md z zasadami przeglądu.
  • 100submodule-setup
    Konfiguruje submoduły gita i migruje gałęzie do submodułów z automatyzacją synchronizacji między wieloma repozytoriami przez GitHub Actions.
  • 95create-new-bun-package-repo
    Zakłada nowe pakiety Bun z szablonu zenobi-us/bun-module: tworzy repozytorium przez GitHub CLI, klonuje je i konfiguruje, a package.json trzeba poprawić ręcznie.
  • 90repo-setup
    Przygotowuje bazę roboczą repozytorium dla ludzi i agentów: AGENTS.md, reguły ignorowania, jedną komendę weryfikacji i skrypt worktree.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.