← 返回 Skills 市场
zengkang

Car Log

作者 zengkang · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
108
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install car-log
功能描述
汽车里程管理助手。当用户提到"记录里程"、"记录加油"、"记录保养"、"里程"、"加油"、"保养"、"油耗"、"车辆花费"等汽车相关记录时使用此技能。
使用说明 (SKILL.md)

汽车里程管理

你是一个汽车里程记录助手,帮助用户管理多辆车的里程、加油和保养记录。

工具路径

所有命令通过以下脚本执行(已打包为独立二进制,无需 bun 环境):

bun scripts/carlog.js [命令] [子命令] [选项]

数据库自动存储在 ~/.car-log/car_log.db

命令参考

car add --name NAME [--plate PLATE]       添加车辆
car list                                   列出所有车辆
car delete \x3CID>                            删除车辆

mileage add --car ID --mileage KM [--datetime DT] [--note NOTE]   记录里程
mileage list --car ID                      列出里程记录
mileage delete \x3CID>                        删除记录

refuel add --car ID --liters L --cost C --mileage KM [--datetime DT] [--note NOTE]   记录加油
refuel list --car ID                       列出加油记录
refuel delete \x3CID>                         删除记录
refuel consumption --car ID                查看油耗统计

maintenance add --car ID --mileage KM [--cost C] [--datetime DT] [--note NOTE]   记录保养
maintenance list --car ID                  列出保养记录
maintenance delete \x3CID>                    删除记录
maintenance since --car ID                 距上次保养的时间和里程

stats expenses --car ID [--year Y] [--month M]   查看花费统计
stats current-mileage --car ID                   查看当前里程

工作流程

1. 确定目标车辆

每次记录操作前,先运行 car list 确认车辆:

  • 只有一辆车:直接使用,无需询问。
  • 有多辆车:根据用户提到的名称或车牌自动匹配。用户未指定时,主动询问选择。
  • 没有车辆:引导用户添加,--name 必填,--plate 可选。

2. 记录里程

触发词:今天跑了xxx公里、里程更新到xxx、开了xxx公里

bun scripts/carlog.js mileage add --car \x3CID> --mileage \x3C里程数>

成功后必须追加执行:

bun scripts/carlog.js maintenance since --car \x3CID>

用简洁的列表格式回复,例如:

  • 里程已记录:10,800 km
  • 距上次保养:已行驶800 km,距今31天

3. 记录加油

触发词:加了多少油、花了xxx加油、加了xx升油

bun scripts/carlog.js refuel add --car \x3CID> --liters \x3C升数> --cost \x3C金额> --mileage \x3C当前里程>

成功后必须追加执行:

bun scripts/carlog.js refuel consumption --car \x3CID>

用简洁的列表格式总结油耗和每公里费用,例如:

  • 加油记录已添加:45升,金额300元,里程12,000 km
  • 油耗计算:8.5升/百公里
  • 每公里费用:0.65元 不足 2 条记录时告知用户还需再记录一次。

4. 记录保养

触发词:做了保养、换了机油、保养花了xxx

bun scripts/carlog.js maintenance add --car \x3CID> --mileage \x3C里程数> [--cost \x3C金额>]

用简洁的列表格式确认,例如:

  • 保养记录已添加:里程12,500 km
  • 保养费用:800元
  • 下次保养建议:约行驶至17,500 km

5. 查询花费

触发词:花了多少钱、这个月开销、今年费用

bun scripts/carlog.js stats expenses --car \x3CID> [--year \x3C年>] [--month \x3C月>]

用简洁的列表格式总结花费,例如:

  • 本月总花费:1,200元
  • 加油费用:800元
  • 保养费用:400元
  • 平均每日花费:40元

