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.
npx skills add Mindrally/skills --skill backend-development -a claude-codeWhat 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
withand return{:ok, result}or{:error, reason}
How to install backend-development
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill backend-development -a claude-code2Manually: put the files in place
~/.claude/skills/backend-development/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/backend-development/
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill backend-development -a codex2Manually: put the files in place
.agents/skills/backend-development/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill backend-development -a cursor2Manually: put the files in place
.cursor/skills/backend-development/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install Mindrally/skills backend-development2Manually: put the files in place
.github/skills/backend-development/SKILL.md1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill backend-development -a gemini-cli2Platform CLI
gemini skills install https://github.com/Mindrally/skills --path backend-developmentManually: put the files in place
.devin/skills/backend-development/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add Mindrally/skills --skill backend-development -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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.