Skip to content
Back to skills

Batch Regex Fix Import Syntax

ASecurity

Detect and fix mid-import blank-line syntax breaks across multiple files using line-based regex

  • 17 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 9, 2026
code-qualitypythonrefactoring

Security analysis

A100/100

Scanned September 9, 2026

npx -y skills add vamseeachanta/workspace-hub --skill batch-regex-fix-import-syntax --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Batch Regex Fix Import Syntax?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Batch Regex Fix Import Syntax
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vamseeachanta-batch-regex-fix-import-syntax/badge)](https://www.skillsdirectory.com/skills/vamseeachanta-batch-regex-fix-import-syntax)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: batch-regex-fix-import-syntax
description: Detect and fix mid-import blank-line syntax breaks across multiple files using line-based regex
version: 1.0.0
source: auto-extracted
extracted: 2026-04-10
metadata:
  tags: ["refactoring", "batch-fix", "regex", "imports", "python"]
---

# Batch Regex Fix for Mid-Import Syntax Breaks

When migrations introduce blank lines within multi-line imports (e.g., `import (\n\n` instead of `import (\n`), use a line-based sed/awk fixer instead of single-pass regex. First identify the pattern across all files with grep, then apply a simple line-aware regex that matches `^import (` followed by a blank line, replacing with `import (` on the next non-blank line. Test parse afterward with `python -m py_compile` or equivalent to verify all 995+ files are clean before committing.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…