Skip to content
Skill

M04 zero cost

Guides Claude through generics, traits, static vs dynamic dispatch and related Rust

M04 zero cost is an open-source agent skill for developer tools. It is available on Claude Code.

Scripts
None
Platforms
Claude Code
GitHub stars
21
Last commit
License
MIT
Listing updated

Similar skills

About M04 zero cost

This skill is a Rust-focused reference for choosing between compile-time polymorphism (generics, impl Trait) and runtime polymorphism (trait objects like dyn Trait). It gives the agent a decision flow based on whether the concrete type is known at compile time, whether a heterogeneous collection is needed, and whether performance or compile time matters more.

When compiler errors such as E0277, E0308, E0599 or E0038 appear, the skill steers the agent to question the abstraction itself rather than apply a quick fix like adding a trait bound or importing a trait. It includes a table mapping each error to a design question, plus pointers to related skills for type-driven design, domain modeling, performance and concurrency bounds.

The material is reference text with code snippets showing static and dynamic dispatch syntax, an object safety checklist and a list of common anti-patterns. It contains no scripts and expects no external tools beyond a Rust codebase.

When your agent uses it

CRITICAL: Use for generics, traits, zero-cost abstraction. Triggers: E0277, E0308, E0599, generic, trait, impl, dyn, where, monomorphization, static dispatch, dynamic dispatch, impl Trait, trait bound not satisfied, 泛型, 特征, 零成本抽象, 单态化

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 1 file (5 KB) on GitHub on 3 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

Copy the skill folder to ~/.claude/skills/m04-zero-cost to use it in all your projects:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/k1-c/linear-tui.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/m04-zero-cost &&
cp -R "$tmp/.claude/skills/m04-zero-cost" ~/.claude/skills/m04-zero-cost &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/m04-zero-cost inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/m04-zero-cost to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/k1-c/linear-tui.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/m04-zero-cost &&
cp -R "$tmp/.claude/skills/m04-zero-cost" ~/.agents/skills/m04-zero-cost &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/m04-zero-cost inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/m04-zero-cost to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/k1-c/linear-tui.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/m04-zero-cost &&
cp -R "$tmp/.claude/skills/m04-zero-cost" ~/.cursor/skills/m04-zero-cost &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/m04-zero-cost inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/k1-c/linear-tui.git --path .claude/skills/m04-zero-cost

Or copy the folder to ~/.gemini/skills/m04-zero-cost yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/m04-zero-cost:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/k1-c/linear-tui.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/m04-zero-cost &&
cp -R "$tmp/.claude/skills/m04-zero-cost" ~/.copilot/skills/m04-zero-cost &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/m04-zero-cost inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/k1-c/linear-tui.git

Then copy linear-tui/.claude/skills/m04-zero-cost into your agent's skills folder as m04-zero-cost. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Dispatch choice guide
Helps decide between generics, impl Trait, enums and dyn Trait based on type knowledge and priorities.
Compiler error triage
Maps E0277, E0308, E0599 and E0038 to design questions instead of quick fixes.
Object safety checklist
Lists the conditions a trait must meet to be used as a trait object.
Dispatch syntax examples
Shows static and dynamic dispatch forms in argument and return positions.
Anti-pattern reference
Flags over-generic code and unnecessary dyn usage with better alternatives.
Related skill pointers
Links to type-driven design, domain, performance and concurrency skills for deeper issues.

Good for

  • Decide whether a function should take impl Trait or a trait object
  • Fix an E0277 trait bound not satisfied error in Rust code
  • Design a collection that holds several types implementing one trait
  • Resolve an E0038 object safety error on a trait
  • Review generic-heavy Rust code for unnecessary abstraction

M04 zero cost FAQ

What does M04 zero cost need to run?

It has no scripts and no tool requirements. It is a SKILL.md instruction file that Claude Code loads when a task matches its triggers.

When does M04 zero cost trigger?

It triggers on requests involving generics, traits, impl, dyn, where clauses, monomorphization, static or dynamic dispatch, impl Trait, trait bound errors, and the error codes E0277, E0308, E0599 and E0038, including Chinese terms for generics and zero-cost abstraction.

Does M04 zero cost change any files in my project?

The skill itself contains only guidance text. It does not describe any code changes it makes on its own.

How do I install M04 zero cost in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/m04-zero-cost to use it in all your projects, or to .claude/skills/m04-zero-cost in one project.

Does M04 zero cost run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use M04 zero cost?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

What are the best alternatives to M04 zero cost?

The closest alternatives to M04 zero cost are M03 mutability, M05 type driven, M01 ownership, Coding guidelines and M11 ecosystem.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from k1-c/linear-tui

  1. Gives the agent a quick reference of Rust-specific naming, error handling and async rules

    • Open source
    • 21 GitHub stars
    • Developer tools
  2. Guides the agent to write Conventional Commits, splitting mixed changes into several

    • Open source
    • 21 GitHub stars
    • Developer tools
  3. Guides an agent through building Rust command-line tools with clap, config layers

    • Open source
    • 21 GitHub stars
    • Developer tools
  4. Guides the agent through Rust ownership, borrow and lifetime compiler errors

    • Open source
    • 21 GitHub stars
    • Developer tools
  5. Guides an agent in choosing Rust smart pointers like Box, Rc, Arc, Weak and RefCell

    • Open source
    • 21 GitHub stars
    • Developer tools
  6. Guides a Rust agent through E0596/E0499/E0502 borrow errors and interior mutability

    • Open source
    • 21 GitHub stars
    • Developer tools