Agent skill

Crud Grpc Ruleset

by ArtisanCloud in ArtisanCloud/PowerX

“PowerX CRUD gRPC 顶层 ruleset 约束。”

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

Install Crud Grpc Ruleset

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

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

GitHub CLI
$ gh skill install ArtisanCloud/PowerX crud-grpc-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/grpc-ruleset .claude/skills/crud-grpc-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-grpc-ruleset
GitHub stars
379
Token cost
~1.8k 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 Grpc Ruleset is a skill in ArtisanCloud/PowerX (379 stars). Its SKILL.md is about 1.8k 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 Grpc Ruleset loads about 1.8k 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.8k

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,804 tokens.

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

PowerX CRUD gRPC Ruleset

步骤

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

核对点

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

规则(内嵌)

crud_grpc.yaml
yaml
kind: ruleset
name: crud_grpc
version: 1.1.0
owner: powerx
status: stable

meta:
  intent: >
    规定 CRUD 的 gRPC 契约与消息形态(proto 结构、分页/错误/鉴权/多租户语义及命名规范),
    保证与 REST/Service 层语义等价,可双向对照;并校验 go_package 与 buf.gen.yaml 前缀一致。
  references:
    - constitution.md
    - crud_api_rest.yaml
    - crud_service.yaml
    - crud_repository.yaml
    - proto_gen.yaml
    - docs/grpc/readme.md

scope:
  applies_to:
    - "api/grpc/**/*.proto"

principles:
  - 使用 proto3;每个 proto 必须声明 go_package。
  - 包与命名:package 用 `<org>.<product>.<domain>`;Service 命名 `{{Entity}}Service`。
  - RPC 五件套:Create/List/Get/Update/Delete;批量操作以 Batch 作为后缀。
  - 分页:与 REST 对齐字段(page,page_size,total,pages),允许扩展 cursor_token。
  - 错误语义:业务错误优先封装在 `common.v1.ResponseMeta`,仅在传输/系统异常时返回标准 gRPC status。
  - 多租户/鉴权:tenant/actor 从 metadata 推导,不作为业务字段传入;request_id/trace_id 透传。
  - 流式场景:仅在必要时使用 server streaming;事件名与 REST SSE 对齐。

checks:

  # ---- 基础 proto 规范 ----
  proto.basics:
    - id: proto.syntax
      level: error
      when: { glob: "api/grpc/**/*.proto" }
      assert:
        - must_contain: 'syntax = "proto3";'
        - must_contain_regex: 'option\\s+go_package\\s*=\\s*"[^\"]+";'
    - id: proto.package.naming
      level: error
      when: { glob: "api/grpc/**/*.proto" }
      assert:
        - must_contain_regex: "package [a-z0-9]+(\\.[a-z0-9_]+)+;"

  # ---- Service + RPC 五件套形态(按资源原型做匹配)----
  service_and_rpcs:
    - id: svc.crud.methods
      level: error
      when: { glob: "api/grpc/**/{{resource}}.proto" }
      assert:
        - must_contain_regex: "service\\s+{{Entity}}Service\\s*{"
        - must_contain: "rpc Create{{Entity}}(Create{{Entity}}Request) returns ({{Entity}}Response);"
        - must_contain: "rpc List{{Entity}}(List{{Entity}}Request) returns (List{{Entity}}Response);"
        - must_contain: "rpc Get{{Entity}}(Get{{Entity}}Request) returns ({{Entity}}Response);"
        - must_contain: "rpc Update{{Entity}}(Update{{Entity}}Request) returns ({{Entity}}Response);"
        - must_contain: "rpc Delete{{Entity}}(Delete{{Entity}}Request) returns (google.protobuf.Empty);"

  # ---- 消息与分页形态 ----
  messages_and_pagination:
    - id: msg.pagination.shape
      level: error
      when: { glob: "api/grpc/**/{{resource}}.proto" }
      assert:
        - must_contain: "message Pagination { int64 total = 1; int32 page = 2; int32 page_size = 3; int32 pages = 4; }"
        - must_contain_regex: "message List{{Entity}}Response\\s*{\\s*repeated {{Entity}} items = 1;\\s*Pagination pagination = 2;"

  # ---- 多租户/鉴权提示(作为规范注释)----
  auth_and_tenant:
    - id: comments.tenant.auth
      level: warn
      when: { glob: "api/grpc/**/{{resource}}.proto" }
      assert:
        - should_contain: "// NOTE: tenant/actor 从 metadata 推导,不作为业务字段传入"

  # ---- go_package 与 buf.gen.yaml 的 go_package_prefix 一致性 ----
  go_package_prefix:
    - id: proto.go_package_prefix.config.exists
      level: error
      when: { file: "api/grpc/contract/buf.gen.yaml" }
      assert:
        - must_contain: "go_package_prefix:"
        - must_contain: "default: github.com/ArtisanCloud/PowerX/api/grpc/gen"
    - id: proto.go_package_prefix.match
      level: error
      when: { glob: "api/grpc/**/*.proto" }
      assert:
        - must_contain_regex: 'option\\s+go_package\\s*=\\s*"github\\.com/ArtisanCloud/PowerX/api/grpc/gen[^"]*;[a-zA-Z0-9_]+";'
      message: "proto 的 go_package 必须以 github.com/ArtisanCloud/PowerX/api/grpc/gen 起始,并以 ;<包名> 结尾"
    - id: proto.go_package_prefix.output.dir
      level: error
      when: { file: "api/grpc/contract/buf.gen.yaml" }
      assert:
        - must_contain_regex: "out:\\s*api/grpc/gen"
        - must_contain: "opt:\n          - paths=source_relative"

