Borrowing it
Nothing to install: this file belongs to ArtisanCloud/PowerX. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/ArtisanCloud/PowerX/release/v1.0.0/.codex/skills/crud/http-ruleset/SKILL.mdgit clone --depth 1 https://github.com/ArtisanCloud/PowerXWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/artisancloud/powerx/http-ruleset)<a href="https://agentmods.dev/skills/artisancloud/powerx/http-ruleset"><img src="https://agentmods.dev/badge/skills/artisancloud/powerx/http-ruleset/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/artisancloud/powerx/http-ruleset"><img src="https://agentmods.dev/badge/skills/artisancloud/powerx/http-ruleset.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00019 | $0.01943 |
| Opus 5.5 | $0.00008 | $0.00777 |
| Sonnet 5.5 | $0.00004 | $0.00389 |
| Haiku 4.5 | $0.00002 | $0.00194 |
Grade A, and why
crud-http-ruleset scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 171 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PowerX CRUD HTTP Ruleset
步骤
- 打开
本文件内嵌规则。 - 按规则执行实现/校对。
- 完成后按核对清单验收。
核对点
- 与 PowerX 当前代码结构、路径与命名一致。
- 仅在传输层/契约层做职责内改动,不跨层越界。
规则(内嵌)
crud_http.yaml
kind: ruleset
name: crud_http
version: 1.0.0
owner: powerx
status: stable
meta:
intent: >
规范 HTTP 层的 CRUD 行为与目录结构,使之与 Service/Repository 等传输无关层保持等价语义,
强制多租户、鉴权、分页、错误桥接与审计的一致性。参照 Constitution 与 Dev CRUD HTTP 指南。
references:
- constitution.md
- dev_crud_http_guides.md
- dev_sts_guides.md
scope:
codebase:
root: "."
http_dir: "internal/transport/http/admin"
route_prefix: "/api/v1/admin"
applies_to:
- "internal/transport/http/**/**_handler.go"
- "internal/transport/http/**/api.go"
principles:
- 服务端 Handler 仅负责 参数绑定/校验 → 调用 Service → 统一回包,不含业务与 DB IO。 # :contentReference[oaicite:3]{index=3}
- 所有请求必须具备 tenant 上下文;从鉴权中间件注入,缺失返回 400。 # :contentReference[oaicite:4]{index=4}
- 错误语义、分页语义与 gRPC 等价;统一使用 pkg/dto.{ResponseSuccess,ResponseError,...} 封装。 # :contentReference[oaicite:5]{index=5}
- 审计与 RBAC 必须在 Service 层落实,HTTP 层不重复执行业务鉴权。 # :contentReference[oaicite:6]{index=6}
checks:
directory:
- id: http.routes.file
level: error
when:
glob: "internal/transport/http/**/api.go"
assert:
- must_define: "func Register*Routes(*gin.RouterGroup, *shared.Deps)" # 统一入口签名 # :contentReference[oaicite:7]{index=7}
- must_prefix_route: "/api/v1/admin" # 版本化路径 # :contentReference[oaicite:8]{index=8}
handler_shape:
- id: handler.no_db_or_io
level: error
when:
glob: "internal/transport/http/**/**_handler.go"
assert:
- must_not_import: ["database/sql", "go.mongodb.org/**"]
- must_not_call: ["gorm.DB", "sql.DB", "http.DefaultClient.Do"] # 只准调 Service # :contentReference[oaicite:9]{index=9}
- id: handler.ctor_signature
level: warn
when:
glob: "internal/transport/http/**/**_handler.go"
assert:
- must_define: "func New*Handler(*service.*)" # 依赖注入 # :contentReference[oaicite:10]{index=10}
tenant_and_auth:
- id: tenant.context.required
level: error
when:
glob: "internal/transport/http/**/**_handler.go"
assert:
- must_call: ["reqctx.From(c)", "ValidateRequestWithContext"] # 统一获取租户 # :contentReference[oaicite:11]{index=11}
- must_handle_missing_tenant_as: 400 # 缺租户 → 400 # :contentReference[oaicite:12]{index=12}
- id: sts.aligned
level: warn
when:
glob: "internal/transport/http/**/**_handler.go"
assert:
- must_use_auth_mw: true # 与 STS/拦截器一致 # :contentReference[oaicite:13]{index=13}
rest_contracts:
- id: verbs.paths
level: error
when:
glob: "internal/transport/http/**/**_handler.go"
assert:
- create: { method: "POST", path: "" }
- list: { method: "GET", path: "" }
- get: { method: "GET", path: "/:id" }
- update: { method: "PATCH", path: "/:id" }
- delete: { method: "DELETE", path: "/:id" } # 标准 REST # :contentReference[oaicite:14]{index=14}
pagination_and_response:
- id: pagination.uniform
level: error
when:
glob: "internal/transport/http/**/**_handler.go"
assert:
- must_bind_dto: ["dto.PaginationRequest"] # 统一 DTO # :contentReference[oaicite:15]{index=15}
- must_return: ["dto.ResponseList", "dto.PaginationResponse"] # 统一回包 # :contentReference[oaicite:16]{index=16}
- id: error.bridge
level: error
when:
glob: "internal/transport/http/**/**_handler.go"
assert:
- must_use: ["dto.ResponseSuccess", "dto.ResponseError", "dto.ResponseErrorWithDetails", "dto.ResponseValidationError"] # 统一错误桥接 # :contentReference[oaicite:17]{index=17}
- id: success.envelope
level: error
when:
glob: "internal/transport/http/**/**_handler.go"
assert:
- must_use: ["dto.ResponseSuccess"] # 成功回包统一 # :contentReference[oaicite:16]{index=16}
streaming_if_any:
- id: sse.events.naming
level: warn
when:
contains: "SSE" # 流式接口可选
assert:
- event_names: ["start","intent","plan","token","data","action","final","end","error","heartbeat"] # :contentReference[oaicite:18]{index=18}
acceptance:
checklist:
- "[ ] 路由前缀为 /api/v1/admin,破坏性变更才升级版本" # :contentReference[oaicite:19]{index=19}
- "[ ] Handler 不含 DB/外部 IO,所有调用经 Service"
- "[ ] 绑定与校验使用统一 DTO/校验函数,缺租户返回 400"
- "[ ] 错误统一使用 dto.ResponseError/ResponseErrorWithDetails/ResponseValidationError"
- "[ ] 分页响应含 total/page/pageSize/pages"
- "[ ] SSE/WS(如有)事件名与规范一致"
- "[ ] 与 gRPC 在错误与分页语义可对照(等价)" # :contentReference[oaicite:20]{index=20}
templates:
handler_go: |
// New{{Entity}}Handler 仅做绑定/校验/回包
type {{Entity}}Handler struct { svc *service.{{Entity}}Service }
func New{{Entity}}Handler(s *service.{{Entity}}Service) *{{Entity}}Handler { return &{{Entity}}Handler{svc: s} }
func (h *{{Entity}}Handler) List(c *gin.Context) {
ctx, rc, err := ValidateRequestWithContext(c, &dto.{{Entity}}ListReq{})
if err != nil { dto.ResponseValidationError(c, err); return }
out, pg, err := h.svc.List(ctx, rc.TenantID, rc.Pagination)
if err != nil { dto.ResponseError(c, http.StatusInternalServerError, "查询失败", err); return }
dto.ResponseList(c, out, pg)
}
api_go: |
func Register{{Domain}}Routes(rg *gin.RouterGroup, deps *shared.Deps) {
h := New{{Entity}}Handler(deps.{{Entity}}Service)
g := rg.Group("{{domain}}/{{resource}}") // 前缀已由上层注入 /api/v1/admin
{
g.POST("", h.Create)
g.GET("", h.List)
g.GET("/:id", h.Get)
g.PATCH("/:id", h.Update)
g.DELETE("/:id", h.Delete)
}
}
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 171 lines · 19 tokens per session scan A 1a73be322c31
crud-http-ruleset is a skill published in the GitHub repository ArtisanCloud/PowerX (382 stars, last pushed 2d ago), licensed Apache-2.0. It adds 19 tokens to every session and 1,943 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-04.
Other skills, from other repositories
fastapi
FastAPI best practices and conventions. Use when working with FastAPI APIs, Pydantic models, dependencies, streaming responses including Server-Sent Events (SSE), and serving frontend apps. Keeps FastAPI code clean and up to date with the latest features and patterns.
langbot-eba-adapter-dev
Build, refactor, and test LangBot platform adapters for the Event-Based Agents architecture. Use when adding or migrating Telegram, Discord, or other messaging platform adapters to the EBA adapter layout, validating unified event/message conversion, writing live adapter probes, or using standalone plugin runtime plus…
langbot-dev
Develop, build, and debug the LangBot core backend and web frontend. Use when working inside the LangBot repository — backend (Python/Quart, src/langbot/pkg), the Vite/React web UI, HTTP API controllers/services, Alembic migrations, or the MCP server. Covers the dev environment (uv, pnpm), repo layout, the API auth…
wxjava-module-selector
A decision guide for choosing the correct WxJava Maven module, dependency management file, and example for a WeChat use case. WxJava is a Java software development kit for services such as official accounts, mini programs, and payments.
wxjava-api-contributor
A contributor guide for adding or maintaining official WeChat API support in WxJava, a Java software development kit. It covers services, request and response data objects, data conversion, HTTP handling, starter configuration, and regression tests.
wxjava-integration-guide
A setup guide for connecting Java, Spring Boot, or Solon applications to WxJava, a Java software development kit for WeChat services. It covers choosing modules, adding dependencies, configuring accounts, and making an initial API call.