Instructions for writing files larger than ~5KB without triggering Copilot CLI timeouts or shell security blocks. Mount this skill on any agent that writes prose chapters, JSON plans, memory files, outlines, or other large artifacts. Use whenever an agent's output could exceed 5KB, when a bash heredoc command is blocked by the shell security scanner, when you see 'Command blocked: contains dangerous shell expansion patterns', or when a file write times out mid-content. Also triggers on: 'timeout writing file', 'heredoc blocked', 'shell expansion error', 'file too large', 'write timed out', 'large output', 'sectioned write', 'append pattern'.
The Copilot CLI resets its timeout clock with each tool call. A single large write risks timeout — the tool call dies mid-content, your work vanishes, and you have to start over. Split large writes into multiple bash calls. Each call resets the clock. Five small writes that each succeed beats one massive write that dies halfway through.
Additionally, the CLI's shell security scanner blocks bash commands containing content that resembles shell expansion patterns, even inside single-quoted heredocs where bash wouldn't actually expand them. This means prose containing dollar signs, backticks, or brace patterns will get your heredoc command rejected before it executes. You need to know the workaround before you waste an attempt.
create tool. You're fine.create tool for initial content, then sequential edit tool calls to append sections. Or use Python file writes (see Section 2).cat << 'EOF'). The shell security scanner blocks content containing words like , dollar signs, backticks, and many other patterns that appear naturally in fiction prose. The and tools bypass the shell entirely and always work.killcreateeditAlways create files using the create tool or Python file writes. Never use bash heredocs.
The CLI shell security scanner inspects bash commands before executing them and blocks anything resembling shell expansion patterns — $, backticks, ${...}, and even ordinary English words like "kill" that overlap with shell commands. This happens inside single-quoted heredocs where bash wouldn't actually expand them. The scanner doesn't care about quoting; it sees the pattern and rejects the command.
New file:
create tool → path/to/output-file.md