agentcli-go
agentcli-go framework reference for building Go CLI tools. Use when working on agentcli-go itself, scaffolding new CLI projects, adding commands, integrating the library, or debugging framework behavior. Triggers on: agentcli-go, scaffold new CLI, add command, cobrax, configx, AppContext, RunLifecycle, agentcli.
Why use this skill?
Use agentcli-go to rapidly scaffold, build, and maintain Go command-line tools. Standardize your projects with built-in logging, config management, and lifecycle hooks.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/gh-xj/agentcli-goWhat This Skill Does
The agentcli-go skill is a comprehensive framework and set of helper utilities designed to streamline the creation, management, and maintenance of CLI tools written in Go. It acts as an abstraction layer over standard CLI patterns, offering pre-configured scaffolding, robust logging with zerolog, structured lifecycle management, and a simplified interface for Cobra-based command development via its cobrax module. By standardizing the directory structure and providing built-in routines for configuration loading and execution monitoring, it allows developers to focus on application business logic rather than boilerplate code.
Installation
To integrate this skill into your environment, use the OpenClaw command-line interface:
clawhub install openclaw/skills/skills/gh-xj/agentcli-go
Ensure you have a valid Go workspace configured, as the framework relies on Go module resolution to generate scaffolded code and perform dependency checks.
Use Cases
- Rapid CLI Prototyping: Quickly scaffold a new CLI tool with a standard, production-ready directory layout, including task runners and testing boilerplate.
- Standardizing Tooling: Implement a consistent CLI interface across a team, ensuring every tool shares common flags like
--verbose,--json, and--config. - Operational Debugging: Utilize the
Doctorreport feature to troubleshoot environment configuration issues within your tool's runtime environment. - Command Extension: Easily modularize large CLI tools by adding sub-commands using the
cobraxpattern without managing complex root-command glue code.
Example Prompts
- "Scaffold a new CLI tool named 'data-processor' using agentcli-go with the module path 'github.com/myorg/processor'."
- "Add a new 'sync' command to my current tool using the 'file-sync' preset."
- "Run a doctor check on the current directory to verify my tool's configuration and dependency status."
Tips & Limitations
- Tips: Use the
cobraxpackage for all new commands to ensure automatic integration with the framework's persistent flags. For configuration, leverageconfigx.Load()to maintain consistency withagentclistandards. - Limitations: Currently strictly bound to the
v0.x.yversioning scheme, implying the API surface is subject to breaking changes. It is optimized for internal tooling rather than high-performance public-facing server software.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-gh-xj-agentcli-go": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-write, file-read, code-execution