shell
Lyngon shell conventions. Invoke before writing or editing a shell script or a file under a scripts/ directory.
- License 许可
- Apache-2.0
- 所属仓库
- lyngon/devkit
- 最近更新
- 2026-11-14
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- shell
- paths
- [ "**/*.sh", "**/*.bash", "**/scripts/**" ]
- description
- Lyngon shell conventions. Invoke before writing or editing a shell script or a file under a scripts/ directory.
- user-invocable
- false
03 SKILL.md 正文
Shell conventions
-
A shell script is bash:
#!/usr/bin/env bash, thenset -euo pipefailbefore its first command. -
Under
pipefaila pipeline fails when any command in it fails, socmd | grep -q patternis false whenevercmdexits non-zero, even on a match. Never pipe a command whose failure is expected intogrep -q; capture its output first and match the variable:out=$(cmd 2>&1) || true grep -q 'expected message' <<<"$out" -
A command meant for a person to run by hand (in a README, a runbook or a plan step) is POSIX sh, or runs through
bash -c '...'. The person's shell may be zsh, where bash-only syntax such as${PIPESTATUS[0]}prints nothing. -
A script that a hook or task runs is a
pkgs.writeShellApplicationwith its dependencies inruntimeInputs, never a bare path that assumes PATH. It sets the same options and runs ShellCheck when it is built. -
Every script is shellcheck clean; the
shellcheckhook checks it. -
Silence a single finding with
# shellcheck disable=SC2086 # reasonon the line above it.
04 同仓库更多 Skills
unslop
Remove AI writing patterns from prose and give it a voice. Use whenever writing or editing non-code text (docs, READMEs, decision records, posts, commit messages, PR descriptions), before handing it over, and on request: "unslop", "humanize", "make this sound human", "clean up this writing", "edit for voice", "de-AI this text".
technical
Layered technical-writing standard: Diátaxis structure, Google developer style sentences, STE instruction rules, Global English syntax. Use before writing or reviewing docs, RFCs, readmes, PR descriptions, or commit messages, every time, however small the document.
simpler
Restate the last message in plain human language, with no jargon. Use when the reader did not follow the last message and says so: "bro", "say that simpler", "in plain words", "no jargon".
init
Set up a fresh repository, or adopt an existing one, to Lyngon conventions. Interviews the owner relentlessly about purpose, failure modes, audiences, stack and constraints, then writes INTENT.md, .claude/CLAUDE.md, README.md, CONCEPTS.md, decision records, devenv, git hooks, CI and every package in the kind-first Lyngon layout. User-invoked only.
add-package
Create a package in a Lyngon repository in the directory its kind decides (apps/, libs/, contracts/, tools/, infra/), with README.md, devenv.nix and the layer lint, and register it in its workspace and devenv. Use whenever a new app, service, CLI, library, adapter, contract, schema, tool, infra module or environment is needed, including when one feature needs several packages. Never create a package by hand.
index
The index of Lyngon's principles, one line per principle saying when it applies and what it demands, each with a file under references/. Invoke before work that takes judgment, such as a design choice, a refactor, a bug fix, a test, a measurement, a script, a document or a question to the owner; then read the file of each principle that applies.