Alex72-py/termux-elite / skills/termux-environment
termux-environment
VerifiedTake a small read-only snapshot of a Termux or Android shell (native Termux, proot, another Android shell, or a non-Android system; Android and Termux version, CPU architecture, installed toolchains, free storage and memory) before choosing a package manager, path, or fix. Use when a task depends on what the device is, when asked what is installed or which architecture applies, or at the start of any Termux debugging session. Do NOT use as a ritual before every command, for plain text questions, or to change anything.
Termux Environment
Purpose
Build a small factual snapshot so later decisions rest on measured facts, not on assumptions about the phone, the shell, or the distro.
When to use
- A fix depends on Android version, CPU architecture, free space, or installed toolchains.
- It is unclear whether the shell is native Termux, a proot distro, another Android shell, or not Android at all.
- Any other skill in this pack says to capture the environment first.
When NOT to use
- Plain text questions, or a command whose result does not depend on the device.
- Before every command. Cache the snapshot; refresh only after a package upgrade, entering or leaving proot, or reinstalling Termux.
Preconditions
Read-only shell only. No root, network, or Termux:API required.
Decision tree
- Run
sh scripts/detect-environment.sh. It printskey: valuelines and never dumps the environment. - Read
environment_classfirst; the line beside it,environment_evidence, says why. Hints are not proof.termux-native: Bionic libc,pkg, Termux package names,$PREFIXpaths. The Termux skills apply as written.proot: a distro running under Termux. It has its own package manager and usually glibc;termux-*commands and Termux package names belong to the native side. Confirm withproot-boundaries.android-other: Android properties are readable but there is no Termux prefix (for example anadb shellor another terminal app). Do not assumepkgor Termux paths; ask.linux,wsl,container,macos: not Android. The Termux-specific steps do not apply; usesystem_package_managerand ordinary rules.unknown: ask the user. Do not guess. Run a command from a Termux skill only when the class istermux-native, or the skill says proot is fine.
- Architecture comes from
architecture, never from the phone model.aarch64is the common case.armv7lorarmv8lmeans a 32-bit userland, where many prebuilt wheels and binaries do not exist.x86_64is an emulator or Chromebook. android_sdkselects which Android behavior applies. Report these as version-specific: background clipboard reads are restricted from Android 10; recent releases restrict network interface listing (ip,ifconfig,netstat); Android 12 and later kill excess child processes (seebackground-processes).- Hard-coded
/tmp,/bin/sh, or#!/usr/bin/envfail on a bare Android layout. Termux uses$TMPDIR($PREFIX/tmp) and$PREFIX/bin/sh, andtermux-execrewrites shebangs. Fix the path or variable, not the system. - Under about 1 GiB free storage or available memory: warn before any compile,
pkg upgrade, or large download. - Termux and its plugin apps (Termux:API, Boot, Widget) must come from the same distribution source and signing key, or plugins fail to talk to Termux.
Example
- Situation: A prebuilt binary will not run and the user says the phone is a recent flagship.
- Without the skill: Guesses arm64 from the phone model and suggests an aarch64 download.
- With the skill: Runs the helper, reads
architecture: armv8l(a 32-bit userland), explains why aarch64 binaries cannot run, and reports the fact with the line that proves it.
Safety
Everything here is read-only. termux-info prints the device model and the full package list, so share only the lines the task needs. Never print env wholesale; it can contain tokens.
Verification
Every reported fact came from command output in this session. Say unknown for anything the script could not read.
Handoffs
proot-boundarieswhen native versus proot is unclear or mixed.package-troubleshootingwhen no package manager is found or indexes look stale.storage-permissionswhenstorage_sharedis absent.python-native-buildwhen a build needs the toolchain list.
Report
At most six lines: environment_class, architecture, Android API level, Termux version, free storage and memory, and any missing tool that matters for the task.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |