smart-file-writer

smart-file-writer is a skill for Claude Code, Codex from foryourhealth111-pixel/Vibe-Skills. It costs 55 tokens per session (2,575 once invoked), scanned C, original, Apache-2.0.

A helper for diagnosing file-writing failures before trying the operation again. It checks problems such as permissions, disk space, path length, and locked files.

In plain words
What is it for?
It is for troubleshooting failed file writes in scripts and command-line tools, within the limits of the operating system and storage environment.
Why use it?
It replaces repeated blind retries with checks that explain why a file cannot be created or changed.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Claude Code.

Good fit It is for troubleshooting failed file writes in scripts and command-line tools, within the limits of the operating system and storage environment.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/foryourhealth111-pixel/vibe-skills/smart-file-writer
About the project

Vibe-Skills is a collection and routing system that helps AI agents discover, select, and coordinate specialized skills for completing tasks. It is intended for agents that need to organize workflows across many installed capabilities. The catalogue entries are skills and an agent belonging to this system.

foryourhealth111-pixel/Vibe-Skills · 3,252 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add foryourhealth111-pixel/Vibe-Skills --skill smart-file-writer
Clone the repo
git clone --depth 1 https://github.com/foryourhealth111-pixel/Vibe-Skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for smart-file-writer

README.md
[![agentmods](https://agentmods.dev/badge/skills/foryourhealth111-pixel/vibe-skills/smart-file-writer/github.svg)](https://agentmods.dev/skills/foryourhealth111-pixel/vibe-skills/smart-file-writer)
Your own site
<a href="https://agentmods.dev/skills/foryourhealth111-pixel/vibe-skills/smart-file-writer"><img src="https://agentmods.dev/badge/skills/foryourhealth111-pixel/vibe-skills/smart-file-writer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for smart-file-writer

Your own site · 80×15
<a href="https://agentmods.dev/skills/foryourhealth111-pixel/vibe-skills/smart-file-writer"><img src="https://agentmods.dev/badge/skills/foryourhealth111-pixel/vibe-skills/smart-file-writer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,575 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Prompt Injection · line 27
    This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.
    Fix: Remove or rewrite any text that instructs the agent to ignore prompts, override safety rules, or trust unverified content. Ensure skill content cannot be injected to alter agent behavior.
  • high YARA Match · line 27
    YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).
    Fix: Remove offensive tool references and exploit code. Legitimate agent skills should not contain penetration testing tools, exploit frameworks, or reconnaissance utilities.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00055 $0.02575
Opus 5 $0.00028 $0.01288
Sonnet 5 $0.00011 $0.00515
Haiku 4.5 $0.00006 $0.00258

Measured 9d ago against content hash ac3b589e8211, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade C, and why

smart-file-writer scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/validate.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Instruction-override phrasinghighPrompt injection

Text telling the model to disregard its earlier instructions or safety rules is the shape of a prompt injection, whoever wrote it.

- Bypass security policies or antivirus software
bundled/skills/smart-file-writer/SKILL.md · 394 lines

How it starts

The opening of the file, as written. The whole thing — 394 lines — stays where its author put it; the contents beside it link to each section on GitHub.

smart-file-writer Skill

Automatically diagnoses and resolves file write errors through systematic investigation rather than blind retries. Prevents common write failures proactively.

When to Use This Skill

Use this skill when any of these occurs:

  • "Error writing file" messages
  • "Permission denied" or "Access denied" errors
  • "No space left on device" errors
  • "File exists" conflicts
  • "Path too long" errors (Windows)
  • "Read-only file system" errors
  • Any file write operation failure (Python, CLI, any language)
  • Before critical file writes (proactive mode)

Not For / Boundaries

This skill does NOT:

  • Handle network file system issues (NFS, SMB) beyond basic diagnostics
  • Modify system-level permissions without user confirmation
  • Bypass security policies or antivirus software
  • Handle database write operations (different error domain)

Required inputs:

  • Target file path
  • Intended operation (write, append, create, etc.)
  • Error message (if reactive mode)

Quick Reference

Diagnostic Checklist (Run Before Retry)

1. Path Validation

import os
# Check path length (Windows: 260 char limit)
if len(filepath) > 260 and os.name == 'nt':
    print(f"Path too long: {len(filepath)} chars")

# Check parent directory exists
parent = os.path.dirname(filepath)
if not os.path.exists(parent):
    print(f"Parent directory missing: {parent}")

2. Permission Check

import os
# Check directory write permission
parent = os.path.dirname(filepath) or '.'
if not os.access(parent, os.W_OK):
    print(f"No write permission: {parent}")

# Check file permissions if exists
if os.path.exists(filepath):
    if not os.access(filepath, os.W_OK):
        print(f"File not writable: {filepath}")

3. Disk Space Check

import shutil
# Check available disk space
stat = shutil.disk_usage(os.path.dirname(filepath) or '.')
free_gb = stat.free / (1024**3)
if free_gb < 0.1:  # Less than 100MB
    print(f"Low disk space: {free_gb:.2f} GB free")

Read the full file on GitHub · 394 lines

Files

What ships with it

7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 394 lines · 55 tokens per session scan C ac3b589e8211

Subscribe to this mod's changes

smart-file-writer is a skill published in the GitHub repository foryourhealth111-pixel/Vibe-Skills (3,252 stars, last pushed 12d ago), licensed Apache-2.0. It adds 55 tokens to every session and 2,575 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it C with 1 finding (instruction-override phrasing). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.