Agent skill

Crud HTTP Ruleset

by ArtisanCloud in ArtisanCloud/PowerX

“PowerX CRUD HTTP 顶层 ruleset 约束。”

— description from SKILL.md by ArtisanCloud
Apache-2.0Auto-check passedBackend & APIs

Install Crud HTTP Ruleset

skills CLI
$ npx skills add ArtisanCloud/PowerX --skill crud-http-ruleset -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ArtisanCloud/PowerX crud-http-ruleset --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ArtisanCloud/PowerX.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.codex/skills/crud/http-ruleset .claude/skills/crud-http-ruleset && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
crud-http-ruleset
GitHub stars
379
Token cost
~1.6k tokens
SKILL.md length
19 words
Files
1
Skills in repo
21
Repo updated
First seen
Licence
Apache-2.0

At a glance

  • Works in 3 steps: 打开 本文件内嵌规则。 → 按规则执行实现/校对。 → 完成后按核对清单验收。
  • SKILL.md covers 步骤, 核对点 and 规则(内嵌)
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

About this skill

Crud HTTP Ruleset is a skill in ArtisanCloud/PowerX (379 stars). Its SKILL.md is about 1.6k tokens. Licence: Apache-2.0.

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. 打开 本文件内嵌规则。
  2. 按规则执行实现/校对。
  3. 完成后按核对清单验收。

What it can do on your machine

Read from SKILL.md and the folder at commit 3f7619d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are yaml).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Crud HTTP Ruleset loads about 1.6k tokens when it runs. Until then it costs about 12 tokens; SKILL.md has 19 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~12
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ArtisanCloud/PowerX at commit 3f7619d, republished under its Apache-2.0 licence (© ArtisanCloud). 19 words, ~1,595 tokens.

Download SKILL.mdSave it as .claude/skills/crud-http-ruleset/SKILL.md (or your agent's skills folder).
name
crud-http-ruleset
description
PowerX CRUD HTTP 顶层 ruleset 约束。

PowerX CRUD HTTP Ruleset

步骤

  1. 打开 本文件内嵌规则。
  2. 按规则执行实现/校对。
  3. 完成后按核对清单验收。

核对点

  • 与 PowerX 当前代码结构、路径与命名一致。
  • 仅在传输层/契约层做职责内改动,不跨层越界。

规则(内嵌)

crud_http.yaml
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)
      }
    }

© ArtisanCloud, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .codex/skills/crud/http-ruleset of ArtisanCloud/PowerX.

Open the folder on GitHubat commit 3f7619d

Compare with similar skills

Crud HTTP Ruleset next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Crud HTTP Ruleset compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Crud HTTP Ruleset this skillArtisanCloud/PowerX379—~1.6kAutomated safety check: PassApache-2.0
Configuring Horizoncoollabsio/coolify63k4 repos~898Automated safety check: PassMIT
Nestjs Best Practicesrolling-scopes/rsschool-app10k6 repos~1.2kAutomated safety check: PassMIT
Sub2API AdminWei-Shaw/sub2api44k1 repos~717Automated safety check: PassLGPL-3.0
Firecrawl Build Onboardingfirecrawl/firecrawl190k1 repos~1.4kAutomated safety check: NotesISC
Obsidian BasesAtmosphere/atmosphere3.8k22 repos~3.2kAutomated safety check: PassApache-2.0

Similar skills

  • Configuring Horizon

    coollabsio/coolify

    A skill your agent uses whenever the user mentions Horizon by name in a Laravel context.

    63k GitHub starsUsed in 4 repos~898 tokens
    Backend & APIsAuto-check passed
  • Nestjs Best Practices

    rolling-scopes/rsschool-app

    NestJS best practices and architecture patterns for building production-ready applications.

    10k GitHub starsUsed in 6 repos~1.2k tokens
    Backend & APIsAuto-check passed
  • Sub2API Admin

    Wei-Shaw/sub2api

    Manages a Sub2API deployment from the command line: accounts, redeem and invitation codes, groups, proxies, imports, exports and raw admin API calls.

    44k GitHub starsUsed in 1 repo~717 tokens
    Backend & APIsAuto-check passed
  • Firecrawl Build Onboarding

    firecrawl/firecrawl

    Gets Firecrawl working in a project: signs you in through the browser, saves FIRECRAWL_API_KEY to .env and picks the first SDK or REST path.

    190k GitHub starsUsed in 1 repo~1.4k tokens
    Backend & APIsAuto-check: notes
  • Obsidian Bases

    Atmosphere/atmosphere

    Create and edit Obsidian Bases (.base files) with views, filters, formulas, and summaries.

    3.8k GitHub starsUsed in 22 repos~3.2k tokens
    Backend & APIsAuto-check passed
  • Fortify Development

    coollabsio/coolify

    ACTIVATE when the user works on authentication in Laravel. An agent skill from coollabsio/coolify.

    63k GitHub starsUsed in 4 repos~1.9k tokens
    Backend & APIsAuto-check passed

