Pular para o conteúdo
TakoAPI
Voltar às skills

agentcli-go

por gh-xj

Coding Agents & IDEs
314Downloads informados pelo clawskills.sh
0Visualizações
0 curtidaEntre para curtir esta skill
—Ainda sem avaliações
Sua avaliação

Resumo

agentcli-go framework reference for building Go CLI tools.

Descrição

O que esta skill faz

agentcli-go is a shared Go library that provides scaffolding, command wiring, config loading, and lifecycle hooks for building CLI tools. It exposes a standard project layout, a cobra wrapper (cobrax), and a config precedence system (configx). The module is pre-1.0 and hosted at github.com/gh-xj/agentcli-go.

Bundles cobra setup, zerolog initialization, config precedence logic, and scaffolding into one reusable module so the same patterns don't need to be wired from scratch in each project.

Quando usá-la

  • Scaffolding a new Go CLI project with standard directory layout
  • Adding a typed subcommand to an existing CLI tool using a preset
  • Loading config from a file, environment variables, and flags with defined precedence
  • Running preflight and postflight hooks around a command's main logic
  • Diagnosing a CLI project's structure with the doctor check

Exemplo de fluxo de trabalho

ENTRADA

User asks: scaffold a new Go CLI tool named my-tool with a sync command

AGENTE
  1. 1

    Run agentcli new --name my-tool --module github.com/me/my-tool to generate the project skeleton

  2. 2

    Review generated files: main.go, cmd/root.go, internal/app/, internal/config/, Taskfile.yml

  3. 3

    Run agentcli add command --name sync --preset file-sync to add the sync subcommand

  4. 4

    Wire configx.Load in internal/config/load.go with defaults, env prefix, and flag overrides

  5. 5

    Run task ci to confirm lint, tests, build, and smoke checks all pass

SAÍDA

A fully structured Go CLI project with the sync command wired and CI passing

Instalação

clawhub install gh-xj/agentcli-go

Execute o comando da CLI ou cole o prompt no Claude Code, Cursor, Codex ou no agente de código que você usa.

Links