{
  "schemaVersion": "1.0",
  "item": {
    "slug": "tesla-smart-charge",
    "name": "Tesla Smart Charge",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/thibautrey/tesla-smart-charge",
    "canonicalUrl": "https://clawhub.ai/thibautrey/tesla-smart-charge",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/tesla-smart-charge",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=tesla-smart-charge",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "CHANGELOG.md",
      "README.txt",
      "SKILL.md",
      "references/api_reference.md",
      "references/cron_setup.md",
      "references/tesla-charge-schedule-example.json"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/tesla-smart-charge"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/tesla-smart-charge",
    "agentPageUrl": "https://openagent3.xyz/skills/tesla-smart-charge/agent",
    "manifestUrl": "https://openagent3.xyz/skills/tesla-smart-charge/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/tesla-smart-charge/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Tesla Smart Charge Optimizer",
        "body": "Schedule Tesla charging to reach target battery % by a specific time. Runs daily via cron to check a schedule file and only charges on configured dates."
      },
      {
        "title": "Security & Dependencies",
        "body": "Required:\n\nEnvironment variable: TESLA_EMAIL (your Tesla account email)\nSkill dependency: tesla skill must be installed and properly configured with Tesla API credentials\n\nSecurity improvements (v1.1.0+):\n\n✅ No shell injection risk: Uses argument lists instead of shell=True\n✅ Email validation: TESLA_EMAIL is validated before use\n✅ Input validation: Charge limits are validated (0-100% range)\n✅ Secure env passing: Credentials passed via environment variables, not string interpolation\n✅ Explicit dependencies: Metadata declares required env vars and skill dependencies"
      },
      {
        "title": "1. Set Up Schedule",
        "body": "Copy the example schedule file:\n\ncp skills/tesla-smart-charge/references/tesla-charge-schedule-example.json \\\n   memory/tesla-charge-schedule.json\n\nEdit memory/tesla-charge-schedule.json with your planned charge dates:\n\n{\n  \"charges\": [\n    {\n      \"date\": \"2026-02-01\",\n      \"target_battery\": 100,\n      \"target_time\": \"08:00\"\n    },\n    {\n      \"date\": \"2026-02-03\",\n      \"target_battery\": 80,\n      \"target_time\": \"07:00\"\n    }\n  ]\n}"
      },
      {
        "title": "Option 1: Daily Check at Midnight (Simple)",
        "body": "clawdbot cron add \\\n  --name \"Tesla daily charge check\" \\\n  --schedule \"0 0 * * *\" \\\n  --task \"TESLA_EMAIL=your@email.com python3 /path/to/skills/tesla-smart-charge/scripts/tesla-smart-charge.py --check-schedule\""
      },
      {
        "title": "Option 2: Daily Check + Session Management (Recommended)",
        "body": "For better charge limit management, run both:\n\nAt midnight (initialize daily charge):\n\nclawdbot cron add \\\n  --name \"Tesla daily charge check\" \\\n  --schedule \"0 0 * * *\" \\\n  --task \"TESLA_EMAIL=your@email.com python3 /path/to/skills/tesla-smart-charge/scripts/tesla-smart-charge.py --check-schedule\"\n\nEvery 30 minutes during active hours (manage session limits):\n\nclawdbot cron add \\\n  --name \"Tesla session management\" \\\n  --schedule \"*/30 8-23 * * *\" \\\n  --task \"TESLA_EMAIL=your@email.com python3 /path/to/skills/tesla-smart-charge/scripts/tesla-smart-charge.py --manage-session\"\n\nThe second job ensures charge limits are properly updated throughout the day:\n\n✅ During session: Maintains 100% (or user-specified) limit\n✅ After session: Applies 80% (or user-specified) limit for battery health"
      },
      {
        "title": "How It Works",
        "body": "Each day at midnight (or whenever cron runs):\n\nScript checks memory/tesla-charge-schedule.json\nIf today's date is in the charges array → executes charge plan\n\nFetches current battery level\nCalculates optimal start time\nSets charge limit to session limit (default 100%)\nDisplays charge details\nShows next scheduled charge date\n\n\nIf today is NOT scheduled → applies post-charge limit\n\nSets charge limit to default 80% (or user-specified)\nStill displays next scheduled charge date\n\nSession Management:\n\nDuring charge session: Charge limit = charge_limit_percent (default 100%)\nAfter charge session expires: Charge limit = post_charge_limit_percent (default 80%)\n\nResult: One cron job that handles both charging and limit management — no need to create new jobs for each date!"
      },
      {
        "title": "Schedule File Format",
        "body": "{\n  \"charges\": [\n    {\n      \"date\": \"2026-02-01\",\n      \"target_battery\": 100,\n      \"target_time\": \"08:00\",\n      \"charge_limit_percent\": 100,\n      \"post_charge_limit_percent\": 80\n    },\n    {\n      \"date\": \"2026-02-03\",\n      \"target_battery\": 80,\n      \"target_time\": \"07:00\",\n      \"charge_limit_percent\": 100,\n      \"post_charge_limit_percent\": 80\n    }\n  ]\n}\n\nFields:\n\ndate: YYYY-MM-DD format (when to charge)\ntarget_battery: Target battery % (default: 100)\ntarget_time: HH:MM when charging should complete (default: 08:00)\ncharge_limit_percent: Charge limit during session (default: 100%, optional)\npost_charge_limit_percent: Charge limit after session ends (default: 80%, optional)"
      },
      {
        "title": "Tesla Email",
        "body": "export TESLA_EMAIL=\"your@email.com\""
      },
      {
        "title": "Optional: Customize Charger Power",
        "body": "Default: 2.99 kW (home charger, ~13A @ 230V)\n\nAdjust in cron task or when calling manually:\n\n--charger-power 3.7      # 16A @ 230V\n--charger-power 7.4      # 32A @ 230V (dual-phase)"
      },
      {
        "title": "Check Schedule for Today",
        "body": "TESLA_EMAIL=\"your@email.com\" python3 scripts/tesla-smart-charge.py --check-schedule\n\nOutput:\n\n✅ If scheduled: Shows charge plan + charge limits + next date\n❌ If not scheduled: Shows next scheduled date + applies default 80% limit"
      },
      {
        "title": "Manage Active Session (Run During or After Charge)",
        "body": "TESLA_EMAIL=\"your@email.com\" python3 scripts/tesla-smart-charge.py --manage-session\n\nThis command:\n\nChecks if today's charge session is active\nDuring session: Sets charge limit to session limit (default 100%)\nAfter session: Sets charge limit to post-charge limit (default 80%)\nNo session: Applies default 80% limit\n\nTip: Run this hourly or every 30 minutes during active charging days for real-time limit management."
      },
      {
        "title": "Show All Scheduled Charges",
        "body": "python3 scripts/tesla-smart-charge.py --show-schedule"
      },
      {
        "title": "Show Last Charge Plan",
        "body": "python3 scripts/tesla-smart-charge.py --show-plan"
      },
      {
        "title": "Daily 100% Charge (Mon-Fri)",
        "body": "{\n  \"charges\": [\n    {\"date\": \"2026-02-02\", \"target_battery\": 100, \"target_time\": \"08:00\"},\n    {\"date\": \"2026-02-03\", \"target_battery\": 100, \"target_time\": \"08:00\"},\n    {\"date\": \"2026-02-04\", \"target_battery\": 100, \"target_time\": \"08:00\"},\n    {\"date\": \"2026-02-05\", \"target_battery\": 100, \"target_time\": \"08:00\"},\n    {\"date\": \"2026-02-06\", \"target_battery\": 100, \"target_time\": \"08:00\"}\n  ]\n}"
      },
      {
        "title": "Smart 80% for Battery Health (Every 3 Days)",
        "body": "{\n  \"charges\": [\n    {\"date\": \"2026-02-01\", \"target_battery\": 80, \"target_time\": \"07:00\"},\n    {\"date\": \"2026-02-04\", \"target_battery\": 80, \"target_time\": \"07:00\"},\n    {\"date\": \"2026-02-07\", \"target_battery\": 80, \"target_time\": \"07:00\"}\n  ]\n}"
      },
      {
        "title": "Variable Targets",
        "body": "{\n  \"charges\": [\n    {\"date\": \"2026-02-01\", \"target_battery\": 100, \"target_time\": \"08:00\"},\n    {\"date\": \"2026-02-02\", \"target_battery\": 80, \"target_time\": \"07:00\"},\n    {\"date\": \"2026-02-03\", \"target_battery\": 60, \"target_time\": \"06:00\"}\n  ]\n}"
      },
      {
        "title": "Charge Time Estimation",
        "body": "Charge time is calculated as:\n\nenergy_needed_kwh = (battery_capacity × (target - current) / 100) / charge_efficiency\ncharge_time_hours = energy_needed_kwh / charger_power_kw\nstart_time = target_time - charge_time_hours - margin_minutes\n\nWhere:\n\nbattery_capacity: Vehicle battery size (kWh, default: 75)\ncharger_power_kw: Your charger's power (kW, default: 2.99)\ncharge_efficiency: ~0.92 (typical AC charging)\nmargin_minutes: Buffer before target (default: 5 min)\n\nExample: 75 kWh battery at 50%, charging to 100% by 08:00 with 2.99 kW:\n\nEnergy needed: (75 × 50% / 100) / 0.92 = 40.8 kWh\nCharge time: 40.8 / 2.99 ≈ 13.6 hours\nStart time: 08:00 - 13.6h - 5min ≈ 18:25 previous day"
      },
      {
        "title": "Workflow Tips",
        "body": "Add new charges: Edit memory/tesla-charge-schedule.json — cron picks up changes on next run\n\nPlan ahead: Add weeks of charges in advance, script handles date logic\n\nOne cron job: No need to create separate jobs — one daily check does it all\n\nSee what's next: Each run displays the next scheduled charge date"
      },
      {
        "title": "Parameters",
        "body": "When calling manually with --target-time:\n\npython3 scripts/tesla-smart-charge.py \\\n  --target-time \"HH:MM\" \\\n  --target-battery 100 \\\n  --charger-power 2.99 \\\n  --battery-capacity 75 \\\n  --margin-minutes 5\n\nFor schedule-based operation, use --check-schedule (reads from JSON file)."
      },
      {
        "title": "References",
        "body": "CRON_SETUP.md - Full cron integration guide\nAPI_REFERENCE.md - Advanced parameters and formulas\ntesla-charge-schedule-example.json - Schedule file template"
      }
    ],
    "body": "Tesla Smart Charge Optimizer\n\nSchedule Tesla charging to reach target battery % by a specific time. Runs daily via cron to check a schedule file and only charges on configured dates.\n\nSecurity & Dependencies\n\nRequired:\n\nEnvironment variable: TESLA_EMAIL (your Tesla account email)\nSkill dependency: tesla skill must be installed and properly configured with Tesla API credentials\n\nSecurity improvements (v1.1.0+):\n\n✅ No shell injection risk: Uses argument lists instead of shell=True\n✅ Email validation: TESLA_EMAIL is validated before use\n✅ Input validation: Charge limits are validated (0-100% range)\n✅ Secure env passing: Credentials passed via environment variables, not string interpolation\n✅ Explicit dependencies: Metadata declares required env vars and skill dependencies\nQuick Start\n1. Set Up Schedule\n\nCopy the example schedule file:\n\ncp skills/tesla-smart-charge/references/tesla-charge-schedule-example.json \\\n   memory/tesla-charge-schedule.json\n\n\nEdit memory/tesla-charge-schedule.json with your planned charge dates:\n\n{\n  \"charges\": [\n    {\n      \"date\": \"2026-02-01\",\n      \"target_battery\": 100,\n      \"target_time\": \"08:00\"\n    },\n    {\n      \"date\": \"2026-02-03\",\n      \"target_battery\": 80,\n      \"target_time\": \"07:00\"\n    }\n  ]\n}\n\nCron Setup (Recommended)\nOption 1: Daily Check at Midnight (Simple)\nclawdbot cron add \\\n  --name \"Tesla daily charge check\" \\\n  --schedule \"0 0 * * *\" \\\n  --task \"TESLA_EMAIL=your@email.com python3 /path/to/skills/tesla-smart-charge/scripts/tesla-smart-charge.py --check-schedule\"\n\nOption 2: Daily Check + Session Management (Recommended)\n\nFor better charge limit management, run both:\n\nAt midnight (initialize daily charge):\n\nclawdbot cron add \\\n  --name \"Tesla daily charge check\" \\\n  --schedule \"0 0 * * *\" \\\n  --task \"TESLA_EMAIL=your@email.com python3 /path/to/skills/tesla-smart-charge/scripts/tesla-smart-charge.py --check-schedule\"\n\n\nEvery 30 minutes during active hours (manage session limits):\n\nclawdbot cron add \\\n  --name \"Tesla session management\" \\\n  --schedule \"*/30 8-23 * * *\" \\\n  --task \"TESLA_EMAIL=your@email.com python3 /path/to/skills/tesla-smart-charge/scripts/tesla-smart-charge.py --manage-session\"\n\n\nThe second job ensures charge limits are properly updated throughout the day:\n\n✅ During session: Maintains 100% (or user-specified) limit\n✅ After session: Applies 80% (or user-specified) limit for battery health\nHow It Works\n\nEach day at midnight (or whenever cron runs):\n\nScript checks memory/tesla-charge-schedule.json\nIf today's date is in the charges array → executes charge plan\nFetches current battery level\nCalculates optimal start time\nSets charge limit to session limit (default 100%)\nDisplays charge details\nShows next scheduled charge date\nIf today is NOT scheduled → applies post-charge limit\nSets charge limit to default 80% (or user-specified)\nStill displays next scheduled charge date\n\nSession Management:\n\nDuring charge session: Charge limit = charge_limit_percent (default 100%)\nAfter charge session expires: Charge limit = post_charge_limit_percent (default 80%)\n\nResult: One cron job that handles both charging and limit management — no need to create new jobs for each date!\n\nSchedule File Format\n{\n  \"charges\": [\n    {\n      \"date\": \"2026-02-01\",\n      \"target_battery\": 100,\n      \"target_time\": \"08:00\",\n      \"charge_limit_percent\": 100,\n      \"post_charge_limit_percent\": 80\n    },\n    {\n      \"date\": \"2026-02-03\",\n      \"target_battery\": 80,\n      \"target_time\": \"07:00\",\n      \"charge_limit_percent\": 100,\n      \"post_charge_limit_percent\": 80\n    }\n  ]\n}\n\n\nFields:\n\ndate: YYYY-MM-DD format (when to charge)\ntarget_battery: Target battery % (default: 100)\ntarget_time: HH:MM when charging should complete (default: 08:00)\ncharge_limit_percent: Charge limit during session (default: 100%, optional)\npost_charge_limit_percent: Charge limit after session ends (default: 80%, optional)\nEnvironment Setup\nTesla Email\nexport TESLA_EMAIL=\"your@email.com\"\n\nOptional: Customize Charger Power\n\nDefault: 2.99 kW (home charger, ~13A @ 230V)\n\nAdjust in cron task or when calling manually:\n\n--charger-power 3.7      # 16A @ 230V\n--charger-power 7.4      # 32A @ 230V (dual-phase)\n\nCommands\nCheck Schedule for Today\nTESLA_EMAIL=\"your@email.com\" python3 scripts/tesla-smart-charge.py --check-schedule\n\n\nOutput:\n\n✅ If scheduled: Shows charge plan + charge limits + next date\n❌ If not scheduled: Shows next scheduled date + applies default 80% limit\nManage Active Session (Run During or After Charge)\nTESLA_EMAIL=\"your@email.com\" python3 scripts/tesla-smart-charge.py --manage-session\n\n\nThis command:\n\nChecks if today's charge session is active\nDuring session: Sets charge limit to session limit (default 100%)\nAfter session: Sets charge limit to post-charge limit (default 80%)\nNo session: Applies default 80% limit\n\nTip: Run this hourly or every 30 minutes during active charging days for real-time limit management.\n\nShow All Scheduled Charges\npython3 scripts/tesla-smart-charge.py --show-schedule\n\nShow Last Charge Plan\npython3 scripts/tesla-smart-charge.py --show-plan\n\nExamples\nDaily 100% Charge (Mon-Fri)\n{\n  \"charges\": [\n    {\"date\": \"2026-02-02\", \"target_battery\": 100, \"target_time\": \"08:00\"},\n    {\"date\": \"2026-02-03\", \"target_battery\": 100, \"target_time\": \"08:00\"},\n    {\"date\": \"2026-02-04\", \"target_battery\": 100, \"target_time\": \"08:00\"},\n    {\"date\": \"2026-02-05\", \"target_battery\": 100, \"target_time\": \"08:00\"},\n    {\"date\": \"2026-02-06\", \"target_battery\": 100, \"target_time\": \"08:00\"}\n  ]\n}\n\nSmart 80% for Battery Health (Every 3 Days)\n{\n  \"charges\": [\n    {\"date\": \"2026-02-01\", \"target_battery\": 80, \"target_time\": \"07:00\"},\n    {\"date\": \"2026-02-04\", \"target_battery\": 80, \"target_time\": \"07:00\"},\n    {\"date\": \"2026-02-07\", \"target_battery\": 80, \"target_time\": \"07:00\"}\n  ]\n}\n\nVariable Targets\n{\n  \"charges\": [\n    {\"date\": \"2026-02-01\", \"target_battery\": 100, \"target_time\": \"08:00\"},\n    {\"date\": \"2026-02-02\", \"target_battery\": 80, \"target_time\": \"07:00\"},\n    {\"date\": \"2026-02-03\", \"target_battery\": 60, \"target_time\": \"06:00\"}\n  ]\n}\n\nCharge Time Estimation\n\nCharge time is calculated as:\n\nenergy_needed_kwh = (battery_capacity × (target - current) / 100) / charge_efficiency\ncharge_time_hours = energy_needed_kwh / charger_power_kw\nstart_time = target_time - charge_time_hours - margin_minutes\n\n\nWhere:\n\nbattery_capacity: Vehicle battery size (kWh, default: 75)\ncharger_power_kw: Your charger's power (kW, default: 2.99)\ncharge_efficiency: ~0.92 (typical AC charging)\nmargin_minutes: Buffer before target (default: 5 min)\n\nExample: 75 kWh battery at 50%, charging to 100% by 08:00 with 2.99 kW:\n\nEnergy needed: (75 × 50% / 100) / 0.92 = 40.8 kWh\nCharge time: 40.8 / 2.99 ≈ 13.6 hours\nStart time: 08:00 - 13.6h - 5min ≈ 18:25 previous day\nWorkflow Tips\n\nAdd new charges: Edit memory/tesla-charge-schedule.json — cron picks up changes on next run\n\nPlan ahead: Add weeks of charges in advance, script handles date logic\n\nOne cron job: No need to create separate jobs — one daily check does it all\n\nSee what's next: Each run displays the next scheduled charge date\n\nParameters\n\nWhen calling manually with --target-time:\n\npython3 scripts/tesla-smart-charge.py \\\n  --target-time \"HH:MM\" \\\n  --target-battery 100 \\\n  --charger-power 2.99 \\\n  --battery-capacity 75 \\\n  --margin-minutes 5\n\n\nFor schedule-based operation, use --check-schedule (reads from JSON file).\n\nReferences\nCRON_SETUP.md - Full cron integration guide\nAPI_REFERENCE.md - Advanced parameters and formulas\ntesla-charge-schedule-example.json - Schedule file template"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/thibautrey/tesla-smart-charge",
    "publisherUrl": "https://clawhub.ai/thibautrey/tesla-smart-charge",
    "owner": "thibautrey",
    "version": "1.1.1",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/tesla-smart-charge",
    "downloadUrl": "https://openagent3.xyz/downloads/tesla-smart-charge",
    "agentUrl": "https://openagent3.xyz/skills/tesla-smart-charge/agent",
    "manifestUrl": "https://openagent3.xyz/skills/tesla-smart-charge/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/tesla-smart-charge/agent.md"
  }
}