agentleFS
thoitiettxl-cyberthoitiettxl-cyber/Claw-II/skills/termux-packager/SKILL.md

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.

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
  1. Distinctive:

    Check results, state validation, and next steps.

    line 18
  2. Very specific:

    Use readelf -d to get NEEDED, RPATH, RUNPATH.

    line 40
  3. Very specific:

    Use relative paths ($ORIGIN/...), do not use absolute Termux paths.

    line 45
  4. Very specific:

    Check readelf -d to ensure com.termux no longer remains.

    line 47
  5. Very specific:

    Run smoke test --version with staging LD_LIBRARY_PATH.

    line 48
  6. Distinctive:

    If input/permissions are missing: state clearly what is missing and request it.

    line 71
  7. Distinctive:

    If there is a runtime/tool error: return a brief error + possible cause + proposed remediation.

    line 72
  8. Distinctive:

    If there is a policy/safety risk: stop and escalate via the approval checkpoint.

    line 73

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

  1. Determine whether the request is within the scope of the skill.
  2. Execute the skill's main workflow/instructions in safe order.
  3. 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 $PREFIX into a Magisk/KSU module.
  • The app fails because of the hardcoded path /data/data/com.termux/files/usr.
  • Need to create a .tar.xz artifact to embed into a module.

Standard process

  1. Discover closure
    • Identify the minimum required files: bin, lib, the app's dedicated runtime folder.
    • Use readelf -d to get NEEDED, RPATH, RUNPATH.
  2. Staging copy
    • Copy only the minimum into staging (.app/bin, .app/lib, ...).
  3. Patch ELF
    • patchelf --set-rpath for executables, .so, .node.
    • Use relative paths ($ORIGIN/...), do not use absolute Termux paths.
  4. Verify
    • Check readelf -d to ensure com.termux no longer remains.
    • Run smoke test --version with staging LD_LIBRARY_PATH.
  5. Pack
    • tar -cJf <output>.tar.xz .app

Required output

  • *.tar.xz bundle
  • 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-packager by 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/FAIL status 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.