prompts-ithinkihaveacat-dotfiles
Create an Agent Skill that helps agents work with Android Jetpack libraries.
Open source Repository Open in the app JSON README (API)
About
Create an Agent Skill that helps agents work with Android Jetpack libraries.
Details
- Kind
- Agent skills
- Topic
- No topic detected
- Publisher
- ithinkihaveacat
- Origin
- majiayu
- Category
- ferramentas
- Stars
- 48
- Forks
- 10
- Last push
- 2026-09-07T16:07:26Z
- Repository state
- ativo
- Language
- Shell
- License
- Apache-2.0
- Added
- 2026-09-02 18:17:19
- Updated
- 2026-09-02 18:17:19
- Origin id
ithinkihaveacat/dotfiles/etc/prompts/jetpack-skill.md@main
README
# .dotfiles
Public dotfiles for [fish](https://fishshell.com/), [git](https://git-scm.com/),
[jed](https://www.jedsoft.org/jed/), and
[VS Code](https://code.visualstudio.com/) — plus a large collection of
[agent skills](#agent-skills) and command-line tools for AI-assisted development
with agents such as Claude Code, Codex, and Gemini CLI.
## Repository layout
```text
.dotfiles/
├── bin/ # Shell scripts added directly to $PATH
├── fish/
│ ├── config.fish # Main fish config; loads .private overlay if present
│ ├── conf.d/ # Fish startup snippets
│ ├── completions/ # Fish completions
│ └── functions/ # Fish functions (autoloaded)
├── home/ # Dotfiles symlinked into $HOME by install.sh
├── etc/ # Tool-specific config (git templates, VS Code, etc.)
├── skills/ # Agent skills (see Agent skills below)
├── config/ # Plugins for the skill and permission tools
├── docker/ # Dockerfile + notes for building an image from this repo
├── tests/ # TAP tests for bin/ scripts
└── install.sh # Idempotent install/update script
```
`install.sh` symlinks `home/.*` into `$HOME`, installs packages, and wires up
tool-specific config. It is safe to run multiple times, and doubles as the
updater: an existing checkout is fast-forwarded before applying. It can be run
locally (`./install.sh`) or piped straight from the network (see
[Installation](#installation)).
## Agent skills
The [`skills/`](skills/) directory contains
[Agent Skills](https://agentskills.io): folders with a `SKILL.md` (metadata and
instructions) plus supporting scripts and references that teach AI coding agents
how to perform specific tasks — driving Android devices over adb, inspecting
APKs, managing emulators, looking up current AndroidX library facts, enforcing
coding standards, planning award flights, and more.
### Key skills
| Skill | Description |
| ---------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| [`adb`](skills/adb/) | ADB device automation with a Wear OS focus: screenshots, screen recording, tiles, dumpsys, logcat |
| [`agent-tools`](skills/agent-tools/) | CLI tools delegating analysis to AI models: image description, screenshot diffing, deep research |
| [`apk`](skills/apk/) | Offline APK binary analysis: manifests, resources, launcher icons, split APKs |
| [`coding-standards`](skills/coding-standards/) | This repo's coding standards: shell/Python/Markdown formatting, CLI design, commit message style |
| [`emumanager`](skills/emumanager/) | Android SDK bootstrap plus AVD/emulator management (mobile, Wear OS, TV, Automotive) |
| [`jetpack`](skills/jetpack/) | Current AndroidX/Jetpack facts that are wrong from memory: versions, Maven coordinates, dependencies |
More specialised skills: [`android-testing`](skills/android-testing/) (system
state and connectivity testing on phone and Wear OS),
[`wear-widget`](skills/wear-widget/) (reverse-engineering widgets), and
[`workspace-config`](skills/workspace-config/) (skill selection and agent tool
permissions). Personal-workflow skills live here too:
[`agent-review`](skills/agent-review/), [`taskgo`](skills/taskgo/),
[`technical-writing`](skills/technical-writing/), and
[`travel`](skills/travel/).
### Installing skills into a workspace
Skills are intentionally **not** installed globally — every project seeing every
skill would be noise. Instead, the bundled `skill` command manages them per
workspace as untracked symlinks in `.claude/skills/` or `.agents/skills/`,
auto-detecting which agent is installed:
```sh
skill apply # sync workspace symlinks with AGENT_REQUIRED_SKILLS
skill add jetpack # add one skill by name
skill list # what's active in this workspace
```
Skill names resolve against `skills/` in this repo and its `.private`/`.corp`
overlays (later layers shadow by name); plugins in `config/skill/plugins/`
register additional remote skills from third-party catalogs. Projects declare
the skills they require via direnv (`skills NAME …` in `.envrc`, maintained by
`envrc add skills NAME`), and `skill preflight` verifies them before an agent is
launched.
## Overlays
**SECURITY NOTE:** The `.dotfiles` repository is public. To prevent the leakage
of sensitive information (such as API keys, corporate tool configurations, or
internal pathnames), two private companion repositories can optionally be
cloned: `~/.private` and `~/.corp`.
This architecture is specifically designed to help both humans and AI agents
understand what goes where and ensures private information remains strictly out
of the public repository. This repository works fine without them.
### Purpose of each layer
| Repo | Intended for |
| ------------- | ------------------------------------------- |
| `~/.dotfiles` | Public config, tools, and scripts |
| `~/.private` | Personal secrets, API keys, private tooling |
| `~/.corp` | Work machine config, internal tooling |
### Precedence
`install.sh` processes overlays in this order: `.dotfiles` → `.private` →
`.corp`. Later layers win on conflict. A file in `~/.corp` always beats the same
path in `~/.private` or `~/.dotfiles`.
### How files are applied
Two functions handle overlay merging, with different semantics:
- **`link_overlay_path rel dst`** — symlinks `dst` to the single
highest-priority source that provides `rel`. Used for whole-file configs where
only one version makes sense (e.g. `etc/starship/starship.toml`).
- **`link_overlay_files rel dst`** — iterates every overlay in order and
symlinks each file it finds under `rel/` into `dst/`. All overlays contribute;
later layers win on filename collision. Used when multiple overlays may each
add files to a directory (e.g. `etc/code/`).
`home/` dotfiles are linked by iterating all overlays in order with `ln -sf`, so
the last overlay to provide a given filename wins.
### Overlay-aware paths
| Path | Mechanism | Notes |
| ---------------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| `home/.*` | `link_home_dotfiles` (all overlays) | Last overlay wins per filename |
| `etc/agents/AGENTS.md` | `overlay_path` (highest wins) | Symlinked to `~/.codex/`, `~/.gemini/`, `~/.claude/` (gated on their respective binaries) |
| `etc/shpool/config.toml` | `link_overlay_path` | |
| `etc/starship/starship.toml` | `link_overlay_path` | |
| `etc/ghostty/config` | `link_overlay_path` | |
| `etc/bat/config` | `link_overlay_path` | |
| `etc/code/` | `link_overlay_files` | VS Code `settings.json`, `keybindings.json`, etc. |
| `etc/macos/KeyBindings` | `overlay_path` | rsync'd (not symlinked) due to macOS bug |
| `etc/macos/Solarized.clr` | `overlay_path` | Copied to `~/Library/Colors/` |
| `skills/*/` | `skill` catalog source | Not linked globally; added per workspace via `skill add`/`skill apply` (see [Agent skills](#agent-skills)) |
### Per-overlay `update` hooks
After the main install, `install.sh` runs `~/.private/update` and
`~/.corp/update` if they exist and are executable. These hooks handle
overlay-specific setup that cannot be expressed as file overlays (package
installs, auth setup, etc.).
### Expected layout
```text
.private/ # same structure for .corp
├── fish/
│ ├── conf.d/ # Startup snippets sourced by config.fish
│ ├── completions/ # Completions prepended to fish_complete_path
│ ├── functions/ # Functions prepended to fish_function_path
│ └── secrets.fish # API keys and tokens (chmod 600)
├── home/ # Dotfiles symlinked into $HOME (e.g. .gitconfig.local)
├── etc/ # Tool-specific config (see overlay-aware paths above)
├── skills/ # Agent skills that shadow ~/.dotfiles/skills/ by name
└── update # Optional hook run at end of ./install.sh
```
`fish/config.fish` prepends `~/.private/fish/functions` (and `.corp`
equivalents) and `~/.private/fish/completions` to the fish search paths, and
sources any `~/.private/fish/conf.d/*.fish` snippets at shell startup.
To install: clone your private repos to `~/.private` and/or `~/.corp`, then run
`./install.sh` again.
## Secret management
Secrets (API keys, tokens) live in `~/.private/fish/secrets.fish` and are not
sourced in full at shell startup. Three fish functions provide on-demand access:
<!-- markdownlint-disable MD013 -->
| Function | Usage | Description |
| ----------- | ------------------------------- | -------------------------------------------- |
| `setsecret` | `setsecret NAME [NAME...]` | Load secret(s) into the current shell |
| `getsecret` | `getsecret NAME` | Print secret value(s) to stdout (array-safe) |
| `envsecret` | `envsecret NAME [...] [--] CMD` | Run a command with secret(s) injected |
<!-- markdownlint-restore MD013 -->
`envsecret` is the safest option for scripts: secrets are injected into the
child process and never leak into the calling shell.
A `~/.private/fish/conf.d/` snippet uses `setsecret --if-unset` to auto-load a
small set of everyday secrets at shell startup.
Run `setsecret --help`, `getsecret --help`, or `envsecret --help` for details.
## Environment management
[direnv](https://direnv.net/) handles per-project environment switching,
configured via `~/.direnvrc` (symlinked from `home/.direnvrc`). To activate it
in a project, create an `.envrc` file in the project root.
### Node.js
Node.js versions are managed by `bin/node-install` and direnv.
```sh
node-install 22 # installs latest 22.x into ~/.local/share/node/versions
```
Add to `.envrc`:
```sh
use node 22
layout node # adds node_modules/.bin to PATH
```
### Ruby
Ruby versions are managed by `bin/ruby-install` and direnv. Versions are
compiled from source via [ruby-build](https://github.com/rbenv/ruby-build) (the
toolchain and its build dependencies install with
`install.sh --install-optional`), so the first install of a version takes a few
minutes.
```sh
ruby-install 3.4 # compiles latest 3.4.x into ~/.local/share/ruby/versions
```
Add to `.envrc`:
```sh
use ruby 3.4
layout ruby # project-local gems in .direnv/ruby
```
`layout ruby` keeps gems inside the project, so `gem install kamal` makes
`kamal` available on `PATH` without touching the system Ruby.
Because each version is compiled against the system libraries present at build
time, an installed Ruby can later fail to start with a library load error (for
example after a Homebrew `openssl` upgrade removes a library it was linked
against). The fix is to rebuild that version: `ruby-install 3.4`.
### Python
Python environments use [uv](https://github.com/astral-sh/uv). Add to `.envrc`:
```sh
layout uv # creates .venv if absent, activates it
```
## Installation
The same `install.sh` script both installs and updates, and runs in two ways.
`git` must already be installed either way (see
[Prerequisites](#prerequisites)).
### Option 1: Straight from the network
Clones the repo to `~/.dotfiles` (if absent), points the push remote at SSH,
then installs — and on later runs, updates (it fast-forwards `~/.dotfiles`
before applying):
```sh
curl -fsSL https://raw.githubusercontent.com/ithinkihaveacat/dotfiles/master/install.sh | bash
```
It must be piped to `bash`, not `sh` — the script is bash and refuses to run
under other shells. Pass flags after `-s --`, e.g. `… | bash -s -- --force`. To
download the whole script before running anything (rather than streaming it into
the interpreter), use the equivalent:
```sh
bash -c "$(curl -fsSL https://raw.githubusercontent.com/ithinkihaveacat/dotfiles/master/install.sh)"
```
### Option 2: From a local checkout
```sh
cd $HOME
git clone https://github.com/ithinkihaveacat/dotfiles.git .dotfiles
cd .dotfiles
git remote set-url origin --push git@github.com:ithinkihaveacat/dotfiles.git
./install.sh
```
After cloning `~/.private` and/or `~/.corp` (if available), run `./install.sh`
again so the overlay is applied.
> **Note:** `install.sh` may overwrite unmanaged files in locations such as
> `~/Library/KeyBindings`. It is otherwise safe to run multiple times.
## Prerequisites
### git
- **Ubuntu/Debian**: `sudo apt-get install git`
- **macOS**: `xcode-select --install`
### fish
On **Debian 13** and **macOS**, `install.sh` installs fish for you, so you can
skip this step. Debian's packaged fish is out of date, so on Debian 13 it pulls
fish 4 from the OpenSUSE Build Service; on macOS it uses Homebrew. If fish is
already installed at a version older than 4.2, `install.sh` warns rather than
replacing it. On other systems, install it first:
- **Ubuntu/other Debian**: `sudo apt-get install fish`
- **Other**: <https://fishshell.com/>
<!-- markdownlint-disable MD013 -->
> Standard apt packages lag significantly (Ubuntu 24.04: 3.7.0, Debian
> bookworm/Raspberry Pi OS: 3.6.0, Debian trixie: 4.0.2). For fish 4.2+, install
> from the OpenSUSE Build Service:
>
> ```bash
> curl -fsSL https://download.opensuse.org/repositories/shells:fish:release:4/Debian_Unstable/Release.key | \
> gpg --dearmor | sudo tee /usr/share/keyrings/fish-shell.gpg > /dev/null
> echo 'deb [signed-by=/usr/share/keyrings/fish-shell.gpg] https://download.opensuse.org/repositories/shells:/fish:/release:/4/Debian_Unstable/ /' | \
> sudo tee /etc/apt/sources.list.d/fish-shell.list
> sudo apt update && sudo apt install -y fish
> ```
<!-- markdownlint-restore MD013 -->
## Platform-specific setup
### macOS
- **Terminal:** Import `etc/macos/Solarized Dark.terminal` and set it as the
default profile.
- **Keyboard:** System Preferences > Keyboard > Shortcuts > Services > File and
Folders: enable "New Terminal at Folder".
- **Text Replacements:** If not shared via iCloud, restore from
`etc/macos/Text Replacements.plist` — see
[Back up and share text replacements on Mac](https://support.apple.com/en-gb/guide/mac-help/mchl2a7bd795/mac).
- **Lock Screen:** Add to Menu Bar via Keychain Access preferences.
- **Volume:** Add to Menu Bar via Control Center > Sound > Always Show in Menu
Bar.
- **Time Machine:** Disable local snapshots: `sudo tmutil disablelocal`
- **Hot Corners:** Disable via System Preferences.
- **Fonts:** See <https://typography.guru/journal/awesome-catalina-fonts/>.
- **iA Writer theme:** <https://ia.net/writer/templates/>
- **Network Link Conditioner** (for simulating degraded network conditions):
<https://developer.apple.com/download/more/?q=Additional%20Tools>
### Ubuntu
```sh
# Emacs keybindings across GTK apps
gsettings set org.gnome.desktop.interface gtk-key-theme "Emacs"
```
**Compose key:** Set to Caps Lock via Settings > Keyboard. Enables e.g. Caps
Lock + `---` → em dash.
### Raspberry Pi
Complete setup sequence for a fresh Raspberry Pi OS install.
1. Use the [Raspberry Pi Imager](https://www.raspberrypi.com/software/) to write
the OS to an SD card or SSD.
- For a headless install: Raspberry Pi OS (other) > Raspberry Pi OS Lite.
- In OS customisation: enable SSH (Remote access section).
- (Optional) Configure Wi-Fi.
1. SSH in: `ssh mjs@lil.local` (substitute your username and hostname).
- (Optional) If using Ghostty, copy the terminfo from your local machine:
`infocmp -x xterm-ghostty | ssh mjs@lil.local -- tic -x -`
1. Update the OS:
```sh
sudo apt-get update && sudo apt-get upgrade -y
```
Reboot if `/var/run/reboot-required` exists: `sudo reboot`
1. Install fish (see [Prerequisites](#fish) for the OpenSUSE Build Service
instructions to get fish 4.2+, or use the older distro version):
```sh
sudo apt-get install fish
```
1. Install git: `sudo apt-get install git`
1. Install Tailscale: `curl -fsSL https://tailscale.com/install.sh | sh` then
`sudo tailscale up`
1. (Optional) Install Node.js and npm: `sudo apt-get install nodejs npm` (for
newer versions see [Node.js](#nodejs)).
1. (Optional) Disable WiFi and Bluetooth: add these lines under `[all]` in
`/boot/firmware/config.txt`:
```text
dtoverlay=disable-wifi
dtoverlay=disable-bt
```
1. (Optional) Change hostname: edit `/etc/hostname` and `/etc/hosts`.
1. Reboot after any optional steps above: `sudo reboot`
Once complete, proceed to [Installation](#installation).
> **Tip:** Use VS Code's
> [Remote - SSH](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh)
> extension to edit files on the Pi.
## Local binaries
Put manually installed binaries in `~/.local/bin`.
## Testing and CI
Scripts are tested with TAP-format tests run via `prove`. Tests are co-located
with the code they cover: `tests/test-*` for `bin/` scripts and
`skills/*/tests/test-*` for skill scripts. Run them with:
```sh
prove -j 9 tests/test-* skills/*/tests/test-*
```
See [tests/README.md](tests/README.md) for details, including how to run tests
offline and in isolated environments.
A GitHub Actions workflow (`.github/workflows/lint.yml`) runs on every push:
`shellcheck` and `shfmt` over all Bash scripts (`bin/`, `skills/*/scripts/`,
`install.sh`), `ruff` via `skills/coding-standards/scripts/python-format` over
all Python scripts, plus the full test suite.
## Author
<mjs@beebo.org>