termux-safe

termux-safe is a skill for Claude Code, Codex from ferrumclaudepilgrim/claude-code-android. It costs 36 tokens per session (916 once invoked), scanned A, original, MIT.

A set of rules for coding inside Termux, an Android app that provides a command-line environment. It identifies Termux by its runtime and accounts for Android-specific limitations.

In plain words
What is it for?
Guide safe work in Termux, avoid commands such as sudo or systemd that do not apply there, and distinguish Termux from a regular Linux environment.
Why use it?
It prevents suggested commands from silently failing because Android and Termux do not provide some standard Linux features, paths, or privilege tools.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/ferrumclaudepilgrim/claude-code-android/termux-safe
Any agent
npx skills add ferrumclaudepilgrim/claude-code-android --skill termux-safe
Clone the repo
git clone --depth 1 https://github.com/ferrumclaudepilgrim/claude-code-android

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for termux-safe

README.md
[![agentmods](https://agentmods.dev/badge/skills/ferrumclaudepilgrim/claude-code-android/termux-safe.svg)](https://agentmods.dev/skills/ferrumclaudepilgrim/claude-code-android/termux-safe)
Your own site
<a href="https://agentmods.dev/skills/ferrumclaudepilgrim/claude-code-android/termux-safe"><img src="https://agentmods.dev/badge/skills/ferrumclaudepilgrim/claude-code-android/termux-safe.svg" alt="Measured on agentmods" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 916 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00036 $0.00916
Opus 5 $0.00018 $0.00458
Sonnet 5 $0.00007 $0.00183
Haiku 4.5 $0.00004 $0.00092

Measured 5d ago against content hash 356c8306c77c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

termux-safe scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/termux-safe/SKILL.md · 47 lines

How it starts

The opening of the file, as written. The whole thing — 47 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Android / Termux Environment Constraints

Scope and when this applies. These constraints apply when you are executing inside Termux on Android, regardless of how Claude Code itself was packaged. The load-bearing runtime signal is $PREFIX === "/data/data/com.termux/files/usr". If that environment variable points at Termux's prefix, you are in Termux and these constraints apply, even if process.platform reports "linux" (it will report "linux" if Claude Code was installed via this repo's v2.9.0 Path A, which runs the linux-arm64 binary patched via glibc-runner; it will report "android" only on older Path A v2.x installs that used the JS bundle). If $PREFIX is unset or points at /usr, you are inside a chroot-like sandbox (for example, a Linux rootfs running under proot-distro, Path B) or inside a hypervisor-managed Linux VM (Path C), and standard Linux conventions apply; most of this file does not.

If the runtime signals indicate the in-Termux case, the constraints below produce silent failures, not errors. Every suggestion must account for them.

Hard Rules: Never Suggest These

  • No sudo. Root does not exist. No su, no doas, no privilege escalation of any kind.
  • No systemctl or systemd. Android does not use systemd. No journalctl, no service, no unit files.
  • No standard Linux paths. /usr/bin, /etc, /var do not exist or are not writable. Termux paths:
    • Home: /data/data/com.termux/files/home
    • Prefix: /data/data/com.termux/files/usr
    • Binaries: $PREFIX/bin
    • Config: $PREFIX/etc
  • No ports below 1024. No root = no binding to 80, 443, etc. Use 1024+.
  • Prefer pkg over apt. Both work, but pkg auto-updates the package index before installing.
  • No Docker, no containers. The kernel does not support them without root.

Silent Failure Modes

  • Node.js is not required by this repo's install.sh. The patched linux-arm64 claude binary is self-contained. If Node is installed separately on native Termux, prefer v25+: v24 had a documented startup hang on ARM64 that was resolved in v25.
  • File descriptor limits vary by device. Check with ulimit -n. Avoid spawning many concurrent processes.
  • Android phantom process killer limits background processes to ~32 across all apps. If "Disable child process restrictions" is enabled in Developer Options, this limit is lifted; 6 concurrent subagents have been observed stable in testing. Otherwise limit to 2-3.
  • process.platform reporting varies by install path. On Path A v2.9.0 (the linux-arm64 binary patched via glibc-runner), Node.js reports process.platform === "linux" even though you are inside Termux. On older Path A v2.x (the JS-bundle npm install) it reports "android". On Path B (proot-distro Ubuntu) and Path C (AVF), it reports "linux" and you are not in Termux. The reliable cross-path signal that you are still in Termux is $PREFIX === "/data/data/com.termux/files/usr".

Read the full file on GitHub · 47 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 47 lines · 36 tokens per session scan A 356c8306c77c

Subscribe to this mod's changes

termux-safe is a skill published in the GitHub repository ferrumclaudepilgrim/claude-code-android (222 stars, last pushed 1mo ago), licensed MIT. It adds 36 tokens to every session and 916 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

analyzing-android-malware-with-apktool

Perform static analysis of Android APK malware using apktool for resource decompilation, jadx for Java source recovery, and androguard for manifest inspection, dangerous permission-combination detection, and identification of obfuscated code, dynamic code loading, and reflection-based API calls. Use to statically…

mukul975/Anthropic-Cybersecurity-Skills · 84 tokens

solopi-ai

通过 SoloPi 的机器可读 CLI 编译和执行 AI 验证计划,管理签名端侧 ExecuTorch 决策模型、持久设备池、无人值守任务、安卓设备、应用、动作、配置、用例步骤与交互录制、回放及性能历史、动态 Agent、批量与重复执行、性能监控、压力测试和证据。适用于需求/AC 到 Result Judge 三态结论、cloud/on-device 决策切换、模型发布门禁,以及 generation 租约的多设备 CI 执行。.

alipay/SoloPi · 127 tokens

argent-tv-interact

Control and inspect TV apps via argent — Apple TV (tvOS), Android TV (leanback), and Amazon Fire TV (Vega). Boot the target, read focus, navigate with the D-pad remote, type, screenshot, and on Vega debug the JS runtime (evaluate, console logs, network inspector). Use when a task targets a TV (runtimeKind "tv", or…

software-mansion/argent · 107 tokens

compose-recomposition-performance

Use when investigating Jetpack Compose recomposition performance, skippable/restartable composables, composables.txt or compiler reports, Layout Inspector recomposition counts, or frame-rate State reads in composition vs layout/draw, and it is not yet clear whether the cause is parameter stability or deferred reads.…

vitorpamplona/amethyst · 78 tokens

android-navigation-3

Install and migrate to Jetpack Navigation 3. Use when implementing Navigation 3 patterns including NavDisplay, NavKey routes, deep links, multiple backstacks, scenes (dialogs, bottom sheets), or migrating from Navigation 2.

HoangNguyen0403/agent-skills-standard · 52 tokens

ios-slim-bindings

Create iOS slim bindings for MAUI. USE FOR: slim iOS binding, Native Library Interop, Swift/Objective-C wrappers, XcodeGen project.yml, Podfile, CocoaPods static linking, BUILDLIBRARYFORDISTRIBUTION, XcodeProject MSBuild, @objc/[Export] selector crashes, async completion handlers. DO NOT USE FOR: Android bindings…

dotnet/maui-labs · 97 tokens