Agent skill

Autofish Android Control

by felinics in felinics/Autofish

Controls an Android device through the af CLI with observe, act and verify steps, ref-based taps, screenshots and recovery when a step goes wrong.

Apache-2.0Auto-check passedMobile

Install Autofish Android Control

skills CLI
$ npx skills add felinics/Autofish --skill autofish-control -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install felinics/Autofish autofish-control --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/felinics/Autofish.git skills-src && mkdir -p .claude/skills && cp -r skills-src/cli/skills/autofish-control .claude/skills/autofish-control && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
autofish-control
GitHub stars
118
Token cost
~1.7k tokens
SKILL.md length
779 words
Files
1
Skills in repo
1
Repo updated
First seen
Licence
Apache-2.0

At a glance

Controls an Android device through the af CLI with observe, act and verify steps, ref-based taps, screenshots and recovery when a step goes wrong.

  • Works in 2 steps: Continue only from fresh observations.… → After solving a non-trivial problem
  • Navigating an Android app's UI through Autofish
  • SKILL.md covers When To Use, Setup, Workflow and Tap Priority, plus 6 more sections
  • Needs AF_TOKEN

What it does

The skill asks for deterministic control with evidence at every step. The agent reads the current screen and its element refs with af observe, performs exactly one action, then verifies the result, and it taps by refs such as @nK instead of screen coordinates so a run can be replayed reliably. Overlay management, screenshots and a recover command are part of the loop.

Setup connects the CLI to the Autofish app on the phone. The URL, port and token come from the app, or af connect usb sets up a forwarded address for an adb-connected device while the token is still copied from the app, and settings can also come from AF_URL, AF_TOKEN and related variables. Each task gets its own named session so unrelated work does not share the default one, and a local memory store can be searched for earlier experience with the current app and page. Output can be switched to JSON for scripts.

When your agent uses it

  • Navigating an Android app's UI through Autofish
  • Replaying a mobile workflow with stable element refs instead of coordinates
  • Verifying the screen after each action in a phone automation
  • Recovering when an automated step lands on the wrong screen

Example prompts

  • “Open the Settings app on my phone with af and turn on dark mode, checking the screen after each tap.”
  • “Connect to my phone over USB and take a screenshot of the current page.”
  • “Use a session named checkout-test to walk through the login screen and verify each step.”

Requirements

  • The af CLI
  • The Autofish Android app with its URL and access token
  • adb, for USB connections

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. Continue only from fresh observations. Do not run blind action chains.
  2. After solving a non-trivial problem

What it can do on your machine

Read from SKILL.md and the folder at commit 5ab0a73. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are bash).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • AF_TOKEN

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Autofish Android Control loads about 1.7k tokens when it runs. Until then it costs about 52 tokens; SKILL.md has 779 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~52
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from felinics/Autofish at commit 5ab0a73, republished under its Apache-2.0 licence (© felinics). 779 words, ~1,697 tokens.

