Логотип Tool Layer Bytes

Tool Layer Bytes

Спільнота
randommonicle
tool-layer-bytes

The shell and editing layers between Claude and a file rewrite bytes the author never touched (escapes dropped or turned into control bytes, CRLF turned LF, arguments rewritten), and the transcript still shows the command as written. Route any payload carrying a backslash, a quote of the enclosing kind or a `$'` through the Write or Edit tool, never a heredoc or an inline -e/-c string; never `sed -i` a CRLF file; and prove the bytes after any scripted edit. Triggers when writing code or regex through the shell, editing files with a script, reading or writing files from Python or Node, and checking whether a scripted edit applied. Does not fire on edits made with the Write or Edit tool, which carry bytes as given.

Огляд

Видавецьrandommonicle
Репозиторійclaude-skills
Назва навичкиtool-layer-bytes
Зірки
27
Форки
3
Файли в пакеті
Лише інструкції
ЛіцензіяApache-2.0
Посилання
  • Інструкції у форматі Markdown

    Файл SKILL.md, який модель завантажує за потреби, тож токени витрачаються лише тоді, коли запит справді відповідає навичці.

  • Працює з будь-якою LLM

    Навички ШІ — це звичайний Markdown, а не код для певного постачальника, тому вони працюють із GPT, Claude, Gemini, Grok або локальною моделлю.

  • Усе необхідне — в інструкціях

    Усе потрібне моделі міститься в інструкціях — жодних додаткових файлів для синхронізації.

  • Відкритий вихідний код

    Опубліковано на GitHub користувачем randommonicle. Перегляньте вихідний вміст перед установленням.

Встановлення

Установіть навичку ШІ Tool Layer Bytes у TypingMind, щоб використовувати її з будь-якою LLM, або додайте її до іншого агента, що читає SKILL.md.

1

Встановити в TypingMind

TypingMind встановлює навичку безпосередньо з її папки GitHub — читає SKILL.md, збирає файли ресурсів у пакет і зберігає результат локально.

  1. Відкрийте застосунок і перейдіть до Плагіни → Навички.
  2. Виберіть «Встановити з GitHub».
  3. Вставте наведений нижче URL папки навички та підтвердьте встановлення.
    https://github.com/randommonicle/claude-skills/tree/main/tool-layer-bytes
  4. Увімкніть навичку в кожному чаті, де хочете її використовувати.
Плагіни → Навички → Нова навичка → За URL GitHub, потім вставте URL папки й натисніть «Продовжити».
2

Встановити в іншому агенті

Будь-який агент, що підтримує формат Agent Skills, може використовувати цю навичку — скопіюйте папку до каталогу навичок цього агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/randommonicle/claude-skills.git /tmp/claude-skills
mkdir -p .claude/skills
cp -r /tmp/claude-skills/tool-layer-bytes .claude/skills/tool-layer-bytes
Після копіювання перезапустіть Claude Code, щоб завантажити нову навичку.

Використовуйте навичку в TypingMind

Увімкніть навичку Tool Layer Bytes в будь-якому чаті TypingMind, і далі модель усе зробить сама. Назва й опис навички містяться в системному промпті, а щойно надходить відповідний запит, модель самостійно завантажує повні інструкції — вам не потрібно викликати навичку вручну, і до фактичного використання вона не витрачає токенів.

Модель самостійно завантажує навичку Tool Layer Bytes, щойно надходить відповідний запит.

Працює з будь-якою моделлю ШІ

Навички ШІ — це звичайні інструкції Markdown, а не код для певного постачальника, тому навичка Tool Layer Bytes не прив’язана до моделі, для якої її створено. Установіть її один раз у TypingMind і використовуйте з GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama або локальною моделлю, яку ви запускаєте самостійно, — усе з вашими власними ключами API.

  • Завантажується лише за потреби

    Системний промпт містить лише назву й опис. Інструкції завантажуються за першого відповідного запиту, тож невикористана навичка нічого не коштує.

  • Змінюйте моделі під час чату

    Оскільки навичка — це інструкції, а не код, зміна моделі не порушує її роботу: наступна модель читає той самий файл SKILL.md.

