outofgas-utils
Guide for the `packages/utils` workspace in the OutOfGas monorepo. Use when editing shared helpers for formatting, explorer URLs, HyperEVM utilities, clipboard helpers, async timing helpers, or market-data integrations such as DexScreener and GeckoTerminal.
How do I install this agent skill?
npx skills add https://github.com/outofgas-org/outofgas --skill outofgas-utilsIs this agent skill safe to install?
- Gen Agent Trust Hubpass
The outofgas-utils skill is a development guide for a utility library in a monorepo. It provides instructions for managing shared helpers related to formatting, blockchain explorers, and market data integrations. The skill includes standard development commands and presents no malicious patterns.
- Socketpass
No alerts
- Snykwarn
Risk: MEDIUM · 1 issue
What does this agent skill do?
Outofgas Utils
Overview
Use this skill for generic shared helpers in packages/utils. This package is the right home for utilities that are reusable across apps, hooks, and contract packages.
What This Workspace Owns
- formatting helpers in
format.ts - explorer helpers in
explorer.ts - HyperEVM helpers in
hyperevm.ts - clipboard helpers in
clipboard.ts - async timing helpers in
sleep.ts - market-data integrations in
dexscreener.tsandgeckoterminal.ts - shared types in
types.ts
Several modules already have Jest specs, so keep test coverage aligned with behavior changes.
Key Methods
Use the existing helpers before adding new utility APIs.
format.ts
shortenId(id, startWidth, endWidth): Collapse long identifiers such as addresses or tx hashes intoprefix...suffix.formatPrice(price): Format token prices with magnitude-aware precision and switch to subscript-style formatting for tiny values.formatPriceSubscript(num, maxDecimals): Render very small decimal values with subscript zeros.formatHuman(value, options): Convert large numbers into compactK,M, andBdisplay strings.formatWithSignificant(num, decimals, significant): Use fixed decimals for values>= 1and significant digits for smaller values.
explorer.ts
getExplorerUrl(chain, type, value, options): Build a block explorer URL for a transaction, address, or token using aviemchain config and optional overrides.
hyperevm.ts
hyperevm: Export the repo'sviemchain definition for HyperEVM, including RPC URLs, explorer URL, and multicall contract metadata.
clipboard.ts
copyToClipboard(text, cb): Copy text withnavigator.clipboardwhen available and fall back todocument.execCommand('copy').pasteFromClipboard(cb): Read clipboard text with async browser APIs when available and fall back to a paste-capable textarea flow.
sleep.ts
sleep(ms): Return a promise that resolves aftermsmilliseconds for simple async pacing and retry flows.
dexscreener.ts
new DexScreener(apiKey?): Create a client for the DexScreener API.pairSearch(query): Search DexScreener pairs usinglatest/dex/search.
geckoterminal.ts
new GeckoTerminal(apiKey?): Create a client for GeckoTerminal API calls.parsePairName(name): Parse pair display strings intosymbol0,symbol1, andfeeTier.getPairs(dex, page, options): Fetch and normalize one page of HypereVM pool data for a DEX.getAllPairs(dex, options): Page through pools and aggregate all normalized pairs, with a lower cap when no API key is present.
Working Rules
- Keep utilities generic and decoupled from React.
- Add or update matching
*.spec.tsfiles when behavior changes. - Export new public helpers through
src/index.ts. - Keep browser-only helpers such as clipboard access safe for client-side usage.
- Preserve the existing package boundaries: explorer and formatting helpers stay here, not in apps or hooks.
Validation
Run from packages/utils:
npm test
npm run lint
npm run build
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/outofgas-org/outofgas/outofgas-utils">View outofgas-utils on skillZs</a>