Code Refactor

🌐Community
by unix2dos · vlatest · Repository

Converts Unix line endings to DOS in code files, ensuring compatibility across different operating systems.

Install on your platform

We auto-selected Claude Code based on this skill’s supported platforms.

1

Run in terminal (recommended)

terminal
claude mcp add unix2dos-code-refactor npx -- -y @trustedskills/unix2dos-code-refactor
2

Or manually add to ~/.claude/settings.json

~/.claude/settings.json
{
  "mcpServers": {
    "unix2dos-code-refactor": {
      "command": "npx",
      "args": [
        "-y",
        "@trustedskills/unix2dos-code-refactor"
      ]
    }
  }
}

Requires Claude Code (claude CLI). Run claude --version to verify your install.

About This Skill

What it does

This skill, unix2dos-code-refactor, automatically converts Unix-style line endings (LF) to DOS-style line endings (CRLF) within code files. This ensures compatibility across different operating systems and avoids issues with file interpretation when sharing or deploying code. The skill also performs basic code formatting and cleanup as part of the refactoring process.

When to use it

  • Cross-platform development: When working on a project that needs to be deployed on both Unix/Linux and Windows environments.
  • Code collaboration: When sharing code with colleagues who may be using different operating systems.
  • Git repository issues: To resolve line ending conflicts in Git repositories, particularly when contributors use different OSs.
  • Automated build processes: To ensure consistent file formatting during automated builds and deployments.

Key capabilities

  • Unix to DOS line-ending conversion (LF -> CRLF)
  • Basic code formatting
  • Code cleanup

Example prompts

  • "Refactor this Python script to use DOS line endings."
  • "Convert the line endings in my_project/main.cpp to Windows format and reformat the code."
  • “Fix the line ending issues in these files: file1.txt, file2.js, file3.py

Tips & gotchas

The skill assumes you want all line endings converted. Be mindful of potential unintended consequences if your project has specific reasons for using Unix-style line endings.

Tags

🛡️

TrustedSkills Verification

Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.

Security Audits

Gen Agent Trust HubPass
SocketPass
SnykPass

Details

Version
vlatest
License
Author
unix2dos
Installs
6

🌐 Community

Passed automated security scans.