terminal-capability-detector

Detect terminal capabilities including color support, TTY status, size, and Unicode support for adaptive CLI output.

509 stars

Best use case

terminal-capability-detector is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Detect terminal capabilities including color support, TTY status, size, and Unicode support for adaptive CLI output.

Teams using terminal-capability-detector 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

$curl -o ~/.claude/skills/terminal-capability-detector/SKILL.md --create-dirs "https://raw.githubusercontent.com/a5c-ai/babysitter/main/library/specializations/cli-mcp-development/skills/terminal-capability-detector/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/terminal-capability-detector/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How terminal-capability-detector Compares

Feature / Agentterminal-capability-detectorStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Detect terminal capabilities including color support, TTY status, size, and Unicode support for adaptive CLI output.

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.

SKILL.md Source

# Terminal Capability Detector

Detect terminal capabilities for adaptive CLI output.

## Capabilities

- Detect color support levels
- Check TTY status
- Get terminal dimensions
- Detect Unicode support
- Check for CI environment
- Configure adaptive output

## Generated Patterns

```typescript
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,
  };
}
```

## Target Processes

- cross-platform-cli-compatibility
- cli-output-formatting
- progress-status-indicators

Related Skills

homoglyph-detector

509
from a5c-ai/babysitter

Byte-level Unicode homoglyph detection for identifying invisible character substitutions in code

geant4-detector-simulator

509
from a5c-ai/babysitter

Geant4 detector simulation skill for particle transport, detector geometry, and physics process modeling

structural-variant-detector

509
from a5c-ai/babysitter

Structural variant detection skill for identifying CNVs, inversions, translocations, and complex rearrangements

fusion-gene-detector

509
from a5c-ai/babysitter

Gene fusion detection skill for oncology applications with multiple caller integration

process-capability-calculator

509
from a5c-ai/babysitter

Process capability analysis skill with Cp, Cpk, Pp, Ppk calculations and specification compliance assessment

memory-leak-detector

509
from a5c-ai/babysitter

Detect memory leaks in desktop applications through heap analysis and object tracking

fairlearn-bias-detector

509
from a5c-ai/babysitter

Fairness assessment skill using Fairlearn for bias detection, mitigation, and compliance reporting.

evidently-drift-detector

509
from a5c-ai/babysitter

Evidently AI skill for data drift detection, model performance monitoring, target drift analysis, and automated reporting for ML systems in production.

code-smell-detector

509
from a5c-ai/babysitter

Automated detection of code smells and anti-patterns to identify refactoring opportunities

mcp-capability-declarator

509
from a5c-ai/babysitter

Generate MCP capability declarations from tool and resource inventory with proper versioning and feature flags.

prompt-injection-detector

509
from a5c-ai/babysitter

Prompt injection detection and prevention for secure LLM applications

process-builder

509
from a5c-ai/babysitter

Scaffold new babysitter process definitions following SDK patterns, proper structure, and best practices. Guides the 3-phase workflow from research to implementation.

Workflow & Productivity