Agent skill

Design Philosophy

by r3bl-org in r3bl-org/r3bl-open-core

Core design principles for the codebase - cognitive load, progressive disclosure, type safety, abstraction worth.

Apache-2.0Auto-check passedDevelopment

Install Design Philosophy

skills CLI
$ npx skills add r3bl-org/r3bl-open-core --skill design-philosophy -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install r3bl-org/r3bl-open-core design-philosophy --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ 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/design-philosophy .claude/skills/design-philosophy && rm -rf skills-src

Use ~/.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/

Facts

Skill name
design-philosophy
GitHub stars
485
Token cost
~1.8k tokens
SKILL.md length
901 words
Files
2
Skills in repo
25
Repo updated
First seen
Licence
Apache-2.0

At a glance

Core design principles for the codebase - cognitive load, progressive disclosure, type safety, abstraction worth.

  • Works in 7 steps: Minimize Cognitive Load → Progressive Disclosure → Make Illegal States Unrepresentable → …
  • Data structures
  • SKILL.md covers When to Use, Core Principles, Supporting Files and Related Skills
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Design Philosophy is an agent skill from r3bl-org/r3bl-open-core. Core design principles for the codebase - cognitive load, progressive disclosure, type safety, abstraction worth. Use when designing APIs, modules, or data structures.

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `patterns.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.

When your agent uses it

  • Data structures
  • Tasks that involve Type safety

Example prompts

  • “/design-philosophy”

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Minimize Cognitive Load
  2. Progressive Disclosure
  3. Make Illegal States Unrepresentable
  4. Abstractions Must Earn Their Keep
  5. High-Fidelity Error Handling
  6. Modern Rust Patterns: ADT Const Params
  7. Strict Encapsulation & Testing Hygiene

What it can do on your machine

Read from SKILL.md and the folder at commit 89db352. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Design Philosophy loads about 1.8k tokens when it runs. Until then it costs about 46 tokens; SKILL.md has 901 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~46
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

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.

Safety

Auto-check passed

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.

SKILL.md

The full file from r3bl-org/r3bl-open-core at commit 89db352, republished under its Apache-2.0 licence (© r3bl-org). 901 words, ~1,849 tokens.

Download SKILL.mdSave it as .claude/skills/design-philosophy/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
design-philosophy
description
Core design principles for the codebase - cognitive load, progressive disclosure, type safety, abstraction worth. Use when designing APIs, modules, or data structures.

Design Philosophy Skill

Apply these principles when writing or reviewing code.

When to Use

  • Proactively when designing new APIs, modules, or data structures
  • When refactoring existing code
  • When reviewing code for maintainability

Core Principles

1. Minimize Cognitive Load

Code should be easy to understand without loading too much into working memory.

Guidelines:

  • Good Separation of Concerns (SoC) means fewer "things" to keep in mind
  • Each module/function should have a single, clear responsibility
  • Limit the number of concepts a reader must hold simultaneously
  • Clean Imports: Use use statements at the top of files rather than inline absolute paths (e.g. crate::Type) to reduce visual noise and cognitive clutter in function bodies.
  • No Magic Numbers/Strings: Extract domain-specific numbers and strings (like ANSI mode integers or escape sequences) into named constants (e.g., in tui/src/core/ansi/constants/). Do not use magic numbers directly in business logic or pattern matches, as this requires readers to memorize their meaning.
  • Technical Precision: Use standard, precise terminology (e.g., Parameter vs. Argument) to ensure the reader's mental model matches the implementation exactly. See the Terminology Precision guide.
2. Progressive Disclosure

Reveal complexity only when needed.

Guidelines:

  • Public APIs should be minimal and intuitive
  • Advanced features should be discoverable but not in-your-face
  • Documentation follows inverted pyramid: high-level first, details later
  • Module structure should guide users from simple to advanced
3. Make Illegal States Unrepresentable

Use the type system to prevent bugs at compile time.

Guidelines:

  • Prefer newtypes over primitives (e.g., Index instead of usize)
  • Eliminate Boolean Soup / Boolean Blindness: Avoid raw bool flags, function parameters, or return values that obscure intent (e.g. fn process(flag: bool) or fn is_default() -> bool). Replace boolean soup with self-documenting domain enums (e.g. SyntaxHighlightPipeline::R3BLMarkdown instead of is_file_extension_default() -> bool, or HasSelection::Yes / No). Domain enums make call sites self-documenting and leverage Rust's match for exhaustive compiler checking.
  • Avoid Boolean Blindness in Mutator Returns (Option<T> / Option<()>): Mutator methods taking &mut self that delete or replace text cannot return borrowed slices (Option<&str>) or metadata offsets (DocSeg) because the borrow checker forbids returning a &str borrowing from self across a &mut self mutation, and deleted bytes no longer exist in memory. Returning a text payload from a &mut self mutator unavoidably requires an owned heap allocation (Option<String>). Return a payload Option<T> (e.g. Option<LineMetadata> for zero-allocation metrics or Option<String> for text) ONLY when callers genuinely consume it. If no text payload is consumed by callers, do not incur speculative allocations. Return Option<()> (Some(()) for success, None for failure). Option<()> achieves the exact same zero-allocation CPU-register performance as bool while eliminating boolean blindness and supporting ? operator chaining.
  • Constructor Conventions (Default over No-Arg new()): If a type requires no arguments for construction, derive or implement Default (#[derive(Default)]) and do NOT create a redundant pub fn new() -> Self method. Use parameterized constructors (with_capacity(...) or new(arg: Type)) only when arguments are required.
  • Design enums and structs so invalid combinations cannot be constructed
  • Move validation from runtime to compile time where possible
  • See check-bounds-safety skill for exemplary patterns
4. Abstractions Must Earn Their Keep

An abstraction should reduce cognitive load, not add to it.

Guidelines:

  • If understanding the abstraction requires more effort than the concrete code, don't abstract
  • Good abstractions match mental models developers already have
  • Three similar lines of code is often better than a premature abstraction
  • Abstractions should hide complexity, not just move it
Show full SKILL.md (352 more words)Show less
5. High-Fidelity Error Handling

Treat errors as a user interface (UI) for developers. Public-facing errors must provide actionable information.

Guidelines:

  • Standardize on miette: All custom error types (enums/structs) must derive miette::Diagnostic in addition to thiserror::Error.
  • Actionable Metadata: Use #[diagnostic(help(...))] to provide hints on how to resolve the error.
  • Searchable Codes: Use #[diagnostic(code(...))] to provide unique identifiers for errors, facilitating documentation and search.
  • Preserve Context: Avoid "lossy" error conversions (like turning a rich miette::Report into a plain string). Use transparent delegation or dedicated variants to preserve the full error chain.
6. Modern Rust Patterns: ADT Const Params

Use Enums with Const Generics (Algebraic Data Type Const Params) to control behavior without runtime overhead or boilerplate. This pattern is enabled by the adt_const_params feature flag.

When to Apply:

  • Proactively apply this pattern when writing new code or refactoring existing code that requires choosing between a closed set of behaviors or strategies at compile-time.

Guidelines:

  • Zero-Cost Behavior: Prefer const POLICY: MyEnum over runtime fields. This allows the compiler to prune dead code and branches at compile-time (monomorphization). Example: ScopedMutex.
  • Reduce Boilerplate: Prefer const Enums over the Trait-based Strategy pattern. This centralizes logic and eliminates the need for multiple marker structs and trait implementations.
  • Type-Level Identity: Use this pattern when you want different behaviors to result in different types, enabling compile-time enforcement of safety rules.
7. Strict Encapsulation & Testing Hygiene

Maintain strict encapsulation boundaries in production code and do not leak internal state merely for the convenience of tests.

Guidelines:

  • No pub for tests: Never make a field or method pub or pub(crate) if its only external caller is a test.
  • Test-Only Accessors: Keep production fields strictly scoped (private or pub(in crate::...)). If tests need to inspect or manipulate internal state, provide explicit accessor methods annotated with #[cfg(test)] (e.g., pub(crate) fn internal_state_for_testing(&self)). This cleanly compiles the escape hatch out of the production binary.

Supporting Files

  • patterns.md - Detailed patterns with good/bad examples
  • check-bounds-safety - Type-safe Index/Length patterns (exemplar of principle #3)
  • organize-modules - Module organization for encapsulation (supports principle #1)
  • write_documentation - Inverted pyramid documentation (supports principle #2)
  • concurrency-safety - Thread safety, Chain of Custody, and Loud Lock Releases

© 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

Files

SKILL.md and 1 other file in .agents/skills/design-philosophy of r3bl-org/r3bl-open-core.

  • SKILL.md
  • patterns.md

Open the folder on GitHubat commit 89db352

Compare with similar skills

Design Philosophy 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.

Design Philosophy compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Design Philosophy this skillr3bl-org/r3bl-open-core485—~1.8kAutomated safety check: PassApache-2.0
Typescript Advanced Typesrolling-scopes/rsschool-app10k25 repos~4.2kAutomated safety check: PassMPL-2.0
Minimizing Ty Ecosystem Changesastral-sh/ruff50k—~4.6kAutomated safety check: PassMIT
RTK Rust Design Patternsrtk-ai/rtk83k—~1.9kAutomated safety check: PassApache-2.0
Kedro Babysitkedro-org/kedro11k—~4kAutomated safety check: PassCustom licence
Dignified Python Standardsdocling-project/docling69k—~1.5kAutomated safety check: PassApache-2.0

Similar skills

  • 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.

    10k GitHub starsUsed in 25 repos~4.2k tokens
    DevelopmentAuto-check passed
  • Official

    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"…

    50k GitHub stars~4.6k tokensUpdated today
    DevelopmentAuto-check passed
  • 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.

    83k GitHub stars~1.9k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Kedro Babysit

    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…

    11k GitHub stars~4k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Dignified Python Standards

    docling-project/docling

    Applies opinionated production Python conventions chosen by the project's Python version: modern type syntax, pathlib, explicit checks and interface guidance.

    69k GitHub stars~1.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Walks through adding a Wagmi feature across its layers: a Viem-based core action, TanStack Query options, and React and Vue bindings.

    6.8k GitHub stars~3.8k tokensUpdated 9 days ago
    DevelopmentAuto-check passed

More from r3bl-org/r3bl-open-core

All 25 skills in this repo
  • Analyze Log Files

    r3bl-org/r3bl-open-core

    Analyze log files by stripping ANSI escape sequences first. An agent skill from r3bl-org/r3bl-open-core.

    485 GitHub stars~632 tokensUpdated yesterday
    Auto-check: notes
  • Analyze Performance

    r3bl-org/r3bl-open-core

    Establish performance baselines and detect regressions using flamegraph analysis.

    485 GitHub stars~2k tokensUpdated yesterday
    Auto-check passed
  • Check Bounds Safety

    r3bl-org/r3bl-open-core

    Apply type-safe bounds checking patterns using VPIndex/VPLength types instead of usize.

    485 GitHub stars~4.1k tokensUpdated yesterday
    Auto-check passed
  • Release Crate

    r3bl-org/r3bl-open-core

    Publish a crate release to crates.io with changelog, standalone release notes, git tag, and GitHub release.

    485 GitHub stars~2.4k tokensUpdated yesterday
    Auto-check passed
  • Organize Modules

    r3bl-org/r3bl-open-core

    Apply private modules with public re-exports (barrel export) pattern for clean API design.

    485 GitHub stars~5.8k tokensUpdated yesterday
    Auto-check passed
  • Check Code Quality

    r3bl-org/r3bl-open-core

    Run comprehensive Rust code quality checks including compilation, linting, documentation, and tests.

    485 GitHub stars~3.8k tokensUpdated yesterday
    Auto-check passed

Categories

Questions about Design Philosophy

What does Design Philosophy do?

Core design principles for the codebase - cognitive load, progressive disclosure, type safety, abstraction worth. Design Philosophy is an agent skill from r3bl-org/r3bl-open-core. Core design principles for the codebase - cognitive load, progressive disclosure, type safety, abstraction worth.

When should I use Design Philosophy?

Design Philosophy fits situations like: data structures; tasks that involve Type safety.

How do I install Design Philosophy in Claude Code?

Run `npx skills add r3bl-org/r3bl-open-core --skill design-philosophy -a claude-code`. Or copy the skill folder (.agents/skills/design-philosophy in r3bl-org/r3bl-open-core) into .claude/skills/design-philosophy in your project. Claude Code loads it when a task matches its description.

How do I install Design Philosophy in Codex?

Run `npx skills add r3bl-org/r3bl-open-core --skill design-philosophy -a codex`. Or copy the skill folder (.agents/skills/design-philosophy in r3bl-org/r3bl-open-core) into .agents/skills/design-philosophy in your project. Codex loads it when a task matches its description.

Can I use Design Philosophy in Cursor, Gemini CLI or GitHub Copilot?

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 design-philosophy -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/design-philosophy, .gemini/skills/design-philosophy, .github/skills/design-philosophy and .opencode/skills/design-philosophy in your project.

What does Design Philosophy need to run?

SKILL.md names no scripts, command-line tools or credentials: Design Philosophy is instructions for the agent only.

Does Design Philosophy access the network?

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.

Is Design Philosophy safe to install?

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.

What licence does Design Philosophy use?

Design Philosophy 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.

How many tokens does Design Philosophy use?

About 1.8k tokens (SKILL.md is roughly 7.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Design Philosophy?

Skills that share tags, products or a category with Design Philosophy: 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.

Who maintains Design Philosophy?

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.