File Style Conventions
Two small, easy-to-violate-by-accident conventions enforced on every file
write/edit:
1. No emoji outside Markdown
- Files with extension
.md (or .mdx) may contain emoji if the user
asked for them — don't add emoji proactively even there.
- Every other file type (source code, YAML/JSON/TOML config, shell/PS1
scripts, Dockerfiles, CI configs, etc.) must contain no emoji
characters at all — including in comments, log messages, string
literals, and commit messages/PR titles (these aren't files, but the same
rule applies).
- Why: emoji can break strict-encoding parsers, inflate diffs with
multi-byte sequences, misrender in some terminals/log viewers, and are
inconsistent with this project's style.
- Before finalizing a non-
.md file you wrote/edited, scan for emoji (common
ranges: U+1F300–U+1FAFF, U+2600–U+27BF, U+2190–U+21FF arrows
used decoratively, variation selectors U+FE0F). If found, replace with
plain text (e.g. [OK]/[FAIL] instead of check/cross emoji, -> instead
of arrow emoji) or remove entirely.
2. YAML files end with a trailing newline
- Every
.yml/.yaml file must end with exactly one \n (the file's last
byte is a newline, and there is no trailing blank line beyond it).
- This matches the POSIX "text file ends with a newline" convention, avoids
git diff showing \ No newline at end of file, and satisfies
yamllint's new-line-at-end-of-file rule (the default in most CI lint
jobs — see ci-pipeline-debug/gitlab-pipeline-ops).
- After writing/editing a
.yml/.yaml file, verify:tail -c1 path/to/file.yml | od -c | head -1 # should show \n, not empty
or in PowerShell:$bytes = [System.IO.File]::ReadAllBytes("path/to/file.yml")
$bytes[-1] -eq 10 # 10 = LF; should be True
- If missing, append a single newline — don't add multiple blank lines at
end of file.
Scope
These checks apply to files this skill's user is actively creating or
editing — don't do a repo-wide sweep reformatting unrelated files unless
asked. If a pre-existing file already violates one of these conventions and
you're touching it for an unrelated reason, fix the convention issue too
while you're there (it's a one-line change), but mention it briefly.
1---2name: file-style-conventions3description: Apply two lightweight file-hygiene conventions when writing or editing files - no emoji characters outside Markdown (.md) files, and YAML files (.yml/.yaml) end with exactly one trailing newline. Use whenever creating or editing non-Markdown files that might contain emoji, or any .yml/.yaml file.4---56# File Style Conventions78Two small, easy-to-violate-by-accident conventions enforced on every file9write/edit:1011## 1. No emoji outside Markdown1213- Files with extension `.md` (or `.mdx`) may contain emoji **if the user14 asked for them** — don't add emoji proactively even there.15- **Every other file type** (source code, YAML/JSON/TOML config, shell/PS116 scripts, Dockerfiles, CI configs, etc.) must contain **no emoji17 characters** at all — including in comments, log messages, string18 literals, and commit messages/PR titles (these aren't files, but the same19 rule applies).20- Why: emoji can break strict-encoding parsers, inflate diffs with21 multi-byte sequences, misrender in some terminals/log viewers, and are22 inconsistent with this project's style.23- Before finalizing a non-`.md` file you wrote/edited, scan for emoji (common24 ranges: `U+1F300`–`U+1FAFF`, `U+2600`–`U+27BF`, `U+2190`–`U+21FF` arrows25 used decoratively, variation selectors `U+FE0F`). If found, replace with26 plain text (e.g. `[OK]`/`[FAIL]` instead of check/cross emoji, `->` instead27 of arrow emoji) or remove entirely.2829## 2. YAML files end with a trailing newline3031- Every `.yml`/`.yaml` file must end with exactly one `\n` (the file's last32 byte is a newline, and there is no trailing blank line beyond it).33- This matches the POSIX "text file ends with a newline" convention, avoids34 `git diff` showing `\ No newline at end of file`, and satisfies35 `yamllint`'s `new-line-at-end-of-file` rule (the default in most CI lint36 jobs — see `ci-pipeline-debug`/`gitlab-pipeline-ops`).37- After writing/editing a `.yml`/`.yaml` file, verify:38 ```bash39 tail -c1 path/to/file.yml | od -c | head -1 # should show \n, not empty40 ```41 or in PowerShell:42 ```powershell43 $bytes = [System.IO.File]::ReadAllBytes("path/to/file.yml")44 $bytes[-1] -eq 10 # 10 = LF; should be True45 ```46- If missing, append a single newline — don't add multiple blank lines at47 end of file.4849## Scope5051These checks apply to files this skill's user is actively creating or52editing — don't do a repo-wide sweep reformatting unrelated files unless53asked. If a pre-existing file already violates one of these conventions and54you're touching it for an unrelated reason, fix the convention issue too55while you're there (it's a one-line change), but mention it briefly.