m04-zero-cost — for Claude Code m04-zero-cost, community, for Claude Code, ide skills, fn foo<T: Trait>(), fn foo(x: &dyn Trait), impl Trait, Box<dyn Trait>, Zero-Cost, Abstraction

v1.0.0

Acerca de este Skill

Escenario recomendado: Ideal for AI agents that need zero-cost abstraction. Resumen localizado: A Rust terminal dashboard with clock, pomodoro, weather, and music playback. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

Características

Zero-Cost Abstraction
Layer 1: Language Mechanics
Do we need compile-time or runtime polymorphism?
Before choosing between generics and trait objects:
Is the type known at compile time?

# Temas principales

alphadoiy alphadoiy
[2]
[0]
Actualizado: 3/14/2026

Skill Overview

Start with fit, limitations, and setup before diving into the repository.

Escenario recomendado: Ideal for AI agents that need zero-cost abstraction. Resumen localizado: A Rust terminal dashboard with clock, pomodoro, weather, and music playback. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

¿Por qué usar esta habilidad?

Recomendacion: m04-zero-cost helps agents zero-cost abstraction. A Rust terminal dashboard with clock, pomodoro, weather, and music playback. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

Mejor para

Escenario recomendado: Ideal for AI agents that need zero-cost abstraction.

Casos de uso accionables for m04-zero-cost

Caso de uso: Applying Zero-Cost Abstraction
Caso de uso: Applying Layer 1: Language Mechanics
Caso de uso: Applying Do we need compile-time or runtime polymorphism

! Seguridad y limitaciones

  • Limitacion: Do we need compile-time or runtime polymorphism?
  • Limitacion: Error Don't Just Say Ask Instead
  • Limitacion: E0038 "Make object-safe" Do we really need dynamic dispatch?

About The Source

The section below comes from the upstream repository. Use it as supporting material alongside the fit, use-case, and installation summary on this page.

Demo Labs

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

FAQ y pasos de instalación

These questions and steps mirror the structured data on this page for better search understanding.

? Preguntas frecuentes

¿Qué es m04-zero-cost?

Escenario recomendado: Ideal for AI agents that need zero-cost abstraction. Resumen localizado: A Rust terminal dashboard with clock, pomodoro, weather, and music playback. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

¿Cómo instalo m04-zero-cost?

Ejecuta el comando: npx killer-skills add alphadoiy/timer/m04-zero-cost. Funciona con Cursor, Windsurf, VS Code, Claude Code y más de 19 IDE adicionales.

¿Cuáles son los casos de uso de m04-zero-cost?

Los casos de uso principales incluyen: Caso de uso: Applying Zero-Cost Abstraction, Caso de uso: Applying Layer 1: Language Mechanics, Caso de uso: Applying Do we need compile-time or runtime polymorphism.

¿Qué IDE son compatibles con m04-zero-cost?

Esta skill es compatible con Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Usa la CLI de Killer-Skills para una instalación unificada.

¿Tiene limitaciones m04-zero-cost?

Limitacion: Do we need compile-time or runtime polymorphism?. Limitacion: Error Don't Just Say Ask Instead. Limitacion: E0038 "Make object-safe" Do we really need dynamic dispatch?.

Cómo instalar este skill

  1. 1. Abre tu terminal

    Abre la terminal o línea de comandos en el directorio de tu proyecto.

  2. 2. Ejecuta el comando de instalación

    Ejecuta: npx killer-skills add alphadoiy/timer/m04-zero-cost. La CLI detectará tu IDE o agente automáticamente y configurará la skill.

  3. 3. Empieza a usar el skill

    El skill ya está activo. Tu agente de IA puede usar m04-zero-cost de inmediato en el proyecto actual.

! Source Notes

This page is still useful for installation and source reference. Before using it, compare the fit, limitations, and upstream repository notes above.

Upstream Repository Material

The section below comes from the upstream repository. Use it as supporting material alongside the fit, use-case, and installation summary on this page.

Upstream Source

m04-zero-cost

A Rust terminal dashboard with clock, pomodoro, weather, and music playback. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

SKILL.md
Readonly
Upstream Repository Material
The section below comes from the upstream repository. Use it as supporting material alongside the fit, use-case, and installation summary on this page.
Upstream Source

Zero-Cost Abstraction

Layer 1: Language Mechanics

Core Question

Do we need compile-time or runtime polymorphism?

Before choosing between generics and trait objects:

  • Is the type known at compile time?
  • Is a heterogeneous collection needed?
  • What's the performance priority?

Error → Design Question

