Agent skill

Valgo

by cohesivestack in cohesivestack/valgo

Add, refactor, debug, review, explain, or migrate type-safe validation in consumer Go applications using github.com/cohesivestack/valgo.

MITAuto-check passedDevelopment

Install Valgo

skills CLI
$ npx skills add cohesivestack/valgo --skill valgo -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install cohesivestack/valgo valgo --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/cohesivestack/valgo.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/valgo .claude/skills/valgo && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
valgo
GitHub stars
508
Token cost
~2.4k tokens
SKILL.md length
1,188 words
Files
5 (incl. references)
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

Add, refactor, debug, review, explain, or migrate type-safe validation in consumer Go applications using github.com/cohesivestack/valgo.

  • Works in 6 steps: Read repository instructions and locate… → Inspect package organization, request or… → Determine whether Valgo is installed and… → …
  • Existing Valgo integrations
  • SKILL.md covers Inspect the consumer project, Resolve API details in…, Load bundled references… and Design the validation, plus 2 more sections
  • Calls go

What it does

Valgo is an agent skill from cohesivestack/valgo. Add, refactor, debug, review, explain, or migrate type-safe validation in consumer Go applications using github.com/cohesivestack/valgo. Use for new or existing Valgo integrations, validator and rule selection, nested or conditional validation, errors and localization, reusable or custom validators, migrations from tag-based validation libraries, and version-compatible Valgo code generation and verification.

Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including reference files (for example `agents/openai.yaml`, `references/patterns.md` and `references/rule-index.md`).

It sits in Development, covering Internationalization, Type safety and Refactoring. It works with GitHub and Go. The repository describes itself as: Valgo is a type-safe, expressive, and extensible validation library for Go with built-in i18n support. The licence is MIT.

When your agent uses it

  • Existing Valgo integrations
  • Validator and rule selection
  • Conditional validation
  • Errors and localization

Example prompts

  • “/valgo”

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Read repository instructions and locate go.mod, go.work, vendor/,
  2. Inspect package organization, request or domain types, JSON/form field
  3. Determine whether Valgo is installed and resolve the code actually built
  4. Record Version, Dir, GoMod, and any Replace value. Inspect vendored
  5. Preserve the installed version. Do not run an upgrade, change a replacement,
  6. For a new integration, identify the latest stable Valgo release whose

What it can do on your machine

Read from SKILL.md and the folder at commit dbaf591. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • go

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Valgo loads about 2.4k tokens when it runs, and up to ~6.5k if it reads all its reference files. Until then it costs about 104 tokens; SKILL.md has 1,188 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~104
When it runs · the whole SKILL.md, loaded when a task matches
~2.4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~6.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from cohesivestack/valgo at commit dbaf591, republished under its MIT licence (© cohesivestack). 1,188 words, ~2,387 tokens.

Download SKILL.mdSave it as .claude/skills/valgo/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
valgo
description
Add, refactor, debug, review, explain, or migrate type-safe validation in consumer Go applications using github.com/cohesivestack/valgo. Use for new or existing Valgo integrations, validator and rule selection, nested or conditional validation, errors and localization, reusable or custom validators, migrations from tag-based validation libraries, and version-compatible Valgo code generation and verification.

Valgo

Use Valgo in an application that consumes the library. Do not use this skill to develop, maintain, or contribute to Valgo itself. For upstream Valgo work, follow that repository's contributor instructions and treat its source and tests as the implementation under change.

Inspect the consumer project

Start from the project root and inspect before editing:

  1. Read repository instructions and locate go.mod, go.work, vendor/, relevant packages, tests, and generated-code policies.

  2. Inspect package organization, request or domain types, JSON/form field naming, error handling, HTTP framework conventions, localization needs, and existing validation helpers.

  3. Determine whether Valgo is installed and resolve the code actually built:

    bash
    go list -m -json github.com/cohesivestack/valgo
  4. Record Version, Dir, GoMod, and any Replace value. Inspect vendored code or a local replacement when the build uses it; a tag alone is then not the effective API.

  5. Preserve the installed version. Do not run an upgrade, change a replacement, or add a second validation library unless the user explicitly requests it.

  6. For a new integration, identify the latest stable Valgo release whose go.mod is compatible with the project's Go version:

    bash
    go list -m -versions github.com/cohesivestack/valgo
    go list -m -json github.com/cohesivestack/valgo@vX.Y.Z

    Add the selected explicit version. Do not hard-code the version listed in this skill.

If go list reports that Valgo is absent, add it only when the requested work requires a new integration or migration.

Resolve API details in source-of-truth order

Use this priority:

  1. The API in the effective Valgo source used by the consumer project (Dir, replacement, or vendor tree).
  2. Valgo documentation from the same release or minor-version snapshot.
  3. This skill's references.
  4. Latest Valgo documentation only for a new integration or explicit upgrade.

Never silently use master APIs in a project pinned to an older release. If documentation and source disagree, investigate the version boundary and follow the effective source. Use go doc, source declarations, and package tests to settle ambiguity. Never invent a constructor, rule, session method, option, or error helper. If matching docs are not shipped with the effective source, retrieve them from the exact release tag rather than the latest branch.

