A personal library of agent skills capturing my Go and frontend conventions. Every skill is namespaced with the ubgo- prefix (e.g. ubgo-golang) so the collection scales without name collisions.
Each skill lives in its own directory under skills/ containing a SKILL.md with YAML frontmatter (name, description) plus instructions. Works with Claude Code, Cursor, Codex, Copilot, Windsurf, Gemini, Cline, and others.
Option A — Symlink mode (recommended for maintainers; live edits in this repo appear in the agent immediately):
git clone https://github.com/ubgo/ubgo-skills && cd ubgo-skills task install # symlinks every skills/<name>/ → ~/.claude/skills/<name>
Per-agent variants: task install:cursor · install:codex · install:windsurf · install:cline (symlink into the current project's rules dir). Run task --list for the full menu. Pull upstream + re-sync new skills with task update. Sanity check frontmatter with task validate.
Option B — CLI install via skills.sh (no clone):
npx skills add ubgo/ubgo-skills # or `npx skills` to browse firstThen restart your agent (or reload skills) and invoke a skill by its frontmatter name.
Skills come in three roles that map cleanly to the read / write / bootstrap split:
| Role | Naming | What it does | Loaded when |
|---|---|---|---|
| Rules | ubgo-<topic> |
The doctrine itself — read-side. Stack, anti-patterns, verbatim patterns. | Before any substantive work on that topic. |
| Train | ubgo-<topic>-train |
Maintenance loop — write-side. Captures universal lessons back into the canonical rules body. | When the user (or the agent itself) wants the rules to keep improving from real-session experience. |
| Learn | ubgo-<topic>-learn |
Bootstrap a per-repo overlay file (<topic>-project.md) that extends the universal rules with this repo's named constants, gotchas, workflow. |
When standing up agent rules in a new repo or refreshing an existing overlay. |
The three roles are independent — loading the train skill doesn't auto-train; it just makes the writeback mandate operational when applicable. Loading the learn skill doesn't auto-write an overlay; it gives you the recipe + multi-agent target paths.
| Skill | What it does |
|---|---|
ubgo-golang |
Universal Go backend rules — stack choices, the 3 commandments (no bare strings, no hardcoded enums, no DB-level business validation), entpoly polymorphism, reference tables, DB-as-dumb-storage, logging (lace/gozap), tracing (lace/gotel), valgo validation, concurrency/defer/time/HTTP/context.Value/constructors traps, migration discipline, anti-pattern catalog, pre-PR checklist. Read before any Go change. |
ubgo-golang-train |
Training loop for ubgo-golang. Captures universal Go learnings from real sessions back into the canonical golang.md, and (learn mode, LEARN.md) bootstraps a repo's golang-project.md overlay. Decision tree for universal vs project vs noise, section-targeting table, voice rules, conflict reconciliation, path-discovery sync ritual. The skill gets smarter every session it's loaded. |
ubgo-frontend |
Universal frontend rules — TanStack Start + Base UI (basecn) + Tailwind v4 + gqlkit SDK stack, the 5 commandments (no inline GraphQL, no useEffect-for-fetch, no native dialogs, no raw <select>, no Radix), design tokens (Fraunces + Geist + compact type scale), forms (TanStack Form + Zod), data fetching (TanStack Query), routing, dialogs/sheets, SSR safety (Nitro localStorage trap, barrel-cycle trap), keyboard dispatcher, hard-won traps, AND a long §29 "Concrete UI patterns" section with verbatim classNames for every primitive (buttons with two-table sizing mapping for compact-default vs shadcn-baseline projects, inputs, forms, ServerDataTable, EntityShell, QuickView, chips/status pills, color + opacity ramps). Read before any .tsx / .css change. |
ubgo-frontend-train |
Training loop for ubgo-frontend. Same shape as ubgo-golang-train but targets frontend.md. Captures universal UI/UX learnings (datagrid-not-bare-table, button-size mapping, dialog-width gotcha, etc.) back into the canonical body. Includes worked examples and a quality bar with the two-occurrence rule for §29 verbatim patterns. |
ubgo-wails-desktop |
Package an existing Go (Gin + gqlgen + oRPC + tRPC) backend and a Web SPA frontend (TanStack Start / Vite / Next-static / SvelteKit-static) into a single native macOS desktop binary using Wails — with ZERO TCP listeners at runtime. API calls ride the Wails IPC bridge into the existing Gin engine in-memory via httptest.NewRecorder. No backend or frontend rewrites; only a fetch-shaped transport swap via a bridgeFetch shim. Captures every gotcha from a real integration (Wails CLI vs Go workspace, macOS framework linker flags, TanStack Start _shell.html rename, config.Get CWD trap, DevTools build tags, base64 IPC overhead, vendor regeneration, Wails 2.8.1 mac.Options surface). |
ubgo-gomod-false-positive |
Diagnose + fix the gopls false positive "X is not in your go.mod file" (and malformed module path: missing dot, go.work requires go >= X (running go Y)) in a go.work multi-module workspace when go build/go list pass clean — including when the squiggle lands on the wrong file or on an obvious local module like lace. Deterministic gopls check reproduction + the seven stacked root causes: toolchain skew (system go older than go.work's directive; gopls forces GOTOOLCHAIN=local → whole workspace fails to load → everything errors), missing replace directives for dotless local modules, dependency version skew, root vendor/, go-directive mismatch, old gopls (pre-v0.22.0) mishandling pruned-graph + local replace, and workspace graph desync (a single-module dep that builds green when none of the others fit — go work sync reconciles it). Key lesson: the fixes are versions (toolchain ≥ go.work, gopls ≥ v0.22.0, align the replaced module's deps), not go.mod surgery — with a "what does NOT work" list (-mod=mod is rejected by the live server in workspace mode, blank-import whack-a-mole, removing vendor). |
- Skill directory + frontmatter
nameboth use theubgo-prefix. - One
SKILL.mdper skill; supporting files (golang.md,frontend.md,TRAIN.md, etc.) allowed alongside it as the rules body when a skill grows past a single file. - Skills are self-contained (no cross-skill imports); related skills cross-reference by name in their bodies.
- Rules-body skills (
ubgo-golang,ubgo-frontend) expect a project overlay atfrontend-project.md/golang-project.md(or under.claude/rules/,.cursor/rules/,.windsurf/rules/,.clinerules/,.codex/rules/,AGENTS.md,GEMINI.md,.github/copilot-instructions.md) that adds repo-specific specifics. Overlay overrides on conflict. - Train skills never edit overlays; they edit the canonical rules body. Discovery-first — paths are found via
findor asked for at runtime, never hardcoded. - Learn skills never edit canonical; they emit per-repo overlays in the format the target agent reads.
- When the project ships a knowledge-base CLI (
aicodermini,lore,codeskill), the skill expects you to query its rules / hotfixes store before substantive work — those are authoritative over the skill body on conflict.
See CONTRIBUTING.md. Short version: rules earn their place by citing the failure mode they prevent, verbatim shapes win over paraphrase, no hard-wrapped markdown, update the README table when adding a skill, open an issue first for reorgs.
Apache-2.0 © Aman Bansal. Use these skills freely in any project, public or private; attribution appreciated but not required.