AgentSkillsCN

motion-skill

获取 Android 运动传感器数据——包括加速度计、陀螺仪,支持运动检测、摇晃手势识别,以及设备朝向的监测。

SKILL.md
--- frontmatter
name: motion-skill
description: Get Android motion sensor data - accelerometer, gyroscope, detect motion, shake gestures, and device orientation.
allowed-tools: motion_detection
metadata:
  author: machina
  version: "1.0"
  category: android
  icon: "📈"
  color: "#14B8A6"

Motion Detection Tool

Access motion sensors on Android device.

How It Works

This skill provides instructions for the Motion Detection tool node. Connect the Motion Detection node to Zeenie's input-tools handle to enable motion sensing.

motion_detection Tool

Get accelerometer, gyroscope, and motion data.

Schema Fields

FieldTypeRequiredDescription
actionstringYes"status" - Get motion sensor data

Example

Get motion data:

json
{
  "action": "status"
}

Response Format

json
{
  "success": true,
  "service": "motion_detection",
  "action": "status",
  "data": {
    "accelerometer": {
      "x": 0.12,
      "y": 9.78,
      "z": 0.34
    },
    "gyroscope": {
      "x": 0.01,
      "y": 0.02,
      "z": 0.00
    },
    "orientation": {
      "azimuth": 45.0,
      "pitch": -5.0,
      "roll": 2.0
    },
    "is_moving": false,
    "is_shaking": false,
    "device_position": "flat"
  }
}

Response Fields

FieldTypeDescription
accelerometerobjectX, Y, Z acceleration (m/s^2)
gyroscopeobjectX, Y, Z rotation rate (rad/s)
orientationobjectDevice orientation angles
is_movingbooleanSignificant movement detected
is_shakingbooleanShake gesture detected
device_positionstringInferred position

Orientation Fields

FieldDescription
azimuthCompass heading (0-360 degrees)
pitchForward/backward tilt (-180 to 180)
rollLeft/right tilt (-90 to 90)

Device Positions

PositionDescription
flatLaying flat on surface
uprightStanding vertical
tiltedAngled position
face_downScreen facing down
face_upScreen facing up

Accelerometer Interpretation

When device is stationary and flat:

  • X ~ 0 (left-right)
  • Y ~ 9.8 (gravity)
  • Z ~ 0 (forward-backward)

Movement creates deviations from gravity baseline.

Use Cases

Use CaseDataDescription
Shake detectionis_shakingTrigger on shake gesture
Movement alertis_movingDetect device moved
Orientationdevice_positionCheck how device is held
Compass headingazimuthGet direction
Tilt detectionpitch, rollDetect angles

Common Workflows

Shake to trigger action

  1. Poll motion status
  2. When is_shaking = true
  3. Execute action

Security monitor

  1. Place device as monitor
  2. Check is_moving periodically
  3. Alert if movement detected

Orientation-based response

  1. Check device_position
  2. Adjust behavior based on orientation

Setup Requirements

  1. Connect the Motion Detection node to Zeenie's input-tools handle
  2. Android device must be paired
  3. Motion sensors must be available on device