mirror of
https://github.com/samber/cc-skills-golang.git
synced 2026-09-11 19:46:44 +03:00
feat: add golang-swagger skill (swaggo/swag v2) (#31)
* feat: add golang-swagger skill
Covers swaggo/swag v2.0.0-rc5 — general API info annotations, operation
annotations (@Summary, @Param, @Success, @Router, @Security), security
definitions (Bearer/JWT, OAuth2, API key, Basic), struct tags (swaggertype,
enums, example, swaggerignore), and framework integrations (gin, echo,
fiber, chi, net/http).
Includes references/swag-cli.md with full CLI flag reference, dynamic
config, generics, nested composition, response headers, and MIME aliases.
* chore(golang-swagger): format, lint, token counts, README, evals
- Fix bare URL lint error (MD034)
- Update README: ❌ → ✅, token counts (desc=144, SKILL.md=2125, dir=3123)
- Add 12 adversarial evals (60 assertions) covering: blank import trap,
body param struct requirement, swaggertype for time.Time/[]byte, Chi
integration via http-swagger, AND security condition, -g flag for
general info file, godoc comment for swag fmt, collectionFormat(multi),
runtime docs.SwaggerInfo override, nested composition, enums/min/max
struct tags, swaggerignore
* chore: bump plugin version to 1.4.0
* Revert "chore: bump plugin version to 1.4.0"
This reverts commit 72f3669199.
* eval(golang-swagger): add evaluation results — 58/60 with skill, 43/60 without (+25pp)
12 adversarial evals (60 assertions). Key discriminating evals:
- swaggertype-overrides: 5/5 vs 1/5 (time.Time + []byte traps)
- map-response-type: 5/5 vs 3/5 (raw map in @Success)
- nested-composition: 5/5 vs 3/5 (Envelope{data=model.User} syntax)
- csv-vs-multi: 4/5 vs 2/5 (collectionFormat discrimination)
- blank-import + swaggerignore: each 5/5 vs 4/5
Evals 4 (Chi+env) and 9 (conditional toggle) score 5/5 in both
conditions — common knowledge. Eval 11 (example tag) misses in both
— coverage gap noted for future iteration.
* fix(golang-swagger): use named docs import when overriding SwaggerInfo
This commit is contained in:
@@ -183,7 +183,7 @@ These skills are designed as **atomic, cross-referencing units**. A skill may re
|
||||
| ✅ `golang-grpc` | ⚡ | -41% | 69 | 2,149 | 4,965 |
|
||||
| ❌ `golang-spf13-cobra` | | — | 0 | 0 | 0 |
|
||||
| ❌ `golang-spf13-viper` | | — | 0 | 0 | 0 |
|
||||
| ❌ `golang-swagger` | | — | 0 | 0 | 0 |
|
||||
| ✅ `golang-swagger` | ⚡ | — | 144 | 2,125 | 3,123 |
|
||||
| ✅ `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 |
|
||||
@@ -200,7 +200,7 @@ These skills are designed as **atomic, cross-referencing units**. A skill may re
|
||||
|
||||
| | With Skill | Without Skill | Delta |
|
||||
| ----------- | ------------------- | ------------------- | --------- |
|
||||
| **Overall** | **3106/3182 (98%)** | **1729/3182 (54%)** | **+44pp** |
|
||||
| **Overall** | **3164/3242 (98%)** | **1772/3242 (55%)** | **+43pp** |
|
||||
|
||||
See [EVALUATIONS.md](./EVALUATIONS.md) for the full per-skill breakdown.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user