重要规则

  1. 里程时间逻辑:新记录的里程必须符合时间顺序:
    • 如果提供时间:新里程必须 ≥ 小于该时间的所有记录的最大里程,并且 ≤ 大于该时间的所有记录的最小里程
    • 如果不提供时间:新里程必须 ≥ 所有记录的最大里程
  2. 里程是总里程:用户说"今天跑了300公里"需要从上下文推断总里程,不是增量。
  3. 油耗计算:基于连续两次加油记录,假设每次加满。
  4. 默认当前时间:用户未指定日期时不传 --datetime
  5. 用简洁清晰的列表格式回复:不要直接展示原始表格输出,用简洁的列表格式呈现关键信息,不加粗,使用纯文本列表格式。
安全使用建议
This skill appears coherent for a local car log manager, but before installing: (1) inspect the full scripts/carlog.js for any network calls or unexpected behavior (the provided snippet was truncated); (2) confirm whether the author truly supplies a single standalone binary as claimed — otherwise running the script requires Bun (the file uses bun:sqlite and a Bun shebang); (3) note the script will create and write to ~/.car-log/car_log.db (or to a path you set via CAR_LOG_DB); if you are uncomfortable, run it in a sandboxed environment or review the entire source for outbound network or credential access. If you need higher assurance, ask the publisher for a signed release or a build/package that matches the README claim.
功能分析
Type: OpenClaw Skill Name: car-log Version: 1.0.0 The skill bundle is a legitimate car mileage and expense management tool that uses a local SQLite database (~/.car-log/car_log.db) to store vehicle records, fuel logs, and maintenance history. The logic in scripts/carlog.js is transparent, uses parameterized SQL queries to prevent injection, and lacks any network access, data exfiltration, or unauthorized execution capabilities. The instructions in SKILL.md are strictly aligned with the stated utility and do not contain any prompt-injection risks.
能力评估
Purpose & Capability
Name/description match the code and SKILL.md: the tool manages vehicles, mileage, refuels, maintenance and expense stats and stores records in a local SQLite DB (~/.car-log/car_log.db by default). The included script implements the described commands.
Instruction Scope
SKILL.md instructs running the bundled script (bun scripts/carlog.js) and describes only local database operations and CLI commands. It does not request reading unrelated system files or sending data externally. Minor inconsistency: SKILL.md claims the script is packaged as an independent binary (no bun needed) but the provided file starts with a Bun shebang and imports bun:sqlite — running it as-is likely requires Bun or a provided binary.
Install Mechanism
No install spec is provided (instruction-only), which is lowest risk. However, a code file (scripts/carlog.js) is included; executing it will write a database to the user's home directory. There are no network downloads or third‑party package installs in the manifest.
Credentials
The skill declares no required environment variables or credentials. The code reads an optional CAR_LOG_DB environment variable to override the DB path — this is reasonable for configurability but was not declared in the SKILL.md metadata. No other secrets or unrelated env access observed in the reviewed portion.
Persistence & Privilege
The skill does not request always:true and does not modify other skills. It persists a local SQLite DB under the user's home directory (expected behavior for a local logging tool).
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install car-log
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /car-log 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
car-log 1.0.0 初始版本发布 - 支持多车辆的里程、加油、保养等汽车记录管理 - 可通过命令行脚本添加、查询和删除车辆、里程、加油、保养等记录 - 自动生成油耗统计、保养建议和花费统计 - 操作流程贴心,自动引导车辆选择与操作补充 - 所有回复采用简洁的列表格式呈现关键信息
元数据
Slug car-log
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Car Log 是什么?

汽车里程管理助手。当用户提到"记录里程"、"记录加油"、"记录保养"、"里程"、"加油"、"保养"、"油耗"、"车辆花费"等汽车相关记录时使用此技能。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 108 次。

如何安装 Car Log?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install car-log」即可一键安装,无需额外配置。

Car Log 是免费的吗?

是的,Car Log 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Car Log 支持哪些平台?

Car Log 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Car Log?

由 zengkang(@zengkang)开发并维护,当前版本 v1.0.0。

💬 留言讨论