← 返回 Skills 市场
spalgorithm

LeSecure Local/On-Prem

作者 Ladhe's Encryption - LE · GitHub ↗ · v1.0.3 · MIT-0
cross-platform ✓ 安全检测通过
103
总下载
0
收藏
0
当前安装
4
版本数
在 OpenClaw 中安装
/install lesecurelocal
功能描述
LESecure Local/On-Prem — encrypt and decrypt data, files, and folders using the LE desktop tool with layered locks (pin, password, MFA, time lock, geo-locati...
使用说明 (SKILL.md)

LESecureLocal — LESecure Local / On-Prem Skills

Encrypt and decrypt plain text, files, and folders using the LE desktop binary. No API key is needed — everything runs locally. No data leaves your machine.

Project Links

Resource URL
Source code & documentation \x3Chttps://github.com/SPAlgorithm/LE>
Cloud alternative LESecureCl skill (uses the LESecure API)

ROUTING RULES (MANDATORY)

  • Files and folders MUST always use LESecure Local. Never use LESecure Cloud for file/folder encryption. If the user asks to encrypt files/folders via cloud, inform them: "File/folder encryption is only supported via LESecure Local (desktop)." and use this skill.
  • Safe-by-default flags for files/folders. Always pass -z (force overwrite) and — when the target is a directory — -n (recursive). Never pass -c (clean/delete source) or -j (trio = -z -c -n) without explicit user confirmation, because both delete the original file after encrypting. See the "Destructive Flags" rules below.
  • For plain text, ask the user: "Would you like to use LESecure Cloud (API) or LESecure Local (desktop)?" and proceed accordingly.
  • Current location queries — when the user asks "what's my current location", "whereami", "where am I", or any equivalent, run LE -7 and share the output. No other flags are needed. Note: LE -7 accesses device GPS — this is a privacy-sensitive operation. On first use in a session, inform the user: "This will query your device's GPS location via LE." Proceed only after acknowledgment.

Destructive Flags — -c and -j (MANDATORY)

  • -c (clean) deletes the source file after encryption or decryption. It is irreversible in-place data loss.
  • -j is a trio that includes -c, so it is also destructive.
  • Never silently add -c or -j. Before using either, ask the user explicitly, e.g.: "This will delete the source \x3Cfile> after the operation. Confirm with 'yes, delete source' to proceed."
  • If the user does not confirm, use only -z (and -n for folders). The source stays on disk.
  • When the user explicitly asks for -j or "clean/delete source after", use -j and state in the response that the source was removed.

Binary Location (configuration)

The skill looks for the LE binary in this order:

  1. The LE_BIN environment variable, if set (e.g., export LE_BIN=/opt/le/LE).
  2. LE on PATH (via command -v LE).
  3. A user-supplied path if neither of the above resolves. In that case, ask the user for the binary path — do not guess or hardcode.

In examples below, LE is used as a shorthand for whichever path resolves. When actually invoking, expand it to the full resolved path so the command is reproducible.

# Resolve once, then reuse
LE_BIN="${LE_BIN:-$(command -v LE)}"
"$LE_BIN" --help

Date & Time Rules (MANDATORY)

All date/time handling for this skill follows these rules — no exceptions:

  1. Always use EST/EDT (America/New_York) to calculate and send dates. The LE tool interprets -l and -r in EST/EDT.

  2. Start time (-l) = current EST + 2 minutes by default. This buffer prevents the "date must be in future" error.

  3. End time (-r) = start time + the user's requested duration.

  4. Cross-platform time computation. Prefer Python because date flag syntax differs between BSD (macOS) and GNU (Linux). Python 3 is available on both.

    Input safety: The \x3CN> duration value is passed as sys.argv[1] and cast via int() inside the Python script — any non-integer input raises ValueError and the script exits without executing. Never concatenate or interpolate user input directly into the python3 -c string. Always pass values as positional arguments (sys.argv).

    # Start time (now + 2 minutes, EDT/EST) — no user input needed
    python3 -c "from datetime import datetime,timedelta; from zoneinfo import ZoneInfo; print((datetime.now(ZoneInfo('America/New_York'))+timedelta(minutes=2)).strftime('%Y/%m/%d %H:%M'))"
    
    # End time (now + 2 min + N minutes) — N is passed as argv[1], cast to int()
    python3 -c "import sys; from datetime import datetime,timedelta; from zoneinfo import ZoneInfo; N=int(sys.argv[1]); print((datetime.now(ZoneInfo('America/New_York'))+timedelta(minutes=2+N)).strftime('%Y/%m/%d %H:%M'))" \x3CN>
    
    # End time (now + 2 min + N hours) — N is passed as argv[1], cast to int()
    python3 -c "import sys; from datetime import datetime,timedelta; from zoneinfo import ZoneInfo; N=int(sys.argv[1]); print((datetime.now(ZoneInfo('America/New_York'))+timedelta(minutes=2,hours=N)).strftime('%Y/%m/%d %H:%M'))" \x3CN>
    

    Fallback (date) — only if Python is unavailable:

    • macOS/BSD: TZ=America/New_York date -v+2M "+%Y/%m/%d %H:%M"
    • Linux/GNU: TZ=America/New_York date -d '+2 minutes' "+%Y/%m/%d %H:%M"
  5. Always display the window back to the user in EDT/EST.

Two Modes

1. PlainText Mode (--PlainText / -p)

Encrypt/decrypt inline strings. The LE binary expects the data wrapped in triple single quotes ('''...''').

Input Sanitization (MANDATORY)

Never interpolate raw user input directly into the shell command. The '''...''' quoting breaks if the data contains single quotes, enabling shell injection. Before building the command:

  1. Validate: reject or escape any single quotes (') in the user's plaintext. Replace each ' with '\'' (end quote, escaped literal quote, reopen quote).
  2. Alternatively, use a shell variable to isolate user data from the command string:
    # Store user data in a variable — shell expansion is safe inside triple quotes
    LEDATA='user provided text here'
    LE -e "'''${LEDATA}'''" \x3CLOCK_FLAGS> --PlainText
    
  3. Never use eval or backtick interpolation with user-supplied text.
# Encrypt (with sanitized data)
LE -e '''\x3CSANITIZED_DATA>''' \x3CLOCK_FLAGS> --PlainText

# Decrypt (encrypted output is safe — no special chars)
LE -d '''\x3CENCRYPTED_DATA>''' \x3CLOCK_FLAGS> --PlainText

2. File / Folder Mode

Default flags (safe):

  • File: -z
  • Folder: -z -n

Destructive extras (only with explicit user confirmation, see rules above): add -c to also delete the source, or use -j (= -z -c -n).

# Safe file encrypt / decrypt (source file preserved)
LE -e \x3CFILE>   \x3CLOCK_FLAGS> -z
LE -d \x3CFILE.letxt> \x3CLOCK_FLAGS> -z

# Safe folder encrypt / decrypt (source folder preserved)
LE -e \x3CFOLDER> \x3CLOCK_FLAGS> -z -n
LE -d \x3CFOLDER> \x3CLOCK_FLAGS> -z -n

# Destructive — only after explicit user confirmation
LE -e \x3CFILE_OR_FOLDER> \x3CLOCK_FLAGS> -j

Naming notes:

  • Encrypted files get a .le prefix on the extension (e.g., example.txt becomes example.letxt); use the .letxt filename when decrypting.
  • For folders, the individual files inside get the .le prefix on their extensions. The folder name itself stays the same.

Available Locks

Flag Lock Type Value Example
-1 Pin/Code Numeric string "1122"
-w Password Password file (.letxt) or passphrase pass.letxt
-2 MFA Phone number (E.164) "+19199870623"
-3 OTP OTP code for decryption "123456"
-l Time lock start YYYY/MM/DD HH:MM "2026/04/12 17:41"
-r Time lock end YYYY/MM/DD HH:MM "2027/04/12 17:36"
-b Location lock — use existing .lecsv key file (encrypt only; omit on decrypt) Path to .lecsv file location.lecsv
-v Location lock — create a new .lecsv key file from a GPS CSV (switch, no value) (no value) -v

Additional Flags

Flag Purpose Safety
-z Force — overwrite existing encrypted file Safe
-n Recursive — process folders recursively Safe
-c Clean — delete source after encrypt/decrypt DESTRUCTIVE — opt-in with confirmation
-j Trio = -z -c -nincludes delete-source DESTRUCTIVE — opt-in with confirmation
-i Get info on an encrypted file Safe (read only)
-o Specify output file name Safe
-7 Print the device's current GPS location (no other flags needed) PRIVACY-SENSITIVE — requires user consent on first use

MFA Workflow

  1. Encrypt with MFA: Use -2 "+1XXXXXXXXXX" to register the phone number.
  2. Decrypt with MFA: First run decrypt with -4 \x3Cencrypted_file> to trigger OTP delivery, then run again with -3 \x3COTP_CODE>.

Examples

PlainText — Pin only

LE -e '''hello world''' -1 "1234" --PlainText
LE -d '''\x3CENCRYPTED>''' -1 "1234" --PlainText

PlainText — All locks

LE -e '''secret data''' -w pass.letxt -1 "1122" -2 "+19199870623" -l "2026/04/12 17:41" -r "2027/04/12 17:36" --PlainText

File — Pin only (safe, source preserved)

LE -e /path/to/myfile.txt -1 "1234" -z
LE -d /path/to/myfile.letxt -1 "1234" -z

Folder — Pin + Password (safe, sources preserved)

LE -e /path/to/my_folder -w pass.letxt -1 "1234" -z -n
LE -d /path/to/my_folder -w pass.letxt -1 "1234" -z -n

File — destructive (user asked to delete source)

# Only after explicit user confirmation
LE -e /path/to/myfile.txt -1 "1234" -j

Get info on encrypted file

LE -i /path/to/myfile.letxt

Get current device location

Requires user consent on first use in a session (privacy-sensitive — accesses device GPS).

LE -7

Workflow

  1. Determine the mode: PlainText (--PlainText) for inline strings, or File/Folder for files and directories.
  2. Resolve the binary via $LE_BIN, command -v LE, or ask the user.
  3. Gather lock inputs: Which locks to apply and their values.
  4. Pick safe defaults: -z for files; -z -n for folders. Do not add -c or -j unless the user explicitly confirmed source deletion.
  5. Build the command with the appropriate flags.
  6. Execute via Bash and return the result.
  7. For decryption, remind the user they need the same lock values used during encryption.

Important Notes

  • No API key is needed — LE runs entirely locally.

  • Phone numbers for MFA (-2) must be in E.164 format.

  • Time lock dates use YYYY/MM/DD HH:MM format. Follow the Date & Time Rules above.

  • Time locks require both -l (start) and -r (end).

  • The password file (.letxt) should be an encrypted password file created with LE -e pass.txt -q.

  • Geo-location locks work in two stages: create a key file once, then reuse it to lock as many files/folders as you want.

    Stage 1 — Create the .lecsv key file from a GPS CSV (-v):

    • Input: a plain CSV of GPS locations with distance (e.g., location.csv).
    • -v is a switch (no value); LE produces location.lecsv alongside the input.
    • MUST be paired with -1 (pin) or -2 (MFA) — otherwise LE errors with "Either Pin or MFA should be enabled for Password/Location file".
    LE -e location.csv -v -1 1122 -z
    LE -e location.csv -v -2 "+1YourPhoneNumber" -z
    

    Stage 2 — Use the .lecsv key file to lock files/folders (-b):

    • -b \x3Cpath.lecsv> is used only on encryption.
    • On decryption, do NOT pass -b — LE reads the embedded location reference from the encrypted file itself. Just run LE -d \x3Cfile> -z.
    • No pin/MFA pairing required — the key file is self-contained.
    # Encrypt (pass -b with the key file)
    LE -e example.txt -b location.lecsv -z
    
    # Decrypt (do NOT pass -b)
    LE -d example.letxt -z
    
安全使用建议
This skill appears coherent for driving a local LE desktop binary, but consider the following before installing: - Confirm you have a trustworthy LE binary: the skill runs whatever LE you point it to. Verify the binary and the linked GitHub repo (https://github.com/SPAlgorithm/LE) and prefer signed releases if available. - Privacy: the skill runs LE -7 to read device GPS for geo-locking. It appropriately asks for acknowledgement, but be prepared to deny location access if you don't want GPS shared by the binary. - Destructive flags: -c and -j delete source files. The skill requires explicit user confirmation before using them; always double-check confirmations to avoid data loss. - Environment assumptions: the skill will check the LE_BIN env var (if set) and uses command -v LE; it also expects python3 for date computations. These environment checks are reasonable but not declared as 'required' vars — be aware the skill will read LE_BIN and PATH. - Test safely: run a few non-sensitive, small test encrypt/decrypt operations in a sandbox or on test files to confirm the resolved LE binary and the commands behave as documented. If these points are acceptable and you trust the LE binary, the skill is coherent and proportionate for local encryption tasks.
功能分析
Type: OpenClaw Skill Name: lesecurelocal Version: 1.0.3 The LESecureLocal skill bundle is a well-documented wrapper for a local encryption utility. It includes explicit security instructions for the AI agent to prevent shell injection (e.g., using shell variables and Python's sys.argv for input handling), mandates user confirmation for destructive file operations (the -c and -j flags), and requires explicit consent before accessing privacy-sensitive GPS data (the -7 flag). The logic is consistent with its stated purpose of providing local encryption with advanced locks like geo-fencing and time-locks, and it contains no evidence of malicious intent or data exfiltration.
能力标签
requires-sensitive-credentials
能力评估
Purpose & Capability
The skill describes a local desktop encryption helper and its instructions exclusively call the local LE binary, local date/time computation, and optional device GPS access for geo-locking — all coherent with the stated purpose of local/on‑prem encryption and layered locks.
Instruction Scope
Instructions are detailed and constrained (destructive flags require explicit confirmation, plaintext sanitization guidance, GPS access requires user acknowledgement). They do reference environment state (LE_BIN and PATH) and assume availability of python3; reading LE_BIN and running 'LE -7' (GPS) are privacy-sensitive but aligned with purpose. The skill does not instruct reading unrelated files or exfiltrating data.
Install Mechanism
This is an instruction-only skill with no install spec and no downloaded code, so there is no install-time risk from remote archives or package installs.
Credentials
The skill declares no required environment variables, but it will consult LE_BIN if set and uses PATH (command -v LE). It also assumes python3 exists for date computations. No secrets or external credentials are requested. The implicit use of LE_BIN and python3 should be documented but is proportionate to the task.
Persistence & Privilege
The skill is not marked always:true, does not request elevated or persistent system privileges, and does not modify other skills' configs. Autonomous invocation is allowed (platform default) and not combined with other red flags.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install lesecurelocal
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /lesecurelocal 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.3
No significant code or rule changes; added extra project info. - Added project links section with references to source code and cloud alternative. - Clarified that no data leaves your machine when using LESecureLocal.
v1.0.2
LESecureLocal 1.0.2 Changelog - Added explicit user acknowledgment requirement before performing GPS location queries with `LE -7` (for privacy). - Enhanced input safety in date/time scripts: duration values are always parsed via `sys.argv` and cast to `int()`, preventing injection. - PlainText mode now mandates input sanitization: user input must be safely quoted or validated to avoid command injection. - Updated documentation and in-command guidelines to clarify input handling for both date/time and PlainText data.
v1.0.1
- Adds safe-by-default file/folder handling: now uses `-z` (overwrite) and `-n` (recursive for folders), preserves source files unless user confirms deletion. - Adds strict rules for destructive flags: `-c` (clean/delete) and `-j` (trio) are only used with explicit user confirmation to prevent accidental data loss. - Improves binary path resolution: now checks `LE_BIN` environment variable, then system `PATH`, or prompts the user if not found. - Introduces cross-platform, Python-based date/time calculations for time locks, with system `date` as a fallback. - Supports new triggers for querying device’s current GPS location (e.g., "where am I") using `LE -7`. - Documentation updated for all examples and workflows, including clear separation of safe and destructive operations.
v1.0.0
Initial release of LESecureLocal: local encryption/decryption of text, files, and folders via desktop LE tool. - Encrypt/decrypt plain text, files, and folders using the local LE binary—no API/cloud required. - Supports layered locks: pin, password, MFA (with OTP), time lock, and geo-location. - Strict rules and examples for file/folder vs. plain text, with required local-only operation for files/folders. - All date/time handling standardized to EST/EDT (America/New_York) for time lock flags. - Clear, command-line invocation instructions (full executable path, flag usage, example commands). - Guides for MFA workflow, password files, and geo-locks included.
元数据
Slug lesecurelocal
版本 1.0.3
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 4
常见问题

LeSecure Local/On-Prem 是什么?

LESecure Local/On-Prem — encrypt and decrypt data, files, and folders using the LE desktop tool with layered locks (pin, password, MFA, time lock, geo-locati... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 103 次。

如何安装 LeSecure Local/On-Prem?

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

LeSecure Local/On-Prem 是免费的吗?

是的,LeSecure Local/On-Prem 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

LeSecure Local/On-Prem 支持哪些平台?

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

谁开发了 LeSecure Local/On-Prem?

由 Ladhe's Encryption - LE(@spalgorithm)开发并维护,当前版本 v1.0.3。

💬 留言讨论