[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AYTKDKY76QQERKWP9CFRVR":3,"skill-same:01M7AYTKDKY76QQERKWP9CFRVR":61},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M7AYTKDKY76QQERKWP9CFRVR","go-fiber-backend-development",null,"Use when building Go backend APIs (Fiber v3, Mongo, gRPC).","oat431\u002Fhermes_config_backup","oat431","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F54722120?v=4","01M7AYD07EH8SYPMYY8CGZKS22","Oralita","01M7AYD0816QDF77E3TWCRSQC9",1,"Unlicense","https:\u002F\u002Fgithub.com\u002Foat431\u002Fhermes_config_backup\u002Fblob\u002Fmain\u002Fworkflow\u002Fproduct-owner\u002Fgo-fiber-backend-development\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: go-fiber-backend-development\ndescription: Use when building Go backend APIs (Fiber v3, Mongo, gRPC).\n---\n\n# Go Backend Development (User Stack: Fiber v3)\n\n## When to Use\n\nAny Go backend service work for this user: new API services, stack migrations (e.g. stdlib→Fiber), Go interview-challenge deliverables, or reviewing Go code from the Dev\u002FQA\u002FSecurity personas.\n\n## Stack Contract (user's chosen stack — do NOT second-guess)\n\n| Concern | Choice (user-confirmed) | Note |\n|---------|-------------------------|------|\n| REST framework | **Fiber v3** (`github.com\u002Fgofiber\u002Ffiber\u002Fv3`) | User explicitly overrode a stdlib `net\u002Fhttp` choice — never default back to stdlib\u002FServeMux |\n| Architecture | Hexagonal (ports & adapters): `domain\u002F` (stdlib-only) → `application\u002F` (use cases + ports) → `infrastructure\u002F` (adapters) | Domain package must have zero external imports |\n| Persistence | Official `go.mongodb.org\u002Fmongo-driver\u002Fv2` behind a repository port | See `references\u002Fmongo-driver-v2-gotchas.md` |\n| Auth | `golang-jwt\u002Fv5` HS256, `golang.org\u002Fx\u002Fcrypto\u002Fbcrypt` | Custom JWT middleware, NOT `jwtware` — so REST + gRPC share one verifier |\n| gRPC (bonus) | grpc-go on separate port + `reflection.Register` | Unary interceptor reads `authorization` metadata |\n| Logging | stdlib `log\u002Fslog` JSON handler | method\u002Fpath\u002Fstatus\u002Fduration_ms + request_id |\n| Testing | stdlib `testing` + hand-written fakes (no mock lib, no testify) | Challenge\u002Ftest convention: standard package |\n| Ops | Multi-stage Dockerfile, docker-compose (app+mongo), Makefile, `.env` gitignored | Non-root runtime user |\n\n## Project Layout (hexagonal, module = repo name)\n\n```\ncmd\u002Fapi\u002Fmain.go            # composition root: wiring + graceful shutdown (helpers: connectMongo\u002FensureIndexes\u002FserveFiber\u002FserveGRPC\u002Fshutdown)\ninternal\u002F\n  domain\u002F                  # entities, validation rules, sentinel errors (stdlib-only)\n  application\u002F             # use cases + port interfaces (UserRepository, TokenManager, PasswordHasher)\n  infrastructure\u002F\n    mongodb\u002F user_repo.go  # + user_repo_integration_test.go (\u002F\u002Fgo:build integration)\n    auth\u002F    bcrypt.go jwt.go\n    httpapi\u002F app.go handlers.go middleware.go errors.go\n    grpcapi\u002F server.go     # + interceptor\n    config\u002F  logger\u002F\n  worker\u002F                  # background jobs (interval injectable for tests)\ntestutil\u002F                  # fake repo + fake hasher (external test packages to avoid import cycles)\nproto\u002F + gen\u002F              # protoc output (module= flag, commit generated code)\n```\n\n## Verification Gate Ladder (run in order, all must pass before commit)\n\n1. `gofmt -l .` empty, `go vet .\u002F...`, `go build .\u002F...`\n2. `go test -race -count=1 .\u002F...` — all packages green\n3. `go test -tags integration -race .\u002Finternal\u002Finfrastructure\u002Fmongodb\u002F` (compose Mongo up; per-test throwaway DB)\n4. `bash scripts\u002Fsmoke.sh` vs live compose stack (REST + gRPC + 404\u002F405 + container-health checks)\n5. `grpcurl -plaintext ...` happy path + missing-token `Unauthenticated`\n6. `docker stop \u003Capi>` → logs show clean shutdown, exit code 0\n7. `go run golang.org\u002Fx\u002Fvuln\u002Fcmd\u002Fgovulncheck@latest .\u002F...` — 0 reachable (bump `go.mod` go directive\u002Ftoolchain to clear reachable stdlib vulns)\n\n## Pitfalls (details in references\u002F)\n\n- **Fiber v3 renames** — `c.BodyParser`→`c.Bind()`, `c.UserContext()`→`c.Context()`, `requestid.HeaderXRequestID`→`fiber.HeaderXRequestID`, no `DisableStartupMessage`. Full map: `references\u002Ffiber-v3-gotchas.md`\n- **Fiber has no auto-405** — add explicit `app.All(path, methodNotAllowed)` for every path with specific methods (test will catch it)\n- **BodyLimit → 413** — server-level `MaxRequestBodySize`; route `*fiber.Error` 413 through central `ErrorHandler` and map to a contract code (e.g. `REQUEST_TOO_LARGE`), never `INTERNAL_ERROR`\n- **In-container healthchecks** — Fiber defaults to `ListenerNetwork: tcp4`; busybox `wget localhost` resolves `::1` → unhealthy. Use `fiber.ListenConfig{ListenerNetwork: fiber.NetworkTCP}`\n- **mongo-driver v2** — `bson\u002Fprimitive` package removed; `ObjectID` lives in `bson` directly; `mongo.Connect(opts...)` takes no ctx. Full map: `references\u002Fmongo-driver-v2-gotchas.md`\n- **JWT hardening** — `jwt.WithValidMethods([HS256])` + `jwt.WithIssuer(...)` + `jwt.WithExpirationRequired()`; login timing oracle → dummy bcrypt compare on unknown email (identical 401 body for both failure paths)\n- **Duplicate-email race** — friendly pre-check (409) + unique index as race-proof backstop; ID-shape validation in the domain layer so every adapter behaves identically\n- **Docker secrets** — `.dockerignore` must exclude `.env`\u002F`.git`\u002F`.agents`\u002F`tools\u002F` or the real JWT secret lands in builder-image layers\n- **Strict JSON decoding** — decode `c.Body()` with `json.Decoder.DisallowUnknownFields()` (rejects `password` smuggling on PUT update)\n- **Import cycles in tests** — `testutil` imports `application`, so application tests must be external (`package application_test`)\n- **Mermaid in spec docs** — see `references\u002Fmermaid-pitfalls.md` (braces\u002Farrows in node labels break rendering)\n\n## Spec-First Workflow (this user)\n\nWrite the spec package BEFORE code, using templates at `F:\\projects\\project_spec\\template\\` (numbered convention: 01_requirement\u002F011, 02_design\u002F022…, 04_testing\u002F041, 07_pm\u002F072_MM). Self-contained spec folder per service (e.g. `.agents\u002Fspec\u002F`, proposals in `.agents\u002Fproposal\u002F`). Cross-persona handoffs are meeting-minutes docs with DEC\u002FACT ids; contract changes route back to PO (DEC-H03 pattern) — personas polish HOW, never change WHAT.\n","# Go Backend Development (User Stack: Fiber v3)\n\n## When to Use\n\nAny Go backend service work for this user: new API services, stack migrations (e.g. stdlib→Fiber), Go interview-challenge deliverables, or reviewing Go code from the Dev\u002FQA\u002FSecurity personas.\n\n## Stack Contract (user's chosen stack — do NOT second-guess)\n\n| Concern | Choice (user-confirmed) | Note |\n|---------|-------------------------|------|\n| REST framework | **Fiber v3** (`github.com\u002Fgofiber\u002Ffiber\u002Fv3`) | User explicitly overrode a stdlib `net\u002Fhttp` choice — never default back to stdlib\u002FServeMux |\n| Architecture | Hexagonal (ports & adapters): `domain\u002F` (stdlib-only) → `application\u002F` (use cases + ports) → `infrastructure\u002F` (adapters) | Domain package must have zero external imports |\n| Persistence | Official `go.mongodb.org\u002Fmongo-driver\u002Fv2` behind a repository port | See `references\u002Fmongo-driver-v2-gotchas.md` |\n| Auth | `golang-jwt\u002Fv5` HS256, `golang.org\u002Fx\u002Fcrypto\u002Fbcrypt` | Custom JWT middleware, NOT `jwtware` — so REST + gRPC share one verifier |\n| gRPC (bonus) | grpc-go on separate port + `reflection.Register` | Unary interceptor reads `authorization` metadata |\n| Logging | stdlib `log\u002Fslog` JSON handler | method\u002Fpath\u002Fstatus\u002Fduration_ms + request_id |\n| Testing | stdlib `testing` + hand-written fakes (no mock lib, no testify) | Challenge\u002Ftest convention: standard package |\n| Ops | Multi-stage Dockerfile, docker-compose (app+mongo), Makefile, `.env` gitignored | Non-root runtime user |\n\n## Project Layout (hexagonal, module = repo name)\n\n```\ncmd\u002Fapi\u002Fmain.go            # composition root: wiring + graceful shutdown (helpers: connectMongo\u002FensureIndexes\u002FserveFiber\u002FserveGRPC\u002Fshutdown)\ninternal\u002F\n  domain\u002F                  # entities, validation rules, sentinel errors (stdlib-only)\n  application\u002F             # use cases + port interfaces (UserRepository, TokenManager, PasswordHasher)\n  infrastructure\u002F\n    mongodb\u002F user_repo.go  # + user_repo_integration_test.go (\u002F\u002Fgo:build integration)\n    auth\u002F    bcrypt.go jwt.go\n    httpapi\u002F app.go handlers.go middleware.go errors.go\n    grpcapi\u002F server.go     # + interceptor\n    config\u002F  logger\u002F\n  worker\u002F                  # background jobs (interval injectable for tests)\ntestutil\u002F                  # fake repo + fake hasher (external test packages to avoid import cycles)\nproto\u002F + gen\u002F              # protoc output (module= flag, commit generated code)\n```\n\n## Verification Gate Ladder (run in order, all must pass before commit)\n\n1. `gofmt -l .` empty, `go vet .\u002F...`, `go build .\u002F...`\n2. `go test -race -count=1 .\u002F...` — all packages green\n3. `go test -tags integration -race .\u002Finternal\u002Finfrastructure\u002Fmongodb\u002F` (compose Mongo up; per-test throwaway DB)\n4. `bash scripts\u002Fsmoke.sh` vs live compose stack (REST + gRPC + 404\u002F405 + container-health checks)\n5. `grpcurl -plaintext ...` happy path + missing-token `Unauthenticated`\n6. `docker stop \u003Capi>` → logs show clean shutdown, exit code 0\n7. `go run golang.org\u002Fx\u002Fvuln\u002Fcmd\u002Fgovulncheck@latest .\u002F...` — 0 reachable (bump `go.mod` go directive\u002Ftoolchain to clear reachable stdlib vulns)\n\n## Pitfalls (details in references\u002F)\n\n- **Fiber v3 renames** — `c.BodyParser`→`c.Bind()`, `c.UserContext()`→`c.Context()`, `requestid.HeaderXRequestID`→`fiber.HeaderXRequestID`, no `DisableStartupMessage`. Full map: `references\u002Ffiber-v3-gotchas.md`\n- **Fiber has no auto-405** — add explicit `app.All(path, methodNotAllowed)` for every path with specific methods (test will catch it)\n- **BodyLimit → 413** — server-level `MaxRequestBodySize`; route `*fiber.Error` 413 through central `ErrorHandler` and map to a contract code (e.g. `REQUEST_TOO_LARGE`), never `INTERNAL_ERROR`\n- **In-container healthchecks** — Fiber defaults to `ListenerNetwork: tcp4`; busybox `wget localhost` resolves `::1` → unhealthy. Use `fiber.ListenConfig{ListenerNetwork: fiber.NetworkTCP}`\n- **mongo-driver v2** — `bson\u002Fprimitive` package removed; `ObjectID` lives in `bson` directly; `mongo.Connect(opts...)` takes no ctx. Full map: `references\u002Fmongo-driver-v2-gotchas.md`\n- **JWT hardening** — `jwt.WithValidMethods([HS256])` + `jwt.WithIssuer(...)` + `jwt.WithExpirationRequired()`; login timing oracle → dummy bcrypt compare on unknown email (identical 401 body for both failure paths)\n- **Duplicate-email race** — friendly pre-check (409) + unique index as race-proof backstop; ID-shape validation in the domain layer so every adapter behaves identically\n- **Docker secrets** — `.dockerignore` must exclude `.env`\u002F`.git`\u002F`.agents`\u002F`tools\u002F` or the real JWT secret lands in builder-image layers\n- **Strict JSON decoding** — decode `c.Body()` with `json.Decoder.DisallowUnknownFields()` (rejects `password` smuggling on PUT update)\n- **Import cycles in tests** — `testutil` imports `application`, so application tests must be external (`package application_test`)\n- **Mermaid in spec docs** — see `references\u002Fmermaid-pitfalls.md` (braces\u002Farrows in node labels break rendering)\n\n## Spec-First Workflow (this user)\n\nWrite the spec package BEFORE code, using templates at `F:\\projects\\project_spec\\template\\` (numbered convention: 01_requirement\u002F011, 02_design\u002F022…, 04_testing\u002F041, 07_pm\u002F072_MM). Self-contained spec folder per service (e.g. `.agents\u002Fspec\u002F`, proposals in `.agents\u002Fproposal\u002F`). Cross-persona handoffs are meeting-minutes docs with DEC\u002FACT ids; contract changes route back to PO (DEC-H03 pattern) — personas polish HOW, never change WHAT.\n",{"name":5,"description":7},"main","2988869c5a7d7be2225c9ea7a54a4a56a59b0d45","workflow\u002Fproduct-owner\u002Fgo-fiber-backend-development",0,"https:\u002F\u002Fgithub.com\u002Foat431\u002Fhermes_config_backup","https:\u002F\u002Fgithub.com\u002Foat431","https:\u002F\u002Fpanomete.com\u002F","Hope and Luck is not a part of the strategy, \r\n\r\nSoftskill produces plan Hard skill produce product.","2026-11-03 00:43:08",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add oat431\u002Fhermes_config_backup --skill go-fiber-backend-development",{"tool":39,"command":40},"bunx","bunx skills add oat431\u002Fhermes_config_backup --skill go-fiber-backend-development",{"tool":42,"command":43},"pnpm","pnpm dlx skills add oat431\u002Fhermes_config_backup --skill go-fiber-backend-development","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Foat431\u002Fhermes_config_backup\u002Fblob\u002Fmain\u002Fworkflow\u002Fproduct-owner\u002Fgo-fiber-backend-development\u002FSKILL.md",true,[47,53,57],{"path":48,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":51,"sourceHtmlUrl":52},"references\u002Ffiber-v3-gotchas.md","REFERENCE","参考文档",3103,"https:\u002F\u002Fgithub.com\u002Foat431\u002Fhermes_config_backup\u002Fblob\u002Fmain\u002Fworkflow\u002Fproduct-owner\u002Fgo-fiber-backend-development\u002Freferences\u002Ffiber-v3-gotchas.md",{"path":54,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":55,"sourceHtmlUrl":56},"references\u002Fmermaid-pitfalls.md",1806,"https:\u002F\u002Fgithub.com\u002Foat431\u002Fhermes_config_backup\u002Fblob\u002Fmain\u002Fworkflow\u002Fproduct-owner\u002Fgo-fiber-backend-development\u002Freferences\u002Fmermaid-pitfalls.md",{"path":58,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":59,"sourceHtmlUrl":60},"references\u002Fmongo-driver-v2-gotchas.md",1870,"https:\u002F\u002Fgithub.com\u002Foat431\u002Fhermes_config_backup\u002Fblob\u002Fmain\u002Fworkflow\u002Fproduct-owner\u002Fgo-fiber-backend-development\u002Freferences\u002Fmongo-driver-v2-gotchas.md",[62,70,77,84,91,98],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":66,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M7AYZ2JY3NFKAPQSC39N5F3F","project-spec-docs","Fill\u002Fupdate project_spec docs (templates, MM handoffs).","MIT","https:\u002F\u002Fgithub.com\u002Foat431\u002Fhermes_config_backup\u002Fblob\u002Fmain\u002Fworkflow\u002Fui-ux\u002Fproject-spec-docs\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":66,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M7AYYRZPE7HQX7778558X52S","penpot-mcp","Penpot MCP: connect, verify, and fix streaming via nginx.","https:\u002F\u002Fgithub.com\u002Foat431\u002Fhermes_config_backup\u002Fblob\u002Fmain\u002Fworkflow\u002Fui-ux\u002Fpenpot-mcp\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M7AYYNKP61CN2281VMJDXMB5","nginx-streaming-proxy","Configure nginx for streaming endpoints (SSE, MCP, WS).","https:\u002F\u002Fgithub.com\u002Foat431\u002Fhermes_config_backup\u002Fblob\u002Fmain\u002Fworkflow\u002Fui-ux\u002Fnginx-streaming-proxy\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":66,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M7AYYJP0MDV1D3WVEEZB3SGA","branding-ci","Use for brand\u002FCI identity, style guides, and brand docs.","https:\u002F\u002Fgithub.com\u002Foat431\u002Fhermes_config_backup\u002Fblob\u002Fmain\u002Fworkflow\u002Fui-ux\u002Fbranding-ci\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":19},"01M7AYYGCXVT97DDTCM0ZJT6F6","yuanbao","Yuanbao (元宝) groups: @mention users, query info\u002Fmembers.","https:\u002F\u002Fgithub.com\u002Foat431\u002Fhermes_config_backup\u002Fblob\u002Fmain\u002Fworkflow\u002Fshared-skills\u002Fyuanbao\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":19},"01M7AYYC2Y65NMGMD4GQXAZMMS","slidev","Create and present web-based slidedecks for developers using Slidev with Markdown, Vue components, code highlighting, animations, and interactive features. Use when building technical presentations, conference talks, code walkthroughs, teaching materials, or developer decks.","https:\u002F\u002Fgithub.com\u002Foat431\u002Fhermes_config_backup\u002Fblob\u002Fmain\u002Fworkflow\u002Fshared-skills\u002Fslidev\u002FSKILL.md",[],[]]