util

Provide clipboard, fuzzy matching, truncation, and metrics utilities.

Updated May 6, 2026
One-click install
npx skills add https://github.com/dbowm91/codegg --skill util
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: util
Source: https://github.com/dbowm91/codegg/tree/main/.opencode/skills/util
Command: npx skills add https://github.com/dbowm91/codegg --skill util

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires arboard, strsim, parking_lot.

What problem does it solve?

This Skill provides a centralized toolkit for common text manipulation, fuzzy matching, and system observability tasks, reducing boilerplate code in the codegg environment.

Core Features & Use Cases

  • Fuzzy Matching: Perform intelligent string comparisons and command filtering using Levenshtein distance.
  • Text Truncation: Safely manage long content by truncating by lines or byte boundaries to maintain UI integrity.
  • Metrics Collection: Track application performance through counters, gauges, and histograms for real-time observability.

Quick Start

Use the util skill to fuzzy match the user input against the available command list and return the best candidates.

Frequently Asked Questions about util

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement fuzzy string matching for command filtering in a TUI?

Fuzzy matching uses Levenshtein distance via the strsim dependency to compare user input against a command list and return the best candidates. It supports intelligent string comparisons for TUI overlays.

What is the best way to truncate text by lines or byte boundaries to maintain UI integrity?

Text truncation manages long content by truncating by lines or byte boundaries to maintain UI integrity. It processes text content against specified limits to prevent layout breaks.

How do I track application performance with counters, gauges, and histograms?

Application performance tracking uses counters, gauges, and histograms for real-time observability. Atomic primitives provide thread-safe metrics collection across the application.

Does this utility toolkit support thread-safe metrics collection?

Thread-safe metrics collection is supported using atomic primitives for tracking application performance. This ensures safe concurrent access to counters, gauges, and histograms across threads.

Can I use arboard for clipboard management within a Rust application?

Clipboard management is supported using the arboard dependency to handle system clipboard operations. It provides utility functions for reading and writing clipboard content within the application environment.

What are the limitations of using Levenshtein distance for fuzzy string matching?

Levenshtein distance for fuzzy string matching calculates character-level edit differences, which may not capture semantic similarity. It works best for short strings like command names rather than long text content.