Skip to content
Skillv1.0.0

db

Database layer. Three subpackages, all opt-in via `golusoris.DB` (or imported individually):

by golusoris(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from golusoris/golusoris (db/AGENTS.md). Install upstream with npx skills add golusoris/golusoris --skill db. Copyright stays with the author.

Agent guide — db/

Database layer. Three subpackages, all opt-in via golusoris.DB (or imported individually):

Subpackage Purpose
db/pgx *pgxpool.Pool fx module with retry + slow-query tracer
db/migrate golang-migrate v4 runner with optional auto-up on fx Start
db/sqlc runtime helpers for sqlc-generated queries (WithTx, MapError)

testutil/pg (sibling, not under db/) boots a real Postgres via testcontainers for integration tests against this layer.

Conventions

  • Config keys live under db.* (env: APP_DB_*).
  • Wiring order: Coredbpgx.Moduledbmigrate.Module. Migrate inherits the pgx DSN by default.
  • Apps don't import database/sql. pgx is the only supported driver.

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/golusoris-golusoris-db/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

golusoris-golusoris-db.ocm.jsonjson
{
  "ocm": "1",
  "id": "golusoris-golusoris-db",
  "kind": "skill",
  "name": "db",
  "description": "Database layer. Three subpackages, all opt-in via `golusoris.DB` (or imported individually):",
  "publisher": "golusoris",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "general"
    ],
    "tags": [
      "skill-md",
      "github-agents"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Database layer. Three subpackages, all opt-in via `golusoris.DB` (or imported individually):"
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "github-agents",
      "repository": "https://github.com/golusoris/golusoris",
      "path": "db/AGENTS.md",
      "ref": "d5a862a77ad92addebfb1bb325c0f1707ca2f243",
      "url": "https://github.com/golusoris/golusoris/blob/d5a862a77ad92addebfb1bb325c0f1707ca2f243/db/AGENTS.md",
      "key": "golusoris/golusoris/db/AGENTS.md"
    }
  },
  "instructions": "# Agent guide — db/\n\nDatabase layer. Three subpackages, all opt-in via `golusoris.DB` (or imported individually):\n\n| Subpackage | Purpose |\n|---|---|\n| `db/pgx` | `*pgxpool.Pool` fx module with retry + slow-query tracer |\n| `db/migrate` | golang-migrate v4 runner with optional auto-up on fx Start |\n| `db/sqlc` | runtime helpers for sqlc-generated queries (WithTx, MapError) |\n\n`testutil/pg` (sibling, not under db/) boots a real Postgres via testcontainers\nfor integration tests against this layer.\n\n## Conventions\n\n- Config keys live under `db.*` (env: `APP_DB_*`).\n- Wiring order: `Core` → `dbpgx",
  "cost": {
    "context_tokens": 185
  }
}

Fetch it by URL: GET /api/v1/registry/golusoris-golusoris-db/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.