golang-cli
Build Reliable Go Command-Line Applications
Go command-line projects need consistent commands, configuration, output, shutdown, and testing patterns. This skill applies practical Cobra and Viper guidance with reusable Go examples.
Installer avec mon Agent
Copiez cette demande dans votre Agent. Elle contient la page Skill de référence et le manifeste.
Review the Skillstore skill "golang-cli" from https://skillstore.io/skills/samber-golang-cli.md and its manifest at https://skillstore.io/api/skills/samber-golang-cli/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.Votre Agent doit toujours présenter son plan et demander toute confirmation exigée par la politique de sécurité.
Ressources lisibles par les agents
Utilisez ces liens lorsquâun Agent IA, un crawler ou un script a besoin dâun contexte propre au lieu de lire toute la page.
Tester
Utilisation de « golang-cli ». Design a deploy command with required environment and tag flags.
Résultat attendu:
- A command layout with declarative argument validation.
- Required environment and tag flags with mutual-exclusion rules.
- Viper bindings and completion values for supported environments.
Utilisation de « golang-cli ». Review a list command that mixes logs with pipeable output.
Résultat attendu:
A review that moves records to stdout, diagnostics to stderr, and recommends selectable table, plain, and JSON formats.
Utilisation de « golang-cli ». Add graceful shutdown to a server subcommand.
Résultat attendu:
A design using signal-aware context cancellation, SIGINT and SIGTERM support, a shutdown timeout, and distinct handling for normal server closure.
Audit de sécurité
SûrAll 94 static findings are false positives caused by Go syntax, Markdown formatting, Cobra identifiers, completion documentation, and benign build examples. No malicious behavior, prompt injection, data exfiltration, unsafe command execution, or covert system access was found.
Facteurs de risque
⥠Contient des scripts (12)
âïž Commandes externes (50)
đ AccĂšs au systĂšme de fichiers (4)
đ AccĂšs rĂ©seau (1)
Partager et citer ce rapport
Partagez le rapport dâĂ©valuation versionnĂ©, le badge neutre, la carte intĂ©grable et les citations. Skillstore prĂ©sente les preuves sans dĂ©cider si ce Skill est sĂ»r.
Copier le lien du rapport
https://skillstore.io/skills/samber-golang-cli/audits/1?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportBadge Markdown
[](https://skillstore.io/skills/samber-golang-cli?utm_source=security_passport_badge)Badge HTML
<a href="https://skillstore.io/skills/samber-golang-cli?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/samber-golang-cli/security.svg" alt="Skillstore security assessment" loading="lazy"></a>Carte intégrable
<iframe src="https://skillstore.io/embed/skills/samber-golang-cli.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>Citations académiques (APA · BibTeX · CFF)
Citation APA
samber. (2026). golang-cli security audit report (audit version 1) [Author version 1.3.0]. Skillstore. https://skillstore.io/skills/samber-golang-cli/audits/1Citation BibTeX
@techreport{samber-samber-golang-cli-2026,
author = {samber},
title = {golang-cli security audit report (audit version 1)},
institution = {Skillstore},
year = {2026},
number = {1},
url = {https://skillstore.io/skills/samber-golang-cli/audits/1},
note = {Author version 1.3.0}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "golang-cli security audit report (audit version 1)"
version: "1.3.0"
type: report
authors:
- name: "samber"
date-released: "2026-09-06"
url: "https://skillstore.io/skills/samber-golang-cli/audits/1"
identifiers:
- type: other
value: "skillstore:samber-golang-cli:audit:1"
description: "Skillstore immutable audit report identifier"
Score Skillstore
Pourquoi ce score Niveau de confiance des preuves: MoyenCe que vous pouvez créer
Start a Go CLI
Create a maintainable Cobra command tree with flags, configuration, output rules, and a minimal entry point.
Extend an Existing Tool
Add subcommands, configuration sources, shell completion, or machine-readable output while preserving established project structure.
Review CLI Behavior
Check exit codes, signal handling, output streams, argument validation, and command tests for predictable automation.
Essayez ces prompts
Create a Cobra command named [command]. Add [arguments] and [flags]. Keep main minimal and return errors from command handlers.
Add Viper configuration to this CLI. Use prefix [prefix], optional file [path], flag bindings, defaults, and clear precedence.
Review this command for scripting. Separate stdout and stderr, add table and JSON output, define exit codes, and add shell completion.
Refactor this server command for production. Add context cancellation, SIGINT and SIGTERM handling, timed shutdown, typed errors, and command-level tests.
Bonnes pratiques
- Read the existing command tree before changing structure or shared behavior.
- Bind configurable flags explicitly and document the precedence of every configuration source.
- Test commands through Cobra interfaces so arguments, output, and errors remain observable.
Ăviter
- Do not call process exit functions inside command handlers because deferred cleanup will not run.
- Do not write logs or diagnostics to stdout because they corrupt piped output.
- Do not require a configuration file when defaults and environment variables can provide valid settings.
Foire aux questions
Which Go CLI libraries does this skill emphasize?
Can it help with a standard library flag application?
Does it provide complete application code?
How does it support shell scripts?
Does it cover shell completion?
Can it review an existing CLI?
Détails du développeur
Auteur
samberLicence
MIT
Version de lâauteur
v1.3.0
Révision Skillstore
r1
Réf
e5464e662405de6361fdde6b984f9ea865635f64
Récence de maintenance
08/09/2026
Utilisation
1 téléchargements · 0 vues
Structure de fichiers
đ assets/
đ examples/
đ args.go
đ cli_test.go
đ completion.go
đ config.go
đ exit_codes.go
đ flags.go
đ main.go
đ output.go
đ root.go
đ serve.go
đ signal.go
đ version.go
đ evals/
đ evals.json
đ SKILL.md