Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计通过

proto-service-generator原型服务生成器

Agent Skill

proto-service-generator 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

419

周安装

18

GitHub Stars

公开资料未说明

下载量

147
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:proto-service-generator(原型服务生成器)
来源仓库:https://github.com/go-sphere/skills
仓库路径:skills/proto-service-generator
安装命令:
npx skills add https://github.com/go-sphere/skills --skill proto-service-generator
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/go-sphere/skills --skill proto-service-generator

简介

用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中快速定位候选结果。

  • 支持基于关键词、任务场景或来源线索进行信息聚合与过滤,适用于服务原型生成任务。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装,需确认权限范围和维护状态。
  • 安装前建议核实是否会触发联网、命令执行或文件读写等敏感操作。
  • proto-service-generator 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Proto Service Generator

Generate or complete compilable service implementations under internal/service/<module>/ from generated *ServiceHTTPServer interfaces in api/<module>/v1/*.sphere.pb.go.

If the module name is not specified, ask: "Which module should I generate service files for?" If the proto generation has not been run yet, stop and ask the user to run make gen/proto first. Do not guess the module from context alone if there are multiple candidates.

When To Use

  1. Proto and generated API files already exist.
  2. You need missing service files or method implementations for *ServiceHTTPServer.
  3. You need safe append-only completion for existing service files.

Out of Scope

  1. BotServer and non-HTTP interfaces.
  2. Redesigning proto contracts or editing generated files.
  3. Rewriting existing business logic unless explicitly requested.

Required Reading

Read before generation:

  1. references/service-implementation-best-practices.md

Load sections selectively:

  1. Always: 1) Interface Assertion and File Mapping, 4) Append-Only Update Procedure, 7) Import and Naming Checklist.
  2. Simple CRUD: 3) Simple CRUD (Direct Ent) Template.
  3. Unknown logic: 2) Stub Template for Unknown Logic.
  4. Complex orchestration and DI changes: 5) Complex Logic Split to Usecase, 6) Wire Injection Pattern.
  5. Reuse checks: 8) Sphere Feature Reuse Pattern.

Companion Skill Policy

When sphere-feature-workflow is available in the current session, use it together with this skill.

Division of responsibility:

  1. sphere-feature-workflow: framework-native end-to-end integration (routing, middleware, auth, errors, wiring flow).
  2. proto-service-generator: per-service file generation and completion from *ServiceHTTPServer.

If sphere-feature-workflow is unavailable, continue with this skill and enforce reuse-first checks from the reference.

Repository Conventions

  1. Keep one Service struct per proto module.
  2. Keep one Go file per proto service.
  3. File naming: XxxService -> xxx.go (snake_case, remove Service suffix).
  4. Every service file must include an interface assertion: var _ <pkg>.<ServiceName>HTTPServer = (*Service)(nil)

Workflow

Step 1: Discover Interface

  1. Find all type XxxServiceHTTPServer interface in api/<module>/v1/*.sphere.pb.go.
  2. List all method signatures from each interface.

Step 2: Check Existing Files

  1. Check if internal/service/<module>/xxx.go exists.
  2. If exists, list implemented methods.
  3. If missing, mark for creation.

Step 3: Decide Implementation Strategy

ScenarioStrategy
Method is Create*, Get*, List*, Update*, Delete* on single entitySimple CRUD via direct Ent
Logic cannot be inferredCompilable stub with errors.New("not implemented")
Cross-entity transactions or complex orchestrationSplit to usecase + wire DI

Step 4: Implement (Append-Only)

  1. Create file if missing with assertion + all methods.
  2. If existing, append only missing methods.
  3. Add only required imports.
  4. Keep existing implementations untouched.

Step 5: Validate

  1. Run go build./internal/service/...
  2. Report using Output Contract.

Decision Rules

  1. Simple CRUD: Method name matches Create*, Get*, List*, Update*, Delete* + single entity = direct Ent.
  2. Stub: Logic unclear = return nil, errors.New("not implemented: <Method>")
  3. Usecase: Cross-entity, reusable orchestration, or long flows = split to internal/usecase/.

Hard Rules

  1. Do not modify generated files under api/*.
  2. Do not add a new DAO wrapper for simple CRUD.
  3. Do not delete or rewrite existing assertions or method bodies in target service files.
  4. Add only required imports.
  5. Keep dependency injection compilable when constructor signatures change.

Output Contract

Output in this exact order:

  1. Scaffold Plan
  2. Files To Create/Update
  3. Interface Coverage Check
  4. Stub Methods Added
  5. Usecase Split Decision
  6. Validation Result

Minimal Validation Checklist

  1. go test./internal/service/...
  2. go test./cmd/app/...
  3. If constructor or provider signatures changed, run make gen/wire and rerun tests.

Acceptance Checklist

  1. New-file case: file exists, assertion exists, all interface methods exist, and code compiles.
  2. Existing-file case: only missing methods are appended; existing implementations are unchanged.
  3. Simple CRUD case: direct Ent via s.db with render helpers.
  4. Complex-flow case: usecase split plus DI chain updates remain compilable.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.26%
按下载量换算50

Claude

28.54%
按下载量换算42

Cursor

18.25%
按下载量换算27

Gemini CLI

9.58%
按下载量换算14

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills