victorzhuk/skills

z-go-pkg

Query the official pkg.go.dev API (v1) for Go module and package metadata — package info, module versions, symbols, imported-by, search, and vulnerabilities.

Zobacz źródło

Jak używać

  1. Skopiuj polecenie instalacji i sprawdź źródła przed instalacją we własnym środowisku agenta.
  2. W oryginale sprawdź wymagane narzędzia, dane dostępowe i obsługiwane środowiska.
  3. Opisz dane wejściowe i oczekiwany rezultat; porównaj wynik ze źródłami.
npx skills add https://github.com/victorzhuk/skills --skill z-go-pkg

Przed rozpoczęciem

  • Instalacja nie obejmuje subskrypcji modelu, limitu API ani uprawnień do plików.
  • Gwiazdki i instalacje pokazują aktywność, a nie niezależny test jakości lub bezpieczeństwa.
Oryginalny dokument Skill

Treść z repozytorium z zachowaniem nagłówków, przykładów, kodu, tabel, linków i obrazów.

pkg.go.dev API

Authoritative metadata for published Go modules via a stateless, GET-only HTTP API. Use this instead of scraping pkg.go.dev HTML or relying on stale training data about versions, symbols, or dependents.

Base URL: https://pkg.go.dev/v1 Interactive spec: https://pkg.go.dev/api · OpenAPI: https://pkg.go.dev/v1/openapi.yaml

Endpoints

EndpointReturns
GET /v1/package/{path}Package metadata at {path}
GET /v1/module/{path}Module metadata at {path}
GET /v1/versions/{path}Versions of the module at {path}
GET /v1/packages/{path}Packages contained in the module at {path}
GET /v1/search?q={query}Search results
GET /v1/symbols/{path}Symbols declared by the package at {path}
GET /v1/imported-by/{path}Paths importing the package at {path}
GET /v1/vulns/{path}Vulnerabilities for the module/package at {path}

{path} is the import path appended directly, e.g. /v1/package/github.com/google/go-cmp/cmp.

Versions

package, module, and symbols endpoints accept an optional ?version= query param. Default is the latest tagged version.

  • Semantic version: ?version=v1.2.3
  • Branch: ?version=master or ?version=main only (resolves to a pseudo-version). Arbitrary branch names are NOT supported.

Precision over convenience

The API requires the module to be unambiguous. If a package path could be provided by multiple modules (e.g. example.com/a/b/c from either example.com/a or example.com/a/b), the API does NOT apply the web UI's "longest module path" rule — it returns candidates and an error asking you to be more specific. The web interface auto-resolves; the API does not.

Usage

Plain curl + jq:

bash
curl -s https://pkg.go.dev/v1/package/github.com/google/go-cmp/cmp | jq .
curl -s "https://pkg.go.dev/v1/package/github.com/google/go-cmp/cmp?version=master" | jq '{path, version}'

Example package response:

json
{
  "modulePath": "github.com/google/go-cmp",
  "version": "v0.7.0",
  "isLatest": true,
  "isStandardLibrary": false,
  "goos": "all",
  "goarch": "all",
  "path": "github.com/google/go-cmp/cmp",
  "name": "cmp",
  "synopsis": "Package cmp determines equality of values.",
  "isRedistributable": true
}

Reference CLI (pkgsite-cli)

A reference client. CLI surface is NOT yet stable; the HTTP API is.

bash
go install golang.org/x/pkgsite/cmd/internal/pkgsite-cli@v0.6.0

pkgsite-cli search "uuid"
pkgsite-cli package github.com/google/go-cmp/cmp
pkgsite-cli package --imported-by github.com/google/go-cmp/cmp
pkgsite-cli package --symbols github.com/google/go-cmp/cmp
pkgsite-cli module -versions github.com/google/go-cmp
pkgsite-cli module -packages -versions github.com/google/go-cmp

It handles pagination and formatting for you.

Notes

  • Stateless and cacheable — safe to call repeatedly; prefer it over HTML scraping.
  • /v1 is current. Backward compatibility is committed to for existing integrations.
  • The pinned pkgsite-cli release above tracks the module's tags; @latest is the

fallback only when deliberately tracking upstream between reviews.

  • When in doubt about exact field names or new endpoints, fetch the OpenAPI spec rather than guessing.
z tego samego repozytorium

Więcej Skills

Wszystkie Skills
victorzhuk
Społeczność

z-accessibility

Audit and improve web accessibility following WCAG 2.2 guidelines. Use when asked to "improve accessibility", "a11y audit", "WCAG compliance", "screen reader support", "keyboard navigation", or "make accessible".

instalacje
1
GitHub Stars
0
Aktualizacja
22 paź
victorzhuk
Społeczność

z-algo-core

DS/algorithm selection judgment for production code, not competitive tricks — hash map for membership/dedup, slice+sort beats a tree until proven, heap for top-k, two-pointer/sliding-window for scans, BFS/DFS/topo-sort for dependency shapes. Triggers on Big-O, hash map vs tree. Does not cover profiling/tuning; see [[z-go-performance]].

instalacje
1
GitHub Stars
0
Aktualizacja
22 paź
victorzhuk
Społeczność

z-bdd

BDD acceptance contracts for humans and agents across UI, API, and CLI products. Use for Gherkin, Given-When-Then, E2E acceptance, or scenario evidence. Define repeatable scenarios with explicit assertions and required outcomes. Test selection belongs to [[z-testing-strategy]]. Go harness wiring belongs to [[z-go-bdd]].

instalacje
1
GitHub Stars
0
Aktualizacja
22 paź
victorzhuk
Społeczność

z-codegraph

Use an existing CodeGraph integration for call graphs, impact analysis, affected tests, or route discovery. Discover installed tools and index freshness; follow host LSP precedence and verify current source. Do not initialize indexes without user authorization.

instalacje
1
GitHub Stars
0
Aktualizacja
22 paź