← 返回 Skills 市场
mr-j-j

tuoluo-company-api

作者 Mr-J-J · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
27
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install company-api
功能描述
陀螺匠公司内部平台接口集成。用于查询日报、项目、财务、客户、合同等公司数据。Token 自动管理,过期自动重新登录。专为使用 陀螺匠 后台的团队设计。
使用说明 (SKILL.md)

陀螺匠 · 公司平台接口

专为 陀螺匠 后台用户设计,查询日报、项目、财务、客户、合同等公司运营数据。

快速开始

# 1. 进入技能目录
cd 你的工作目录/skills/company-api

# 2. 运行配置向导(首次使用)
bash scripts/api.sh setup

# 3. 按提示输入你的账号信息即可使用

前置依赖

  • jq(JSON处理,apt install jq
  • curl(系统通常自带)
  • python3(用于JSON生成)

配置说明

首次运行 setup 命令,按提示输入:

  1. API地址(如 https://你的域名/api
  2. 开放平台 access_key / secret_key(从系统后台获取)
  3. 登录手机号 + 密码

配置保存后,所有接口自动管理 Token,过期自动重新登录,无需手动维护。

文件结构

company-api/
├── SKILL.md              # 本文件
├── scripts/
│   └── api.sh            # API 脚本(功能入口)
├── .api-config.json      # 你的配置(自动创建)
└── .token-cache.json     # 登录 Token 缓存(自动管理)

所有命令

命令 用法 说明
setup scripts/api.sh setup 首次配置向导
auth scripts/api.sh auth 刷新开放平台 Token
login scripts/api.sh login 账号密码登录(Token过期自动调用)
save-token scripts/api.sh save-token \x3Ctoken> 手动保存Token
daily scripts/api.sh daily [页] [条数] [时间] 查日报列表
projects scripts/api.sh projects [页] [条数] 查项目列表
project-info scripts/api.sh project-info \x3C项目id> 查看项目详情(含成员、客户)
project-add scripts/api.sh project-add \x3C名称> \x3C客户eid> [合同cid] [负责人uid] 创建项目
task-add scripts/api.sh task-add \x3C项目id> \x3C任务名> [负责人uid] 创建项目任务
bills scripts/api.sh bills [页] [条数] 查财务/账单
customers scripts/api.sh customers [页] [条数] 查客户列表
contracts scripts/api.sh contracts [页] [条数] 查合同列表
contract-form scripts/api.sh contract-form 查合同创建页数据(客户ID、分类ID)
products scripts/api.sh products [页] [条数] 查产品列表
product-add scripts/api.sh product-add \x3C名称> [分类] [单位] 添加产品
product-attrs scripts/api.sh product-attrs 查产品SKU(含unique ID)
product-cate scripts/api.sh product-cate 查产品分类
status scripts/api.sh status 查看 Token 状态

Token 自动管理

接口请求时先直接请求,如果返回 Token 过期,自动重新登录获取新 Token 并重试,对使用者完全透明,无需手动维护。

数据关系

日报(daily)  → 员工每天工作记录
项目(projects)→ 开发任务管理
合同(contracts)→ 客户签约/收款
财务(bills)  → 收支记录
客户(customers)→ 客户信息
产品(products)→ 服务/商品目录

注意事项

  • 配置文件中包含账号密码,请勿分享给他人
  • .api-config.json.token-cache.json 包含敏感信息,建议加入 .gitignore
安全使用建议
Use this only if you trust the skill and the configured API domain. Prefer a least-privilege account, protect the config/token files, and avoid write commands unless you explicitly intend to create records. The maintainer should fix the python3 -c interpolation and add confirmations or a read-only mode before broad team use.
功能分析
Type: OpenClaw Skill Name: company-api Version: 1.0.0 The skill bundle contains significant security vulnerabilities in `scripts/api.sh`, primarily potential command injection risks where unsanitized shell variables (e.g., `$name`, `$admin_template`) are passed directly into `python3 -c` execution strings in `cmd_project_add` and `cmd_task_add`. Additionally, the script stores sensitive user credentials, including plain-text passwords, in a local `.api-config.json` file. While these appear to be unintentional coding flaws rather than intentional malware, they represent a high risk for exploitation.
能力评估
Purpose & Capability
The stated purpose emphasizes querying internal company data, but the artifacts also expose create/add operations for projects, tasks, and products, making the authority broader and higher-impact than a read-only integration.
Instruction Scope
Write commands are documented without clear confirmation, dry-run, or rollback guidance, and visible code builds Python snippets from command/config values, creating local code-execution risk if those values are hostile or malformed.
Install Mechanism
No install-time execution is specified; the skill is a Bash script with documented jq, curl, and python3 prerequisites.
Credentials
Access to the configured Tuoluojiang API, API keys, login password, and finance/customer/contract data is expected for this integration but high-value; use only with a trusted API URL and least-privilege account.
Persistence & Privilege
The skill intentionally persists .api-config.json and .token-cache.json and auto-relogs in; this is disclosed, but it leaves reusable credentials/tokens on disk.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install company-api
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /company-api 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of company-api, integrating the internal platform APIs for 陀螺匠. - Provides unified command-line access to company data, including daily reports, projects, financials, customers, contracts, and products. - Automates token management with auto-login and transparent token refresh on expiration. - Includes easy setup via guided script and clear configuration instructions. - Supports multiple commands for data querying and project management through Bash scripts. - Security note: config and token files contain sensitive information; recommended to add them to .gitignore.
元数据
Slug company-api
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

tuoluo-company-api 是什么?

陀螺匠公司内部平台接口集成。用于查询日报、项目、财务、客户、合同等公司数据。Token 自动管理,过期自动重新登录。专为使用 陀螺匠 后台的团队设计。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 27 次。

如何安装 tuoluo-company-api?

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

tuoluo-company-api 是免费的吗?

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

tuoluo-company-api 支持哪些平台?

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

谁开发了 tuoluo-company-api?

由 Mr-J-J(@mr-j-j)开发并维护,当前版本 v1.0.0。

💬 留言讨论