用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/majiayu000/claude-skill-registry --skill koan-api-building命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
LLM token logprobs and calibration. Per-decision confidence, ECE, Brier, reliability diagrams, low-confidence triage.
Analyze LLM token logprobs and calibration. Use for per-decision confidence, ECE, Brier scores, reliability diagrams, and low-confidence triage.
回顾最近 N 天的 Claude Code 使用记录——扫描原始会话数据,按主题分组汇总"我都做了什么",并从个人操作系统视角输出模式、风险与增删建议。当用户说 /recap、"看看我这几天做了什么"、"回顾一下我最近的会话"、"这两天我用 claude 干了啥"、"活动回顾" 时使用。
基于 SOC 职业分类
正在显示 SKILL.md
| name | koan-api-building |
| description | EntityController<T>, custom routes, payload transformers, auth policies |
EntityController provides full CRUD APIs automatically. Extend with custom routes for business operations. No manual endpoint implementation needed.
[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}
}
[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);
}
}
[Route("api/[controller]")]
[Authorize] // Require authentication for all endpoints
public class OrdersController : EntityController<Order>
{
[HttpGet]
public Task<List<Order>> GetMyOrders(CancellationToken ct)
{
var userEmail = User.FindFirst(ClaimTypes.Email)?.Value;
return Order.Query(o => o.CustomerEmail == userEmail, ct);
}
[HttpPost]
[Authorize(Policy = "CanCreateOrders")] // Require specific policy
public override async Task<IActionResult> Post([FromBody] Order entity)
{
entity.CustomerEmail = User.FindFirst(ClaimTypes.Email)?.Value ?? "";
return await base.Post(entity);
}
}
public class TodoTransformer : IPayloadTransformer<Todo>
{
public Task<object> TransformAsync(Todo entity)
{
return Task.FromResult<object>(new
{
entity.Id,
entity.Title,
entity.Completed,
_links = new
{
self = $"/api/todos/{entity.Id}",
user = $"/api/users/{entity.UserId}"
}
});
}
}
// Register in KoanAutoRegistrar
services.AddScoped<IPayloadTransformer<Todo>, TodoTransformer>();
docs/guides/building-apis.mddocs/api/web-http-api.mdsamples/S1.Web/Controllers/