agentsclimarketplace

Lazy static once init pattern

Skill kjuhwa/skills-hub/skills/patterns/lazy-static-once-init-pattern

lazy_static! for one-time initialization of expensive resources (codec choices, audio devices).From its SKILL.md

Install
npx -y skills add kjuhwa/skills-hub --skill lazy-static-once-init-pattern

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

1.1 KB, 149 tokens by cl100k_base, as published. Nobody here has run it

Lazy Static Once Init Pattern

When to use

lazy_static! for one-time initialization of expensive resources (codec choices, audio devices).

Source context

  • Repo: rustdesk/rustdesk @ ac124c0680
  • Demonstrated in: src/server/video_service.rs

Why this generalizes

Common Rust one-shot init pattern.

Next steps before publishing

  • Read the source files above and rewrite this as a product-agnostic how-to — keep the pattern, drop rustdesk-specific names.
  • Add a minimal code example in the target language (Rust + Dart / Rust only / etc.).
  • List 2-3 gotchas you hit while reproducing it.

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 326,871. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.