device-session-lifecycle

device-session-lifecycle is a skill for Claude Code, Codex from kaeawc/auto-mobile. It costs 122 tokens per session (9,913 once invoked), scanned A, original, Apache-2.0.

A troubleshooting guide for device-session lifecycle bugs in AutoMobile, covering device startup, shutdown, readiness, expiry, release, and pool-state races. A device session is the tracked connection between a test or client and a device.

In plain words
What is it for?
Use it when fixing bugs involving device sessions, daemon restarts, boot readiness, session expiry, device pools, or unreliable lifecycle tests.
Why use it?
It helps developers distinguish several similar session identifiers and preserve the rules needed to avoid devices becoming stuck, misassigned, or incorrectly marked available.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when fixing bugs involving device sessions, daemon restarts, boot readiness, session expiry, device pools, or unreliable lifecycle tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kaeawc/auto-mobile/device-session-lifecycle
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add kaeawc/auto-mobile --skill device-session-lifecycle
Clone the repo
git clone --depth 1 https://github.com/kaeawc/auto-mobile

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for device-session-lifecycle

README.md
[![agentmods](https://agentmods.dev/badge/skills/kaeawc/auto-mobile/device-session-lifecycle/github.svg)](https://agentmods.dev/skills/kaeawc/auto-mobile/device-session-lifecycle)
Your own site
<a href="https://agentmods.dev/skills/kaeawc/auto-mobile/device-session-lifecycle"><img src="https://agentmods.dev/badge/skills/kaeawc/auto-mobile/device-session-lifecycle/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for device-session-lifecycle

Your own site · 80×15
<a href="https://agentmods.dev/skills/kaeawc/auto-mobile/device-session-lifecycle"><img src="https://agentmods.dev/badge/skills/kaeawc/auto-mobile/device-session-lifecycle.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 122 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 9,913 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 7 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Prompt Injection · line 17
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 17
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 20
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 21
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 22
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Agent Snooping · line 136
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
  • medium Excessive Agency · line 183
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00122 $0.09913
Opus 5.5 $0.00049 $0.03965
Sonnet 5.5 $0.00024 $0.01983
Haiku 4.5 $0.00012 $0.00991

Measured 20d ago against content hash 00b399e4dce8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

device-session-lifecycle scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 20d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/device-session-lifecycle/SKILL.md · 634 lines

How it starts

The opening of the file, as written. The whole thing — 634 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Device Session Lifecycle — Hunting & Fixing

The device session layer is where AutoMobile has shipped the most regressions. The bug classes repeat; the fixes that stuck follow a small set of patterns. This skill encodes both, plus the invariants any change must preserve.

Line refs are against main @ 2026-08-20 (post PR #5419). They drift — verify with grep before citing. Full bug history: references/history.md.

1. Four identifiers, three lifecycles — never conflate them

Identifier Minted by Meaning Persisted
sessionUuid IdGenerator in startDevice (src/server/deviceTools.ts), autolock (src/daemon/devicePool.ts), or client-supplied Who is driving: client/test session owning one device; caches, tool-selection profile yes (device_sessions table)
runtime.deviceSessionUuid src/daemon/deviceSessionRegistry.ts One device connection epoch: minted per pool incarnation, retired on disconnect, re-minted on reconnect even for the same serial. Stream routing key no — meaningless across daemon restarts
__mcpSessionId socket-server connection / MCP transport Per-connection transport identity; implicit autolock resolution no
deviceId (serial/UDID) adb / simctl Human label + adb target only. Mutable across reboots — never an identity key n/a

Read the full file on GitHub · 634 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 20d ago Changed 00b399e4dce8
  2. 22d ago Changed 4b2059dbf514
  3. 26d ago Changed · +10 lines 21b53a26332a
  4. 29d ago Changed · +18 lines 6be3438071f4
  5. 1mo ago Changed · +49 lines 942fd51a56b8
  6. 1mo ago Changed b298d90c966a
  7. 1mo ago Changed 62101e994d6a
  8. 1mo ago Changed · +276 lines 8dc1b228e4ca
  9. 2mo ago First seen · 281 lines · 122 tokens per session scan A 9a61584350cd

Subscribe to this mod's changes

device-session-lifecycle is a skill published in the GitHub repository kaeawc/auto-mobile (55 stars, last pushed today), licensed Apache-2.0. It adds 122 tokens to every session and 9,913 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

device-session-lifecycle compared with skills from other repositories

device-session-lifecycle next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
device-session-lifecyclekaeawc/auto-mobileSkill55todayApache-2.0A122Claude Code, Codex
ios-fixgarrytan/gstackSkill141ktodayMITA15Claude Code
node-connectopenclaw/openclawSkill394ktodayMITA39Claude Code, Codex
google-mobile-ads-validategoogle/skillsSkill23kyesterdayApache-2.0A84Claude Code, Codex
jetpack-compose-performanceandroid/skillsSkill10k2d agoApache-2.0A41Claude Code
android-tombstone-symbolicationdotnet/skillsSkill5.8ktodayMITA176Claude Code
swiftui-performance-auditsteipete/agent-scriptsSkill7.5k8d agoMITA24Claude Code, Codex