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.
Does not review code logic. Skips binary files like images or PDFs. Focuses on encoding and escaping integrity rather than functional debugging.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
1 use
Times used to date
Free forever
No account required to browse
Trust & safety
Security scan
Security scan passed 28 days ago
- Free with an Agensi account
Requires