Інструкції навички

Це вміст файлу SKILL.md, який завантажує модель. Прочитайте його перед установленням — навичка містить інструкції, яких дотримуватиметься ваша модель.

Tool-layer bytes

Between the text Claude writes and the bytes on disk sit layers that rewrite: the Bash tool's own escaping, the shell's quoting and heredoc rules, MSYS path conversion on Git for Windows, sed -i and Python's newline handling, and git's core.autocrlf. Each reports success. A green run afterwards proves nothing about whether the edit applied, because the run tests the bytes that landed, not the ones intended.

The rules

  1. Code through files, not the shell. Any script or payload carrying a backslash, a quote of the kind enclosing it, or a $' goes to disk with the Write tool and runs as a file. Not a heredoc, not node -e, not python -c. The Bash tool has dropped one level of backslashes, turned \b and \xNN into raw bytes, and split a heredoc at a $'.
  2. No in-place stream edits on Windows checkouts. sed -i and perl -pi rewrite the whole file and turn CRLF line endings LF; git diff under core.autocrlf=true cannot see it. Use the Edit tool.
  3. Python and Node read and write with the newline mode stated. Python's default open(p) turns CRLF into LF on read, so "read normally, write with newline=''" still writes LF. Read and write with newline='', or bytes.
  4. One input per command. A heredoc and a later < file redirect on one command: the later redirect wins and the heredoc never reaches the program.
  5. Paths and revisions through MSYS: an argument like origin/main:path or one starting // can be rewritten; prefix MSYS_NO_PATHCONV=1.

Prove the bytes after any scripted edit

  • git diff --stat: a whole-file count for a one-line edit is the tell.
  • Line endings: tr -cd '\r' < f | wc -c against wc -l < f; git ls-files --eol f.
  • Control bytes: tr -d '\011\012\015\040-\176\200-\377' < f | wc -c should print 0.
  • Syntax: node --check f, or the language's own.
  • A mutation test is proved by its red run, read in full; if the mutation script reports it made no change, the escape was eaten and the red run never happened.

The hook

hooks/byte-layer-warn.mjs (PreToolUse, Bash) warns, never blocks, on a heredoc or inline code string carrying a backslash (a git commit message is exempt), on sed -i and perl -pi, and on a heredoc with a later input redirect. It is the moment-of-use half; this skill is the rest.

Provenance

