Skip to main content

chmod-ref

❖ Communityv1.0.0★ 0

@chmod: context references that explain a file permission mode for the model: @chmod:<mode> takes an octal mode (755, 0755, 4755), ls -l text (-rwsr-xr-x, with the file type letter and a trailing + . or @) or an st_mode as stat and git write it (100644), and attaches both forms, each class's rights in words (directory rights named as such), what setuid, setgid and the sticky bit do and where they are ignored, and notes such as a mode everyone can change, one private to the owner, or a class holding rights the class before it lacks; @chmod:"644 u+x,go-w" applies a symbolic change step by step the way GNU chmod does (u g o a, + - =, r w x X s t, copies like u=g), @chmod:"100644 100755" shows what changes between two modes, and @chmod:"umask 027" shows what new files and directories get; the TUI and Desktop composer preview a mode as you type it.

Open in Hermes Desktop
hermes plugins install chmod-ref

README

From the reviewed commit d2f543a ↗; it updates when the author re-pins.

chmod-ref

@chmod: references for Hermes: put @chmod:755, @chmod:-rwsr-xr-x or @chmod:"644 u+x,go-w" in a message and Hermes replaces it with what that file mode means, worked out on your machine: the mode in both forms (octal and ls -l), each class's rights in words, what setuid, setgid and the sticky bit do, what a chmod change does to a mode step by step, what changes between two modes, and what a umask gives new files and directories.

Permission bits are easy to misread: 4755 against 2755, an S against an s, a directory where x means "enter", a symbolic change whose X only sometimes adds execute. With @chmod: the model gets the exact bits instead of working them out from the digits.

Install

hermes plugins install chmod-ref --enable

Requires Hermes 0.21.7 or newer (older plugin security scans treat any mention of setuid as critical). No API key, no configuration, no dependencies.

Use

@chmod:755                     an octal mode (0755, 0o755 and 4-digit modes like 4755 too)
@chmod:-rw-r--r--              ls -l text, with or without the file type letter (and + . @ after it)
@chmod:100644                  an st_mode with the file type, as stat and git write it
@chmod:"644 u+x,go-w"          a symbolic change applied to a mode, step by step
@chmod:u+x,go-w                a symbolic change on its own, in words
@chmod:"100644 100755"         what changes between two modes
@chmod:"umask 027"             what new files and directories get

Example, from the end-to-end test (a one-shot hermes chat turn). The message git says the mode changed: @chmod:"100644 100755" and I ran @chmod:u+x,go-w reaches the model as the message followed by:

Mode 644 -> 755
  before    rw-r--r--  (644)
  after     rwxr-xr-x  (755)
  adds      execute for owner, group and others
Notes
  - this is the change git shows as old mode / new mode when a file's execute bit flips

Mode 755 (rwxr-xr-x), a regular file
  octal     755
  st_mode   100755 (file type and permission bits, as stat and git write them)
  ls -l     -rwxr-xr-x
  owner     read, write, execute
  group     read, execute
  others    read, execute
  special   none

chmod u+x,go-w
  u+x       add execute for the owner
  go-w      remove write from the group and others
  on 644    rwxr--r--  (744)
  on 755    rwxr-xr-x  (755)
Notes
  - give a starting mode to see one result: @chmod:"644 u+x,go-w"

