Normalize Line Endings
Documentsnormalize-line-endingsNormalize Line Endings is an Agent Skill for documents published in the sybrew/the-seo-framework repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Normalize text file line endings to LF on Windows after agent writes. Use when creating or editing tracked text files on Windows, when CRLF/LF endings are mentioned, or after Write/StrReplace on paths covered by .editorconfig or .gitattributes eol=lf rules.
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/sybrew/the-seo-framework/blob/HEAD/.cursor/skills/normalize-line-endings/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/normalize-line-endings, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Normalize Line Endings to LF
On Windows, agent Write and StrReplace tools often persist \r\n even when content uses \n. This repo requires LF via .editorconfig (end_of_line = lf) and .gitattributes (*.md, *.mdc, *.txt, etc. eol=lf).
When to run
After creating or editing any text file that must use LF created via Write or StrReplace, run normalization before finishing the task. Do this even when only one file changed.
Command
Run from the repo root. Paths below are relative to it.
powershell -NoProfile -ExecutionPolicy Bypass -File ".cursor\skills\normalize-line-endings\scripts\normalize-lf.ps1" ".cursor\rules\core.mdc" "lib\js\title.js"
If cwd may not be the repo root, resolve it first:
Set-Location (git rev-parse --show-toplevel)
powershell -NoProfile -ExecutionPolicy Bypass -File ".cursor\skills\normalize-line-endings\scripts\normalize-lf.ps1" ".cursor\rules\core.mdc"
To normalize every matching file under a directory:
powershell -NoProfile -ExecutionPolicy Bypass -File ".cursor\skills\normalize-line-endings\scripts\normalize-lf.ps1" -Recurse ".cursor"
Verify (optional)
python -c "from pathlib import Path; p=Path(r'PATH'); b=p.read_bytes(); print(p.name, 'CRLF' if b'\r\n' in b else 'LF')"
Rules
- Do not "fix" encoding issues beyond CRLF→LF and ensuring a final newline.
- Preserve UTF-8 without BOM unless the file already used BOM.
- Do not normalize binary files.