Windows-Safe Source Edits
Prevent and repair silent file corruption, encoding errors, and broken regex escapes in Windows dev environments.
Free
Works with the AI Agents you already use
Windows-Safe Source Edits
Example session with this skill installed
I need to update the regex in my python scripts across the project. I'm on Windows using PowerShell. Make sure the backslashes don't break.
- Read your context and instructions
- Compiled the windows-safe source edits
I will update the regex patterns in your Python files. To prevent PowerShell from corrupting the backslashes or adding a UTF-8 BOM, I will use the internal editor tool for direct string replacement rather than a shell script. I will also run the byte-level validation script to confirm no control characters were introduced.
File Integrity Audit
| File | Status | Line Endings | BOM | Issues Found |
|---|---|---|---|---|
src/parser.py | Verified | LF | None | None |
src/utils/regex_helper.py | Fixed | LF | None | Found and removed 0x08 (Backspace) |
tests/test_parser.py | Verified | LF | None | None |
# Updated regex in src/parser.py
# The replacement was performed using direct string injection to preserve backslashes.
import re
def parse_logs(line):
# Safe edit: ensured \b remains two characters and not a backspace byte
pattern = re.compile(r'\b(ERROR|WARN)\b')
return pattern.findall(line)
Next steps
- Run
python scripts/check_text_files.py src/to perform a final byte-level sweep. - Execute one unit test that specifically exercises the
\bboundary logic. - If deploying to Linux, use
scpto move the files instead of piping viasshstdin.
Connects securely to your tools. The creator never sees your data.
About this skill
A regex that stops matching because \b became a backspace byte. Accents turned into é. A script that runs on the server but finds nothing because of an invisible BOM. These bugs compile, pass type-checks, and look fine on screen.
This skill teaches your agent the five rules that prevent them on Windows (PowerShell, Git Bash, SSH to Linux).
It also ships check_text_files.py, which detects control characters, BOMs, mixed line endings, mojibake and invalid UTF-8, and can repair mojibake after taking a backup.
Includes an EXPERT.md reference (exact parameters, thresholds, failure diagnosis). Tested script: scripts/check_text_files.py.
Note: the skill's own docs and its checker contain mojibake examples on purpose, so the checker flags them.
How to use
Skills on Agensi run inside your AI agent. Copy the prompt, paste it into your agent, and it connects to Agensi and installs this skill for you. If a payment is needed, your agent shows it to you first.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free forever
No account required to browse
Trust & safety
Security scanned
Verified clean today
- Free to download with an account
Requires