x-is

Value validation and environment detection tool for Shell scripts. Validates input types (integers, floats, IPs), compares file ages, detects runtime environments (TTY, WSL, Termux, Cygwin). Supports batch checking with exit code 0 success / 1 failure. Trigger when user needs to validate input types, detect terminal environment, check file freshness, verify variable states, or perform environment suitability checks (suitable_pkg/suitable_advise). Keywords: validate, check, verify, is, integer, float, positive, negative, range, IP address, file age, interactive, WSL, Termux, environment detection, unset variable, batch check.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "x-is" with this command: npx skills add X-CMD/x-is

x is - Value & Environment Validation

x is is x-cmd's value validation tool for checking if values or environment states meet specific criteria. Supports batch checking multiple values, ideal for robust Shell scripting.

Prerequisites

  1. Load x-cmd before use:
    . ~/.x-cmd.root/X
    

Core Usage

  • Type Check: x is int 42 100 -5 / x is float 3.14
  • Range Check: x is minmax 1 100 50 75
  • Compare: x is eq "a" "a" / x is within "ok" pending success
  • IP Check: x is ip 192.168.1.1
  • File Age: x is newest target src/*.c / x is oldest cache.txt /tmp/*.tmp
  • Variable Check: x is unset VAR1 VAR2
  • Environment Detection: x is interactive / x is wsl / x is termux

Subcommands

Type

CommandDescription
intInteger check, batch supported
floatFloat check (must contain decimal point)
positivePositive integer (≥0)
negativeNegative integer (<0)
minmaxRange check [MIN,MAX]

Compare

CommandDescription
eqMultiple values equal
withinFirst value in candidate list
inColon-separated list member check
in-Dash-separated list
in_Underscore-separated list
in/Slash-separated list
in|Pipe-separated list

Network

CommandDescription
ipIPv4 address check

File

CommandDescription
newestFile newer than others (glob supported)
oldestFile older than others (glob supported)

Variable

CommandDescription
unsetVariable is unset

Environment

CommandDescription
interactiveInteractive session
interactive_ttystdin is interactive TTY
interactiveshellShell is interactive
replREPL mode
stdout2ttystdout outputs to TTY
wslWSL environment
cygwinCygwin environment
msysMSYS/MinGW environment
gitbashGit Bash environment
termuxTermux environment
ishiSH environment

Suitability

CommandDescription
suitable_pkgSuitable for package installation
suitable_advise_envSuitable for advise feature
suitable_advise_replSuitable for advise REPL

Practical Examples

Batch Type Validation

x is int 1 2 3 4 5 && echo "All integers"
x is float 3.14 -2.5 .5 && echo "All floats"

Environment Conditional Branch

x is interactive && echo "Interactive session" || echo "Script mode"
x is wsl && echo "WSL environment" || echo "Not WSL"
x is termux && echo "Termux environment"

File Status Check

x is newest build.tar.gz src/*.c lib/*.h || echo "Rebuild needed"

Variable Cleanup Verification

x is unset TEMP_VAR1 TEMP_VAR2 && echo "Temp variables cleaned"

Script Pre-flight Check

x is suitable_pkg || { echo "Environment not suitable"; exit 1; }

Design Principles

  • Batch First: Check multiple values at once, all must pass
  • Exit Code Semantics: 0 = success, 1 = failure, perfect for &&/|| chains
  • Silent: Validation tool outputs nothing, only exit code indicates result

Get Help

x is --help

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

letcairn.work

Project management for AI agents using markdown files. Install and use the cairn CLI to create projects, manage tasks, track status, and coordinate human-AI collaboration through a shared workspace of markdown files.

Registry SourceRecently Updated
1.6K0Profile unavailable
Coding

Find Skills

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express...

Registry SourceRecently Updated
2040Profile unavailable
Coding

CLI-Hub Tools

CLI-Hub工具箱 - 100+ CLI工具一键安装。浏览器自动化、视频编辑、知识管理、AI模型、云服务等。源自HKUDS CLI-Anything项目。

Registry SourceRecently Updated
590Profile unavailable
General

Openclaw Rescue Kit

OpenClaw 自救套件 - 网关启动包装(端口冲突防护)、看门狗监控、自动重启、配置回滚、安全加固、日志清理、Git版本管理。当用户提到 OpenClaw 网关崩溃、需要看门狗、配置回滚、安全扫描、日志清理、端口冲突、或部署自救脚本时使用此技能。包含 10 个独立脚本和完整部署指南。

Registry SourceRecently Updated
5380Profile unavailable