go-vercel
БесплатноБез исполняемых скриптовНе проверенUnofficial Go client for the Vercel REST API, generated with oapi-codegen from Vercel's OpenAPI spec. Package `vercel` from `github.com/psyb0t/go-vercel`…
от psyb0t2 081 установка в других каталогахОб этом скилле
go-vercel
Typed Go client for the Vercel REST API. Every operation in Vercel's OpenAPI spec is a method on *vercel.ClientWithResponses.
For install, auth details, union responses and error handling, see references/setup.md.
Security & safety
- Read the token from an environment variable such as
VERCEL_TOKEN. Never hardcode it, commit it or log it, and never print request headers. - Requests go only to the base URL passed to
NewClientWithResponses. Usehttps://api.vercel.com. - Many endpoints change or delete live resources (deployments, projects, domains, DNS records, env vars, teams). Call those only when the user asked for that change, and only on resources the task is about.
When to use
- Go code needs to read or manage Vercel projects, deployments, domains, env vars or teams.
- The project already imports
github.com/psyb0t/go-vercel.
When NOT to use
- A shell script or CI step that the
vercelCLI already covers. - Code in a language other than Go.
Finding endpoints and types
The examples below cover a few calls. Every operation in the spec has a generated method, and the spec's descriptions are on them as Go doc comments. Look names and fields up instead of guessing. After go get github.com/psyb0t/go-vercel, from inside your module:
go doc github.com/psyb0t/go-vercel ClientWithResponsesInterface # every endpoint method
go doc github.com/psyb0t/go-vercel GetProjectsParams # one method, params type or model
go doc -all github.com/psyb0t/go-vercel # the whole package
The same documentation is at https://pkg.go.dev/github.com/psyb0t/go-vercel. The package is very large, so prefer the targeted go doc lines over -all.
Method names come from the spec's operation IDs. <OperationId>WithResponse takes the context, then the path parameters in order, then *<OperationId>Params when the operation has query or header parameters, then the request body when it has one. The JSON200 field (or JSON201 and so on, per declared status) holds the decoded body; it is nil for any other status.
Usage
import (
"context"
"net/http"
"os"
vercel "github.com/psyb0t/go-vercel"
)
auth := vercel.WithRequestEditorFn(func(_ context.Context, req *http.Request) error {
req.Header.Set("Authorization", "Bearer "+os.Getenv("VERCEL_TOKEN"))
// Requests act on your personal account unless they name a team.
if teamID := os.Getenv("VERCEL_TEAM_ID"); teamID != "" {
query := req.URL.Query()
query.Set("teamId", teamID)
req.URL.RawQuery = query.Encode()
}
return nil
})
client, err := vercel.NewClientWithResponses("https://api.vercel.com", auth)
if err != nil {
return err
}
res, err := client.GetAuthUserWithResponse(ctx)
if err != nil {
return err // transport error
}
if res.JSON200 == nil {
return fmt.Errorf("vercel: status %d: %s", res.StatusCode(), res.Body)
}
user, err := res.JSON200.User.AsAuthUser()
if err != nil {
return err
}
fmt.Println(user.Id, user.Username, user.Email)
Listing projects with typed params:
search := "site"
res, err := client.GetProjectsWithResponse(ctx, &vercel.GetProjectsParams{
Search: &search,
})
if err != nil {
return err
}
if res.JSON200 == nil {
return fmt.Errorf("vercel: status %d: %s", res.StatusCode(), res.Body)
}
page, err := res.JSON200.AsGetProjects200JSONResponseBody1()
if err != nil {
return err
}
for _, project := range page.Projects {
fmt.Println(project.Id, project.Name)
}
Method names follow the spec's operationId: getProjects becomes GetProjectsWithResponse. Look the name up with go doc as shown above rather than guessing it.
Установить go-vercel в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл go-vercel?
Unofficial Go client for the Vercel REST API, generated with oapi-codegen from Vercel's OpenAPI spec. Package `vercel` from `github.com/psyb0t/go-vercel` gives `NewClientWithResponses` a typed `...WithResponse` method for every endpoint in the spec (projects, deployments, domains, DNS, env vars, teams and more), with typed params structs, `JSON200` response bodies and `As...` methods for oneOf unions. Auth is a bearer token added by a `RequestEditorFn`, with an optional `teamId` query parameter. Use when Go code needs to call the Vercel API, or the project already imports go-vercel.
Как установить скилл go-vercel?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл go-vercel запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic