skills/builderx_api-controllers/SKILL.md
Guide to Phoenix Controller structure in builderx_api using FallbackController and standard tuple responses.
npx skillsauth add vuluu2k/skills builderx_api-controllersInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Conventions for handling HTTP requests and responses at the Web API layer.
| Topic | Description | Reference |
|-------|-------------|-----------|
| FallbackController | Centralized response handling via tuples | core-fallback |
| Tuple Returns | Standard formats like {:success, ...} or {:failed, ...} | core-fallback |
defmodule BuilderxApiWeb.V1.ExampleController do
use BuilderxApiWeb, :controller
def show(conn, %{"id" => id}) do
# Context functions should return tuples compatible with FallbackController instead of standard {:ok, data}
# Example:
{:success, :with_data, %{id: id, name: "Sample"}}
end
def delete(conn, _params) do
# Return success without data
{:success, :success_only}
end
def create(conn, _params) do
# Return failure with a custom reason
{:failed, :with_reason, "Invalid input data"}
# Or return an error from a Changeset validation failure
# {:error, changeset}
end
end
development
Vue 3 Composition API — <script setup>, reactivity (shallowRef/ref), props without destructure, computed, watch, provide/inject, and composables. Use when the project uses modern Vue 3 Composition API style.
development
Vue 3 Options API — data, props, computed, methods, watch, emits, provide/inject, lifecycle hooks, and mixins. Use when the project uses Options API style (Vue 2 legacy or explicit Vue 3 Options API preference).
tools
Best practices for mixing Ant Design Vue components with Tailwind CSS utility classes. Use this skill to keep styling consistent without custom CSS files.
development
Pinia state management for Vue 3 using Composition API (Setup Stores) — TypeScript-first, storeToRefs for reactivity, focused stores, and API calls in composables. Use when the project uses Vue 3 Composition API / <script setup>.