Toolverse
All skills

check-bounds-safety

by r3bl-org

Apply type-safe bounds checking patterns using Index/Length types instead of usize. Use when working with arrays, buffers, cursors, viewports, or any code that handles indices and lengths.

Installation

Pick a client and clone the repository into its skills directory.

Installation

Quick info

Author
r3bl-org
Category
Backend

About this skill

Apply type-safe bounds checking patterns using Index/Length types instead of usize. Use when working with arrays, buffers, cursors, viewports, or any code that handles indices and lengths.

How to use

  1. Zainstaluj skill w swoim katalogu .claude/skills/ poprzez sklonowanie repozytorium r3bl-org/r3bl-open-core lub skopiowanie folderu check-bounds-safety do projektu.

  2. Gdy pracujesz z kodem zawierającym dostęp do tablic, buforów lub logikę pozycjonowania kursora, poproś Claude'a o zastosowanie tego skilla. Wspomni o "sprawdzaniu granic", "bezpieczeństwie typów" lub "błędach off-by-one", aby aktywować wskazówki.

  3. Zamiast pisać kod z surowymi wartościami usize, użyj konstruktorów z biblioteki r3bl_tui: idx() dla indeksów (0-based), len() dla długości (1-based), oraz specjalizowane typy takie jak RowIndex, ColIndex, RowHeight i ColWidth.

  4. Zastosuj metody bezpiecznego porównania dostarczone przez skill, na przykład .overflows() do sprawdzenia, czy indeks przekracza długość. Unikaj surowych operatorów porównania między różnymi typami — kompilator Rusta będzie Cię chronić przed błędami kategorii.

  5. Do sprawdzania wartości zerowych używaj metody .is_zero() zamiast porównania == 0, co jest bardziej idiomatyczne i czytelne.

  6. Przed commitowaniem kodu wrażliwego na granice poproś Claude'a o przegląd, aby upewnić się, że wszystkie indeksy i długości są poprawnie typowane i porównywane.

Related skills

dotnet-backend

by anton-abyzov

.NET/C# backend developer for ASP.NET Core APIs with Entity Framework Core. Builds REST APIs, minimal APIs, gRPC services, authentication with Identity/JWT, authorization, database operations, background services, SignalR real-time features. Activates for: .NET, C#, ASP.NET

Backend
92296

seedream-image-gen

by openclaw

Generate images via Seedream API (doubao-seedream models). Synchronous generation.

Backend
6235

context-optimizer

by openclaw

Advanced context management with auto-compaction and dynamic context optimization for DeepSeek's 64k context window. Features intelligent compaction (merging, summarizing, extracting), query-aware relevance scoring, and hierarchical memory system with context archive. Logs

Backend
2964

fastapi-templates

by wshobson

Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.

Backend
327582

himalaya

by openclaw

CLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language).

Backend
35108

architecture-decision-records

by wshobson

Write and maintain Architecture Decision Records (ADRs) following best practices for technical decision documentation. Use when documenting significant technical decisions, reviewing past architectural choices, or establishing decision processes.

Backend
29130