Przejdź do treści
Biblioteka skilli
Programowanie · Budowanie i kod

new-unit

/new-unit

Tworzy lub poprawia jednostkę nawyków dla języka, narzędzia lub praktyki testowej: wyzwalacze, treść, rejestrację i walidację.

Repozytorium
habits ↗
Licencja
MIT
Ostatnia zmiana repozytorium
13.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
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 13.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

Tworzy lub poprawia jednostkę nawyków dla języka, narzędzia lub praktyki testowej: wyzwalacze, treść, rejestrację i walidację.

Oryginalny opis (EN)

Use when creating or improving a habits unit: the user asks for guidance on a language, tool, framework, platform, testing practice or workflow that has no unit yet, habits suggested creating one, or an existing unit needs work. Covers choosing triggers, what to write, and registering and validating the unit.

Jak działa

  1. 1. Find where units live
  2. 2. Scope it
  3. 3. Choose the triggers
  4. 4. Write the content
  5. 5. Register and check it
Sekcje z nagłówków SKILL.md, w oryginale · 69 linii, 619 słów
Podgląd SKILL.md
---
name: new-unit
description: >
  Use when creating or improving a habits unit: the user asks for guidance on a language, tool, framework, platform,
  testing practice or workflow that has no unit yet, habits suggested creating one, or an existing unit needs work.
  Covers choosing triggers, what to write, and registering and validating the unit.
---

# Creating a habits unit

A unit is one small file of professional guidance for one technology, which habits injects only when a project uses that technology. Getting the triggers and the content right is what makes it useful.

## 1. Find where units live

Units are the `units/<category>/<id>.md` files in the habits plugin. The plugin root was given at session start, and `habits` on the PATH runs the CLI.

- Check the root is a git working copy (`git -C <root> rev-parse --show-toplevel`). If it's an installed copy under `~/.claude/plugins/cache/`, an update would overwrite your edit. Tell the user to clone the habits repo and install from that folder (`claude plugin marketplace add <folder>`), then work there.
- Run `habits units` to see what exists. Improve an existing unit rather than adding a near-duplicate.

## 2. Scope it

- One technology per unit, named in one or two lowercase words joined by a hyphen: `swift`, `gradle`, `spring-boot`, `docker-compose`. Never a combination like `kotlin-gradle`; those are two units that load together.
- Categories: `languages`, `tools` (build tools, CLIs, package managers), `frameworks`, `platforms`, `testing`, `workflows` (processes like OpenSpec). Add a category folder only when none fits.
- The file name is the id.

## 3. Choose the triggers

A unit should load in every session that needs it, and in no other. Use as many triggers as fit:

- `paths`: globs of the technology's own files: its source extension (`**/*.swift`) and its config files (`**/Package.swift`, `**/docker-compose.y{a,}ml`). Avoid globs another unit already owns: check `habits units`.
- `commands`: the CLI names someone runs when using it (`docker compose`, `xcodebuild`). Command prefixes match word by word, after stripping `cd …&&`, env assignments and `sudo`.
- `markers`: only for project-level workflows that should load at session start (`openspec/specs`). Relative globs without `{}`; add `*/…` variants for monorepos.
- `lsp`: the language server plugin id, if an official one exists (`<name>-lsp@claude-plugins-official`).
- `script`: only when the guidance must be computed from the project, like the OpenSpec spec index. A Python script next to the unit; it gets `{"cwd", "root"}` as JSON on stdin and prints text.

## 4. Write the content

Write for a strong developer who already knows the language but not the conventions. Every line is read in every session that loads the unit, so each must earn its place.

Include:
- The official style guide or conventions, linked in the first line, and the points from it that are most often gotten wrong.
- Idioms that separate professional code from merely working code.
- Concrete pitfalls, with the correct alternative.
- How to build, test and verify narrowly (exact commands), and what to gitignore.

Leave out:
- General programming advice, and anything already covered by the `hygiene`, `secrets`, `dependencies` or `errors` skills.
- Facts about a single project; those belong in that project's CLAUDE.md or OpenSpec config.
- Tutorials and explanations of basics.

Format: a first line naming the technology and its style guide, then short sections (`Style`, `Idioms`, `Pitfalls`, `Verify`, or whatever fits) of terse imperative bullets. Aim for 20 to 45 lines.

```markdown
---
id: swift
title: Swift
paths: ["**/*.swift"]
lsp: swift-lsp@claude-plugins-official
---
Swift. Follow the Swift API Design Guidelines (swift.org/documentation/api-design-guidelines).

Style
- …
```

## 5. Register and check it

There is no registry to edit: the file's location registers it. Then:

1. `habits validate`: fix every error and warning.
2. `habits units`: confirm the triggers read as intended.
3. `habits status <a project that uses the technology>`: the unit should be listed with matching files, and nothing unrelated should match.
4. `habits load <id>`: read it the way Claude will receive it.

Commit with the commit skill (`feat(units): add <id> unit`). Don't push unless the user asks.

Wersje

RepozytoriumWynikLicencja
Ta strona · e-reitbauer/habits100MIT
yoebuild/yoe100Apache-2.0

Migawka bazy z 13.11.2026 · wersja paczki 6d8cef66f023 (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

  • 86units
    Wczytuje, wyświetla i sprawdza jednostki nawyków oraz pokazuje, które wskazówki dotyczą bieżącego projektu.
  • 100unit-testing
    Pisze i aktualizuje testy jednostkowe dla nowego lub zmienionego kodu, uruchamia je z pokryciem i naprawia błędy.
  • 100create-unit-test
    Pisze lub refaktoryzuje testy jednostkowe według kanonicznego wzorca projektu, także ujednolicając istniejące.
  • 90testing-strategy
    Obejmuje testy jednostkowe, integracyjne i e2e z TDD, poprawę pokrycia oraz konfigurację infrastruktury testowej, z użyciem jest, vitest i mocków.
  • 90build-unit
    Realizuje jedną jednostkę zaplanowanej budowy dokładnie według pliku specyfikacji, sprawdza ją na liście kontrolnej i aktualizuje tracker.
  • 100audit-unit
    Przegląda unit pod kątem poprawności, kompletności i jakości oraz sprawdza zgodność z dobrymi praktykami i typowymi problemami.

Uwagi i zgłoszenia

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