console-rendering
Instructions for using the struct tag-based console rendering system in Go
Best use case
console-rendering is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Instructions for using the struct tag-based console rendering system in Go
Teams using console-rendering should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/console-rendering/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How console-rendering Compares
| Feature / Agent | console-rendering | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Instructions for using the struct tag-based console rendering system in Go
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
AI Agents for Marketing
Discover AI agents for marketing workflows, from SEO and content production to campaign research, outreach, and analytics.
AI Agents for Startups
Explore AI agent skills for startup validation, product research, growth experiments, documentation, and fast execution with small teams.
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
SKILL.md Source
# Console Rendering System Usage
This skill provides instructions for using the struct tag-based console rendering system.
## Struct Tag Support
Use the `console` struct tag to control rendering behavior:
- **`header:"Name"`** - Sets the display name for fields (used in both structs and tables)
- **`title:"Section Title"`** - Sets the title for nested structs, slices, or maps
- **`format:"type"`** - Sets the formatting type for the field value
- `format:number` - Formats integers as human-readable numbers (e.g., "1k", "1.2M")
- `format:cost` - Formats floats as currency with $ prefix (e.g., "$1.234")
- **`omitempty`** - Skips the field if it has a zero value
- **`"-"`** - Always skips the field
## Example Usage
```go
type Overview struct {
RunID int64 `console:"header:Run ID"`
Workflow string `console:"header:Workflow"`
Status string `console:"header:Status"`
Duration string `console:"header:Duration,omitempty"`
}
data := Overview{
RunID: 12345,
Workflow: "test-workflow",
Status: "completed",
Duration: "5m30s",
}
// Simple rendering
fmt.Print(console.RenderStruct(data))
// Output:
// Run ID : 12345
// Workflow: test-workflow
// Status : completed
// Duration: 5m30s
```
## Format Tag Examples
### Number Formatting
```go
type Metrics struct {
TokenUsage int `console:"header:Token Usage,format:number"`
Errors int `console:"header:Errors"`
}
data := Metrics{
TokenUsage: 250000,
Errors: 5,
}
// Renders as:
// Token Usage: 250k
// Errors : 5
```
### Cost Formatting
```go
type Billing struct {
Cost float64 `console:"header:Estimated Cost,format:cost"`
}
data := Billing{
Cost: 1.234,
}
// Renders as:
// Estimated Cost: $1.234
```
## Rendering Behavior
### Structs
Structs are rendered as key-value pairs with proper alignment.
### Slices
Slices of structs are automatically rendered as tables:
```go
type Job struct {
Name string `console:"header:Name"`
Status string `console:"header:Status"`
Conclusion string `console:"header:Conclusion,omitempty"`
}
jobs := []Job{
{Name: "build", Status: "completed", Conclusion: "success"},
{Name: "test", Status: "in_progress", Conclusion: ""},
}
fmt.Print(console.RenderStruct(jobs))
```
Renders as:
```
Name | Status | Conclusion
----- | ----------- | ----------
build | completed | success
test | in_progress | -
```
### Maps
Maps are rendered as markdown-style headers with key-value pairs.
### Special Type Handling
#### time.Time
`time.Time` fields are automatically formatted as `"2006-01-02 15:04:05"`. Zero time values are considered empty when used with `omitempty`.
#### Unexported Fields
The rendering system safely handles unexported struct fields by checking `CanInterface()` before attempting to access field values.Related Skills
temporary-id-safe-output
Plan for adding temporary ID support to safe output jobs
skills
Using Skillz MCP Server with Docker
reporting
Guidelines for formatting reports using HTML details/summary tags
messages
Instructions for adding new message types to the safe-output messages system
javascript-refactoring
Instructions for refactoring JavaScript code into separate files
http_mcp_headers
HTTP MCP Header Secret Support - Implementation Summary
github-script
Best practices for writing JavaScript code for GitHub Actions using github-script
github-pr-query
Query GitHub pull requests efficiently with jq argument support for filtering
github-mcp-server
GitHub MCP Server Documentation
github-issue-query
Query GitHub issues efficiently with jq argument support for filtering
github-discussion-query
Query GitHub discussions efficiently with jq argument support for filtering
github-copilot-agent-tips-and-tricks
Tips and Tricks for Working with GitHub Copilot Agent PRs