init
/init
Wpisuje do ustawień Claude Code reguły ochronne lstk, czyli odmowy i pytania o uprawnienia, na poziomie użytkownika lub projektu.
- Autor
- leanstacks ↗
- Repozytorium
- lstk ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 13.11.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 13.11.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Wpisuje do ustawień Claude Code reguły ochronne lstk, czyli odmowy i pytania o uprawnienia, na poziomie użytkownika lub projektu.
Oryginalny opis (EN)
Bootstraps lstk guardrail permission rules (deny and ask, optional allow) into Claude Code settings at user or project scope. Use when installing lstk-guardrails or when the user asks to set up, apply, or refresh guardrail settings.
Jak działa
- Steps
- Contract
Podgląd SKILL.md
---
name: init
description: Bootstraps lstk guardrail permission rules (deny and ask, optional allow) into Claude Code settings at user or project scope. Use when installing lstk-guardrails or when the user asks to set up, apply, or refresh guardrail settings.
disable-model-invocation: true
allowed-tools: Bash(node "${CLAUDE_PLUGIN_ROOT}/scripts/merge-settings.mjs" *)
---
# lstk-guardrails init
Merge the lstk-guardrails permission rules into a Claude Code `settings.json`. The script does the work. Do not edit
settings files by hand.
The hooks in this plugin are already active once it is installed. This skill adds the second layer: `deny` and `ask`
permission rules in settings, which still apply if a hook fails open.
## Steps
1. **Ask the scope.** Offer two choices:
- **user**: `~/.claude/settings.json`. Applies to every project on this machine. Once per machine.
- **project**: `.claude/settings.json` in this project. Committed, so the whole team gets the rules.
2. **Ask about the opt-in `convenience` rules.** These are `allow` rules for common read-only git, `gh`, and
`cdk synth` / `cdk diff` commands. Default to no.
3. **Preview with a dry run.** Run the script with `--dry-run`, then show the user the output, including any conflict
report.
```bash
node "${CLAUDE_PLUGIN_ROOT}/scripts/merge-settings.mjs" --scope <user|project> --project-dir "${CLAUDE_PROJECT_DIR}" --dry-run
```
Add `--include-convenience` if the user chose the convenience rules. `--project-dir` is only used for project scope.
4. **Apply on confirmation.** Ask the user to confirm. Then run the same command without `--dry-run`.
5. **Report what changed.** Say which rules were added, and that the original file was kept as `settings.json.bak`. If
the output says "No changes", say the rules were already present.
6. **Give the follow-up notes.**
- If an old `hooks` block for `protect-files` or `block-cdk-mutate` exists in `~/.claude/settings.json`, remove it.
Otherwise the hooks run twice.
- Run `/reload-plugins` or restart Claude Code if the rules do not take effect.
- Suggest adding `.claude/lstk.local.json` to `.gitignore` if the user wants personal protected-file overrides.
## Contract
- The script only adds entries to `permissions.deny`, `permissions.ask`, and (opt-in) `permissions.allow`.
- It never removes or reorders existing entries, and never touches `hooks`, `model`, `theme`, or any other key.
- It is idempotent. Running it again reports "No changes".
- It refuses to write if the existing file is not valid JSON or has the wrong types, and tells the user why.
- If the output lists conflicts, an existing `allow` rule is covered by a `deny` rule. Deny wins at runtime. The check is
best effort.
Wersje
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · leanstacks/lstk | 100 | MIT |
| CodaColaLight/nightmill | 100 | Apache-2.0 |
| userKael/rastro | 100 | MIT |
| elalfner/relevo | 100 | MIT |
| abatyuk/okf | 100 | MIT |
| duronext/jig | 100 | MIT |
| sh5623/e2e-rail | 100 | MIT |
| Calvin-LLC/skills | 100 | MIT |
| arxdsilva/ai-loops | 100 | MIT |
Migawka bazy z 13.11.2026 · wersja paczki 3551039c015b (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
- 100permission-hygiene
Diagnozuje i poprawia konfigurację uprawnień projektu Claude Code: reguły allow, ask i deny w settings.json oraz lokalne nadpisania, gdy rozrosły się lub monity są zbyt częste. - 84audit-permission-state
Scala uprawnienia ze wszystkich zakresów ustawień Claude Code w obowiązujący zestaw allow, ask i deny ze źródłem każdej reguły i wskazuje reguły odrzucane przez tryb auto. - 91update-config
Konfiguruje harness Claude Code przez settings.json: hooki dla zachowań automatycznych, uprawnienia, zmienne środowiskowe i naprawę ustawień. - 90deny-rules
Ustawia reguły odmowy uprawnień w .claude/settings.json, blokując odczyt sekretów, rm -rf, wymuszone pushe i produkcyjne hosty. - 100setperms
Ustawia uprawnienia narzędzi dla Claude Code: konfiguruje dozwolone polecenia, reguły i preferencje w katalogu .claude/. - 95localstack-deploy
Wdraża infrastrukturę do LocalStack przez Terraform, CDK, CloudFormation, SAM lub Pulumi, z poleceniami lstk i pulumilocal.