Download SKILL.mdSave it as .claude/skills/autofish-control/SKILL.md (or your agent's skills folder).
name
autofish-control
description
Control Android devices with Autofish via the af CLI. Use this skill when you need reliable observe-act-verify loops, ref-based tapping, overlay management, screenshots, and recovery steps.

Autofish Control Skill

Use deterministic control with evidence at every step.

When To Use

  • You need to navigate Android UI through Autofish (af).
  • You need stable replay using refs (@nK) instead of coordinates.
  • You need explicit verification after each action.

Setup

bash
af config set remote.url "http://<IP>:<PORT>"
af config set remote.token "<token>"
af config set memory.db "$HOME/.config/af/af.db"
af config set output.default "text"
af config set artifacts.dir "$HOME/.config/af/artifacts"

Copy IP, PORT, and token from the Autofish Android app. For USB port forwarding, use the forwarded local address, for example http://127.0.0.1:<PORT>.

If the device is connected with adb and the App is new enough to write a connection hint, prefer:

bash
af connect usb --device <ADB_SERIAL>

af connect usb writes the forwarded remote.url and connection.* USB metadata, verifies af health, and does not write remote.token. Keep the token copied from the app for observe, act, verify, and recover.

Environment variables also work: AF_URL, AF_TOKEN, AF_DB, AF_OUTPUT, AF_ARTIFACT_DIR.

  • af health only requires URL.
  • observe, act, verify, recover require URL + token.
  • af memory ... is local-only and requires memory enabled.
  • config list and config get remote.token redact tokens as <redacted>.
  • Use --output json when parsing results in scripts.
  • Check af --help first if the installed CLI may be older than this skill.
  • If config/env is unavailable, put remote flags after the command group: af --session <session> observe --url <url> --token <token> page.

Choose one session per task:

bash
SESSION="task-name"
af --session "$SESSION" observe page --field screen --field refs --max-rows 80

Do not reuse the default default session across unrelated tasks.

Workflow

Memory session rules:

  • memory context and memory save use the global --session.
  • memory log and memory stats filter with --for-session <session>.
  • memory search and memory experience query cross-session history; do not treat global --session as a filter for them.
  1. Baseline:
  • af --session <session> observe page --field screen --field refs --max-rows 80
  • af --session <session> memory context
  • af memory search --app <current-app>
  • af memory experience --app <current-app> --activity <current-activity> --page-fp "<page-fingerprint>"
  1. One-step execution:
  • Run exactly one action command.
  • Run af --session <session> observe page (add --field refs if needed).
  • Verify expected state.
  1. Continue only from fresh observations. Do not run blind action chains.

  2. After solving a non-trivial problem:

  • af --session <session> memory save --app <pkg> --topic "<category>/<name>" --content "<what you learned>"
Memory Loop

For experience learning, keep this exact order:

  1. observe the starting page.
  2. Run one act.
  3. observe again.
  4. Run one verify.

act and recover invalidate the cached page fingerprint. A transition is recorded only when a fresh successful observation happens after the action and before verification.

observe page

Always returns: topActivity, mode, hasWebView, nodeReliability.

--fieldWhat it adds
screen (default)Row counts, fingerprint rows, and a JSON artifact path for full rows
refsClickable ref aliases with refVersion

Use the returned screen.artifact saved path when full page rows are needed. observe screenshot and overlay commands are diagnostics only; they do not refresh memory context.

topActivity is null when the service cannot confirm a stable value. Re-observe before acting.

Show full SKILL.md (322 more words)Show less

Tap Priority

  1. af --session <session> act tap --by ref --value @nK
  2. af --session <session> act tap --by text|desc|resid --value "<value>" [--exact-match]
  3. af --session <session> act tap --xy X,Y

Other actions exist for non-tap flows: swipe, text, launch, stop, key, back, home.

Refs

  • Refresh refs on dynamic pages: af --session <session> observe page --field refs.
  • If ref tap fails with stale/unobserved errors, re-observe once and retry once.
  • Do not assume alias index stability after UI updates.
  • Do not auto-pick among ambiguous matching candidates.

Verify Priority

  1. af --session <session> verify top-activity --expected "<activity>" --mode contains
  2. af --session <session> verify text-contains --text "<text>"
  3. af --session <session> verify node-exists --by text|desc|resource_id|class --value "<value>" [--exact-match]

top-activity --mode is contains or equals. text-contains is case-insensitive by default; use --case-sensitive only when exact case matters.

On WebView-heavy pages (hasWebView=true or nodeReliability=low), prefer text-contains. Do not rely on node/ref structure inside WebView content.

Recovery

When state is uncertain:

  1. af --session <session> observe page --max-rows 120
  2. af memory experience --app <pkg> --activity <act> --failure-cause <cause>
  3. Choose one recovery:
  • af --session <session> recover back --times 1 for modal/back-stack drift.
  • af --session <session> recover home for lost navigation context.
  • af --session <session> recover relaunch --package <pkg> for app reset.
  1. af memory log --for-session <session> --status failed --limit 5
  2. Re-run baseline.

Diagnostics

bash
af --session <session> observe overlay set --enable --mark-scope all --refresh on --refresh-interval-ms 800
af --session <session> observe screenshot --annotate --hide-overlay --max-marks 120 --mark-scope interactive
af --session <session> observe overlay set --disable --mark-scope all --refresh off

Artifacts still write to disk when memory is disabled, but DB artifact ids may be absent.

Memory Topic Conventions

PrefixPurpose
nav/Navigation paths between screens
pitfall/Known problems and workarounds
selector/Reliable selector strategies
recovery/Recovery strategies that worked

Guidelines

  • Favor refs over coordinates.
  • Keep --session stable and unique per task.
  • Each action must be followed by observation, then verification.
  • Use af memory experience before acting on unfamiliar pages.
  • Use af --session <session> memory context to inspect the current cached page fingerprint.
  • Use af memory log --for-session <session> and af memory stats --for-session <session> to inspect failures and session quality.

© felinics, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in cli/skills/autofish-control of felinics/Autofish.

Open the folder on GitHubat commit 5ab0a73

Compare with similar skills

Autofish Android Control next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Autofish Android Control compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Autofish Android Control this skillfelinics/Autofish118—~1.7kAutomated safety check: PassApache-2.0
Burner Phone Android Controlsmallnest/goclaw599—~436Automated safety check: PassMIT
OpenGUI Android ControlCore-Mate/OpenGUI1.8k—~788Automated safety check: PassCustom licence
Mobilerun Docs Referencedroidrun/mobilerun9.6k—~943Automated safety check: PassMIT
Appiumblokadaorg/blokada3.3k—~3.5kAutomated safety check: PassMPL-2.0
Phone HarnessShawnPana/phone-harness3.2k—~4.3kAutomated safety check: PassMIT

Similar skills

  • Controls an Android device over ADB in a loop of screenshot, vision analysis, tap and verification, so the agent acts on real on-screen coordinates.

    599 GitHub stars~436 tokensUpdated 6 mo ago
    MobileAuto-check passed
  • OpenGUI Android Control

    Core-Mate/OpenGUI

    Drives locally connected Android phones through OpenGUI screenshots and allowlisted actions, one observed step at a time, for app, game and multi-device tasks.

    1.8k GitHub stars~788 tokensUpdated today
    MobileAuto-check passed
  • Mobilerun Docs Reference

    droidrun/mobilerun

    Answers questions about Mobilerun, the LLM-agent framework for automating Android and iOS devices, by pointing the agent to the right page of its v5 documentation.

    9.6k GitHub stars~943 tokensUpdated 3 days ago
    MobileAuto-check passed
  • Appium

    blokadaorg/blokada

    A skill your agent uses for dynamic inspection and navigation of the Blokada app through the repo-local Appium machine session.

    3.3k GitHub stars~3.5k tokensUpdated today
    MobileAuto-check passed
  • Phone Harness

    ShawnPana/phone-harness

    Control the user's phone — an iPhone through the Mac's iPhone Mirroring window, an Android over adb, or a rented cloud Android: open apps, tap, type, swipe, read the screen.

    3.2k GitHub stars~4.3k tokensUpdated today
    MobileAuto-check passed
  • Phoneagent

    rounak/PhoneAgent

    Control a connected iPhone, iOS simulator, Android emulator, or Android device from macOS through PhoneAgent's JSON-RPC bridge.

    799 GitHub stars~2.2k tokensUpdated 1 mo ago
    MobileAuto-check passed

Works with

Questions about Autofish Android Control

What does Autofish Android Control do?

Controls an Android device through the af CLI with observe, act and verify steps, ref-based taps, screenshots and recovery when a step goes wrong. The skill asks for deterministic control with evidence at every step. The agent reads the current screen and its element refs with af observe, performs exactly one action, then verifies the result, and it taps by refs such as @nK instead of screen coordinates so a run can be replayed reliably.

When should I use Autofish Android Control?

Autofish Android Control fits situations like: navigating an Android app's UI through Autofish; replaying a mobile workflow with stable element refs instead of coordinates; verifying the screen after each action in a phone automation; recovering when an automated step lands on the wrong screen.

How do I install Autofish Android Control in Claude Code?

Run `npx skills add felinics/Autofish --skill autofish-control -a claude-code`. Or copy the skill folder (cli/skills/autofish-control in felinics/Autofish) into .claude/skills/autofish-control in your project. Claude Code loads it when a task matches its description.

How do I install Autofish Android Control in Codex?

Run `npx skills add felinics/Autofish --skill autofish-control -a codex`. Or copy the skill folder (cli/skills/autofish-control in felinics/Autofish) into .agents/skills/autofish-control in your project. Codex loads it when a task matches its description.

Can I use Autofish Android Control in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add felinics/Autofish --skill autofish-control -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/autofish-control, .gemini/skills/autofish-control, .github/skills/autofish-control and .opencode/skills/autofish-control in your project.

What does Autofish Android Control need to run?

Going by SKILL.md and its folder, Autofish Android Control needs credentials named AF_TOKEN. Our summary lists: The af CLI; The Autofish Android app with its URL and access token; adb, for USB connections.

Does Autofish Android Control access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Autofish Android Control safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Autofish Android Control use?

Autofish Android Control is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Autofish Android Control use?

About 1.7k tokens (SKILL.md is roughly 6.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Autofish Android Control?

Skills that share tags, products or a category with Autofish Android Control: Burner Phone Android Control (smallnest/goclaw, 599 stars), OpenGUI Android Control (Core-Mate/OpenGUI, 1.8k stars), Mobilerun Docs Reference (droidrun/mobilerun, 9.6k stars) and Appium (blokadaorg/blokada, 3.3k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Autofish Android Control?

felinics (a GitHub organization) maintains it in felinics/Autofish, which has 118 GitHub stars. The repository was last updated on August 29, 2026.

Source: felinics/Autofish on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.