一键导入
termux-system
Android system integration via Termux API — job scheduling, infrared transmit, USB device access, NFC tag read/write, hardware keystore crypto
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Android system integration via Termux API — job scheduling, infrared transmit, USB device access, NFC tag read/write, hardware keystore crypto
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Motion-reactive freestyle game that maps phone movements to hardware effects. Use when the user wants to dance, play a motion game, do movement-based interaction, sensor play, shake-to-action, tilt games, or any physical phone interaction involving accelerometer/gyroscope responses like vibrations, torch flashes, TTS quips, and camera snapshots.
Summarize or extract text/transcripts from URLs, podcasts, and local files (great fallback for “transcribe this YouTube/video”).
Get current weather and forecasts (no API key required).
Remove signs of AI-generated writing from text. Use when editing or reviewing text to make it sound more natural and human-written. Based on Wikipedia's comprehensive "Signs of AI writing" guide. Detects and fixes patterns including: inflated symbolism, promotional language, superficial -ing analyses, vague attributions, em dash overuse, rule of three, AI vocabulary words, negative parallelisms, and excessive conjunctive phrases.
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction.
Create and optimize social media content for multiple platforms using the Thoth API. Use when the user wants to create social media posts, optimize content for Twitter/LinkedIn/Instagram, generate hashtags, create AI images for posts, schedule social media content, or work with brand-consistent content creation. Supports single-post creation, content review workflows, and brand style integration.
| name | termux-system |
| description | Android system integration via Termux API — job scheduling, infrared transmit, USB device access, NFC tag read/write, hardware keystore crypto |
System-level automation and hardware interfaces from the command line via Termux API.
When a Termux API command runs for the first time, Android may prompt the user to grant permission. The command will fail with a permission/access error, but the user sees an approval dialog on their device. Always retry the command once if you get a permission error — the user will have approved the permission by then, and the retry will succeed.
Do not assume you lack access after a single permission failure. One retry is all it takes.
| Command | Description |
|---|---|
termux-job-scheduler | Schedule scripts to run later or periodically |
termux-infrared-frequencies | Query IR transmitter supported frequency ranges |
termux-infrared-transmit | Transmit IR patterns at a carrier frequency |
termux-usb | List or access USB devices |
termux-nfc | Read or write NFC tags |
termux-keystore | Hardware-backed crypto key management |
Schedule scripts to run at a later time or on a recurring basis, optionally requiring network or charging.
termux-job-scheduler --script /sdcard/ruuh/backup.sh # run once
termux-job-scheduler --script /sdcard/ruuh/sync.sh \
--job-id 1 --period-ms 3600000 # every hour
termux-job-scheduler --script /sdcard/ruuh/sync.sh \
--job-id 2 --period-ms 86400000 --network unmetered \
--charging true --persisted true # daily on WiFi while charging
termux-job-scheduler --pending # list pending jobs
termux-job-scheduler --cancel 1 # cancel job by ID
termux-job-scheduler --cancel-all # cancel all jobs
Flags:
--script <path> — path to script to execute--job-id <id> — integer job identifier (for cancel/update)--period-ms <ms> — repeat interval in milliseconds (0 = run once)--network <type> — required network: any, unmetered, none (default: any)--charging <bool> — require device charging: true or false (default: false)--persisted <bool> — survive reboots: true or false (default: false)--pending — list all pending scheduled jobs--cancel <id> — cancel a specific job by ID--cancel-all — cancel all scheduled jobsQuery the supported carrier frequency ranges of the device's IR transmitter.
termux-infrared-frequencies
[
{"min": 30000, "max": 30000},
{"min": 33000, "max": 33000},
{"min": 36000, "max": 36000},
{"min": 38000, "max": 38000},
{"min": 40000, "max": 40000},
{"min": 56000, "max": 56000}
]
Returns an array of objects with min and max frequency in Hz. An empty array means no IR transmitter is available.
Transmit an IR pattern at a given carrier frequency.
termux-infrared-transmit -f 38000 9000,4500,560,560,560,1690,560,560,560,65535
Flags:
-f <hz> — carrier frequency in Hz (e.g. 38000 for most consumer IR)The positional argument is a comma-separated list of on/off durations in microseconds. The first value is "on", the second is "off", alternating. These patterns are specific to the target device's IR protocol (NEC, Samsung, Sony, etc.).
List or access USB devices connected to the Android device.
termux-usb -l # list connected USB devices
termux-usb -r /dev/bus/usb/001/002 # request permission for a device
termux-usb -e "cat" /dev/bus/usb/001/002 # run command with device fd
termux-usb -E /dev/bus/usb/001/002 # print device info
Flags:
-l — list connected USB device paths-r <device> — request permission to access a USB device-e <command> — execute a command with the device file descriptor passed via env-E <device> — print USB device information (vendor/product IDs, class, etc.)["/dev/bus/usb/001/002", "/dev/bus/usb/001/003"]
Read from or write to NFC tags. The command waits for a tag to be tapped.
termux-nfc -r # read tag (wait for tap)
termux-nfc -w -t text "Hello NFC" # write text record
termux-nfc -w -t url "https://example.com" # write URL record
Flags:
-r — read mode: wait for tag tap and return contents-w — write mode: wait for tag tap and write data-t <type> — NDEF record type for writing: text or urlRead output:
{
"type": "NDEF",
"records": [
{
"type": "text",
"payload": "Hello NFC"
}
]
}
Hardware-backed cryptographic key management using Android Keystore. Keys never leave the secure hardware.
termux-keystore list # list stored keys
termux-keystore generate "mykey" -a RSA -s 2048 # generate RSA-2048 key
termux-keystore generate "ec256" -a EC -s 256 # generate EC P-256 key
termux-keystore sign "mykey" < data.bin > sig.bin # sign data
termux-keystore verify "mykey" -s sig.bin < data.bin # verify signature
termux-keystore delete "mykey" # delete a key
Subcommands:
list — list all keys in the keystoregenerate <alias> — generate a new key pair
-a <algorithm> — RSA or EC-s <size> — key size: 2048, 4096 for RSA; 256 for ECsign <alias> — sign data from stdin, output signature to stdoutverify <alias> — verify a signature against data
-s <signature-file> — path to the signature filedelete <alias> — delete a key from the keystore["mykey", "ec256", "backup-signing-key"]
# Create backup script
cat > /sdcard/ruuh/backup.sh << 'SCRIPT'
#!/bin/bash
tar czf "/sdcard/ruuh/backup-$(date +%Y%m%d).tar.gz" /sdcard/ruuh/MEMORY.md /sdcard/ruuh/AGENTS.md
SCRIPT
chmod +x /sdcard/ruuh/backup.sh
# Schedule daily on WiFi
termux-job-scheduler --script /sdcard/ruuh/backup.sh \
--job-id 10 --period-ms 86400000 --network unmetered --persisted true
# Check IR is available
FREQS=$(termux-infrared-frequencies)
if [ "$FREQS" = "[]" ]; then
echo "No IR transmitter on this device"
exit 1
fi
# Samsung TV power toggle (NEC protocol, 38kHz)
termux-infrared-transmit -f 38000 \
9000,4500,560,560,560,560,560,1690,560,1690,560,560,560,560,560,560,560,560,560,1690,560,1690,560,560,560,560,560,1690,560,1690,560,1690,560,1690,560,560,560,1690,560,560,560,560,560,560,560,560,560,560,560,560,560,1690,560,560,560,1690,560,1690,560,1690,560,1690,560,1690,560,1690,560,65535
# Read an NFC tag and act on contents
TAG=$(termux-nfc -r)
TYPE=$(echo "$TAG" | jq -r '.records[0].type')
PAYLOAD=$(echo "$TAG" | jq -r '.records[0].payload')
case "$TYPE" in
url)
termux-open-url "$PAYLOAD"
;;
text)
termux-toast "NFC: $PAYLOAD"
;;
esac
# One-time: generate a signing key
termux-keystore generate "file-signer" -a EC -s 256
# Sign a file
termux-keystore sign "file-signer" < /sdcard/ruuh/release.tar.gz > /sdcard/ruuh/release.sig
termux-toast "File signed"
# Verify later
termux-keystore verify "file-signer" -s /sdcard/ruuh/release.sig < /sdcard/ruuh/release.tar.gz
echo "Signature valid: $?"