← 返回 Skills 市场
ohernandez-dev-blossom

Chmod Calc

作者 Omar Hernandez · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
138
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install chmod-calc
功能描述
Calculate chmod permissions — convert between numeric (octal) and symbolic notation, and generate the chmod command. Use when the user asks what chmod 755 me...
使用说明 (SKILL.md)

chmod Calculator

Convert file permission specifications between numeric (octal) and symbolic notation, and produce the corresponding chmod command.

Input

  • Either a numeric permission string (e.g. 755, 644, 4755)
  • Or a description of permissions per entity (owner/group/others with read/write/execute)
  • Or a symbolic string (e.g. rwxr-xr-x)

Output

  • Numeric notation (3 or 4 digits)
  • Symbolic notation (9 characters, e.g. rwxr-xr-x)
  • Numeric chmod command: chmod 755 filename
  • Symbolic chmod command: chmod u+rwx,g+rx,o+rx filename
  • Plain-English description of what each entity can do

Instructions

Permission bit values

Each entity (owner/group/others) is a sum of:

  • Read (r) = 4
  • Write (w) = 2
  • Execute (x) = 1

Special permission bits (4th leading digit)

  • Setuid = 4 (runs as owner)
  • Setgid = 2 (runs as group)
  • Sticky = 1 (only owner can delete in directory)

Numeric → Symbolic conversion

Given a 3-digit octet OGO:

  • For each digit, decompose: r if bit 2 set, w if bit 1 set, x if bit 0 set, else -.
  • With leading special digit S: setuid sets s/S in owner execute position; setgid sets s/S in group execute position; sticky sets t/T in others execute position.

Symbolic → Numeric conversion

Map each 3-char group to a digit using the bit values above.

Symbolic chmod command format

Build clauses for each entity with permissions set:

  • u = owner, g = group, o = others
  • Emit {entity}+{perms} for each entity that has any permissions
  • Special bits: u+s (setuid), g+s (setgid), +t (sticky)

Common permission reference

Numeric Symbolic Description
644 rw-r--r-- Standard file (owner rw, rest r)
755 rwxr-xr-x Standard directory/executable
600 rw------- Private file (owner only)
700 rwx------ Private directory/executable
777 rwxrwxrwx Full access (avoid in production)
4755 rwsr-xr-x Setuid executable
2755 rwxr-sr-x Setgid executable
1755 rwxr-xr-t Sticky directory

Options

  • Input can be numeric, symbolic, or a plain-English description of desired permissions.

Examples

Input: 755 Output:

Numeric:          755
Symbolic:         rwxr-xr-x
Command (numeric):   chmod 755 filename
Command (symbolic):  chmod u+rwx,g+rx,o+rx filename

Owner: read, write, execute
Group: read, execute
Others: read, execute

Input: 644 Output:

Numeric:          644
Symbolic:         rw-r--r--
Command (numeric):   chmod 644 filename
Command (symbolic):  chmod u+rw,g+r,o+r filename

Owner: read, write
Group: read
Others: read

Input: rwxr-xr-x Output:

Numeric:          755
Symbolic:         rwxr-xr-x
Command (numeric):   chmod 755 filename
Command (symbolic):  chmod u+rwx,g+rx,o+rx filename

Input: "owner can read and write, group can read, others nothing" Output:

Numeric:          640
Symbolic:         rw-r-----
Command (numeric):   chmod 640 filename
Command (symbolic):  chmod u+rw,g+r filename

Error Handling

  • If numeric input has more than 4 digits or contains non-octal characters, say so.
  • If a digit in the octet exceeds 7, explain that each permission digit must be 0–7.
  • If symbolic input is not exactly 9 or 10 characters in valid format, ask for clarification.
  • Warn the user if they request 777 that this allows full access to everyone and is a security risk.
安全使用建议
This skill appears coherent and low-risk: it only formats permission representations and suggests chmod commands. Before running any suggested chmod command, verify the target filename/path and the intended permissions (especially for 777, setuid, setgid, or sticky bits) because the skill outputs example commands but cannot act on your system itself. Because it is instruction-only and requests no credentials, there is no hidden network or credential access implied — still exercise normal caution and review generated commands before executing them with elevated privileges.
功能分析
Type: OpenClaw Skill Name: chmod-calc Version: 1.0.0 The skill bundle is a straightforward utility for converting file permissions between numeric and symbolic notation. It contains no executable code, network requests, or data access logic, and even includes a security warning regarding the risks of using '777' permissions in SKILL.md.
能力评估
Purpose & Capability
Name/description match the instructions: the SKILL.md only describes converting between numeric and symbolic permission formats and generating chmod commands.
Instruction Scope
Runtime instructions only describe parsing/formatting permission strings and producing example chmod commands and human-readable explanations; they do not read files, access environment variables, or transmit data externally.
Install Mechanism
No install spec and no code files — nothing is downloaded or written to disk by the skill itself.
Credentials
The skill declares no required environment variables, credentials, or config paths; no secrets are requested or needed for its stated function.
Persistence & Privilege
always is false and the skill does not request persistent/system-level changes or access to other skills' configs.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install chmod-calc
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /chmod-calc 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of chmod-calc skill. - Converts between numeric (octal) and symbolic file permission notations. - Generates both numeric and symbolic chmod commands. - Provides plain-English explanations for each permission set. - Supports input as numeric code, symbolic string, or natural language description. - Handles special permission bits: setuid, setgid, and sticky. - Includes error handling for invalid input and warnings for insecure permissions (e.g., 777).
元数据
Slug chmod-calc
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Chmod Calc 是什么?

Calculate chmod permissions — convert between numeric (octal) and symbolic notation, and generate the chmod command. Use when the user asks what chmod 755 me... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 138 次。

如何安装 Chmod Calc?

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

Chmod Calc 是免费的吗?

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

Chmod Calc 支持哪些平台?

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

谁开发了 Chmod Calc?

由 Omar Hernandez(@ohernandez-dev-blossom)开发并维护,当前版本 v1.0.0。

💬 留言讨论