Agent skill

Crud Dto

by ArtisanCloud in ArtisanCloud/PowerX

“PowerX CRUD DTO 规则(输入输出分离、分页、校验)。”

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

Install Crud Dto

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

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

GitHub CLI
$ gh skill install ArtisanCloud/PowerX crud-dto --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/dto .claude/skills/crud-dto && 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-dto
GitHub stars
378
Token cost
~1.2k tokens
SKILL.md length
18 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 Dto is a skill in ArtisanCloud/PowerX (378 stars). Its SKILL.md is about 1.2k 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 Dto loads about 1.2k tokens when it runs. Until then it costs about 11 tokens; SKILL.md has 18 words of instructions outside code blocks.

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

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). 18 words, ~1,248 tokens.

Download SKILL.mdSave it as .claude/skills/crud-dto/SKILL.md (or your agent's skills folder).
name
crud-dto
description
PowerX CRUD DTO 规则(输入输出分离、分页、校验)。

PowerX CRUD DTO

步骤

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

核对点

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

规则(内嵌)

dto.yaml
yaml
kind: ruleset
name: crud_dto
version: 1.0.0
owner: powerx
status: stable

meta:
  intent: >
    统一 DTO 目录、命名、字段与校验规则:DTO 与模型解耦;输入严格校验(binding/validate),
    输出统一信封(Response / ResponseList / PaginationResponse),并提供通用筛选/排序/搜索契约。
  references:
    - dev_crud_http_guides.md
    - constitution.md

scope:
  codebase:
    dto_globs:
      - "internal/transport/http/**/**/dto/*.go"
    handler_globs:
      - "internal/transport/http/**/**_handler.go"

principles:
  - DTO ≠ Model:DTO 不得包含 gorm tag/DB 逻辑;Model 不直接暴露给 HTTP 层。
  - 入参与出参分离:Create/Update 与 Get/List 各自独立结构。
  - 统一分页/筛选/排序:PaginationRequest、Filters、SortBy/SortOrder;输出 PaginationResponse。
  - 统一错误回包:错误由 Handler 使用统一桥接封装,无自定义裸写。

checks:
  - id: dto.no_gorm_tags
    level: error
    when: { glob: "internal/transport/http/**/**/dto/*.go" }
    assert:
      - must_not_contain: '`gorm:"'
  - id: dto.json_tags_required
    level: error
    when: { glob: "internal/transport/http/**/**/dto/*.go" }
    assert:
      - must_contain_regex: "`json:\"[a-zA-Z][a-zA-Z0-9]*\""
  - id: dto.has_validation_tags
    level: warn
    when: { glob: "internal/transport/http/**/**/dto/*_req.go" }
    assert:
      - should_contain_any: ["`binding:","`validate:"]
  - id: dto.pagination_exists
    level: error
    when: { glob: "internal/transport/http/**/**/dto/*.go" }
    assert:
      - must_define: "type PaginationRequest struct"
      - must_define: "type PaginationResponse struct"
  - id: handler.binds_dto
    level: error
    when: { glob: "internal/transport/http/**/**_handler.go" }
    assert:
      - must_call_one_of: ["ValidateRequestWithContext(", "ValidateAndBindWithContext("]
  - id: dto.separation
    level: warn
    when: { glob: "internal/transport/http/**/**/dto/*.go" }
    assert:
      - should_file_suffix_one_of: ["_req.go","_resp.go","_common.go"]

acceptance:
  checklist:
    - "[ ] DTO 不包含任何 gorm Tag / DB 细节"
    - "[ ] Create/Update/Get/List DTO 独立,字段含 json & 校验 tag"
    - "[ ] handler 使用统一绑定函数进行校验与上下文注入"
    - "[ ] 存在 PaginationRequest 与 PaginationResponse"
    - "[ ] 错误回包统一通过错误桥接函数完成"

templates:
  common_dto_go: |
    // internal/transport/http/{{layer}}/{{domain}}/dto/common_dto.go
    package dto

    type PaginationRequest struct {
      Page     int    `json:"page"      binding:"omitempty,min=1"`
      PageSize int    `json:"pageSize"  binding:"omitempty,min=1,max=200"`
      SortBy   string `json:"sortBy"    binding:"omitempty,oneof=createdAt updatedAt id"`
      SortOrder string `json:"sortOrder" binding:"omitempty,oneof=asc desc"`
      Q        string `json:"q"         binding:"omitempty"`
      // 通用过滤:filters[field]=op:value → 在 handler/service 解析
      Filters map[string]string `json:"filters" binding:"omitempty"`
    }

    type PaginationResponse struct {
      Total    int64 `json:"total"`
      Page     int   `json:"page"`
      PageSize int   `json:"pageSize"`
      Pages    int   `json:"pages"`
    }

    type ResponseSuccess struct {
      OK bool `json:"ok"`
    }

    type ResponseList[T any] struct {
      Items      []T                `json:"items"`
      Pagination PaginationResponse `json:"pagination"`
    }
  entity_req_resp_go: |
    // internal/transport/http/{{layer}}/{{domain}}/dto/{{resource}}_req_resp.go
    package dto

    // Create
    type {{Entity}}CreateReq struct {
      Name   string            `json:"name"   binding:"required,min=1,max=128"`
      Code   string            `json:"code"   binding:"required,alphanum,max=64"`
      Meta   map[string]any    `json:"meta"   binding:"omitempty"`
      Status *int16            `json:"status" binding:"omitempty,oneof=0 1"`
    }

    // Update
    type {{Entity}}UpdateReq struct {
      ID     string            `json:"id"     binding:"required,ulid|uuid4"`
      Name   *string           `json:"name"   binding:"omitempty,max=128"`
      Meta   map[string]any    `json:"meta"   binding:"omitempty"`
      Status *int16            `json:"status" binding:"omitempty,oneof=0 1"`
      // 幂等/并发(可选)
      IfMatch *string          `json:"ifMatch" binding:"omitempty"`
    }

    // Get
    type {{Entity}}GetReq struct {
      ID string `json:"id" binding:"required,ulid|uuid4"`
    }

    // Delete
    type {{Entity}}DeleteReq struct {
      ID    string `json:"id" binding:"required,ulid|uuid4"`
      Force bool   `json:"force" binding:"omitempty"`
    }

    // List
    type {{Entity}}ListReq struct {
      PaginationRequest
    }

  bind_helpers_go: |
    // internal/transport/http/{{layer}}/{{domain}}/dto/bind_helpers.go
    package dto

    import "github.com/gin-gonic/gin"

    // 仅示例:项目内已有 ValidateRequestWithContext/ValidateAndBindWithContext 则无需重复
    func Bind[T any](c *gin.Context, v *T) error {
      return c.ShouldBind(v)
    }

© 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/dto of ArtisanCloud/PowerX.

Open the folder on GitHubat commit 3f7619d

Compare with similar skills

Crud Dto 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 Dto compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Crud Dto this skillArtisanCloud/PowerX378—~1.2kAutomated 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.

    378 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…

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

    ArtisanCloud/PowerX

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

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

    ArtisanCloud/PowerX

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

    378 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.

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

    ArtisanCloud/PowerX

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

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

Categories

Questions about Crud Dto

How do I install Crud Dto in Claude Code?

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

How do I install Crud Dto in Codex?

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

Can I use Crud Dto 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-dto -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-dto, .gemini/skills/crud-dto, .github/skills/crud-dto and .opencode/skills/crud-dto in your project.

What does Crud Dto need to run?

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

Does Crud Dto 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 Dto 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 Dto use?

Crud Dto 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 Dto use?

About 1.2k tokens (SKILL.md is roughly 5k 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 Dto?

Skills that share tags, products or a category with Crud Dto: 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 Dto?

ArtisanCloud (a GitHub organization) maintains it in ArtisanCloud/PowerX, which has 378 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.