Skip to main content
skill CX Codex

backend-development · mindrally — Claude Code skill: C++ and Elixir rules

Tells the agent how to write backend code in C++ and Elixir/Phoenix: naming, memory management, Phoenix contexts, error handling.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add Mindrally/skills --skill backend-development -a claude-code
Open on GitHub

What backend-development does

The skill ships as a set of instructions that shape how the agent writes server-side code. For C++ it asks for PascalCase classes, camelCase variables and methods, SCREAMING_SNAKE_CASE constants. Smart pointers over raw ones, std::unique_ptr for exclusive ownership, std::shared_ptr only when ownership is shared. RAII for every resource, plus std::optional, std::variant, structured bindings and std::move.

On the Elixir side the focus is domain-driven design. Code groups around business domains through Phoenix contexts, each context exposes a clear public API, controllers stay thin. Errors come back as tagged tuples {:ok, result} and {:error, reason}, fallible steps chain through with, and validation runs on Ecto.Changeset even outside the database. LiveView is named the primary UI technology.

One thing to weigh: the skill covers two stacks at once. If your service is Go or Python, the smart pointer and Phoenix context rules have nothing to bite on, and the agent will drag foreign conventions into your codebase. Install runs through npx skills add, and the skill file lands in your platform's skills directory.

What it helps with

  • settle naming conventions for C++ with the agent
  • swap raw pointers for smart pointers in new code
  • split a bloated Phoenix module into contexts
  • chain fallible calls with with
  • validate input at the boundary with Ecto.Changeset

Example prompts for the agent

  • Rewrite this module in C++ using smart pointers instead of raw ones
  • Split this Phoenix code into contexts and keep the controller thin
  • Chain these calls with with and return {:ok, result} or {:error, reason}

How to install backend-development

1Skills CLI (Vercel)

npx skills add Mindrally/skills --skill backend-development -a claude-code

2Manually: put the files in place

~/.claude/skills/backend-development/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/backend-development/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about backend-development

How do I install backend-development in Claude?

Run npx skills add Mindrally/skills --skill backend-development -a claude-code. The skill ends up at ~/.claude/skills/backend-development/SKILL.md.

What does backend-development do?

It gives the agent backend rules for C++ and Elixir/Phoenix: naming, memory management, modern language features, Phoenix contexts, error handling and validation.

Which platforms support the skill?

Claude, Codex, Cursor, GitHub Copilot, Gemini CLI and OpenCode. Each platform has its own install command and skill file path.

Source text

SKILL.md · Apache-2.0
---
name: backend-development
description: Guidelines for backend development in C++ and Elixir/Phoenix, covering modern language features, best practices, and production-ready patterns.
metadata:
  maintainer: Mindrally
  source: https://github.com/Mindrally/skills
---

# Backend Development

You are an expert in backend development with C++ and Elixir/Phoenix.

## C++ Development

### Naming Conventions
- Use PascalCase for classes and structs
- Use camelCase for variables and methods
- Use SCREAMING_SNAKE_CASE for constants and macros

### Memory Management
- Prefer smart pointers (`std::unique_ptr`, `std::shared_ptr`) over raw pointers
- Use `std::unique_ptr` for exclusive ownership
- Use `std::shared_ptr` only when shared ownership is required
- Implement RAII for all resource management
- Avoid unnecessary heap allocations

### Modern C++ Features
- Use `auto` for type inference where it improves readability
- Leverage range-based for loops
- Use `std::optional` for values that may not exist
- Use `std::variant` for type-safe unions
- Apply structured bindings for cleaner code
- Use `std::move` for move semantics

### Error Handling
- Use exceptions for error handling
- Define custom exception types for domain-specific errors
- Catch exceptions at appropriate boundaries
- Ensure exception safety in all code

### Best Practices
- Enforce const-correctness throughout
- Avoid C-style casts; use `static_cast`, `dynamic_cast`, etc.
- Write unit tests with Google Test or Catch2
- Document with Doxygen comments

## Elixir and Phoenix Best Practices

### Core Philosophy
- Follow domain-driven design with PragDave philosophy
- Use functional programming with explicit error handling
- Embrace the "let it crash" principle

### Code Organization
- Organize code around business domains using Phoenix contexts
- Keep contexts focused on single domains
- Use bounded contexts to prevent coupling
- Implement clear public APIs for each context

### Pattern Matching and Control Flow
- Use pattern matching extensively for data extraction
- Apply "railway-oriented programming" with `with` statements
- Chain operations cleanly with the pipe operator
- Handle all pattern match cases explicitly

### Error Handling
- Return tagged tuples (`{:ok, result}` or `{:error, reason}`)
- Use `with` statements to chain fallible operations
- Implement proper supervision trees
- Handle expected errors explicitly

### Phoenix Contexts
- Group related functionality in contexts
- Define clear boundaries between contexts
- Use contexts as the API layer for business logic
- Keep controllers thin, delegate to contexts

### LiveView
- Use LiveView as primary UI technology
- Implement function components for reusable UI
- Handle events in LiveView modules
- Manage state appropriately in assigns

### Data Validation
- Validate at boundaries using `Ecto.Changeset`
- Use changesets even outside database contexts
- Define clear validation rules
- Return helpful error messages

© Mindrally · Apache-2.0 · Mindrally/skills

Similar skills

Everything for Backend and APIs →

backend-development by other authors comes first.

backend-development mrgoonie A skill that walks your agent through API design, database schemas, auth and CI/CD. Useful when a backend starts from scratch or heads to production. CX Codex +1 2,300installs backend-development MoizIbnYousaf A skill that gives your agent conventions for REST APIs, database schemas and microservice patterns. Useful when backend code should stay consistent across sessions. CX Codex +1 868installs elixir-expert VoltAgent Community Reviews an Elixir project and helps implement changes using OTP, Phoenix, and Ecto. Use it when you need to reason about process architecture, fault handling, or tests. 167installs phoenix sanjeed5 A Cursor rule that tells the agent how to write Phoenix apps in Elixir: contexts, formatting, Ecto queries. Useful once the agent starts editing your code. ★ 3,579repo stars phoenix-api-channels Claude MPM Team A Claude skill that walks the agent through Phoenix: JSON controllers, Ecto contexts, Channels and Presence on the BEAM. CX Codex +1 339installs ecto-patterns Claude MPM Team A skill that feeds your agent Ecto conventions for Phoenix apps: schemas, changesets, migrations, transactions and multi-tenancy. CX Codex +1 336installs sentry-elixir-sdk getsentry A skill that walks you through Sentry setup in an Elixir project: it scans mix.exs, proposes a feature set and hands you the configs. CX Codex +1 2,000installs woocommerce-backend-dev woocommerce Skill guides you through WooCommerce backend PHP development following project standards. Use it before creating new classes, modifying backend code, or writing unit tests. CX Codex +1 2,300installs

From the same set168

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor