batch-regex-fix-import-syntax
Detect and fix mid-import blank-line syntax breaks across multiple files using line-based regex
Best use case
batch-regex-fix-import-syntax is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Detect and fix mid-import blank-line syntax breaks across multiple files using line-based regex
Teams using batch-regex-fix-import-syntax should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/batch-regex-fix-import-syntax/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How batch-regex-fix-import-syntax Compares
| Feature / Agent | batch-regex-fix-import-syntax | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Detect and fix mid-import blank-line syntax breaks across multiple files using line-based regex
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# 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.
Related Skills
python-import-path-mismatch-debugging
Diagnose and fix ModuleNotFoundError when a package is installed but imports still fail due to environment/path mismatches
python-import-path-debugging
Diagnose ModuleNotFoundError when a package is installed but still fails to import
diagnose-venv-shebang-import-errors
Debugging pattern for ModuleNotFoundError when CLI entry points use wrong Python interpreter
diagnose-shebang-virtualenv-import-errors
Debugging pattern for ModuleNotFoundError when CLI entry points use wrong Python interpreter
diagnose-shebang-venv-import-errors
Troubleshoot ModuleNotFoundError in CLI tools by identifying shebang-venv mismatches
batch-syntax-repair-from-injection-errors
Detect and fix systematic syntax errors caused by line-injection scripts that split multiline constructs
batch-syntax-fix-with-regex-line-based-fallback
Fix repeated syntax errors across many files using regex, then fall back to line-based parsing when regex fails
batch-syntax-fix-regex-iteration
Iteratively fix widespread syntax errors across many files using regex refinement when initial patterns fail
batch-syntax-fix-pattern
Identify and repair cascading import/syntax errors across multiple files using regex-based line-scanning and verification
diagnose-stale-pycache-import-mismatch
Diagnose Python ImportError cases where a symbol cannot be imported even though the source file already defines it; verify live source, interpreter/venv selection, clear stale __pycache__, and rerun targeted imports/tests.
closure-first-overnight-batch
Run a high-leverage overnight batch by clearing stale-open approved issues first, converting shared blockers into tracked issues, and reserving only one lane for true implementation.
workspace-hub-batch-issue-execution
Deprecated alias for gh-work-execution.