victorzhuk/skills

z-go-taskfile

Author a Taskfile.yml (go-task) for orchestration around a Go project — docker, databases, pipelines, CLI shortcuts, E2E — while delegating the inner loop to the Makefile.

Ver código-fonte

Como usar

  1. Copie o comando e verifique o pacote antes de instalar no seu ambiente de agente.
  2. Consulte no original as ferramentas, credenciais e ambientes necessários.
  3. Descreva os dados de entrada e a entrega esperada; confira a saída com as fontes.
npx skills add https://github.com/victorzhuk/skills --skill z-go-taskfile

Antes de começar

  • A instalação não inclui assinatura de modelo, franquia API ou acesso aos seus arquivos.
  • Estrelas e instalações indicam atividade, não um teste independente de qualidade ou segurança.
Documento original do Skill

Renderizado do repositório de origem, preservando títulos, exemplos, código, tabelas, links e imagens.

Go Taskfile (orchestration)

Preserve the project's existing build tool and approved commands. When Make and Task coexist, let Task compose environment operations and delegate existing build/test targets to [[z-go-makefile]]. Do not add Make to a Task-only project merely to enforce this split.

Single source of truth — delegate, don't duplicate

Never re-implement a Makefile command in a task. Call make:

yaml
test:
  desc: Run all Go tests (pass GO_TEST_FLAGS="-run Foo")
  vars:
    GO_TEST_FLAGS: '{{.GO_TEST_FLAGS | default ""}}'
  cmds:
    - make test GOTESTFLAGS='{{.GO_TEST_FLAGS}}'

fmt:   { desc: Format Go code, cmds: [make fmt] }
lint:  { desc: Run linter,    cmds: [make lint] }
build: { desc: Build the app, cmds: [make build] }

A copied-out go build/golangci-lint drifts from the Makefile (missing flags, stale install step). Delegation keeps them identical. The Makefile must keep process/test timeouts and concurrency caps separate from GOTESTFLAGS, which carries optional selectors only; see [[z-go-makefile]]. A command-line assignment, even empty, overrides a Make ?= default.

Discoverability

A default that lists tasks, and a one-line desc: on every task:

yaml
version: '3'
dotenv: ['.env', '.env.example']

tasks:
  default:
    desc: List all tasks
    cmds: [task --list]

Inputs

  • Optional vars with fallbacks: '{{.LIMIT | default "10"}}'.
  • Mandatory vars guarded up front:
yaml
migrate:create:
  desc: Create a migration (NAME=... required)
  requires: { vars: [NAME] }
  cmds:
    - 'go tool goose -dir {{.MIGDIR | shellQuote}} create {{.NAME | shellQuote}} sql'
  • Free-form passthrough to a CLI: {{.CLI_ARGS}} (everything after --):
yaml
run:
  desc: 'task run -- --source X --limit 10'
  cmds:
    - 'go run ./cmd/tool {{.CLI_ARGS}}'
  • Dynamic values via sh: (computed once at parse):
yaml
vars:
  RUN_DIR: { sh: 'echo "run-$(date +%Y%m%d-%H%M%S)"' }

Dependencies and safety

  • deps: [db:up] boots prerequisites (and runs them in parallel) before the task.
  • prompt: gates destructive actions behind a confirmation.
  • task: other composes pipelines from existing tasks.
yaml
migrate:up:
  desc: Apply migrations
  deps: [db:up]
  cmds:
    - 'go tool goose -dir {{.MIGDIR | shellQuote}} postgres "$DATABASE_URL" up'

db:nuke:
  desc: Drop the database volume (DESTRUCTIVE)
  prompt: This deletes all data. Continue?
  cmds: ['{{.COMPOSE}} down -v']

Layer split, concretely

ConcernLives inWhy
build / test / lint / fmt / generateMakefile (task delegates)pure Go inner loop
docker up/down, db shell, migrate-with-dbTaskfileneeds a running environment
pipelines, seeds, E2E, CLI shortcutsTaskfilemulti-step orchestration

Migration nuance: a Makefile migrate-up (bare goose, no docker — for CI/remote DBs) and a Task migrate:up (deps: [db:up] then the same goose) coexist on purpose; the Task one can still delegate the goose call to make migrate-up to avoid duplicating the command.

Do not

  • Re-implement build/test/lint/fmt that the Makefile owns — delegate via make.
  • Omit desc: — it's what task --list shows.
  • Rename a task another tool/CI/script calls (task db:up, task migrate:up) without

updating callers.

  • Hide a destructive action behind an innocuous name with no prompt:.
  • Re-derive env the Makefile already loads — set dotenv: once at the top.

Verify

sh
task --list                       # renders every task with its desc
task --dry test                   # shows it expands to `make test …`, runs nothing
do mesmo repositório

Mais Skills

Todos os Skills
victorzhuk
Comunidade

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".

instalações
1
GitHub Stars
0
Atualizado
22 de out.
victorzhuk
Comunidade

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]].

instalações
1
GitHub Stars
0
Atualizado
22 de out.
victorzhuk
Comunidade

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]].

instalações
1
GitHub Stars
0
Atualizado
22 de out.
victorzhuk
Comunidade

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.

instalações
1
GitHub Stars
0
Atualizado
22 de out.