Read only the matching documentation needed for the task:

  • Setup and sessions: getting-started.md and using-valgo/validation-sessions.md
  • Validator selection and rules: validators/overview.md, validators/rule-index.md, and the relevant validator page
  • Stateless boolean rules: validators/predicates.md when that page and the github.com/cohesivestack/valgo/is package exist in the effective version
  • Nested values and slices: using-valgo/namespaces.md
  • Result queries and conditional work: using-valgo/querying-results.md and using-valgo/conditional-flows.md
  • Errors, localization, and factories: using-valgo/errors.md and using-valgo/localization.md
  • OR behavior: validators/or-operators.md (or the matching older page)
  • Extension and reusable patterns: extending/custom-validators.md and the relevant cookbook/ page
  • Release differences: migration.md

When versioned docs exist, select the directory matching the installed minor release. Use unversioned latest docs only under priority 4 above.

Load bundled references selectively

  • Read references/rule-index.md before choosing an unfamiliar constructor or translating rules from another library. Confirm every selected API against the installed version.
  • Read references/patterns.md only for the requested feature: pointers, namespaces, slices, conditionals, errors, localization, factories, reuse, custom validators, Or(), or OrElse().
  • Read references/version-notes.md when the project is pinned, replaced, vendored, being upgraded, or uses a deprecated name. Treat it as a risk checklist, not a changelog.

Design the validation

  1. Preserve the project's existing field paths, titles, message language, response schema, and boundary between validation and transport handling.

  2. Prefer the conventional alias for a new import:

    go
    import v "github.com/cohesivestack/valgo"

    Preserve a different established alias.

  3. Keep Valgo's function-based model. Do not introduce validation struct tags.

  4. Select the narrowest validator compatible with the Go value's exact type. On versions with generalized numeric constructors, use Int/IntP for signed integers, Uint/UintP for unsigned integers, and Float/FloatP for floating-point values regardless of width. On older versions, use the width-specific constructor. Do not replace pointer absence with a sentinel zero value. For strings, use EqualTo for exact equality. Use EqualFold only when the effective version provides it and Unicode simple case-insensitive comparison is intended; it does not normalize text or perform full case folding.

  5. Give validators stable machine-readable names. Use titles only when display text must differ from the field name.

  6. Use In for nested objects, InRow for slices of objects, and InCell for slices of scalar values. Match the project's dot/index path convention.

  7. Keep session operations separate from validator rules:

    • Build or extend sessions with Is, Check, New, In, InRow, InCell, If, When, Do, and Merge only when supported.
    • Chain rules such as Not, Blank, Between, or Passing on a type-compatible validator.
  8. Use Is for the usual first-failure-per-validator behavior. Use Check only when the consumer needs every failing message in a chain. Use New for sessions assembled over multiple statements.

  9. Treat Or() grouping and OrElse() cut semantics as version-sensitive. Verify both behavior and error shape in matching docs/tests before changing a chain.

  10. Keep a one-off validation local. Extract a helper returning *v.Validation when the pattern genuinely repeats. Create a custom validator only for a reusable domain rule that benefits from its own typed API and message key.

  11. When the effective Valgo version includes the is subpackage, use its stateless predicates for reusable boolean checks that do not need field paths, messages, localization, or validation-session results. A predicate may be passed to a validator's Passing method when an error is needed.

Show full SKILL.md (329 more words)Show less

Follow the task-specific workflow

Add or change validation

Translate requirements into exact Go value types, field paths, rules, and expected errors. Implement the smallest change that fits existing package and handler conventions. Do not replace project error handling merely because Valgo offers another output form.

Review, debug, or refactor

Trace each input value through its constructor, rule chain, namespace, session operation, and error conversion. Check pointer nil behavior, rune-versus-byte length, OR precedence, conditional evaluation timing, unknown-path queries, and Is versus Check. Preserve observable behavior during refactors unless the user requests a behavior change.

Migrate another validation library
  1. Inventory tags, aliases, registered custom rules, cross-field checks, conditional rules, slice traversal, translations, and error response code.
  2. Capture existing valid/invalid cases and error paths in tests before replacing behavior.
  3. Map each rule explicitly to an installed Valgo API or an ordinary Go/custom predicate. Do not infer a same-named Valgo method from a source-library tag.
  4. Convert required according to the Go type and desired whitespace semantics; convert omitempty using pointers or explicit Go conditions; convert slice traversal with InRow or InCell; express cross-field rules with typed Go values and conditional session flow.
  5. Preserve JSON/form names and the external error contract. Remove the old dependency only when the requested migration is complete and no usages remain.

