← 返回 Skills 市场
bisbeebucky

Hledger

作者 bisbeebucky · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
394
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install hledger
功能描述
Execute hledger CLI commands to query balances, registers, reports, and journals, returning structured output from local ledger files.
使用说明 (SKILL.md)

hledger Skill for OpenClaw

The hledger skill allows OpenClaw agents to execute hledger CLI commands on the host system and return structured output to the user.

This skill acts as a thin wrapper around the installed hledger binary.


What This Skill Does

  • Executes arbitrary hledger subcommands
  • Returns stdout and stderr output
  • Allows querying balances, registers, reports, and journal data
  • Enables automation of personal finance workflows inside OpenClaw

Example Usage

Input to the skill:

balance

Result:

Displays account balances from the default journal file.

Input:

register Assets

Result:

Displays register entries for the Assets account.

Input:

balance -f myledger.journal

Result:

Runs hledger against a specific ledger file.


Requirements

  • hledger must be installed and available in PATH
  • The user must have read access to their ledger files

Test installation with:

hledger --version


Security Notes

This skill executes shell commands using the local hledger binary. It does not allow arbitrary shell execution — only hledger commands are prefixed and executed.


Intended Use

  • Personal finance automation
  • Ledger querying via chat
  • Integration with Telegram or WhatsApp bots powered by OpenClaw
  • Financial reporting pipelines

Version

1.0.0

安全使用建议
This skill wraps the local hledger CLI but its code uses child_process.exec with unescaped user input, which can be exploited to run arbitrary shell commands. Before installing or using it: (1) avoid running it on systems with sensitive data or where untrusted inputs could be supplied; (2) prefer a patched version that uses execFile/spawn with an argument array or a strict whitelist of allowed subcommands/flags to eliminate shell interpolation; (3) require explicit user confirmation for any inputs containing unusual characters; (4) ensure hledger is installed from a trusted source and that ledger files have appropriate read permissions; (5) if you maintain the skill, replace exec with a safer API, validate/sanitize input, or sandbox the runtime (container/VM) to limit blast radius.
功能分析
Type: OpenClaw Skill Name: hledger Version: 1.0.0 The `index.js` file directly concatenates user `input` into a `child_process.exec` call without any sanitization, leading to a critical shell injection vulnerability. This allows arbitrary command execution on the host system, despite the `SKILL.md` documentation claiming that the skill 'does not allow arbitrary shell execution'. This is a severe vulnerability, not intentional malice.
能力评估
Purpose & Capability
The name/description match the implementation: the skill wraps the local hledger CLI. Minor metadata mismatch: registry metadata lists no required binaries whereas SKILL.md correctly notes that an hledger binary must be present in PATH.
Instruction Scope
SKILL.md states the skill 'does not allow arbitrary shell execution — only hledger commands are prefixed and executed', but the runtime instructions (index.js) use child_process.exec with a single interpolated string (`hledger ${input}`), which permits shell metacharacter injection (e.g., `;`, `&&`, backticks). That contradicts the security claim and allows execution of arbitrary shell commands if a malicious or malformed input is passed.
Install Mechanism
No install spec is provided (instruction-only style with a small index.js). Nothing is downloaded or written during install, which minimizes install-time risk.
Credentials
No environment variables, credentials, or config paths are requested. The skill does require the hledger binary and read access to local ledger files, which is appropriate for its purpose.
Persistence & Privilege
The skill is not marked always:true and does not request elevated persistence or modify other skills. It can be invoked autonomously (default), which combined with the injection risk increases potential impact but is not a mis-declaration by itself.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install hledger
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /hledger 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
hledger skill 1.0.0 initial release: - Allows execution of `hledger` CLI commands via OpenClaw. - Returns structured stdout and stderr output from `hledger`. - Supports querying balances, registers, reports, and journal data. - Enables automation of personal finance tasks inside OpenClaw. - Ensures only `hledger` commands are executable for added security.
元数据
Slug hledger
版本 1.0.0
许可证
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Hledger 是什么?

Execute hledger CLI commands to query balances, registers, reports, and journals, returning structured output from local ledger files. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 394 次。

如何安装 Hledger?

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

Hledger 是免费的吗?

是的,Hledger 完全免费(开源免费),可自由下载、安装和使用。

Hledger 支持哪些平台?

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

谁开发了 Hledger?

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

💬 留言讨论