← Back to Skills Marketplace
Calculator Chat
by
Yifan Shen
· GitHub ↗
· v0.1.5
· MIT-0
403
Downloads
0
Stars
2
Active Installs
6
Versions
Install in OpenClaw
/install calculator-chat
Description
用计算器数字回应用户。当用户发送 /calc-chat 或表达情感时,在系统计算器上显示对应数字(如 520=我爱你,88=再见)。支持中文谐音翻译。
README (SKILL.md)
Calculator Chat
让 AI 用计算器数字来回应你!
触发方式
当你说:
/calc-chat 我爱你/calc-chat 再见/calc-chat 恭喜发财
或者直接表达情感时自动触发。
翻译规则
| 你说 | 计算器显示 | 含义 |
|---|---|---|
| 我爱你 / 爱你 / 喜欢 | 520 | 我爱你 |
| 一生一世 | 1314 | 一生一世 |
| 再见 / 拜拜 | 88 | 拜拜 |
| 好累 / 哭 | 555 | 呜呜呜 |
| 恭喜 / 发财 | 888 | 發發發 |
| 帮我 / 救命 | 995 | 救救我 |
| 想你 | 777 | 亲亲亲 |
使用方法
# 直接运行
calc-chat "我爱你"
calc-chat "520+888"
calc-chat "恭喜发财"
技术实现
- 自动检测桌面环境 (Wayland/X11)
- 使用 gnome-calculator 打开系统计算器
- 通过 --equation 参数预填表达式
- 代码已优化,减少安全扫描误判
安全说明
本技能已通过安全优化:
- 输入验证:只允许安全字符(数字和基本运算符)
- 进程管理:使用 pgrep 检查,pkill 关闭
- 计算安全:使用受限的 eval 命名空间
- 无外部网络请求
Usage Guidance
This skill mostly does what it promises (type numeric codes into your system calculator), but exercise caution before installing:
- Mismatched requirements: The skill's metadata requires gnome-calculator even though it includes Windows and macOS code. If you're on macOS/Windows this requirement is incorrect and may indicate sloppy packaging.
- Shell/PowerShell execution: The code writes a temporary PowerShell script and executes it with ExecutionPolicy Bypass, and it uses execSync with interpolated command strings in places. Those patterns increase the risk of command injection if inputs are not strictly validated.
- Input validation is inconsistent: The Linux Python helper validates allowed characters, but the Windows path constructs and executes a script that accepts the number parameter without the same explicit sanitization. That discrepancy is the main practical risk.
Before installing, ask the publisher or check the code to ensure:
1) The metadata is corrected for cross-platform usage (don't require gnome-calculator on Windows/macOS).
2) All command invocations use safe argument arrays (no shell interpolation) or properly escape/validate values on every platform.
3) The Windows PowerShell flow enforces the same safe-character policy as the Linux Python helper (reject any input containing characters outside 0-9 and + - * / . ( ) and reasonable length limits).
If the author confirms fixes (or you review and harden the code locally) this skill is reasonable for local usage. If you cannot verify those fixes, avoid installing it on sensitive systems because of the script-execution and shell-exec risks.
Capability Analysis
Type: OpenClaw Skill
Name: calculator-chat
Version: 0.1.5
The skill bundle implements cross-platform UI automation to display numbers on a system calculator, but employs several high-risk coding patterns. Key indicators include the use of 'eval()' on user-influenced strings in 'src/calculator.py' (mitigated by a character whitelist), the dynamic creation and execution of PowerShell scripts with 'ExecutionPolicy Bypass' in 'src/platform/windows.js', and the use of AppleScript for keystroke injection in 'src/platform/macos.js'. While these methods are functionally consistent with the stated purpose, they provide powerful primitives for potential abuse and represent a significant security risk if input sanitization is bypassed.
Capability Assessment
Purpose & Capability
Overall functionality matches the description (mapping text to numbers and automating the system calculator). However, the metadata requires gnome-calculator unconditionally even though the code includes macOS and Windows implementations — that is incoherent for a cross-platform skill and would wrongly fail on non-Linux systems.
Instruction Scope
Runtime instructions and code operate on system processes (pgrep/pkill), launch system apps, write and execute PowerShell scripts, and run shell commands. These actions are explained by the skill's purpose (UI automation), but the code uses execSync with interpolated command strings and writes temporary PowerShell files that are executed with ExecutionPolicy Bypass — a pattern that can amplify risks if input sanitization is incomplete.
Install Mechanism
No install spec is provided (instruction-only + included code). That minimizes supply-chain install risk, but the included code will execute system tools already on the host when invoked.
Credentials
No credentials or config paths are requested (good). The declared required binaries (node, python3, gnome-calculator) are mostly appropriate for the Linux path, but requiring gnome-calculator for all platforms is disproportionate for macOS/Windows.
Persistence & Privilege
The skill is not force-included (always: false) and does not request persistent elevated privileges. It does execute local system commands and temporarily writes scripts, but it does not declare persistent system-wide modifications.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install calculator-chat - After installation, invoke the skill by name or use
/calculator-chat - Provide required inputs per the skill's parameter spec and get structured output
Version History
v0.1.5
- Major update: Cross-platform support and enhanced security for calculator interactions.
- Added platform-specific modules for Linux, Windows, and macOS.
- Now launches and controls the system calculator more reliably using gnome-calculator with pre-filled equations.
- Improved input and process validation to enhance security and reduce false positives in code scans.
- Clearer, updated documentation with usage examples and technical details.
- Removed obsolete files and reorganized project structure for maintainability.
v0.1.4
- No user-facing changes in this version.
- Internal code updated in src/calc.py.
v0.1.3
Initial implementation release.
- Added core source files for calculator-chat functionality.
- Supports system calculator display in response to emotional or specific user inputs.
- Includes mapping for Chinese phrases and their numeric equivalents.
- Provides both command and natural language triggers for calculator responses.
- Adds package and dependency definitions for project setup.
v0.1.2
- Changed dependency from Node.js 14+ to Python 3 in documentation and metadata.
- No other content changes.
v0.1.1
- Updated description and documentation to support both /calc-chat and emotional expressions for triggering calculator responses.
- Improved translation/examples table for clearer mapping between messages and calculator numbers.
- Added metadata specifying OpenClaw compatibility, emoji, and Node.js requirement.
- Documentation now fully in Chinese, emphasizing natural language understanding and Chinese homophone support.
- Clarified dependencies and platform information.
v0.1.0
calculator-chat 0.1.0 – Initial Release
- Introduces a chatbot skill that communicates solely through number/symbol inputs in the system calculator.
- Responds to `/calc <message>` commands by interpreting the message and outputting a meaningful number (e.g., via Chinese numeric homophones, number codes, or context).
- Lists common message/number pairings (e.g., “我需要你的帮助” → 995, “祝你平安” → 88).
- Provides platform-specific commands for launching and typing into system calculators (Windows, macOS, Linux).
- Falls back to a Unicode sum if the message can’t be clearly inferred.
Metadata
Frequently Asked Questions
What is Calculator Chat?
用计算器数字回应用户。当用户发送 /calc-chat 或表达情感时,在系统计算器上显示对应数字(如 520=我爱你,88=再见)。支持中文谐音翻译。 It is an AI Agent Skill for Claude Code / OpenClaw, with 403 downloads so far.
How do I install Calculator Chat?
Run "/install calculator-chat" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Calculator Chat free?
Yes, Calculator Chat is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Calculator Chat support?
Calculator Chat is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Calculator Chat?
It is built and maintained by Yifan Shen (@shenyfzero9211); the current version is v0.1.5.
More Skills