ErrorDon't Just SayAsk Instead
E0277"Add trait bound"Is this abstraction at the right level?
E0308"Fix the type"Should types be unified or distinct?
E0599"Import the trait"Is the trait the right abstraction?
E0038"Make object-safe"Do we really need dynamic dispatch?

Thinking Prompt

Before adding trait bounds:

  1. What abstraction is needed?

    • Same behavior, different types → trait
    • Different behavior, same type → enum
    • No abstraction needed → concrete type
  2. When is type known?

    • Compile time → generics (static dispatch)
    • Runtime → trait objects (dynamic dispatch)
  3. What's the trade-off priority?

    • Performance → generics
    • Compile time → trait objects
    • Flexibility → depends

Trace Up ↑

When type system fights back:

E0277 (trait bound not satisfied)
    ↑ Ask: Is the abstraction level correct?
    ↑ Check: m09-domain (what behavior is being abstracted?)
    ↑ Check: m05-type-driven (should use newtype?)
Persistent ErrorTrace ToQuestion
Complex trait boundsm09-domainIs the abstraction right?
Object safety issuesm05-type-drivenCan typestate help?
Type explosionm10-performanceAccept dyn overhead?

Trace Down ↓

From design to implementation:

"Need to abstract over types with same behavior"
    ↓ Types known at compile time → impl Trait or generics
    ↓ Types determined at runtime → dyn Trait

"Need collection of different types"
    ↓ Closed set → enum
    ↓ Open set → Vec<Box<dyn Trait>>

"Need to return different types"
    ↓ Same type → impl Trait
    ↓ Different types → Box<dyn Trait>

Quick Reference

PatternDispatchCode SizeRuntime Cost
fn foo<T: Trait>()Static+bloatZero
fn foo(x: &dyn Trait)DynamicMinimalvtable lookup
impl Trait returnStatic+bloatZero
Box<dyn Trait>DynamicMinimalAllocation + vtable

Syntax Comparison

rust
1// Static dispatch - type known at compile time 2fn process(x: impl Display) { } // argument position 3fn process<T: Display>(x: T) { } // explicit generic 4fn get() -> impl Display { } // return position 5 6// Dynamic dispatch - type determined at runtime 7fn process(x: &dyn Display) { } // reference 8fn process(x: Box<dyn Display>) { } // owned

Error Code Reference

ErrorCauseQuick Fix
E0277Type doesn't impl traitAdd impl or change bound
E0308Type mismatchCheck generic params
E0599No method foundImport trait with use
E0038Trait not object-safeUse generics or redesign

Decision Guide

ScenarioChooseWhy
Performance criticalGenericsZero runtime cost
Heterogeneous collectiondyn TraitDifferent types at runtime
Plugin architecturedyn TraitUnknown types at compile
Reduce compile timedyn TraitLess monomorphization
Small, known type setenumNo indirection

Object Safety

A trait is object-safe if it:

  • Doesn't have Self: Sized bound
  • Doesn't return Self
  • Doesn't have generic methods
  • Uses where Self: Sized for non-object-safe methods

Anti-Patterns

Anti-PatternWhy BadBetter
Over-generic everythingCompile time, complexityConcrete types when possible
dyn for known typesUnnecessary indirectionGenerics
Complex trait hierarchiesHard to understandSimpler design
Ignore object safetyLimits flexibilityPlan for dyn if needed

WhenSee
Type-driven designm05-type-driven
Domain abstractionm09-domain
Performance concernsm10-performance
Send/Sync boundsm07-concurrency

Habilidades relacionadas

Looking for an alternative to m04-zero-cost or another community skill for your workflow? Explore these related open-source skills.

Ver todo

openclaw-release-maintainer

Logo of openclaw
openclaw

Resumen localizado: 🦞 # OpenClaw Release Maintainer Use this skill for release and publish-time workflow. It covers ai, assistant, crustacean workflows. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

333.8k
0
Inteligencia Artificial

widget-generator

Logo of f
f

Resumen localizado: Generate customizable widget plugins for the prompts.chat feed system # Widget Generator Skill This skill guides creation of widget plugins for prompts.chat . It covers ai, artificial-intelligence, awesome-list workflows. This AI agent skill supports Claude Code, Cursor, and

149.6k
0
Inteligencia Artificial

flags

Logo of vercel
vercel

Resumen localizado: The React Framework # Feature Flags Use this skill when adding or changing framework feature flags in Next.js internals. It covers blog, browser, compiler workflows. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

138.4k
0
Navegador

pr-review

Logo of pytorch
pytorch

Resumen localizado: Usage Modes No Argument If the user invokes /pr-review with no arguments, do not perform a review . It covers autograd, deep-learning, gpu workflows. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

98.6k
0
Desarrollador