termux-packager
Skill2 starsChanged 7 months agoMITView on GitHub
Package a runtime from Termux into a relocatable bundle (.tar.xz), patch RPATH/RUNPATH with patchelf, verify that hardcoded Termux paths are clean before putting it into a module.
In this repository47 other files it gives its agents.
- brainstormingSkill
- claude-code-termux-runbookSkill
- cli-patcherSkill
- code-review-workflowSkill
- commit-commandsSkill
- consulting-analysisSkill
- context7-cleanSkill
- data-analysisSkill
- deep-researchSkill
- edit-tool-compat-guardSkill
- env-managerSkill
- executing-plansSkill
- feature-devSkill
- firecrawlSkill
- frontend-designSkill
- gateway-device-pairingSkill
- githubSkill
- glibc-prebuilt-bundleSkill
- gogSkill
- image-generationSkill
- memory-setupSkill
- module-auditorSkill
- module-scaffoldSkill
- openclaw-config-guardianSkill
- openclaw-ollama-runtime-kbSkill
- plugin-cutover-guardianSkill
- plugin-runtime-guardianSkill
- python-env-managerSkill
- self-improving-agentSkill
- simplify-and-hardenSkill
- skill-benchSkill
- skill-creatorSkill
- skill-unificationSkill
- skill-vetterSkill
- socratic-groundingSkill
- subagent-orchestrationSkill
- systematic-debuggingSkill
- tailscale-oauth-bridgeSkill
- termux-runnerSkill
- test-driven-developmentSkill
- vercel-deploy-claimableSkill
- verification-before-completionSkill
- video-generationSkill
- workspace-cleanupSkill
- writing-plansSkill
- yt-dlp-ingest-firstSkill
- zero-downtime-cutoverSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 4 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
Check results, state validation, and next steps.
- Very specific: line 40
Use readelf -d to get NEEDED, RPATH, RUNPATH.
- Very specific: line 45
Use relative paths ($ORIGIN/...), do not use absolute Termux paths.
- Very specific: line 47
Check readelf -d to ensure com.termux no longer remains.
- Very specific: line 48
Run smoke test --version with staging LD_LIBRARY_PATH.
- Distinctive: line 71
If input/permissions are missing: state clearly what is missing and request it.
- Distinctive: line 72
If there is a runtime/tool error: return a brief error + possible cause + proposed remediation.
- Distinctive: line 73
If there is a policy/safety risk: stop and escalate via the approval checkpoint.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Termux Packager
A skill that standardizes the process of packaging an app installed in Termux so it can run at a different module path (/data/adb/...).
Scope
- In-scope: package a runtime from Termux into a relocatable bundle, patch RPATH/RUNPATH, and verify that hardcoded paths are clean.
- Out-of-scope: runtime deployment/cutover outside the packaging artifact scope.
SOP
- Determine whether the request is within the scope of the skill.
- Execute the skill's main workflow/instructions in safe order.
- Check results, state validation, and next steps.
Indexed Reference Map
- @[SKILL.md#L1-L64] Standard frontmatter (
name,description). - @[SKILL.md#L6-L64] Termux Packager.
- @[SKILL.md#L10-L64] When to use.
- @[SKILL.md#L15-L64] Standard process.
- @[SKILL.md#L30-L64] Required output.
- @[SKILL.md#L34-L64] Template.
Supporting files
- @[references/verify-checklist.md#L1-L7] Reference document/rulebook for technical decisions.
- @[templates/pack_app.sh#L1-L57] Template used for quick scaffolding/patching.
When to use
- Need to move a binary/runtime from
$PREFIXinto a Magisk/KSU module. - The app fails because of the hardcoded path
/data/data/com.termux/files/usr. - Need to create a
.tar.xzartifact to embed into a module.
Standard process
- Discover closure
- Identify the minimum required files:
bin,lib, the app's dedicated runtime folder. - Use
readelf -dto getNEEDED,RPATH,RUNPATH.
- Identify the minimum required files:
- Staging copy
- Copy only the minimum into staging (
.app/bin,.app/lib, ...).
- Copy only the minimum into staging (
- Patch ELF
patchelf --set-rpathfor executables,.so,.node.- Use relative paths (
$ORIGIN/...), do not use absolute Termux paths.
- Verify
- Check
readelf -dto ensurecom.termuxno longer remains. - Run smoke test
--versionwith stagingLD_LIBRARY_PATH.
- Check
- Pack
tar -cJf <output>.tar.xz .app
Required output
*.tar.xzbundle- report including: patched files, verify pass/fail, artifact size
Template
- Sample script:
templates/pack_app.sh - Checklist:
references/verify-checklist.md
Trigger Rules
- Positive: Activate when the user request matches
termux-packagerby description: Package a runtime from Termux into a relocatable bundle (.tar.xz), patch RPATH/RUNPATH with patchelf, verify that hardcoded Termux paths are clean before putting it into a module. - Negative: Do not activate for out-of-scope requests or when this skill's workflow/expertise is not needed.
- Escalation: If there is external action/network write or sensitive operations, an approval checkpoint must be added before execution.
Output Contract
- Deliverable: a result aligned with the objective of
termux-packager; clearly state the artifact/path/steps performed (if any). - Validation: report
PASS/FAILstatus together with the main checks run. - Failure mode: when there is an error, state the root cause + proposed remediation.
Error Handling
- If input/permissions are missing: state clearly what is missing and request it.
- If there is a runtime/tool error: return a brief error + possible cause + proposed remediation.
- If there is a policy/safety risk: stop and escalate via the approval checkpoint.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

