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

hashiiiii-zig

/hashiiiii-zig

Pomaga pisać, edytować i przeglądać implementację w Zig, testy, pliki budowania i konfigurację CI.

Repozytorium
rules-for-ai ↗
Licencja
MIT
Ostatnia zmiana repozytorium
19.10.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
2
Przestarzałość

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

Pomaga pisać, edytować i przeglądać implementację w Zig, testy, pliki budowania i konfigurację CI.

Oryginalny opis (EN)

Use when writing, editing, or reviewing Zig implementation, tests, build files, or CI.

Jak działa

  1. Structure
  2. Implementation
  3. Tests
  4. Build and CI
Sekcje z nagłówków SKILL.md, w oryginale · 55 linii, 508 słów
Podgląd SKILL.md
---
name: hashiiiii-zig
description: Use when writing, editing, or reviewing Zig implementation, tests, build files, or CI.
---

# Zig

Write the smallest implementation that preserves the required behavior.
Use the project's Zig version. Read a few matching examples in that version's standard library before choosing syntax or APIs.

## Structure

- Keep unit tests in the implementation file: tests for `src/parser.zig` belong in `src/parser.zig`.
- Put end-to-end tests in `e2e/` at the repository root. Exercise real public API flows.
- Use `src/root.zig` for library exports and `src/main.zig` for executables.
- Ensure the test root references files containing tests; Zig does not discover every source file automatically.

## Implementation

- Prefer concrete types, `const`, inferred `.{ ... }` literals, `struct`, `enum`, `union(enum)`, and exhaustive `switch`.
- Use ordinary functions and runtime loops when they express the behavior directly.
- Prefer file imports within a module, such as `@import("parser.zig")`. Use named imports for separate module dependencies.
- Use `comptime` or `inline` when evaluation must happen at compile time. Use `anytype` or reflection for necessary type-dependent code.
- Propagate errors with `try`; use `catch` for recovery or translation. Reserve `unreachable` for proven invariants.
- Use `defer` for cleanup and `errdefer` for error returns. A failure returned as a union value does not run `errdefer`.
- Accept allocators explicitly. Store resource owners by value unless retained pointers or allocator handles require a stable address.
- Make owned and borrowed slices clear. Copy retained input when the result must outlive it.
- Use `undefined` only for storage initialized before reading. Add casts only when inference or representation requires them.

## Tests

- Keep or add tests only when at least 80% confident they are necessary. Remove lower-confidence tests and add missing necessary ones.
- Judge user impact, regression risk, and overlap with other tests. The threshold concerns necessity, not code coverage.
- Use native `test` blocks and `std.testing` expectations. Name the concrete behavior being checked.
- Assert public behavior, not private layout or dependencies' own guarantees.
- Write each test from setup to assertion. Keep inputs and expected values literal and setup local.
- Avoid shared fixtures, computed expectations, and case-table loops that make readers reconstruct the behavior.
- Explain why the behavior matters in comments. Use real dependencies; never use mocks or stubs.
- For allocations, use `std.testing.allocator` and release owned resources with `defer`.

```zig
test "parse rejects duplicate modifiers" {
    // Duplicate modifiers can hide configuration mistakes.
    try std.testing.expectError(error.InvalidKey, KeySpec.parse("Ctrl+Ctrl+x"));
}
```

## Build and CI

- Keep `build.zig` direct. Run unit and end-to-end tests through `zig build test`.
- Give tests a separate module when their imports would add dependencies or generators to consumer builds.
- After changing module wiring, build a small real consumer and inspect its dependency steps.
- Include source paths used by the distributed build in `build.zig.zon` `.paths`, including `e2e/` when present.
- Run `zig fmt --check` on changed Zig paths and `zig build test` with the project's toolchain.
- Check Debug and ReleaseSafe when changing ownership or error paths.
- Keep CI jobs for distinct risks. Avoid duplicate push and pull-request runs for the same change.

References: [Zig sources](https://codeberg.org/ziglang/zig), [Readable Test Code](https://speakerdeck.com/jnchito/number-vstat).

Wersje

W bazie nie ma innych skilli o nazwie hashiiiii-zig.

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

  • 96zig-best-practices
    Wspiera czytanie i pisanie plików Zig: .zig, build.zig i build.zig.zon.
  • 95zig
    Implementuje, debuguje, przegląda, migruje i optymalizuje kod w Zig oraz systemy budowania.
  • 100zig
    Prowadzi przez język Zig: pisanie kodu, zakładanie projektów, migracje między wersjami i przegląd przepływów pracy.
  • 100zig-build-system
    Pomaga pisać i naprawiać pliki build.zig w wieloplikowych projektach Zig: dodaje programy, biblioteki, źródła C, opcje i manifest zależności.
  • 100zig-build-system
    Pomaga pisać i naprawiać build.zig: pliki wykonywalne, biblioteki, moduły, źródła C, opcje budowania, kroki testów, kroki własne i zależności build.zig.zon.
  • 100zig-build-system
    Pomaga pisać i debugować pliki build.zig, dodawać pliki wykonywalne i biblioteki oraz zarządzać manifestami build.zig.zon.

Uwagi i zgłoszenia

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