More from ArtisanCloud/PowerX

All 21 skills in this repo
  • API Naming

    ArtisanCloud/PowerX

    PowerX API 命名与访问规范(/api/v1、/admin、/internal 边界). An agent skill from ArtisanCloud/PowerX.

    379 GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Capability Governance

    ArtisanCloud/PowerX

    PowerX 底座 Capability 治理与发布准入规则。用于审计 REST/OpenAPI/gRPC/Gin 生成的能力候选、正式 platformcapabilities 目录、Capability Registry 登记、agentusable/permissioncode/risklevel 元数据、ignore…

    379 GitHub stars~3k tokensUpdated today
    Auto-check passed
  • Crud Di

    ArtisanCloud/PowerX

    PowerX CRUD 依赖注入规则(Deps 单入口、构造注入、跨传输复用). An agent skill from ArtisanCloud/PowerX.

    379 GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • Crud Grpc

    ArtisanCloud/PowerX

    PowerX CRUD gRPC 开发规范(proto、server、拦截器、错误映射). An agent skill from ArtisanCloud/PowerX.

    379 GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • Crud Handler HTTP

    ArtisanCloud/PowerX

    PowerX HTTP Handler 规则(绑定校验、统一回包、无 DB IO). An agent skill from ArtisanCloud/PowerX.

    379 GitHub stars~1.8k tokensUpdated today
    Auto-check passed
  • Crud HTTP

    ArtisanCloud/PowerX

    PowerX CRUD HTTP 开发规范(管理端路由、绑定、错误桥接、多租户). An agent skill from ArtisanCloud/PowerX.

    379 GitHub stars~2.2k tokensUpdated today
    Auto-check passed

Categories

Questions about Crud HTTP Ruleset

How do I install Crud HTTP Ruleset in Claude Code?

Run `npx skills add ArtisanCloud/PowerX --skill crud-http-ruleset -a claude-code`. Or copy the skill folder (.codex/skills/crud/http-ruleset in ArtisanCloud/PowerX) into .claude/skills/crud-http-ruleset in your project. Claude Code loads it when a task matches its description.

How do I install Crud HTTP Ruleset in Codex?

Run `npx skills add ArtisanCloud/PowerX --skill crud-http-ruleset -a codex`. Or copy the skill folder (.codex/skills/crud/http-ruleset in ArtisanCloud/PowerX) into .agents/skills/crud-http-ruleset in your project. Codex loads it when a task matches its description.

Can I use Crud HTTP Ruleset in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ArtisanCloud/PowerX --skill crud-http-ruleset -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/crud-http-ruleset, .gemini/skills/crud-http-ruleset, .github/skills/crud-http-ruleset and .opencode/skills/crud-http-ruleset in your project.

What does Crud HTTP Ruleset need to run?

SKILL.md names no scripts, command-line tools or credentials: Crud HTTP Ruleset is instructions for the agent only.

Does Crud HTTP Ruleset access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Crud HTTP Ruleset safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Crud HTTP Ruleset use?

Crud HTTP Ruleset is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Crud HTTP Ruleset use?

About 1.6k tokens (SKILL.md is roughly 6.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Crud HTTP Ruleset?

Skills that share tags, products or a category with Crud HTTP Ruleset: Configuring Horizon (coollabsio/coolify, 63k stars), Nestjs Best Practices (rolling-scopes/rsschool-app, 10k stars), Sub2API Admin (Wei-Shaw/sub2api, 44k stars) and Firecrawl Build Onboarding (firecrawl/firecrawl, 190k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Crud HTTP Ruleset?

ArtisanCloud (a GitHub organization) maintains it in ArtisanCloud/PowerX, which has 379 GitHub stars. The repository holds 21 skills in this directory. The repository was last updated on October 9, 2026.

Source: ArtisanCloud/PowerX on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.