用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tomevault-io/skills-registry --skill prefab-dev命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | prefab-dev |
| description | | Use when this capability is needed. |
Prefab is a Go server framework that simplifies building production-ready gRPC and HTTP services with a plugin-based architecture.
Prefab servers commonly compose multiple gRPC services into a single process. This enables a service-oriented monolith architecture where related services share infrastructure (auth, storage, logging) while maintaining clear boundaries. As utilization requirements become known, individual services can be extracted into separate deployments without changing their interfaces.
import "github.com/dpup/prefab"
func main() {
s := prefab.New(
prefab.WithPort(8080),
prefab.WithPlugin(auth.Plugin()),
// Add more options...
)
s.RegisterService(
&myservice.MyService_ServiceDesc,
myservice.RegisterMyServiceHandler,
&myServiceImpl{},
)
if err := s.Start(); err != nil {
log.Fatal(err)
}
}
Load these resources based on the specific task:
errors.New(), errors.NewC(), errors.Wrap() for errors with stack tracesPlugin() function and PluginName constant| Task | Resources to Load |
|---|---|
| Starting a new project | project-setup.md, server-setup.md |
| Creating a new server | server-setup.md, configuration.md, logging.md |
| Adding authentication | auth.md, server-setup.md |
| Building an OAuth server | oauth-server.md, auth.md, storage.md |
| Setting up access control | authz.md, auth.md |
| Adding real-time features | sse.md |
| Creating a custom plugin | plugins.md, eventbus.md |
| Handling errors properly | errors.md, logging.md |
| Security review | security.md |
| Adding storage | storage.md |
| Adding HTTP/gRPC endpoints | grpc-http.md |
| Adding file uploads | uploads.md, authz.md |
| Sending emails | email.md, templates.md |
| Rendering templates | templates.md |
| Inter-plugin communication | eventbus.md |
| Setting up logging | logging.md |
Converted and distributed by TomeVault — claim your Tome and manage your conversions.