Claude Code plugin for the LambdaTest iOS team — slash commands, knowledge base, and MCP servers.
One repo. One install. Every team member gets all workflows globally.
git clone [email protected]:LambdatestIncPrivate/iCommand.git
cd iCommand
./install.shOpen Claude Code in any repo and type / to see all available commands.
| Command | Description |
|---|---|
/feature |
Full 8-phase feature development workflow (RFC → TDD → PR) |
/fix-bug |
Fix a Jira bug with TDD, create PR, transition ticket |
/commit-push-pr |
Quick commit + push + PR creation |
/review-pr |
Language-aware code review with Go/Swift checklists |
/deploy-check |
Deployment readiness check for a service |
/read-prd |
Analyze a PRD/Confluence page — extract requirements, gaps |
/write-rfc |
Generate an RFC from a topic or Jira ticket |
/debug-host |
Debug a host via logtail MCP — tail logs, grep errors |
/check-health |
Health dashboard for one or all hosts (logtail MCP) |
/incident |
Create incident report from logs, post to Slack |
/standup |
Generate standup update from git activity |
/slack-update |
Post formatted status update to Slack |
/transition-jira |
Transition a Jira ticket through workflow states |
/changelog |
Generate user-friendly changelog from git history |
/doctor |
Self-diagnosis — verify iCommand installation health |
/host-inspect |
Quick host overview — devices, services, health, errors |
/host-diag |
Full system diagnostic — CPU, memory, disk, Xcode, USB |
/host-rca |
Root cause analysis with source code correlation |
/device-manage |
Device operations — list, info, apps, screenshot, reboot, syslog |
/service-manage |
Service lifecycle — status, health, restart, stop, logs |
/host-exec |
Run arbitrary commands on a remote host |
/clean-host |
Clean Xcode caches/DerivedData, show disk freed |
Requires the
hostctlbinary. See Setup below.
Get a snapshot of a remote host: system stats, connected devices, service health, and recent errors.
/host-inspect <host_ip> [environment]
/host-inspect 10.151.1.211
/host-inspect 10.151.1.211 prod
What it runs: hostctl inspect, hostctl stats, hostctl health, hostctl devices (in parallel)
Output:
- System table — hostname, OS, uptime, CPU, memory, disk
- Connected devices — UDID, model, iOS version, battery
- Service health — LRR/MB running status, PID, health check result
- Anomaly flags — disk > 80% suggests
/clean-host, stopped service suggests/service-manage restart
Comprehensive diagnostic covering every aspect of the host.
/host-diag <host_ip> [environment]
/host-diag 10.151.1.211
/host-diag 10.151.1.213 prod
What it runs (all in parallel):
| hostctl command | Data collected |
|---|---|
hostctl diag |
Full diagnostic report |
hostctl stats |
CPU, memory, disk, load average |
hostctl disk |
Disk usage by path |
hostctl top --sort cpu |
Top 10 CPU consumers |
hostctl top --sort mem |
Top 10 memory consumers |
hostctl xcode |
Xcode version, xcodebuild, swift |
hostctl usb |
USB device tree |
hostctl simulators |
Simulator inventory |
hostctl network |
Interfaces and connections |
Anomaly detection:
- Disk > 80% → suggests
/clean-host - Memory pressure critical → shows top memory consumers
- CPU > 90% → shows top CPU consumers
- Unavailable simulators → suggests cleanup
Intelligent RCA combining log pattern matching with source code correlation. Maps errors to exact file:line references in your local source code.
/host-rca <host_ip> <udid> [environment]
/host-rca 10.151.1.211 00008110-001E04C10C8A801E
/host-rca 10.151.1.211 00008110-001E04C10C8A801E prod
Two-layer analysis:
| Layer | hostctl command | What it does |
|---|---|---|
| Pattern-based | hostctl rca |
Scans logs for ERROR, FATAL, PANIC, wda_status, tunnel drops |
| Source-aware | hostctl analyze |
Correlates log errors with local source code (requires source_path in config) |
Known failure signatures cross-referenced:
| Log pattern | Root cause |
|---|---|
IPv6 header EOF + usbmuxd broken pipe |
go-ios tunnel drop (upstream) |
wda_status=failed + manual=0 |
WDA unreachable, tunnel instability |
USB reset on iOS 17+ |
Bug — must be gated to iOS 12-16 |
health 400 |
LRR returning unhealthy status |
context deadline exceeded |
Operation timeout |
Output: Findings with severity (P1-P4), frequency, source file:line, error timeline, service status. Offers to post to Slack or create /incident.
Manage iOS devices connected to a remote host.
/device-manage <action> <host_ip> [udid] [environment]
list — Show all connected devices
/device-manage list 10.151.1.211
/device-manage list 10.151.1.211 prod
Output: UDID, name, model, iOS version, battery %
info — Detailed device metadata
/device-manage info 10.151.1.211 00008110-001E04C10C8A801E
Output: Serial, WiFi MAC, Bluetooth, storage, all device properties
apps — List installed applications
/device-manage apps 10.151.1.211 00008110-001E04C10C8A801E
Supports filtering: user, system, or all (default: user)
screenshot — Capture and download screenshot
/device-manage screenshot 10.151.1.211 00008110-001E04C10C8A801E
Saves to /tmp/screenshot-<last8_udid>.png
reboot — Reboot device (requires confirmation)
/device-manage reboot 10.151.1.211 00008110-001E04C10C8A801E
syslog — Stream iOS system logs
/device-manage syslog 10.151.1.211 00008110-001E04C10C8A801E
Shows last 200 lines. Use --follow for live streaming.
Manage LRR (Lambda Remote Runner) and MB (Mobile Binary) services on remote hosts.
/service-manage <action> <host_ip> [service] [environment]
status — Show service process info
/service-manage status 10.151.1.211
Output: Service name, status (RUNNING/STOPPED), PID, CPU%, MEM%
health — Run health checks
/service-manage health 10.151.1.211
/service-manage health 10.151.1.211 prod
Output: Process check + custom health command result (OK/FAIL)
restart — Restart a service (requires confirmation)
/service-manage restart 10.151.1.211 lrr
/service-manage restart 10.151.1.211 mb prod
Sends SIGTERM, waits 2s, verifies auto-restart. Reports new PID.
stop — Stop a service (requires confirmation)
/service-manage stop 10.151.1.211 mb
Add --force for SIGKILL.
logs — Tail or stream service logs
/service-manage logs 10.151.1.211 lrr 00008110-001E04C10C8A801E
/service-manage logs 10.151.1.211 mb 00008110-001E04C10C8A801E
Shows last 200 lines. Supports --follow for live streaming.
Execute arbitrary shell commands on a remote host through the bastion SSH tunnel.
/host-exec <host_ip> "<command>" [environment]
/host-exec 10.151.1.211 "ps aux | grep mobile"
/host-exec 10.151.1.211 "df -h" prod
/host-exec 10.151.1.213 "ls -la ~/Documents/Mobile_Binary/"
/host-exec 10.151.1.211 "cat /etc/os-release"
Safety checks:
- Blocked:
rm -rf /,shutdown,ddon disks, SSH key modifications - Requires confirmation:
rm,kill,sudo, file modifications - No confirmation needed: Read-only commands (
ls,ps,df,cat,uptime)
Clean DerivedData, Xcode caches, and unavailable simulators. Shows before/after disk usage.
/clean-host <host_ip> [environment]
/clean-host 10.151.1.211
/clean-host 10.151.1.211 prod
Workflow:
- Shows current disk usage (root, DerivedData, caches)
- Asks what to clean:
- DerivedData only (safest, usually largest gain)
- Xcode caches
- Unavailable simulators
- All of the above
- Runs cleanup
- Shows before/after comparison with space freed
-
Get the
hostctlbinary from your team lead and place it in your PATH:cp hostctl ~/bin/hostctl chmod +x ~/bin/hostctl
-
Create config templates:
hostctl config init
-
Edit
~/.hostctl/{dev,stage,prod}.yamlwith your bastion username and credentials. -
Verify:
hostctl --version
environment: prod
bastion:
host: bastion-prod.lambdatest.com
user: <your_username>
password: "<your_password>"
host:
user: ltadmin
password: "<host_password>"
services:
lrr:
name: Lambda Remote Runner
log_path: ~/Documents/LambdaRemoteRunner/lamda-remote-runner-{{udid}}.log
source_path: /path/to/lambda-remote-runner # optional, enables /host-rca source analysis
mb:
name: Mobile Binary
log_path: ~/Documents/Mobile_Binary/lt-{{udid}}.log
source_path: /path/to/mobile-automation # optionalThe logtail MCP server (used by /debug-host, /check-health, /incident) reads credentials from macOS Keychain:
# Bastion passwords (replace with your username)
security add-generic-password -s 'logtail-bastion-prod' -a '<username>' -w '<password>'
security add-generic-password -s 'logtail-bastion-stage' -a '<username>' -w '<password>'
# Host passwords
security add-generic-password -s 'logtail-host-prod' -a 'ltadmin' -w '<password>'
security add-generic-password -s 'logtail-host-stage' -a 'ltadmin' -w '<password>'install.sh symlinks every commands/*.md to ~/.claude/commands/, making them available as global slash commands in Claude Code from any directory. The repo path is stored in ~/.claude/icommand-path so commands can find docs/.
# Update (no reinstall needed)
cd iCommand && git pull
# Uninstall
cd iCommand && ./uninstall.sh
# Verify installation
/doctoriCommand/
├── install.sh # One-command setup
├── uninstall.sh # Clean removal
├── commands/ # 22 slash commands
│ ├── host-inspect.md # hostctl-powered
│ ├── host-diag.md
│ ├── host-rca.md
│ ├── device-manage.md
│ ├── service-manage.md
│ ├── host-exec.md
│ ├── clean-host.md
│ ├── debug-host.md # logtail MCP-powered
│ ├── check-health.md
│ ├── incident.md
│ ├── feature.md # dev workflow
│ ├── fix-bug.md
│ ├── commit-push-pr.md
│ ├── review-pr.md
│ ├── deploy-check.md
│ ├── read-prd.md
│ ├── write-rfc.md
│ ├── standup.md
│ ├── slack-update.md
│ ├── transition-jira.md
│ ├── changelog.md
│ └── doctor.md
├── skills/ # 4 auto-triggered skills
├── docs/ # Knowledge base
├── mcp-servers/logtail/ # SSH log access MCP server
└── templates/ # CLAUDE.md templates