feat: add golang-uber-dig and golang-uber-fx skills (#25)

* feat: add golang-uber-dig and golang-uber-fx skills

Two new library skills covering uber-go's reflection-based DI ecosystem. golang-uber-dig covers the container, Provide/Invoke, dig.In/dig.Out, named values, value groups, dig.As, optional deps, Decorate, Scopes, error handling, and Visualize. golang-uber-fx covers fx.New/Run, lifecycle hooks, fx.Module, fx.Annotate, fx.Supply/Replace/Decorate, fxevent logging, and fxtest. Each skill ships recipes.md (end-to-end app examples) and testing.md (test patterns and CI graph validation), and cross-references golang-samber-do, golang-google-wire, and golang-dependency-injection.

* refactor(uber-dig,uber-fx): trim SKILL.md under 2,500 tokens

Both SKILL.md exceeded the project budget. Moved Decorate, Scopes, optional deps, error helpers, Visualize, and Quick Reference into references/advanced.md for both skills. dig: 3,744 -> 2,264 tok. fx: 4,466 -> 2,499 tok. README updated.

* test(uber-dig,uber-fx): add eval prompts and assertions

11 adversarial evals per skill targeting unique guidance: parameter objects, value groups (with flatten), named values, dig.As to hide concrete types, scopes for request locals, container at composition root, DryRun graph validation, Decorate, RecoverFromPanics, fx vs dig choice. fx evals additionally cover lifecycle non-blocking OnStart, fx.Annotate vs fx.Out, modules, fx.Supply, fx.Replace + fx.Populate in fxtest, fxevent.ZapLogger, manual lifecycle for CLI embedding.

* test(uber-dig,uber-fx): add preliminary eval results to EVALUATIONS.md

Ran 4 evals × 2 configs per skill (16 subagents total) with Claude Opus 4.7. Both skills score 100% with-skill. Without-skill: dig 90% (-10pp uplift), fx 95% (-5pp uplift). The base model has very strong baseline knowledge of both libraries; only adversarial evals targeting subtle API choices (Decorate vs scope-shadow Provide; fx.As interface binding) showed meaningful uplift. Full 11-eval suite (53/56 assertions) remains in evals.json for re-runs via /skill-creator.

* fix(uber-dig): clean up unused context import and fix handler signature in recipes

* fix(golang-uber-dig,golang-uber-fx): address PR #25 review comments and deep review findings

PR comments:
- dig/advanced.md: rephrase "module boundaries" to "scope/package wiring boundaries"
- dig/recipes.md: fix ignored repo.List error in HTTP handler (return 500)
- dig/recipes.md: remove unused context import and _ = context.Background hack
- dig/recipes.md: fix handle() signature to idiomatic (w, r) order
- fx/testing.md: assert net.Listen error before using listener

Deep review:
- dig/advanced.md: add code example for dig.Export(true) call site
- dig/advanced.md: clarify c.String() as text summary, not DOT output
- dig/recipes.md: add missing root.Provide(NewHandler) to request-scope recipe
- fx/advanced.md: add fx.ErrorHook to lifecycle quick reference
- fx/testing.md: add zaptest/observer import hint to observer example
- fx/testing.md: comment why lc.Start is used instead of RequireStart
This commit is contained in:
Samuel Berthe
2026-04-29 00:03:43 +02:00
committed by GitHub
parent 6a55473e25
commit 85156e78dd
12 changed files with 1944 additions and 4 deletions
+3 -3
View File
@@ -185,8 +185,8 @@ These skills are designed as **atomic, cross-referencing units**. A skill may re
| ❌ `golang-spf13-cobra` | | — | 0 | 0 | 0 |
| ❌ `golang-spf13-viper` | | — | 0 | 0 | 0 |
| ❌ `golang-swagger` | | — | 0 | 0 | 0 |
| `golang-uber-dig` | | — | 0 | 0 | 0 |
| `golang-uber-fx` | | — | 0 | 0 | 0 |
| `golang-uber-dig` | | -10% | 107 | 2,264 | 5,904 |
| `golang-uber-fx` | | -5% | 118 | 2,499 | 6,747 |
| ✅ `golang-samber-do` | ⚡ | -81% | 70 | 1,746 | 3,269 |
| ✅ `golang-samber-hot` | ⚡ | -54% | 118 | 1,843 | 7,273 |
| ✅ `golang-samber-lo` | ⚡ | -40% | 155 | 2,410 | 10,031 |
@@ -201,7 +201,7 @@ These skills are designed as **atomic, cross-referencing units**. A skill may re
| | With Skill | Without Skill | Delta |
| ----------- | ------------------- | ------------------- | --------- |
| **Overall** | **3065/3141 (98%)** | **1691/3141 (54%)** | **+44pp** |
| **Overall** | **3106/3182 (98%)** | **1729/3182 (54%)** | **+44pp** |
See [EVALUATIONS.md](./EVALUATIONS.md) for the full per-skill breakdown.