← 返回 Skills 市场
ckchzh

Labor Law

作者 BytesAgain2 · GitHub ↗ · v2.0.1 · MIT-0
cross-platform ✓ 安全检测通过
509
总下载
1
收藏
2
当前安装
10
版本数
在 OpenClaw 中安装
/install labor-law
功能描述
Query Chinese labor law on overtime, leave, contracts, and severance rules. Use when checking overtime rules, calculating severance, reviewing contracts.
使用说明 (SKILL.md)

Labor Law

A multi-purpose utility tool for managing data entries from the command line. Run tasks, manage configurations, track items, search entries, and export data — with full activity logging and history.

Commands

Command Description
labor-law run \x3Cargs> Execute the main function with given arguments
labor-law config Show the configuration file path ($DATA_DIR/config.json)
labor-law status Display current status (ready/not ready)
labor-law init Initialize the data directory
labor-law list List all entries in the data log
labor-law add \x3Centry> Add a new timestamped entry to the data log
labor-law remove \x3Centry> Remove a specified entry
labor-law search \x3Cterm> Search entries in the data log (case-insensitive)
labor-law export Export all data from the data log to stdout
labor-law info Show version number and data directory path
labor-law help Show the built-in help message
labor-law version Print the current version

Data Storage

All data is stored in $DATA_DIR/data.log as plain text with date-prefixed entries. Activity history is logged to $DATA_DIR/history.log with timestamps. The default data directory is ~/.local/share/labor-law/. Override it by setting the LABOR_LAW_DIR environment variable, or it will respect XDG_DATA_HOME if set.

Requirements

  • Bash 4+ with standard Unix utilities (date, grep, cat)
  • No external dependencies or API keys required
  • Works on any Linux/macOS terminal

When to Use

  1. Quick data tracking — Use labor-law add \x3Centry> to log items with automatic timestamps, then labor-law list to review everything you've recorded.
  2. Searching past entries — Run labor-law search \x3Cterm> to find specific entries in your data log using case-insensitive matching.
  3. Initializing a new workspace — Use labor-law init to set up the data directory, then labor-law config to verify the configuration path.
  4. Checking system readiness — Run labor-law status for a quick confirmation that the tool is ready and operational.
  5. Exporting data for external use — Use labor-law export to dump all logged data to stdout, which you can redirect to a file or pipe to another tool.

Examples

# Initialize the data directory
labor-law init

# Add entries to the data log
labor-law add "Review employment contract for new hire"
labor-law add "Check overtime policy compliance"
labor-law add "Prepare severance calculation"

# List all entries
labor-law list

# Search for specific entries
labor-law search "overtime"

# Check status
labor-law status

# View configuration path
labor-law config

# Show version and data directory
labor-law info

# Export all data
labor-law export > backup.txt

# Run a task
labor-law run "quarterly review"

# Remove an entry
labor-law remove "old item"

How It Works

Labor Law stores all entries locally in ~/.local/share/labor-law/data.log. Each add command prepends the current date to the entry. Every command invocation is logged to history.log with a timestamp for full audit traceability. No data leaves your machine — everything is stored locally in plain text files.

Configuration

Set LABOR_LAW_DIR to change the data directory:

export LABOR_LAW_DIR=/custom/path

Default: ~/.local/share/labor-law/


Powered by BytesAgain | bytesagain.com | [email protected]

安全使用建议
This skill is largely local and coherent: it bundles a Bash reference (labor.sh) that prints Chinese labor-law notes and a small CLI (script.sh) that stores/searches short text entries under ~/.local/share/labor-law (or LABOR_LAW_DIR). Before installing, review the two scripts if you want to be certain: they create/append plain-text files (data.log, history.log) in your data directory and do not perform network calls or request credentials. Note the minor mismatch between the short description (labor law reference) and SKILL.md which describes a general data-entry tool — that's probably intentional (reference + local notes) but you should confirm you’re comfortable with the tool writing logs to your home directory. If you plan to run the scripts on a shared system, be aware they store logs in plain text and do not sanitize or escape user-provided search/add input (typical for a simple CLI).
功能分析
Type: OpenClaw Skill Name: labor-law Version: 2.0.1 The skill bundle provides informational resources on Chinese labor law and a local data-tracking utility. The scripts (labor.sh and script.sh) perform local file operations and text output without any network activity, data exfiltration, or suspicious execution patterns. While there is a minor functional mismatch between the documented commands and the actual script logic (the labor law content is in labor.sh while the documented commands point to a generic tracker in script.sh), no malicious intent or high-risk behavior is present.
能力评估
Purpose & Capability
Name and description advertise a labor-law reference tool; included files implement that (scripts/labor.sh) plus a generic local data-entry/logger CLI (scripts/script.sh). The extra data-logging functionality is reasonable but slightly inconsistent with the 'query labor law' description (looks like a combined reference + local note-keeping tool). This mismatch is likely benign but worth noting.
Instruction Scope
Runtime instructions and scripts operate only on local files under a configurable data directory (default ~/.local/share/labor-law). They read/write local logs and data, accept command arguments, and print legal guidance. They do not reference network endpoints, system-wide credentials, or other unrelated system paths.
Install Mechanism
No install spec or remote download; the skill is instruction-only with included bash scripts. Nothing is fetched from external URLs and no archives are extracted.
Credentials
No required environment variables, credentials, or config paths. The scripts optionally honor LABOR_LAW_DIR and XDG_DATA_HOME (reasonable for changing the local data directory). No secrets are requested.
Persistence & Privilege
always:false (no forced inclusion). The skill writes files only under its own data directory (default ~/.local/share/labor-law) and does not modify other skills or global agent settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install labor-law
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /labor-law 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v2.0.1
update
v2.0.0
v2.5 standard: Use-when desc, homepage, source, security fix
v1.0.5
yaml-fix+quality
v1.0.4
yaml-fix+quality
v1.0.3
Quality upgrade
v1.0.2
Standards compliance: unique content, no template text
v1.0.1
Quality update: docs, examples, standards compliance
v2.3.0
Quality fixes: removed third-party references, aligned docs with implementation
v2.2.0
Enhanced descriptions for better AI triggering
v1.0.0
Initial release: A quick reference tool for Chinese labor law regulations. - Covers key topics: worker rights, overtime, leave, contracts, disputes, severance. - Designed for Chinese users with culture-aware content. - Provides easy-to-use commands for different labor law scenarios. - Content suitable for HR management and employee self-help.
元数据
Slug labor-law
版本 2.0.1
许可证 MIT-0
累计安装 2
当前安装数 2
历史版本数 10
常见问题

Labor Law 是什么?

Query Chinese labor law on overtime, leave, contracts, and severance rules. Use when checking overtime rules, calculating severance, reviewing contracts. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 509 次。

如何安装 Labor Law?

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

Labor Law 是免费的吗?

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

Labor Law 支持哪些平台?

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

谁开发了 Labor Law?

由 BytesAgain2(@ckchzh)开发并维护,当前版本 v2.0.1。

💬 留言讨论