⏳ This skill is pending AI review.
Scores will appear once the review pipeline completes.
authoring-code-safely
Write and edit source files with Write/Edit, never through bash heredocs or python -c string surgery. Use when creating or modifying any code file. Prevents escaping corruption that silently breaks the file you just wrote.
Choose how to use this skill
You do not need every option. Choose the path your AI client supports. The stable page stays the same; versioned files are immutable.
1. Native installer
This listing has no registered native installer command. Use the complete package or source fallback below, depending on what your client supports.
Do not guess an installer command or replace an existing version without reviewing the diff.
2. Complete package recommended
Download the ZIP when available. It includes SKILL.md plus the references, security notes and version metadata.
No complete ProSkills package is published for this listing yet.3. Prompt-only
Copy the prompt above when the agent can read the stable page or when you want to adopt the workflow without installing a skill.
Need only the instruction file?
Download SKILL.md only if your client requires a single file. The complete ZIP is safer for a full installation because it preserves the references and release context.
No path installs or executes anything by itself. Your agent still needs access to the project files. Before updating, compare the installed version and review the diff.
// RATINGS
Not yet listed on ClawHub or SkillsMP
// README
authoring-code-safely
Write and edit source files with Write/Edit, never through bash heredocs or python -c string surgery. Use when creating or modifying any code file. Prevents escaping corruption that silently breaks the file you just wrote.
A skill for Claude Code. The skill itself is SKILL.md in this folder, 784 words. This page is the summary; the file is what the agent reads.
What it does
In one session, heredocs turned "\n" into literal newlines, python -c mangled a regex escape, and an unquoted heredoc let the shell run backticked names as commands, deleting text from four files while this very skill was being written. Source files are written with Write and Edit, never through bash string surgery.
Inside the skill
Sections of SKILL.md:
- What actually went wrong (2026-08-20/21, one session)
- The rule, concretely
- The one exception, and its guard
- Before you run anything that writes
- After you write
- Related skills
When the agent should load it
Write and edit source files with Write/Edit, never through bash heredocs or python -c string surgery. Use when creating or modifying any code file. Prevents escaping corruption that silently breaks the file you just wrote.
Dates recorded inside the skill, each one an incident it was written from: 2026-08-20, 2026-08-21.
Install
Copy the folder into your Claude Code skills directory. It loads on the next session.
git clone https://github.com/gavin844/claude-code-skills.git
cp -r claude-code-skills/skills/authoring-code-safely ~/.claude/skills/
Or just the one file:
mkdir -p ~/.claude/skills/authoring-code-safely
curl -sL https://raw.githubusercontent.com/gavin844/claude-code-skills/main/skills/authoring-code-safely/SKILL.md -o ~/.claude/skills/authoring-code-safely/SKILL.md
Windows (PowerShell): the skills directory is $HOME\.claude\skills\authoring-code-safely; the same files go there.
Files
License
MIT, see the repository license. Written by Gavin Long with Claude Code, 2026.
// HOW IT'S BUILT
KEY FILES