Typescript Advanced Types
rolling-scopes/rsschool-app
Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for building type-safe applications.
Apply type-safe bounds checking patterns using VPIndex/VPLength types instead of usize.
$ npx skills add r3bl-org/r3bl-open-core --skill check-bounds-safety -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install r3bl-org/r3bl-open-core check-bounds-safety --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/r3bl-org/r3bl-open-core.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/check-bounds-safety .claude/skills/check-bounds-safety && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "check-bounds-safety" agent skill from https://github.com/r3bl-org/r3bl-open-core/tree/main/.agents/skills/check-bounds-safety into .claude/skills/check-bounds-safety/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "check-bounds-safety", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/r3bl-org/r3bl-open-core/tree/main/.agents/skills/check-bounds-safetyType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add r3bl-org/r3bl-open-core --skill check-bounds-safety -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install r3bl-org/r3bl-open-core check-bounds-safety --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/r3bl-org/r3bl-open-core.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/check-bounds-safety .agents/skills/check-bounds-safety && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "check-bounds-safety" agent skill from https://github.com/r3bl-org/r3bl-open-core/tree/main/.agents/skills/check-bounds-safety into .agents/skills/check-bounds-safety/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "check-bounds-safety", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add r3bl-org/r3bl-open-core --skill check-bounds-safety -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install r3bl-org/r3bl-open-core check-bounds-safety --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/r3bl-org/r3bl-open-core.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/check-bounds-safety .cursor/skills/check-bounds-safety && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "check-bounds-safety" agent skill from https://github.com/r3bl-org/r3bl-open-core/tree/main/.agents/skills/check-bounds-safety into .cursor/skills/check-bounds-safety/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "check-bounds-safety", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/r3bl-org/r3bl-open-core.git --path .agents/skills/check-bounds-safety--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add r3bl-org/r3bl-open-core --skill check-bounds-safety -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install r3bl-org/r3bl-open-core check-bounds-safety --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/r3bl-org/r3bl-open-core.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/check-bounds-safety .gemini/skills/check-bounds-safety && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "check-bounds-safety" agent skill from https://github.com/r3bl-org/r3bl-open-core/tree/main/.agents/skills/check-bounds-safety into .gemini/skills/check-bounds-safety/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "check-bounds-safety", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install r3bl-org/r3bl-open-core check-bounds-safetyInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add r3bl-org/r3bl-open-core --skill check-bounds-safety -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/r3bl-org/r3bl-open-core.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/check-bounds-safety .github/skills/check-bounds-safety && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "check-bounds-safety" agent skill from https://github.com/r3bl-org/r3bl-open-core/tree/main/.agents/skills/check-bounds-safety into .github/skills/check-bounds-safety/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "check-bounds-safety", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add r3bl-org/r3bl-open-core --skill check-bounds-safety -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install r3bl-org/r3bl-open-core check-bounds-safety --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/r3bl-org/r3bl-open-core.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/check-bounds-safety .opencode/skills/check-bounds-safety && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "check-bounds-safety" agent skill from https://github.com/r3bl-org/r3bl-open-core/tree/main/.agents/skills/check-bounds-safety into .opencode/skills/check-bounds-safety/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "check-bounds-safety", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
check-bounds-safetyApply type-safe bounds checking patterns using VPIndex/VPLength types instead of usize.
Check Bounds Safety is an agent skill from r3bl-org/r3bl-open-core. Apply type-safe bounds checking patterns using VPIndex/VPLength types instead of usize. Use when working with arrays, buffers, cursors, viewports, or any code that handles indices and lengths.
Its SKILL.md is about 4.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `decision-trees.md`).
It sits in Development, covering Type safety. The repository describes itself as: TUI framework and developer productivity apps in Rust 🦀. The licence is Apache-2.0.
5 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 89db352. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are rust).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Check Bounds Safety loads about 4.1k tokens when it runs. Until then it costs about 53 tokens; SKILL.md has 878 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from r3bl-org/r3bl-open-core at commit 89db352, republished under its Apache-2.0 licence (© r3bl-org). 878 words, ~4,069 tokens.
.claude/skills/check-bounds-safety/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.Raw usize values are ambiguous and error-prone:
// ❌ Bad - What is `x`? Index or length?
let x = 10_usize;
if x < length { // Off-by-one error waiting to happen
buffer[x]
}
// Is this an index (0-based) or a length (1-based)?
// The type system can't help us!Use type-safe wrappers from tui/src/core/coordinates/bounds_check/:
// ✅ Good - Types make it clear
use r3bl_tui::{vp_idx, vp_len, ArrayBoundsCheck};
let index = vp_idx(10); // Clearly an index (0-based)
let length = vp_len(100); // Clearly a length (1-based)
if index.overflows(length) {
// Safely caught! Can't accidentally compare incompatible types
}Follow these principles when working with indices and lengths:
Use Index types (0-based) instead of usize
VPRow, VPCol, VPIndexrow(), col(), vp_idx()Use Length types (1-based) instead of usize
VPHeight, VPWidth, VPLengthheight(), width(), vp_len()Type-safe comparisons
VPRow with VPWidth (compile error!)Use .is_zero() for zero checks
== 0Distinguish navigation from measurement
index - offset → index): Moving backward in position spaceindex.distance_from(other) → length): Calculating distance between positions- for cursor movement, use distance_from() for calculating spansuse std::ops::Range;
use r3bl_tui::{
// Traits
ArrayBoundsCheck, CursorBoundsCheck, ViewportBoundsCheck,
RangeBoundsExt, RangeConvertExt, RangeExt, IndexOps, LengthOps,
// Status enums
ArrayOverflowResult, CursorPositionBoundsStatus,
RangeValidityStatus, RangeBoundsResult,
// Type constructors
col, row, width, height, vp_idx, vp_len,
// Terminal delta types (relative cursor movement)
TermRowDelta, TermColDelta, term_row_delta, term_col_delta,
};| Use Case | Trait | Key Method | When to Use |
|---|---|---|---|
| Array access | ArrayBoundsCheck | index.overflows(length) | Validating buffer[index] access (index < length) |
| Cursor positioning | CursorBoundsCheck | length.check_cursor_position_bounds(pos) | Text editing where cursor can be at end (index <= length) |
| Viewport visibility | ViewportBoundsCheck | index.check_viewport_bounds(start, size) | Rendering optimization (is content on-screen?) |
| Range validation | RangeBoundsExt | range.check_range_is_valid_for_length(len) | Iterator bounds, algorithm parameters |
| Range membership | RangeBoundsExt | range.check_index_is_within(index) | VT-100 scroll regions, text selections |
| Range conversion | RangeConvertExt | inclusive_range.to_exclusive() | Converting VT-100 ranges for Rust iteration |
| Slice indexing | RangeExt | range.as_usize_range() | Converting strongly-typed index ranges into raw [usize] ranges for slice indexing |
| Relative movement | TermRowDelta/TermColDelta | TermRowDelta::new(n) returns Option | ANSI cursor movement preventing CSI zero bug |
Use ArrayBoundsCheck when validating buffer access.
use r3bl_tui::{idx, len, ArrayBoundsCheck, ArrayOverflowResult};
let buffer_length = len(100);
let index = idx(50);
match index.overflows(buffer_length) {
ArrayOverflowResult::Within => {
// Safe to access: buffer[50]
let value = buffer[index.value()];
}
ArrayOverflowResult::Overflows => {
// Out of bounds! Handle error
eprintln!("Index {} overflows buffer length {}", index, buffer_length);
}
}Mathematical law:
0 <= index < lengthindex < length (since Index is always >= 0)Use CursorBoundsCheck for text cursor positioning.
use r3bl_tui::{idx, len, CursorBoundsCheck, CursorPositionBoundsStatus};
let text_length = len(10); // Text has 10 characters
let cursor = idx(10); // Cursor at position 10 (after last char)
match text_length.check_cursor_position_bounds(cursor) {
CursorPositionBoundsStatus::Within => {
// Valid! Cursor CAN be at position 10 (after char 9)
// User can insert text here
}
CursorPositionBoundsStatus::Overflows => {
// Invalid cursor position
}
}Mathematical law:
0 <= position <= lengthlength (after the last character)Key difference from array access:
index < length (strict inequality)index <= length (includes equality)Use ViewportBoundsCheck to optimize rendering.
use r3bl_tui::{idx, len, ViewportBoundsCheck};
let line_index = idx(150); // Line 150 in document
let viewport_start = idx(100); // Viewport starts at line 100
let viewport_size = len(50); // Viewport shows 50 lines
if line_index.check_viewport_bounds(viewport_start, viewport_size) {
// Line 150 is visible (100 <= 150 < 150)
// Render this line
} else {
// Line is off-screen, skip rendering
}Mathematical law:
viewport_start <= index < viewport_start + viewport_sizeUse RangeBoundsExt to validate range boundaries.
use r3bl_tui::{len, RangeBoundsExt, RangeValidityStatus};
let buffer_length = len(100);
let range = 10..50; // Want to process elements 10-49
match range.check_range_is_valid_for_length(buffer_length) {
RangeValidityStatus::Valid => {
// Range is valid for this buffer
for i in range {
process(buffer[i]);
}
}
RangeValidityStatus::Invalid(reason) => {
eprintln!("Invalid range: {}", reason);
}
}Use RangeBoundsExt to check if index is within a range.
use r3bl_tui::{idx, RangeBoundsExt};
// VT-100 scroll region: lines 5-15
let scroll_region = 5..=15; // Inclusive range
let cursor_row = idx(10);
if scroll_region.check_index_is_within(cursor_row) {
// Cursor is within scroll region
// Apply scroll behavior
} else {
// Cursor outside scroll region
}Use RangeConvertExt to convert inclusive to exclusive ranges.
use r3bl_tui::RangeConvertExt;
// VT-100 uses inclusive ranges: 1..=10 means lines 1 through 10
let vt100_range = 1..=10;
// Rust iterators use exclusive ranges: 1..11
let rust_range = vt100_range.to_exclusive();
// Now can use in Rust iteration
for line in rust_range {
process_line(line);
}Use - for navigation (moving cursor), distance_from() for measurement (calculating spans).
use r3bl_tui::{row, height, RowIndex, RowHeight};
// Navigation: Move cursor backward by offset (returns RowIndex).
let cursor_pos = row(10);
let new_pos = cursor_pos - row(3); // row(7) - moved 3 positions back
// Uses saturating subtraction: row(2) - row(5) = row(0), not overflow
// Measurement: Calculate distance between two positions (returns RowHeight).
let start = row(5);
let end = row(15);
let distance: RowHeight = end.distance_from(start); // height(10) - 10 rows apart
// Panics if start > end (negative distance)When to use which:
- operatordistance_from()Use TermRowDelta/TermColDelta for relative cursor movement in ANSI sequences.
The CSI zero problem: ANSI cursor movement commands interpret parameter 0 as 1:
CSI 0 A (CursorUp with n=0) moves cursor 1 row up, not 0CSI 0 C (CursorForward with n=0) moves cursor 1 column right, not 0Solution: TermRowDelta and TermColDelta wrap NonZeroU16 internally, making zero-valued
deltas impossible to represent. Construction is fallible:
use r3bl_tui::{TermRowDelta, TermColDelta, CsiSequence};
use std::io::Write;
// Calculate cursor movement from position on 80-column terminal.
let position: u16 = 240; // 240 chars from start
let term_width: u16 = 80;
// Fallible construction - must handle the None case.
// For position 240: rows = 3 (Some), cols = 0 (None).
if let Some(delta) = TermRowDelta::new(position / term_width) {
// delta is guaranteed non-zero, safe to emit
term.write_all(CsiSequence::CursorDown(delta).to_string().as_bytes())?;
}
if let Some(delta) = TermColDelta::new(position % term_width) {
// This branch is NOT taken for position 240 (cols = 0)
// Zero cannot be represented, so the bug is prevented at the type level!
term.write_all(CsiSequence::CursorForward(delta).to_string().as_bytes())?;
}Using the ONE constant for common case:
use r3bl_tui::{TermRowDelta, TermColDelta, CsiSequence};
// For the common case of moving exactly 1 row/column, use the ONE constant.
// This avoids the need for fallible construction or unwrap().
let up_one = CsiSequence::CursorUp(TermRowDelta::ONE);
let right_one = CsiSequence::CursorForward(TermColDelta::ONE);Mathematical law:
NonZeroU16 wrappernew() returns None for zero, Some(delta) for non-zeroKey difference from absolute positioning:
TermRow/TermCol: 1-based absolute coordinates (for CursorPosition)TermRowDelta/TermColDelta: Relative movement amounts (for CursorUp/Down/Forward/Backward)Use RangeExt to convert strongly-typed index ranges into primitive usize ranges for slice indexing.
use r3bl_tui::{vp_idx, RangeExt};
let index_range = vp_idx(2)..vp_idx(5); // Range<VPIndex>
// Convert to standard Range<usize> cleanly:
for item in &mut buffer[index_range.as_usize_range()] {
process(item);
}Supported range types:
Range<I> (e.g. start..end)RangeInclusive<I> (e.g. start..=end)RangeFrom<I> (e.g. start..)RangeTo<I> (e.g. ..end)See the accompanying decision-trees.md file for flowcharts showing which trait to use for
each scenario.
For comprehensive documentation, decision trees, and more examples, see:
tui/src/core/units/bounds_check/mod.rs
This module contains:
// Bad - ambiguous types
let index: usize = 10;
let length: usize = 100;
if index < length { // Works, but no type safety
// ...
}Fix:
// Good - clear types
let index = idx(10);
let length = len(100);
if !index.overflows(length) { // Type-safe!
// ...
}// Bad - cursor can be at end!
let cursor = idx(10);
let text_length = len(10);
if cursor.overflows(text_length) { // Wrong! Cursor at end is valid
return Err("Invalid cursor");
}Fix:
// Good - cursor bounds check
if text_length.check_cursor_position_bounds(cursor) == CursorPositionBoundsStatus::Overflows {
return Err("Invalid cursor");
}// Bad - this won't compile (good!)
let row = row(5);
let width = width(10);
if row < width { // Compile error! Can't compare VPRow with VPWidth
// ...
}This is actually GOOD - the type system prevents nonsensical comparisons!
- when you need distance// Bad - using subtraction to calculate distance.
// This returns VPRow, not VPHeight!
let current_row = row(5);
let target_row = row(15);
let rows_to_scroll = target_row - current_row; // Returns row(10), a position!Fix:
// Good - use distance_from() for measurement.
let rows_to_scroll: VPHeight = target_row.distance_from(current_row); // height(10)// Bad - CSI 0 C moves 1 column right, not 0!
// This won't even compile now - CursorForward requires TermColDelta, not u16!
let cols = position % term_width; // Could be 0!
let seq = CsiSequence::CursorForward(cols); // Compile error!Fix:
// Good - use fallible delta construction (zero is unrepresentable)
if let Some(delta) = TermColDelta::new(position % term_width) {
// delta is guaranteed non-zero
term.write_all(CsiSequence::CursorForward(delta).to_string().as_bytes())?;
}
// No sequence emitted when cols = 0 (correct behavior - branch not taken)When applying bounds checking:
This skill includes additional reference material:
decision-trees.md - Visual decision trees and flowcharts for choosing the right bounds checking approach: main decision tree (which trait?), array vs cursor bounds comparison, index vs length visual diagrams, viewport visibility flowchart, range validation flowchart, comparison table, edge case reference, and quick reference card. Read this when:check-code-quality - Includes testing bounds-checking codewrite-documentation - For documenting bounds-checking logicNo dedicated command, but used throughout the codebase for safe index/length handling.
tui/src/core/units/bounds_check/mod.rstui/src/core/units/tui/src/core/units/bounds_check/tests/tui/src/core/coordinates/vt_100_ansi_coords/term_row_delta.rs and term_col_delta.rs© r3bl-org, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 1 other file in .agents/skills/check-bounds-safety of r3bl-org/r3bl-open-core.
Open the folder on GitHubat commit 89db352
Check Bounds Safety next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Check Bounds Safety this skillr3bl-org/r3bl-open-core | 485 | — | ~4.1k | Automated safety check: Pass | Apache-2.0 | |
| Typescript Advanced Typesrolling-scopes/rsschool-app | 10k | 25 repos | ~4.2k | Automated safety check: Pass | MPL-2.0 | |
| Minimizing Ty Ecosystem Changesastral-sh/ruff | 50k | — | ~4.6k | Automated safety check: Pass | MIT | |
| RTK Rust Design Patternsrtk-ai/rtk | 83k | — | ~1.9k | Automated safety check: Pass | Apache-2.0 | |
| Kedro Babysitkedro-org/kedro | 11k | — | ~4k | Automated safety check: Pass | Custom licence | |
| Dignified Python Standardsdocling-project/docling | 69k | — | ~1.5k | Automated safety check: Pass | Apache-2.0 |
rolling-scopes/rsschool-app
Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for building type-safe applications.
astral-sh/ruff
A skill your agent uses when a user says "minimize this ty ecosystem change", "reproduce this ecosystem result", "investigate a primer difference", "investigate a mypyprimer difference"…
rtk-ai/rtk
Describes seven Rust design patterns for the RTK CLI filter modules, with when to use each, RTK examples, and notes on when a pattern is overkill.
kedro-org/kedro
Run Kedro's local lint / format / type-check / tests on changed files (uses the project's pre-commit hooks, ruff, mypy, pytest, lint-imports, detect-secrets, Make targets — in the right venv), or…
docling-project/docling
Applies opinionated production Python conventions chosen by the project's Python version: modern type syntax, pathlib, explicit checks and interface guidance.
wevm/wagmi
Walks through adding a Wagmi feature across its layers: a Viem-based core action, TanStack Query options, and React and Vue bindings.
r3bl-org/r3bl-open-core
Analyze log files by stripping ANSI escape sequences first. An agent skill from r3bl-org/r3bl-open-core.
r3bl-org/r3bl-open-core
Establish performance baselines and detect regressions using flamegraph analysis.
r3bl-org/r3bl-open-core
Publish a crate release to crates.io with changelog, standalone release notes, git tag, and GitHub release.
r3bl-org/r3bl-open-core
Apply private modules with public re-exports (barrel export) pattern for clean API design.
r3bl-org/r3bl-open-core
Run comprehensive Rust code quality checks including compilation, linting, documentation, and tests.
r3bl-org/r3bl-open-core
Audit and verify test coverage for a specific file or module, ensuring all custom logic branches, state transitions, and boundary conditions are covered while strictly eliminating dependency test…
Categories
Apply type-safe bounds checking patterns using VPIndex/VPLength types instead of usize. Check Bounds Safety is an agent skill from r3bl-org/r3bl-open-core. Apply type-safe bounds checking patterns using VPIndex/VPLength types instead of usize.
Check Bounds Safety fits situations like: working with arrays; any code that handles indices and lengths.
Run `npx skills add r3bl-org/r3bl-open-core --skill check-bounds-safety -a claude-code`. Or copy the skill folder (.agents/skills/check-bounds-safety in r3bl-org/r3bl-open-core) into .claude/skills/check-bounds-safety in your project. Claude Code loads it when a task matches its description.
Run `npx skills add r3bl-org/r3bl-open-core --skill check-bounds-safety -a codex`. Or copy the skill folder (.agents/skills/check-bounds-safety in r3bl-org/r3bl-open-core) into .agents/skills/check-bounds-safety in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add r3bl-org/r3bl-open-core --skill check-bounds-safety -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/check-bounds-safety, .gemini/skills/check-bounds-safety, .github/skills/check-bounds-safety and .opencode/skills/check-bounds-safety in your project.
SKILL.md names no scripts, command-line tools or credentials: Check Bounds Safety is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Check Bounds Safety is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 4.1k tokens (SKILL.md is roughly 16k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Check Bounds Safety: Typescript Advanced Types (rolling-scopes/rsschool-app, 10k stars), Minimizing Ty Ecosystem Changes (astral-sh/ruff, 50k stars), RTK Rust Design Patterns (rtk-ai/rtk, 83k stars) and Kedro Babysit (kedro-org/kedro, 11k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
r3bl-org (a GitHub organization) maintains it in r3bl-org/r3bl-open-core, which has 485 GitHub stars. The repository holds 25 skills in this directory. The repository was last updated on October 9, 2026.
Source: r3bl-org/r3bl-open-core on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.