backend

Guides Rails backend work on models, REST API v1 controllers, auth, and services.

23|1|Updated Feb 26, 2026
One-click install
npx skills add https://github.com/Alexey-Lukin/silken_net --skill backend-alexey-lukin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: backend
Source: https://github.com/Alexey-Lukin/silken_net/tree/main/.claude/skills/backend
Command: npx skills add https://github.com/Alexey-Lukin/silken_net --skill backend-alexey-lukin

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Working on the silken_net Rails backend requires knowing dozens of non-obvious conventions and past-incident lessons (role predicate naming, IDOR guards, session salt stamps, partition primary keys) that are not visible from the code or docs alone, and violating them produces silent security or data bugs. ## Core Features & Use Cases - Codebase navigation: Maps models, concerns, API v1 controllers, Pundit policies, services, and workers to their single-source-of-truth documentation files. - Indexed gotcha registry: Provides a one-line index of 80+ hard-won rules (e.g., role_admin? not admin?, client-supplied FK checks returning 404 vs 422, self.primary_key = "id" on partitioned models) with full mechanisms in an on-demand gotchas.md file. - Task recipes: Gives step-by-step procedures for adding REST endpoints, models, columns, services, and workers, including strong_migrations-safe migration forms and documentation-sync gates. - Use Case: When adding a new API endpoint, follow the recipe to place the route correctly, apply the IDOR sibling-guard, register the doc-table row, and pass the route-doc parity gate. ## Quick Start Ask the assistant to add a new REST endpoint or model to the silken_net Rails backend and follow the backend skill's recipe and gotcha index.

Frequently Asked Questions about backend

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new REST endpoint to a Rails API v1 backend?

Create a thin controller inheriting from BaseController with params, authorization, and render only. Verify any client-supplied foreign key against the acting organization, returning 404 for foreign records and 422 for missing ones, then add the route and a row in the API documentation table.

How do I safely remove a database column in Rails with strong_migrations?

Use two steps: first add the column to self.ignored_columns in the model and deploy, then in a separate commit run a remove_column migration and delete the ignored_columns line. This avoids errors from cached schemas during rolling deploys.

Why does my Rails enum predicate like admin? not exist?

The User model declares its role enum with prefix: true, so the predicate is role_admin? rather than admin?. The same prefix pattern applies to all enums in the codebase, and there is no patrol role.

Why does a partitioned Rails model return an array from .id?

Partitioned tables keep a composite database primary key of (id, created_at), so the model must declare self.primary_key = "id" to make ActiveRecord return a scalar. Without it, .id returns an array that breaks bigint columns and JSON serialization.

What are the boundaries of this backend skill?

It covers models, non-money services and workers, REST API auth and RBAC, and the MaintenanceRecord domain. Money-path minting and slashing belong to the web3-pipeline skill, telemetry uplink to telemetry-pipeline, and Phlex/Tailwind UI to the frontend skill.