Twelve misses in four repositories, August to October 2026, while the rule lived only in a machine memory: ICC L-043, L-046, L-083, L-094, L-120 and the session of 22 October 2026 (fifty working-copy files turned LF by Python's default read; three heredocs that dropped backslashes); AI domain L-122, L-144, L-146; passive income L-084; RimModManager L-011. docs/SKILL_PROPOSALS_2026-10-22.md, Tier 1 item 1.

Additions from the misses-log sweep (2026-11-01)

Four more layers that rewrite bytes between the thing you typed and the thing that ran.

  • A byte-exact test against a working-tree file needs a .gitattributes behind it. Git's text=auto normalises to LF in the object store and may hand the working copy CRLF on checkout, so a test asserting exact bytes passes on the machine that wrote the file and fails on the next clone. Pin the path's eol in .gitattributes and let the test assert against that, or the test is measuring the checkout rather than the content. (PropOS 2026-07-27. Acted on here: this repository pinned *.json text eol=lf on 2026-11-05 after the three skill-count files warned on commit.)
  • PowerShell double-quoted strings turn backtick sequences into control bytes. In PowerShell the backtick is the escape character, so `n becomes a newline, `t a tab and `0 a null inside "...", before your program sees any of it. Use single quotes for a literal, or write the file with a tool rather than through a shell string. (Rimagent 2026-10-13.)
  • Git Bash drops TZ region names on the way to a Windows program. TZ=Europe/London set in Git Bash does not reach a native Windows binary as that zone, so a time read through one is not the zone you asked for. Read Windows clock values with PowerShell Get-Date instead, and see live-state-first for how the reading reaches the record. Rule 5 above covers the other half of this layer, the // and origin/main:path rewrite. (ASH 2026-10-08.)
  • $'\r' inside a double-quoted substitution is the two letters, not a carriage return. grep -c "$'\r'" file searches for a dollar sign, a quote and the letter r. Bash expands $'...' only when it is unquoted, so write grep -c $'\r' file. The failure is silent and reports zero, which reads as a clean file. (Library 35.)

Поширені запитання

Що робить навичка ШІ Tool Layer Bytes?

The shell and editing layers between Claude and a file rewrite bytes the author never touched (escapes dropped or turned into control bytes, CRLF turned LF, arguments rewritten), and the transcript still shows the command as written. Route any payload carrying a backslash, a quote of the enclosing kind or a `$'` through the Write or Edit tool, never a heredoc or an inline -e/-c string; never `sed -i` a CRLF file; and prove the bytes after any scripted edit. Triggers when writing code or regex through the shell, editing files with a script, reading or writing files from Python or Node, and c...

Навіщо використовувати Tool Layer Bytes у TypingMind?

Тому що ви встановлюєте її один раз і використовуєте з будь-якою моделлю. Tool Layer Bytes — це звичайний Markdown, а не код для конкретного постачальника, тому та сама навичка працює з GPT-5, Claude, Gemini, Grok або локальною моделлю. Ви можете змінити модель навіть посеред чату, і навичка продовжить працювати. TypingMind використовує ваші власні ключі API, тож ви платите безпосередньо постачальникам замість передплати за кожне місце користувача, а ваші навички й чати залишаються у вашому сховищі.

Як встановити Tool Layer Bytes у TypingMind?

Відкрийте в TypingMind Плагіни → Навички → Встановити з GitHub і вставте https://github.com/randommonicle/claude-skills/tree/main/tool-layer-bytes. TypingMind прочитає файл SKILL.md і встановить навичку, яку можна вмикати окремо для кожного чату.

Які моделі ШІ можуть використовувати Tool Layer Bytes?

Будь-яка модель, яку ви підключите в TypingMind. Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для конкретного постачальника, тому GPT, Claude, Gemini, Grok і локальні моделі можуть завантажувати цю навичку, коли запит їй відповідає.

Зі скількома моделями ШІ можна використовувати Tool Layer Bytes?

Зі скількома забажаєте. Якщо модель підтримує навички, ви можете використовувати з нею Tool Layer Bytes — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama та інші — усе в TypingMind із власними ключами API.

Чи безкоштовна навичка ШІ Tool Layer Bytes?

Так. Навичку опубліковано на GitHub: randommonicle, за ліцензією Apache-2.0. Ви платите лише своєму постачальнику ШІ за використані токени.

Що таке навички ШІ?

Навичка ШІ — це багаторазовий набір інструкцій, який навчає модель ШІ виконувати одне конкретне завдання. Він відповідає відкритому формату Agent Skills: файл SKILL.md із назвою та описом, а також скрипти, шаблони чи довідкові файли, які можуть знадобитися моделі. Модель читає інструкції лише тоді, коли ваш запит відповідає навичці, тому встановлена навичка нічого не коштує, доки її не використано.

Чим навички ШІ відрізняються від плагінів або серверів MCP?

Плагін або сервер MCP надає моделі нові інструменти для виклику — код, який десь виконується й повертає результат. Натомість навичка ШІ надає моделі знання та порядок дій: як підійти до завдання, яких кроків дотримуватися та яким має бути якісний результат. Навички — це звичайний Markdown, тож їм не потрібні ні сервер, ні ключ API, ні середовище виконання, і вони працюють із будь-якою моделлю.

Усі

Створіть власний ШІ-простір уже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