$120 tested Claude codes · real before/after data · Full tier $15 one-timebuy --sheet=15 →
$Free 40-page Claude guide — setup, 120 prompt codes, MCP servers, AI agents. download --free →
clskills.sh — terminal v2.4 — 2,347 skills indexed● online
[CL]Skills_
Scaffoldingbeginner

EditorConfig Setup

Share

Create .editorconfig for consistent coding styles

Works with OpenClaude

You are a developer setting up project-wide code style consistency. The user wants to create a .editorconfig file that enforces uniform indentation, line endings, and formatting rules across all file types.

What to check first

  • Verify your project root directory — .editorconfig must be placed there
  • Check if your editor/IDE has EditorConfig plugin installed (most modern editors support it natively)
  • Run ls -la | grep editorconfig to confirm no .editorconfig file already exists

Steps

  1. Create a .editorconfig file in your project root using touch .editorconfig
  2. Define the root property with root = true to signal this is the top-level config (prevents searching parent directories)
  3. Add a wildcard section [*] for all files with base rules: charset, end_of_line, insert_final_newline, trim_trailing_whitespace
  4. Add language-specific sections: [*.js], [*.py], [*.json] with indent_size matching each language convention
  5. Set indent_style to either space or tab — spaces are standard for most projects (2 or 4 spaces typical)
  6. Add a [*.md] section and set trim_trailing_whitespace = false (markdown requires double-space line breaks)
  7. Include [Makefile] section with indent_style = tab (Makefiles require tabs, not spaces)
  8. Commit .editorconfig to version control so the entire team uses identical rules

Code

# EditorConfig helps maintain consistent coding styles
# across multiple developers and editors
# See https://editorconfig.org for documentation
root = true

# All files
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

# JavaScript/TypeScript
[*.{js,jsx,ts,tsx}]
indent_style = space
indent_size = 2
max_line_length = 100

# Python
[*.py]
indent_style = space
indent_size = 4
max_line_length = 88

# JSON
[*.{json,jsonc}]
indent_style = space
indent_size = 2

# YAML
[*.{yml,yaml}]
indent_style = space
indent_size = 2

# Markdown
[*.md]
indent_style = space
indent_size = 2
trim_trailing_whitespace = false

# Shell scripts
[*.{sh,bash}]
indent_style = space
indent_size = 2
end_of_line = lf

# Makefiles (MUST use tabs)
[Makefile]
indent_style = tab

# CSS/SCSS
[*.{css,scss,less}]
indent_style = space
indent_size = 2

# HTML
[*.{html,htm}]
indent_style = space
indent_

Note: this example was truncated in the source. See the GitHub repo for the latest full version.

Common Pitfalls

  • Treating this skill as a one-shot solution — most workflows need iteration and verification
  • Skipping the verification steps — you don't know it worked until you measure
  • Applying this skill without understanding the underlying problem — read the related docs first

When NOT to Use This Skill

  • When a simpler manual approach would take less than 10 minutes
  • On critical production systems without testing in staging first
  • When you don't have permission or authorization to make these changes

How to Verify It Worked

  • Run the verification steps documented above
  • Compare the output against your expected baseline
  • Check logs for any warnings or errors — silent failures are the worst kind

Production Considerations

  • Test in staging before deploying to production
  • Have a rollback plan — every change should be reversible
  • Monitor the affected systems for at least 24 hours after the change

Quick Info

CategoryScaffolding
Difficultybeginner
Version1.0.0
AuthorClaude Skills Hub
scaffoldingeditorconfigconsistency

Install command:

curl -o ~/.claude/skills/editorconfig-setup.md https://claude-skills-hub.vercel.app/skills/scaffolding/editorconfig-setup.md

Related Scaffolding Skills

Other Claude Code skills in the same category — free to download.

Want a Scaffolding skill personalized to YOUR project?

This is a generic skill that works for everyone. Our AI can generate one tailored to your exact tech stack, naming conventions, folder structure, and coding patterns — with 3x more detail.