acceptance:
  checklist:
    - "[ ] 使用 proto3,且每个 proto 设置 go_package"
    - "[ ] {{Entity}}Service 含 Create/List/Get/Update/Delete RPC"
    - "[ ] 列表响应包含 items + Pagination(total/page/page_size/pages)"
    - "[ ] 错误响应通过 ResponseMeta 对齐 HTTP(仅系统异常返回 gRPC status)"
    - "[ ] 多租户/鉴权通过 metadata 推导(非业务字段)"
    - "[ ] go_package 与 buf.gen.yaml 的 go_package_prefix.default 一致"
    - "[ ] 生成输出到 api/grpc/gen,并使用 paths=source_relative"

templates:
  proto_snippet: |
    syntax = "proto3";
    package powerx.media;

    option go_package = "github.com/ArtisanCloud/PowerX/api/grpc/gen/media;media";

    import "google/protobuf/empty.proto";
    import "google/protobuf/timestamp.proto";

    // NOTE: tenant/actor 从 metadata 推导,不作为业务字段传入
    message Pagination {
      int64 total = 1;
      int32 page = 2;
      int32 page_size = 3;
      int32 pages = 4;
    }

    message MediaAsset {
      string id = 1;                   // ULID/UUID
      uint64 tenant_id = 2;            // 服务端填充
      string name = 3;
      string code = 4;
      string meta_json = 5;
      int32 status = 6;
      google.protobuf.Timestamp created_at = 7;
      google.protobuf.Timestamp updated_at = 8;
    }

    message CreateMediaAssetRequest {
      string name = 1;
      string code = 2;
      string meta_json = 3;
      int32 status = 4;
    }
    message UpdateMediaAssetRequest {
      string id = 1;
      string name = 2;
      string meta_json = 3;
      int32 status = 4;
    }
    message GetMediaAssetRequest { string id = 1; }
    message DeleteMediaAssetRequest { string id = 1; }

    message ListMediaAssetRequest {
      int32 page = 1;
      int32 page_size = 2;
      string sort_by = 3;     // created_at/updated_at/id
      string sort_order = 4;  // asc/desc
      string q = 5;
      map<string,string> filters = 6;
    }

    message MediaAssetResponse { MediaAsset data = 1; }
    message ListMediaAssetResponse {
      repeated MediaAsset items = 1;
      Pagination pagination = 2;
    }

    service MediaAssetService {
      rpc CreateMediaAsset(CreateMediaAssetRequest) returns (MediaAssetResponse);
      rpc ListMediaAsset(ListMediaAssetRequest) returns (ListMediaAssetResponse);
      rpc GetMediaAsset(GetMediaAssetRequest) returns (MediaAssetResponse);
      rpc UpdateMediaAsset(UpdateMediaAssetRequest) returns (MediaAssetResponse);
      rpc DeleteMediaAsset(DeleteMediaAssetRequest) returns (google.protobuf.Empty);
    }
  handler_go: |
    func (s *FooServer) GetFoo(ctx context.Context, req *foov1.GetFooRequest) (*foov1.GetFooResponse, error) {
      tid := tenantIDFrom(ctx, req.GetCtx())
      if tid == 0 {
        return &foov1.GetFooResponse{Meta: badMeta(ctx, 400, "tenant_id required", req.GetCtx().GetRequestId())}, nil
      }
      foo, err := s.fooSvc.GetFoo(ctx, uint64(tid), req.GetId())
      if err != nil {
        if errors.Is(err, service.ErrFooNotFound) {
          return &foov1.GetFooResponse{Meta: badMeta(ctx, 404, "foo not found", req.GetCtx().GetRequestId())}, nil
        }
        return nil, status.Errorf(codes.Internal, "get foo: %v", err)
      }
      return &foov1.GetFooResponse{
        Meta: okMeta(ctx, req.GetCtx().GetRequestId()),
        Data: &foov1.GetFooData{Foo: toPBFoo(foo)},
      }, nil
    }

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

