android
Use when working with Android devices via ADB - connecting devices, running shell commands, installing apps, debugging, taking screenshots, UI automation, viewing logs, analyzing crashes, or exploring system internals. Triggers on "adb", "logcat", "install apk", "debug android", "android device", "shell command", "screenshot", "dumpsys", "crash", "ANR".
What this skill does
# Android Device Mastery
This skill covers everything about interacting with Android devices via ADB and shell commands.
## Device Connection
### Check Connected Devices
```bash
adb devices -l
```
Output shows serial, status, and device info. Common statuses:
- `device` - Connected and authorized
- `unauthorized` - Accept USB debugging prompt on device
- `offline` - Connection issues, try `adb kill-server && adb start-server`
### Wireless Debugging
**Android 11+ (Recommended):**
1. Enable Wireless debugging in Developer Options
2. Tap "Pair device with pairing code"
3. Run: `adb pair <ip>:<pairing_port>` and enter the code
4. Then: `adb connect <ip>:<connection_port>`
**Legacy (requires USB first):**
```bash
adb tcpip 5555
adb connect <device_ip>:5555
```
### Multiple Devices
Always specify device with `-s`:
```bash
adb -s <serial> shell
adb -s emulator-5554 install app.apk
```
---
## Shell Commands
### Interactive Shell
```bash
adb shell # Enter shell
adb shell <command> # Run single command
adb shell "cmd1 && cmd2" # Chain commands
```
### Essential Commands
```bash
# Device info
getprop ro.product.model # Device model
getprop ro.build.version.release # Android version
getprop ro.build.version.sdk # SDK level
# File operations
ls -la /sdcard/
cat /path/to/file
cp /source /dest
rm /path/to/file
# Process info
ps -A | grep <name>
pidof <package_name>
top -n 1 -m 10
```
### Safe Output Limiting
For commands with potentially large output:
```bash
adb shell "logcat -d | head -500"
adb shell "dumpsys activity | head -200"
```
---
## App Management
### Install/Uninstall
```bash
adb install app.apk # Basic install
adb install -r app.apk # Replace existing
adb install -g app.apk # Grant all permissions
adb install -r -g app.apk # Both
adb uninstall com.example.app # Full uninstall
adb uninstall -k com.example.app # Keep data
```
### Start/Stop Apps
```bash
# Start main activity
adb shell monkey -p com.example.app -c android.intent.category.LAUNCHER 1
# Start specific activity
adb shell am start -n com.example.app/.MainActivity
# Start with intent extras
adb shell am start -n com.example.app/.Activity \
-a android.intent.action.VIEW \
-d "myapp://page/123" \
--es "key" "value"
# Force stop
adb shell am force-stop com.example.app
# Clear app data
adb shell pm clear com.example.app
```
### List Packages
```bash
adb shell pm list packages # All packages
adb shell pm list packages -3 # Third-party only
adb shell pm list packages | grep term # Filter
adb shell pm path com.example.app # APK location
adb shell dumpsys package com.example.app # Full package info
```
### Permissions
```bash
adb shell pm grant com.example.app android.permission.CAMERA
adb shell pm revoke com.example.app android.permission.CAMERA
adb shell dumpsys package com.example.app | grep permission
```
---
## File Operations
### Push/Pull Files
```bash
adb push local_file.txt /sdcard/
adb pull /sdcard/remote_file.txt ./
# Recursive
adb push local_dir/ /sdcard/target/
adb pull /sdcard/dir/ ./local/
```
### Access App Data (Debuggable Apps)
```bash
adb shell run-as com.example.app ls files/
adb shell run-as com.example.app cat shared_prefs/prefs.xml
adb shell run-as com.example.app sqlite3 databases/app.db ".tables"
```
---
## UI Automation
### Input Commands
```bash
# Tap at coordinates
adb shell input tap 500 800
# Swipe (x1 y1 x2 y2 [duration_ms])
adb shell input swipe 500 1500 500 500 300
# Text input (needs focused field)
adb shell input text "hello"
# Key events
adb shell input keyevent KEYCODE_HOME # Home
adb shell input keyevent KEYCODE_BACK # Back
adb shell input keyevent KEYCODE_ENTER # Enter
adb shell input keyevent KEYCODE_POWER # Power
adb shell input keyevent KEYCODE_VOLUME_UP # Volume up
```
### Common Keycodes
| Code | Key | Code | Key |
| ---- | ------ | ---- | -------- |
| 3 | HOME | 4 | BACK |
| 24 | VOL_UP | 25 | VOL_DOWN |
| 26 | POWER | 66 | ENTER |
| 67 | DEL | 82 | MENU |
### Screenshots & Recording
```bash
# Screenshot
adb shell screencap -p /sdcard/screen.png
adb pull /sdcard/screen.png
# One-liner (binary-safe)
adb exec-out screencap -p > screen.png
# Screen recording (max 3 min)
adb shell screenrecord /sdcard/video.mp4
adb shell screenrecord --time-limit 10 /sdcard/video.mp4
```
### UI Hierarchy
```bash
adb shell uiautomator dump /sdcard/ui.xml
adb pull /sdcard/ui.xml
```
---
## Debugging & Logs
### Logcat Essentials
```bash
# Dump and exit
adb logcat -d
# Last N lines
adb logcat -t 100
# Filter by tag:priority
adb logcat ActivityManager:I *:S
# Filter by package (get PID first)
adb logcat --pid=$(adb shell pidof -s com.example.app)
# Crash buffer
adb logcat -b crash
```
**Priority levels:** V(erbose), D(ebug), I(nfo), W(arn), E(rror), F(atal), S(ilent)
### Common Debug Patterns
```bash
# Find crashes
adb logcat *:E | grep -E "(Exception|Error|FATAL)"
# Activity lifecycle
adb logcat ActivityManager:I ActivityTaskManager:I *:S
# Memory issues
adb logcat art:D dalvikvm:D *:S | grep -i "gc"
```
### Memory Analysis
```bash
adb shell dumpsys meminfo com.example.app
```
Key metrics:
- **PSS**: Proportional memory use (compare apps with this)
- **Private Dirty**: Memory exclusive to process
- **Heap**: Java/Native heap usage
### Crash Analysis
```bash
# ANR traces
adb shell cat /data/anr/traces.txt
# Tombstones (native crashes, needs root)
adb shell ls /data/tombstones/
# Recent crashes via logcat
adb logcat -b crash -d
```
---
## System Inspection
### dumpsys Services
```bash
adb shell dumpsys -l # List all services
# Common services
adb shell dumpsys activity # Activities, processes
adb shell dumpsys package <pkg> # Package details
adb shell dumpsys battery # Battery status
adb shell dumpsys meminfo # System memory
adb shell dumpsys cpuinfo # CPU usage
adb shell dumpsys window displays # Display info
adb shell dumpsys connectivity # Network state
```
### System Properties
```bash
adb shell getprop # All properties
adb shell getprop | grep <filter> # Filter properties
# Useful properties
getprop ro.product.model # Model
getprop ro.build.fingerprint # Build fingerprint
getprop ro.serialno # Serial number
getprop sys.boot_completed # Boot status (1 = done)
```
### Settings
```bash
# Namespaces: system, secure, global
adb shell settings get global airplane_mode_on
adb shell settings put system screen_brightness 128
adb shell settings list global
```
---
## Reboot Commands
```bash
adb reboot # Normal reboot
adb reboot recovery # Recovery mode
adb reboot bootloader # Fastboot mode
adb reboot sideload # Sideload mode
adb reboot-bootloader # Alias for bootloader
```
---
## Troubleshooting
**Device not found:**
```bash
adb kill-server && adb start-server
```
**Unauthorized:**
- Check USB debugging is enabled
- Revoke USB debugging authorizations in Developer Options, reconnect
**Multiple devices error:**
- Use `-s <serial>` to specify device
**Command not found (on device):**
- Some commands require root or are version-specific
- Try `/system/bin/<cmd>` or check if command exists
---
## Quick Reference
| Task | Command |
| ------------ | --------------------------------------------------------------- |
| List devices | `adb devices -l` |
| Install app | `adb install -r -g app.apk` |
| Start app | `adb shell monkey -p pkg -c android.intent.category.LAUNCHER 1` |
| Related in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.