terminal-capability-detector — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited terminal-capability-detector (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
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,
};
}~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.