Open the folder on GitHubat commit 3f7619d

Compare with similar skills

Crud Grpc 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 Grpc Ruleset compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Crud Grpc Ruleset this skillArtisanCloud/PowerX379—~1.8kAutomated safety check: PassApache-2.0
Use Yaakmountain-loop/yaak19k—~1.9kAutomated safety check: PassMIT
Golang Proantoniopaya22/go-rest-template1723 repos~1.2kAutomated safety check: PassMIT
Debug Grpc ConnectionGetBindu/Bindu10k—~1.2kAutomated safety check: PassCustom licence
Aspnet Corefanslead/ReverseProxy.Store1632 repos~1.4kAutomated safety check: PassApache-2.0
Regenerate Grpc StubsGetBindu/Bindu10k—~810Automated safety check: PassCustom licence

Similar skills

  • Use Yaak

    mountain-loop/yaak

    A skill your agent uses when the user mentions Yaak, a Yaak workspace, or the yaak command, or asks to call, hit, or smoke test HTTP/REST endpoints, save or organize API requests for reuse or manual…

    19k GitHub stars~1.9k tokensUpdated 2 days ago
    Backend & APIsAuto-check passed
  • Golang Pro

    antoniopaya22/go-rest-template

    Implements concurrent Go patterns using goroutines and channels, designs and builds microservices with gRPC or REST, optimizes Go application performance with pprof, and enforces idiomatic Go with…

    172 GitHub starsUsed in 3 repos~1.2k tokens
    Backend & APIsAuto-check passed
  • Debug Grpc Connection

    GetBindu/Bindu

    Diagnose gRPC connection issues between the Bindu core and a language SDK.

    10k GitHub stars~1.2k tokensUpdated 1 mo ago
    Backend & APIsAuto-check passed
  • Aspnet Core

    fanslead/ReverseProxy.Store

    Build, review, refactor, or architect ASP.NET Core web applications using current official guidance for .NET web development.

    163 GitHub starsUsed in 2 repos~1.4k tokens
    Backend & APIsAuto-check passed
  • Regenerate Grpc Stubs

    GetBindu/Bindu

    Regenerate Python + TypeScript gRPC stubs after editing proto files.

    10k GitHub stars~810 tokensUpdated 1 mo ago
    Backend & APIsAuto-check passed
  • Spider King

    aoyunyang/spider-king-skill

    Pure-web protocol reverse skill: turn hostile browser clients into browser-free Python collectors.

    509 GitHub stars~7.3k tokensUpdated 1 mo ago
    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

Works with

Categories

Questions about Crud Grpc Ruleset

How do I install Crud Grpc Ruleset in Claude Code?

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

How do I install Crud Grpc Ruleset in Codex?

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

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

What does Crud Grpc Ruleset need to run?

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

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

Crud Grpc 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 Grpc Ruleset use?

About 1.8k tokens (SKILL.md is roughly 7.2k 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 Grpc Ruleset?

Skills that share tags, products or a category with Crud Grpc Ruleset: Use Yaak (mountain-loop/yaak, 19k stars), Golang Pro (antoniopaya22/go-rest-template, 172 stars), Debug Grpc Connection (GetBindu/Bindu, 10k stars) and Aspnet Core (fanslead/ReverseProxy.Store, 163 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Crud Grpc 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.