koan-api-building
EntityController<T>, custom routes, payload transformers, auth policies
npx skills add majiayu000/claude-skill-registry --skill api-building --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Koan API Building ## Core Principle **EntityController<T> provides full CRUD APIs automatically.** Extend with custom routes for business operations. No manual endpoint implementation needed. ## Quick Reference ### Basic CRUD API ```csharp [Route("api/[controller]")] public class TodosController : EntityController<Todo> { // Full CRUD auto-generated: // GET /api/todos // GET /api/todos/{id} // POST /api/todos // PUT /api/todos/{id} // DELETE /api/todos/{id} // PATCH /api/todos/{id} } ``` ### Custom Routes ```csharp [Route("api/[controller]")] public class ProductsController : EntityController<Product> { [HttpPost("{id}/discount")] public async Task<IActionResult> ApplyDiscount( string id, [FromBody] DiscountRequest request, CancellationToken ct) { var product = await Product.Get(id, ct); if (product is null) return NotFound(); await product.ApplyDiscount(request.Amount); return Ok(product); } [HttpGet("overstock")] public async Task<IActionResult> GetOverstock(CancellationToken ct) { var products = await Product.Query(p => p.Stock > 1000, ct); return Ok(products); } } ``` ### Auth Policies ```csharp [Route("api/[controller]")] [Authorize] // Require authentication for all endpoin
- Core Principle
- Quick Reference
- Basic CRUD API
- Custom Routes
- Auth Policies
- Payload Transformers
- When This Skill Applies
- Reference Documentation
What does the koan-api-building skill do?
EntityController<T>, custom routes, payload transformers, auth policies
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill api-building --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
