library/specializations/cli-mcp-development/skills/terminal-capability-detector/SKILL.md
Detect terminal capabilities including color support, TTY status, size, and Unicode support for adaptive CLI output.
npx skillsauth add a5c-ai/babysitter terminal-capability-detectorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Detect terminal capabilities for adaptive CLI output.
import process from 'process';
import tty from 'tty';
export interface TerminalCapabilities {
isTTY: boolean;
colorLevel: 0 | 1 | 2 | 3;
supportsUnicode: boolean;
columns: number;
rows: number;
isCI: boolean;
}
export function detectCapabilities(): TerminalCapabilities {
const isTTY = tty.isatty(1);
const isCI = Boolean(process.env.CI || process.env.CONTINUOUS_INTEGRATION);
let colorLevel: 0 | 1 | 2 | 3 = 0;
if (isTTY && !process.env.NO_COLOR) {
if (process.env.COLORTERM === 'truecolor') colorLevel = 3;
else if (process.env.TERM?.includes('256color')) colorLevel = 2;
else if (process.env.TERM && process.env.TERM !== 'dumb') colorLevel = 1;
}
const supportsUnicode = process.platform !== 'win32' ||
process.env.WT_SESSION ||
process.env.TERM_PROGRAM === 'vscode';
return {
isTTY,
colorLevel,
supportsUnicode,
columns: process.stdout.columns || 80,
rows: process.stdout.rows || 24,
isCI,
};
}
development
Model documentation skill for generating model cards following Google's model card framework.
development
MLflow integration skill for experiment tracking, model registry, and artifact management. Enables LLMs to log experiments, compare runs, manage model lifecycle, and retrieve artifacts through the MLflow API.
data-ai
LIME-based local explanation skill for individual predictions across tabular, text, and image data.
devops
Kubeflow Pipelines skill for ML workflow orchestration, component management, and Kubernetes-native ML.