Vidar

Vidar

Elixir, Rustler, Rust skills for Claude

So in case others find them useful here are 3 of the skills I use. They work pretty well together. Avoid Claude starting agents to plan and implement as the agents will typically not use the skills, and well, that is not optimal. They are substantial but only core Skill is loaded into context until it needs any specialized part.

Elixir skill

This is a rather ambitious project to make Claude do idiomatic Elixir both in architecture and code. The skill has a hub structure with a core skill aiming to cover the most crucial and daily bits, and with referenced supporting files covering more specialized topics. Only the core skill is loaded into the context when the skill is invoked.

So far I’ve only sanitized this and the rust-nif skill. Other related skills might follow time and motivation permitting.

Rust_NIF (Rustler)

Rust NIFs with Rustler for Elixir — safe native code, BEAM/OTP integration, error handling, scheduler management, and process communication. ALWAYS use when writing Rust NIFs or Rustler code. ALWAYS use when integrating native Rust code with Elixir/BEAM. ALWAYS use when debugging NIF performance, crashes, or type conversion issues.

Rust skill

A comprehensive Claude Code skill for idiomatic Rust development. Covers ownership, traits, generics, async/await, error handling, serde, tracing, macros, design patterns, and production best practices. Current for Rust 2024 edition.

Most Liked Switch mode

Vidar

Vidar

So these skills have been through another iteration and some major reorganizing. The goal has been to get Claude to:

  1. Invoke the relevant skills before planning or implementing.
  2. Actively use the skills while working.
  3. Option for semi-forced TDD (which still allows refactoring without issue).
  4. Use milestone plans, and force Claude to actively use the skills before implementing each milestone.
  5. Hooks to catch some slop so it can be replaced while still implementing and context is fresh.
  6. When making key code decisions, and there are relevant rules/ guidance/ decisions in the skills, Claude should add a §§ code in the comments about which skill guidance were followed. (Easily removed later with a script when done). This helps make Claude stop and consider decisions using the skills.

With this setup using hooks there are additive edits to existing files and many new files. Thus for convenience there is an install and uninstall file. It is purely additive, and it is namespaced bb, so it should not collide with anything else.

The Elixir pack and the Rust pack can be used alone or together. The install script will ask to install the common third repo with the hooks they share. The idea is that more languages can easily follow the same pattern later and be added or removed without messing up the existing configuration of other languages.

So now the Elixir and Rust skills have repos including these skills (with subskills):

Elixir:
elixir-planning
elixir-implementing
elixir-reviewing
phoenix
phoenix-liveview

Rust:
rust-planning
rust-implementing
rust-reviewing
rust-nif

These are big skills so they do spend tokens loading. But to the degree they improve the Claude output closer to directly usable code I’m ok with that. Might be an issue for 200k contexts (haven’t tried), but works fine with 1M.

There is a user_guide included, but the most important things are two keywords:

  • [use-skills] which forces invoking of relevant skills, and activates more hooks to encourage actual skill use.
  • [TDD] which forces tests to be written before the implementation. Apart from getting the test workflow it also makes it harder for Claude to get lazy or skip work. Once the test is in place the implementation has to be done. And it forces Claude to think about the code two times instead of just one, which is likely good.
  • Mentioning milestone plan will make a milestone plan, and with [use-skills] active Claude then have to actively check the relevant skills before implementing each step.

Links:

Older Elixir and Rust skills marked as having been superceded.

Vidar

Vidar

I sanitized two more skills for anyone who might find them useful.

Phoenix skill

Comprehensive Phoenix skill for Claude which I’ve used for a while. Further cleaned up and validated against 10 production code bases.

Phoenix LiveView skill

Comprehensive Phoenix Liveview skill for Claude. There is likely a bit more than normal focus on use with SVGs as I use that for dashboards, gauges, slider controls and charts. Apart from some overdue clean up it was also validated against 10 production code bases.

frankdugan3

frankdugan3

You might give this ClaudePlans a try. It watches and renders plans, memories, and extra folders you add using MDex with syntax highlighting, Mermaid charts, etc. Keyboard navigation, supports the PLUG_EDITOR conventions so you can open in editor of choice, inline annotations, etc. Makes plan mode much more pleasant.

Last Post!

dimitarvp

dimitarvp

Ha, this looks useful, thank you.

Where Next?

Trending in AI / LLMs Top

garrison
For those who are not aware, “AI agents” are, for the most part, commodity LLMs which are given access to “tools” and prompted to complet...
#ai
New
AstonJ
Anyone vibe-converted a Rails app to Phoenix? How did it go? Which tools did you use? Any tips? Asking for a friend :sweat_smile:
New
mjason
I built a tmux alternative in Elixir, focused on remote development in the AI era. It makes using remote AI agents feel just like running...
#ai
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
type1fool
I just stumbled on a newly redesigned elixir-lang.org. :tada: It looks like @Software_Mansion did the work, and I think it is generally a...
New
akoutmos
@hugobarauna and I (Alex Koutmos) have been hard at work on writing a book on Nerves that takes you from simply blinking LEDs to building...
New

We're in Beta

About us Mission Statement