What the notes point out, when it applies:

  • Special bits: what setuid, setgid and sticky do on a program and on a directory, that they are ignored where they are (setuid on a directory, sticky on a file), and an ls -l S or T that means the bit is set without the matching execute.
  • Who can do what: a mode no one but root can use, one everyone can change, one private to the owner (what ssh wants for keys), others able to write in a directory without the sticky bit, and a class with rights the class before it lacks (the kernel uses only the first class that matches a user, so an owner with --- cannot use the group's rwx).
  • Files and directories: execute without read (a binary runs, a script does not), a file read-only for its owner, and on a directory write without execute (does nothing) or read without execute (names can be listed, nothing opened).
  • Types and git: a symbolic link's own mode, git's 160000 submodule entry, a file mode git would not keep (it records only 100644 and 100755), and the +, . and @ after ls -l bits (ACL, SELinux context, macOS extended attributes).

Symbolic changes are applied the way GNU chmod applies them: u, g, o and a, the +, - and = operators (several in one clause, like u+r-w), r, w, x, X, s and t, and copies like u=g. On a directory, setuid and setgid are kept by = unless s is named, as GNU chmod does. A change with no u, g, o or a is shown as with a umask of 0, and a note says so, since chmod leaves out the bits your umask blocks.

Errors say what is wrong ('788' is not octal: 8 is not an octal digit (0-7), a letter in the wrong place of ls -l text, a clause that is not a chmod change) and reach the model under Hermes's context warnings.

Suggestions

In the TUI and the desktop app, @chmod: followed by a mode previews it as a suggestion (750 = rwxr-x---, 644 u+x -> 744 (rwxr--r--), umask 027: new files 640, new directories 750); with nothing typed yet, it offers three examples. The classic CLI does not show reference suggestions.

What it does not do

chmod-ref explains the mode you write; it never looks at a file. It does not read file modes, ACLs or ownership from disk, and it does not change anything. Platforms differ in small ways (BSD chmod, for example, refuses the sticky bit on a file for non-root users); the notes say where Linux and macOS behave the same.

Security and footprint

  • register() only registers one context reference provider (@chmod:).
  • It reads nothing but the text of the reference itself, and only when you write @chmod: in a message.
  • No network access, no subprocesses, no downloads, no credentials read, no files read or written, no permission changed. The plugin keeps no copy of what you write, but the @chmod: reference and the explanation become part of the message sent to your model provider and saved in the session history.
  • Standard library only (re).

Development

python -m pytest tests                                           # unit tests, no Hermes needed
PYTHONPATH=<hermes checkout> python tests/e2e/chmod_ref_e2e.py   # real hermes chat turns and TUI suggestions
hermes plugins validate chmod-ref

The unit tests check every one of the 4,096 permission bit patterns against Python's own stat.filemode, and on Linux compare symbolic changes with the real GNU chmod and umask results with real new files.

Changes

  • 1.0.0: first release.

MIT licensed.

Disclosure

approval-ledger❖ Community★ 0

Local ledger of Hermes's approval prompts (dangerous commands, protected writes, MCP consent, smart-mode verdicts): /approval-log shows how often each rule asked, how many prompts were approved, denied or left unanswered, and how long a person took to answer, per rule, per surface or per day, for the last 24 hours, any number of hours or days, the latest session or everything recorded; /approval-log recent lists the newest decisions (ten, or up to 100 with /approval-log recent 50).

Tools
aux-ledger❖ Community★ 0

Local ledger of Hermes's auxiliary LLM calls (titling, compression, vision, approval): /aux shows tokens, time and failures per task, model, provider or day, or lists the newest calls (ten, or up to 100 with /aux recent 50), for the last 24 hours, any number of hours or days, the latest session or everything recorded.

Tools
b64-ref❖ Community★ 0

@b64: context references that decode encoded text for the model: @b64:<value> takes base64 (standard or URL-safe, padded or not), hex (0x48656c6c6f, 48:65:6c, \x48\x65), percent-encoding or a data: URI, told apart by the value's shape or picked with base64:, base64url:, hex: or url:, and attaches what it holds: text as text with control and invisible characters escaped, JSON pretty-printed, gzip and zlib inflated in memory (at most 1 MiB, one layer), and binary named by its format (PNG and GIF with their size, JPEG, PDF, ZIP, ELF, SQLite and more) with a hex dump of its first 128 bytes; notes point out a value that was cut short, padding that is off, a second layer of encoding and a JWT inside; the TUI and Desktop composer preview a value as you type it.

Tools
command-ledger❖ Community★ 0

Local ledger of the slash commands you run in Hermes (built-in commands in the CLI, built-in and plugin commands on messaging platforms): /command-log shows how often each command was used, its share, in how many sessions and when last, per command, platform, surface or day, for the last 24 hours, any number of hours or days, the latest session or everything recorded; /command-log recent lists the newest commands (ten, or up to 100 with /command-log recent 50) with the alias typed.

Tools
crontab-ref❖ Community★ 0

@crontab: context references that explain a cron expression for the model: @crontab:"0 9 * * 1-5" (or a shortcut such as @crontab:@daily) attaches a plain-words reading ("At 09:00 on Monday through Friday."), each field on its own row, whether Hermes's /cron takes it as a cron expression (shortcuts, ? and 5#3 are not), its next five runs in Hermes's timezone setting worked out the way cron/jobs.py computes next runs, and notes on day of month OR day of week, * in the minute field, steps that do not divide the hour or day, days 29-31 and 7 as Sunday; the TUI and Desktop composer suggest examples and preview an expression as you type it. The reading comes from croniter, the library Hermes's scheduler uses.

Tools
edit-ledger❖ Community★ 0

Local ledger of the turns in which the agent changed files with write_file or patch: /edit-log shows how many turns changed files, how many files in all, the median per turn, the most changed file type and how long ago the last one was, per model, platform or day, a table of file types (extensions), or the newest turns, for the last 24 hours, any number of hours or days, the latest session or everything recorded; /edit-log recent lists the newest turns (ten, or up to 100 with /edit-log recent 50). A turn another plugin keeps going is counted once.

Tools

← Back to the catalog · catalog built Nov 3, 2026