Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

termux-compat-runner

БесплатноЗапускает вложенные скриптыНе проверен

Advisory skill for safe shell command execution on Termux/Android. Detects platform, checks tool availability, classifies risk, and provides a dry-run…

pmuhammadagus-byteот pmuhammadagus-byte664 установки в других каталогах

Об этом скилле

Termux Compat Runner

Advisory skill for safe shell command execution on Termux/Android. This skill is advisory-only — it guides safe command selection and provides a dry-run validator script. It does NOT execute commands.

Language note: This skill is language-agnostic. Use whichever language the user prefers.

Tool & Permission Declaration

Declared capability: Read-only shell command validation (dry-run). Execution: None — this skill never executes commands. All execution is left to the user. Allowed commands (read-only validation): ls, cat, head, tail, wc, echo, pwd, date, uname, whoami, id, ps, top, free, df, du, ss, netstat, ip, ifconfig, ping, getprop, dumpsys, git status, git log, git diff, git branch, git show. Mutating commands (require explicit user confirmation): pkg install, pkg update, pkg upgrade, apt, dpkg, git fetch, git pull. Denied commands: rm -rf, mkfs, dd, chmod -R, shutdown, reboot, systemctl, fork bombs, writes to /dev/, and any command containing shell operators (|, &&, ||, ;, $(), backticks, >, <) unless explicitly approved by the user.

When to Use

Use when:

  • Running shell commands on Termux/Android and need compatibility validation
  • Checking if a tool is available before executing
  • Classifying command risk (read-only vs destructive)
  • Need a dry-run safety check before manual execution

Don't use when:

  • Operating on non-Termux environments without compatibility concerns
  • Executing destructive operations without user confirmation
  • Replacing backup/restore scripts
  • Running unverified scripts without inspection

Platform Detection

Before selecting a command strategy, detect the platform:

# Termux detection
echo "$PREFIX" | grep -q "com.termux" && echo "TERMUX" || echo "NOT_TERMUX"

# Architecture
uname -m  # usually aarch64 on Android

# API level (Termux only)
getprop ro.build.version.sdk 2>/dev/null

Detection must happen BEFORE choosing command strategy. Never assume platform.

Tool Availability Check

Before executing any command, verify the tool exists:

command -v <tool>        # check if tool is available
pkg list-installed 2>/dev/null | grep <pkg>  # check installed package

If tool is not available:

  1. Search for a fallback (see Command Compatibility below)
  2. If no fallback exists → report ERROR and stop. Do not assume.

Execution Runbook

1. DETECT    → platform + architecture
2. CHECK     → tool available? (command -v)
3. CLASSIFY  → read-only | mutating | destructive
4. VALIDATE  → run scripts/run_safe.sh for dry-run check
5. CONFIRM   → if mutating/destructive, ask user explicitly
6. EXECUTE   → user runs the command manually (skill does NOT execute)
7. VERIFY    → user checks exit code + side effects
8. REPORT    → output format below

Strict rules:

  • Always use timeout when executing manually
  • Maximum 2 retries on transient failure, then fallback
  • Never continue if output is invalid
  • Never ignore non-zero exit codes

Risk Classification

Category Examples Action
Read-only ls, cat, uname, ps, ss Safe to run after validation
Mutating pkg install, git pull, apt Require explicit user confirmation
Destructive rm -rf, mkfs, dd, chmod -R Denied — require manual user execution with double confirmation

Timeout Policy

Type Timeout
Fast (ls, cat, uname) 15 seconds
Medium (pkg update, install) 60 seconds
Heavy (build, large download) 180 seconds

If exceeded: report TIMEOUT, stop, use fallback or ask user.

Command Compatibility

AVOID on Termux/Android:

  • systemctl / systemd commands
  • Paths /usr/local/..., /etc/systemd
  • Desktop-only binaries without fallback
  • glibc-only commands without verification

USE Termux alternatives:

  • pkg for package management
  • termux-services for service management
  • termux-setup-storage for storage access
  • Dynamic paths $HOME / $PREFIX, never hardcoded

Verification

After any action, verify beyond exit code 0:

  • Exit code = 0
  • Output valid and matches intent
  • Side effects confirmed (ls -l, check state)
  • No hidden errors in stderr
  • Within timeout

If verification fails: DIAGNOSE → RETRY (transient only, max 2x) → FALLBACK → REPORT ERROR.

Error Recovery

Error Type Recovery Example
INPUT Explain wrong format, show correct pkg instal → pkg install
DEPENDENCY Report missing package → suggest install python3 absent → pkg install python
TOOL Report tool error → do not continue ss absent → try netstat
NETWORK Report failure → offline fallback pkg update timeout → change mirror
TIMEOUT Report duration → lighter command build >180s → split task
PERMISSION Report denied path → set
Полный SKILL.md на ClawHub

Установить termux-compat-runner в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл termux-compat-runner?

Advisory skill for safe shell command execution on Termux/Android. Detects platform, checks tool availability, classifies risk, and provides a dry-run validator. Does not execute commands — execution is left to the user.

Как установить скилл termux-compat-runner?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл termux-compat-runner запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить termux-compat-runner с