← 返回 Skills 市场
shing19

Ledger Project Expense Entry

作者 shing19 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
94
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install ledger-project-expense-entry
功能描述
Record natural-language project expense messages into ledger JSONL. Use when user sends "项目+支出" directly (e.g., "OpenClaw 服务器 89"), wants quick记账, or asks to...
使用说明 (SKILL.md)

Ledger Project Expense Entry

Use this skill for fast bookkeeping from short natural-language messages.

Defaults

  • direction: default 支出
  • currency: default CNY
  • date: default today (Asia/Taipei)

Only change defaults if user explicitly provides different values.

Parse target

Extract from message:

  • project (项目名)
  • description (消费内容)
  • amount (number)
  • optional date
  • optional currency
  • optional direction (收入/支出)
  • optional tags

If project and description are both present, build description as:

  • \x3Cproject> - \x3Cdescription>

If only one exists, use that field directly.

If amount is missing, ask one short clarification question.

Write command

IMPORTANT: Get today's date (YYYY-MM-DD) first, for determining which month file to write to.

# Get today's date in Asia/Taipei timezone
CURRENT_DATE=$(TZ='Asia/Taipei' date +%Y-%m-%d)

Then append via existing script:

python3 projects/scripts/add_ledger_entry.py \
  --data-root projects/data \
  --date "$CURRENT_DATE" \
  --direction \x3C支出|收入> \
  --amount \x3Cnumber> \
  --currency \x3CCNY|USD|JPY|...> \
  --description \x3Cproject-description> \
  --tags \x3Ctag1,tag2,...> \
  --source manual \
  --batch manual

Category catalog (must check before writing)

Before each write, check:

  • projects/docs/CATEGORY_CATALOG.md

Selection policy:

  • Prefer existing values from catalog (tags/major_category/type/currency).
  • If user gives a new tag not in catalog and meaning is clear, write it; otherwise ask one short confirmation.
  • If uncertain, keep optional fields empty rather than inventing noisy labels.

Tag suggestion rules

  • If user gives tags, use them directly.
  • If user does not give tags:
    • project/infra/subscription/domain/server -> 开发成本 / 服务器 / 域名 / 通讯网络 (pick the closest one)
    • meal/drink -> 外卖 / 下馆子 / 饮料零食
    • ride/transport -> 打车 / 交通卡 / 火车 / 飞机
  • If still uncertain, keep tags empty.

Response format

After appending, reply with:

  • month file path
  • one-line summary: 日期 | 流向 | 金额币种 | 描述
安全使用建议
This skill will try to read projects/docs/CATEGORY_CATALOG.md and run projects/scripts/add_ledger_entry.py on your system — those files are not provided by the skill. Before enabling or using it: 1) confirm those paths exist in the target workspace and inspect the Python script to ensure it is safe and does only what you expect; 2) back up your ledger files or test in a copy; 3) prefer requiring user confirmation for each write (disable autonomous invocation if you want manual oversight); 4) if you do not have the repo structure, don’t enable the skill or modify the instructions to target a safe, reviewed tool. If you want, provide the add_ledger_entry.py and CATEGORY_CATALOG.md here (or point to a trusted repo) so I can evaluate them too.
功能分析
Type: OpenClaw Skill Name: ledger-project-expense-entry Version: 1.0.0 The skill instructions in SKILL.md direct the agent to execute a shell command (running projects/scripts/add_ledger_entry.py) using parameters like description and tags derived directly from user-provided natural language. This creates a potential shell injection vulnerability if the agent fails to sanitize these inputs before execution. While the intent appears to be legitimate bookkeeping and no evidence of malicious exfiltration or persistence was found, the pattern of passing unvalidated user strings to a shell environment is a significant security risk.
能力评估
Purpose & Capability
The name and description (append natural-language project expense messages into ledger JSONL) align with the SKILL.md actions (parse fields, pick date, write via an add_ledger_entry.py script). However the skill assumes existence of a specific repository layout (projects/data, projects/docs/CATEGORY_CATALOG.md, projects/scripts/add_ledger_entry.py) without declaring or bundling those files — reasonable for a repo-specific assistant, but unexpected in a generic skill.
Instruction Scope
The run instructions tell the agent to obtain the local date, read a local category catalog, and execute a local Python script to append data. That means the agent will access and modify files on disk and execute arbitrary code present at projects/scripts/add_ledger_entry.py. While these actions are coherent with 'append ledger entries', they grant filesystem and code-execution scope beyond purely conversational behavior and could be risky if the referenced files or script are untrusted or absent.
Install Mechanism
This is an instruction-only skill with no install spec and no bundled code — nothing will be downloaded or installed by the skill itself. That lowers supply-chain risk, but it also means the correctness/safety of runtime behavior depends entirely on local files and scripts.
Credentials
The skill requests no environment variables, credentials, or external config paths. The only required resources are local repository paths referenced in the instructions; these are proportionate to the described bookkeeping task but should be present and trusted.
Persistence & Privilege
always is false (normal). disable-model-invocation is false (agent may invoke autonomously). Autonomous invocation combined with file-write + script-execution instructions increases the blast radius if the agent is allowed to act without user confirmation. This is not automatically disallowed, but it's a meaningful consideration for safety.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install ledger-project-expense-entry
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /ledger-project-expense-entry 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
initial publish
元数据
Slug ledger-project-expense-entry
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Ledger Project Expense Entry 是什么?

Record natural-language project expense messages into ledger JSONL. Use when user sends "项目+支出" directly (e.g., "OpenClaw 服务器 89"), wants quick记账, or asks to... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 94 次。

如何安装 Ledger Project Expense Entry?

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

Ledger Project Expense Entry 是免费的吗?

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

Ledger Project Expense Entry 支持哪些平台?

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

谁开发了 Ledger Project Expense Entry?

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

💬 留言讨论