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.

Voir la source

Mode d’emploi

  1. Copiez la commande et examinez le paquet avant de l’installer dans votre environnement agent.
  2. Consultez le document original pour les outils, identifiants et environnements requis.
  3. Décrivez les entrées et le livrable souhaité ; comparez la sortie aux sources.
npx skills add https://github.com/victorzhuk/skills --skill z-go-taskfile

Avant de commencer

  • L’installation n’inclut ni abonnement au modèle, ni quota API, ni accès aux fichiers.
  • Étoiles et installations reflètent l’activité, pas un test indépendant de qualité ou de sécurité.
Document Skill original

Rendu depuis le dépôt source en conservant titres, exemples, code, tableaux, liens et images.

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
du même dépôt

Autres Skills

Tous les Skills
victorzhuk
Communauté

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

installations
1
GitHub Stars
0
Mis à jour
22 oct.
victorzhuk
Communauté

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

installations
1
GitHub Stars
0
Mis à jour
22 oct.
victorzhuk
Communauté

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

installations
1
GitHub Stars
0
Mis à jour
22 oct.
victorzhuk
Communauté

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.

installations
1
GitHub Stars
0
Mis à jour
22 oct.