Verify the result

  1. Format every modified Go file with gofmt.
  2. Compile and run the narrowest relevant tests, then run go test ./... when practical.
  3. Run project-specific integration or handler tests that assert status codes, error paths, messages, locale, and JSON shape.
  4. If dependency metadata changed, inspect go.mod and go.sum; run go mod tidy only when appropriate, and verify it did not upgrade Valgo or unrelated dependencies unexpectedly.
  5. Search edited code for guessed or deprecated APIs and compare them with the effective source.
  6. Review the final diff for accidental abstractions, unrelated edits, changed error conventions, and version drift. Report commands run and any checks that could not be completed.

© cohesivestack, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (references) in skills/valgo of cohesivestack/valgo.

  • SKILL.md
  • agents/openai.yaml
  • references/patterns.md
  • references/rule-index.md
  • references/version-notes.md

Open the folder on GitHubat commit dbaf591

Compare with similar skills

Valgo next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Valgo compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Valgo this skillcohesivestack/valgo508—~2.4kAutomated safety check: PassMIT
Typed Dependencies with fp-go EffectIBM/fp-go2k—~4.3kAutomated safety check: PassApache-2.0
Golang Samber Mosamber/cc-skills-golang3.4k—~2.9kAutomated safety check: PassMIT
Golang Samber Locontext-labs/whip1.1k2 repos~2.3kAutomated safety check: PassMIT
Golang Samber Docontext-labs/whip1.1k1 repos~2.3kAutomated safety check: PassMIT
Golang Samber Mocontext-labs/whip1.1k—~2.8kAutomated safety check: PassMIT

Similar skills

  • Teaches an agent to write fp-go v2 services with the Effect type, carrying dependencies in its type parameter instead of in context.Context or parameters.

    2k GitHub stars~4.3k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Golang Samber Mo

    samber/cc-skills-golang

    Monadic types for Golang using samber/mo — Option, Result, Either, Future, IO, Task, and State types for type-safe nullable values, error handling, and functional composition with pipeline…

    3.4k GitHub stars~2.9k tokensUpdated 9 days ago
    DevelopmentAuto-check passed
  • Golang Samber Lo

    context-labs/whip

    Functional helpers for Go using samber/lo — 500+ type-safe generics for slices, maps, strings, concurrency (Map, Filter, Reduce); concurrent (lo/parallel), in-place (lo/mutable), lazy iterators…

    1.1k GitHub starsUsed in 2 repos~2.3k tokens
    DevelopmentAuto-check passed
  • Golang Samber Do

    context-labs/whip

    Dependency injection in Go using samber/do — service containers, lifecycle, scopes, health checks, graceful shutdown, module organization.

    1.1k GitHub starsUsed in 1 repo~2.3k tokens
    DevelopmentAuto-check passed
  • Golang Samber Mo

    context-labs/whip

    Monadic types in Golang via samber/mo — Option, Result, Either, Future, IO, Task, State for type-safe nullable values, error handling, functional composition.

    1.1k GitHub stars~2.8k tokensUpdated 5 days ago
    DevelopmentAuto-check passed
  • Use this skill when developing or maintaining browser extension code in the `browser/` directory, including Chrome/Firefox/Edge compatibility, content…

    29k GitHub starsUsed in 1 repo~288 tokens
    DevelopmentAuto-check passed

Works with

Questions about Valgo

What does Valgo do?

Add, refactor, debug, review, explain, or migrate type-safe validation in consumer Go applications using github.com/cohesivestack/valgo. Valgo is an agent skill from cohesivestack/valgo.com/cohesivestack/valgo.

When should I use Valgo?

Valgo fits situations like: existing Valgo integrations; validator and rule selection; conditional validation; errors and localization.

How do I install Valgo in Claude Code?

Run `npx skills add cohesivestack/valgo --skill valgo -a claude-code`. Or copy the skill folder (skills/valgo in cohesivestack/valgo) into .claude/skills/valgo in your project. Claude Code loads it when a task matches its description.

How do I install Valgo in Codex?

Run `npx skills add cohesivestack/valgo --skill valgo -a codex`. Or copy the skill folder (skills/valgo in cohesivestack/valgo) into .agents/skills/valgo in your project. Codex loads it when a task matches its description.

Can I use Valgo in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add cohesivestack/valgo --skill valgo -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/valgo, .gemini/skills/valgo, .github/skills/valgo and .opencode/skills/valgo in your project.

What does Valgo need to run?

Going by SKILL.md and its folder, Valgo needs the command-line tools its instructions call (go).

Does Valgo access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Valgo safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Valgo use?

Valgo is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Valgo use?

About 2.4k tokens (SKILL.md is roughly 9.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 4.1k tokens, read only when the agent opens those files.

What are the alternatives to Valgo?

Skills that share tags, products or a category with Valgo: Typed Dependencies with fp-go Effect (IBM/fp-go, 2k stars), Golang Samber Mo (samber/cc-skills-golang, 3.4k stars), Golang Samber Lo (context-labs/whip, 1.1k stars) and Golang Samber Do (context-labs/whip, 1.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Valgo?

cohesivestack (a GitHub organization) maintains it in cohesivestack/valgo, which has 508 GitHub stars. The repository was last updated on August 20, 2026.

Source: cohesivestack/valgo on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.