1b-project-structure-repair

Repair project structure by applying mechanical fixes from docs/todo.md findings.

Updated Mar 22, 2026
One-click install
npx skills add https://github.com/AgustinMadygraf/skills --skill 1b-project-structure-repair
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: 1b-project-structure-repair
Source: https://github.com/AgustinMadygraf/skills/tree/main/1b-project-structure-repair
Command: npx skills add https://github.com/AgustinMadygraf/skills --skill 1b-project-structure-repair

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Repair de estructura REACTIVO: lee docs/todo.md y ejecuta reparaciones basadas en hallazgos de 1a.

Core Features & Use Cases

  • Reactivo: no detecta violaciones por sí mismo. Lee docs/todo.md generado por $1a-project-structure-gate y ejecuta las reparaciones necesarias.
  • Reparaciones mecánicas: crea .gitkeep en directorios vacíos, sincroniza claves entre .env y .env.example, ordena imports, arregla docstrings y vacía init.py cuando no hay exports.
  • Flujo de uso: ejecutar primero $1a-project-structure-gate para detectar, luego $1b-project-structure-repair para reparar, y finalmente volver a verificar con $1a-project-structure-gate.
  • Notas de diseño: NO maneja violaciones de arquitectura; utiliza skills 2b/3b para layer-boundary y SOLID.

Quick Start

Ejecuta el script de reparación desde la raíz del repositorio: python ~/.codex/skills/1b-project-structure-repair/scripts/structure_repair.py --repo-root .

Frequently Asked Questions about 1b-project-structure-repair

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automatically fix project structure issues like empty directories and unordered Python imports?

To fix project structure issues automatically, run a reactive repair script that reads docs/todo.md and applies mechanical fixes like creating .gitkeep placeholders, syncing .env files, ordering Python imports, and cleaning docstrings.

Do I need to run a structure gate analysis before repairing my repository?

Yes, you must run a structure gate analysis first. The repair process is reactive and does not detect violations itself; it reads the findings from docs/todo.md generated by a prior gate analysis to execute the necessary fixes.

What is the best way to sync environment variables between .env and .env.example files?

The best way to sync environment variables is to run an automated structure repair script that reads gate findings from docs/todo.md and mechanically synchronizes keys between .env and .env.example files.

Can this automated repair handle architecture violations and layer boundary issues?

No, automated structure repair cannot handle architecture violations or layer boundary issues. It only performs mechanical fixes like gitkeep creation, import ordering, and env-sync; architectural issues require specialized layer-boundary and SOLID analysis skills.

How do I execute the Python script to clean up docstrings and empty __init__.py files?

To execute the Python script for cleaning docstrings and emptying non-essential __init__.py files, run the structure_repair.py module from the repository root using the --repo-root argument.

Why does my project structure repair script fail to detect missing .gitkeep files?

Project structure repair fails to detect missing .gitkeep files because it operates reactively. It relies entirely on pre-existing findings in docs/todo.md rather than proactively scanning the repository for structural violations.