ghost/freecell

Open Patience (F-Droid) FreeCell: deal a game (classic, 2 or 6 cells), tap cards to move them, undo/redo and read the full board (cells, foundations, columns, moves, time). Offline, no account.

Proven 27× fewer tokens Score 41/100 Official hard skill python

Token savings

96% fewer tokens
Tokenswithout1,588,646with59,382 (96% fewer)
Timewithout94.0 swith47.3 s (50% less time)
Tool callswithout34with6 (82% fewer)

Agent run: stopped early without the skill, finished with it (not independently checked).

One recorded run each way, claude-haiku-5-5, same phone and same prompt. Watch it in the Before / after tab.

Recorded: new_game · live agent session on a real phone

Control Open Patience on Android with an AI agent — play FreeCell and Klondike solitaire

Control Open Patience on Android with an AI agent. Play FreeCell solitaire on your phone: an agent deals a game, moves cards, undoes and reads the whole board.

Target search phrase: AI agent plays FreeCell solitaire on Android

Demo shows: new_game (variant=Classic)

Ghost in the Droid seed skill for Open Patience (io.github.d_rk.openpatience), a free offline solitaire collection from F-Droid (this skill plays its FreeCell). Offline, no account.

ActionWhat it doesParams
new_gameDeal a new game (Classic, 2 cells, 6 cells) and return the boardvariant
tap_cardTap a card by name; the app plays it to its best placecard
tap_columnTap the bottom card of column 1-8column
undo_moveUndo (or redo) the last moveredo
get_boardRead cells, foundations, 8 columns, moves and timenone

Toolkit

An agent can drive the whole app with these; compose them.

RoleAction
Entrynew_game
Primitivestap_card, tap_column, undo_move
Read stateget_board

Install

The app: F-Droid, or https://f-droid.org/packages/io.github.d_rk.openpatience/. The skill:

pip install "ghost-in-the-droid>=1.6.0"   # 1.6.0 is not on PyPI yet: until it ships, git clone the repo and `pip install -e .`
ghost skill install ghost/freecell

Use

ghost skill run ghost/freecell new_game --device <serial>
ghost skill run ghost/freecell tap_column --param column=3 --device <serial>
run_skill(name="ghost/freecell", action="get_board")
# {"board": {"free_cells": [], "foundations": ["ace of hearts"], "columns": [["five of hearts", ...], ...], "moves": 1}}

Try asking: "Deal a new FreeCell game, then play the bottom card of columns 3, 5 and 7."

Tested on

Real Samsung phone, Android 13 (720x1600, 300 dpi, en-GB), Open Patience 1.1.2. License: MIT.

Known failure modes and versions tested

Versions tested

App versionAndroidDeviceSkill versionDates
1.1.213Samsung real phone (720x1600, 300 dpi, en-GB)1.0.02026-11-02

Recorded failures

  • The deal is random: never assert specific cards, assert 52 cards on the board and 0 moves after a deal.
  • A tap moves the card to the app's chosen place; it cannot be steered to a specific column, so an agent reads the board and picks which card to tap.
  • Reopening the app resumes the game in progress: new_game goes back to the variants screen first.

Popups and first-run screens handled

  • None: no first-run screens, no permissions.

Try a sample prompt or run an action by name. Replace any parameters in braces with your own values.

new_game

Play demo

Try asking

  • Deal a new FreeCell game
  • play FreeCell
  • new solitaire game
  • deal a hard freecell with 2 cells
ghost skill run ghost/freecell new_game

tap_card

Play demo

Try asking

  • Move the seven of hearts in FreeCell
  • play the king of hearts
  • tap the ace of clubs
ghost skill run ghost/freecell tap_card

tap_column

Play demo

Try asking

  • Play the bottom card of the third FreeCell column
  • move the last card in column 5
ghost skill run ghost/freecell tap_column

undo_move

Play demo

Try asking

  • Undo my last FreeCell move
  • take back that move
ghost skill run ghost/freecell undo_move

get_board

Play demo

Try asking

  • What does my FreeCell board look like?
  • which cards are in the free cells
  • show the foundations
ghost skill run ghost/freecell get_board