Legacy to ai ready

From nicepkg/ai-workflow · View interactive version

Legacy to ai ready is an AI agent skill from the GitHub repository nicepkg/ai-workflow. Transform legacy codebases into AI-ready projects with Claude Code configurations. Use when (1) analyzing old projects to generate AI coding configurations, (2) creating CLAUDE.md, skills, subagents, slash commands, hooks, or rules for existing projects, (3) user wants to enable vibe coding for a co

How to use this skill

Skill file

Legacy to AI-Ready

Transform legacy codebases into AI-ready projects by generating Claude Code configurations.

Quick Start (5-Minute Setup)

For most projects, start with just CLAUDE.md:

  1. Analyze: python scripts/analyze_codebase.py [path]
  2. Create CLAUDE.md with build commands, code style, architecture overview
  3. Done - Claude can now write code following your project's conventions

Expand to full configuration only when needed.

Interactive Discovery

Before generating configs, ask these questions:

Project Scope:

Pain Points:

Integration Needs:

Configuration Decision Tree

Start
│
├─ Small project / Solo dev
│  └─ CLAUDE.md only
│
├─ Team project
│  ├─ Multi-language? → Add .claude/rules/
│  ├─ Complex domain? → Add .claude/skills/
│  ├─ Code reviews? → Add .claude/agents/
│  └─ Repeated tasks? → Add .claude/commands/
│
└─ Enterprise / Large team
   └─ All configurations + MCP servers + Hooks

Generated Configurations

| Config | Purpose | When to Create |

|--------|---------|----------------|

| CLAUDE.md | Project memory (shared) | Always (required) |

| CLAUDE.local.md | Personal preferences (git-ignored) | Individual customization |

| .claudeignore | Files Claude should not access | Sensitive files exist |

| .claude/rules/ | Path-specific rules | Multi-module projects |

| .claude/skills/ | Domain knowledge | Complex business logic |

| .claude/agents/ | Task specialists | Repeated review/debug tasks |

| .claude/commands/ | Quick prompts | Common workflows |

| .claude/settings.json | Hooks + permissions | Auto-formatting, security |

| MCP servers | External tools | Database/API integrations |

Workflow

Phase 1: Automated Analysis

python scripts/analyze_codebase.py [project-path]

The script detects:

Output includes:

Phase 2: Context Gathering

Claude should read:

  1. 3-5 representative source files - understand naming, patterns
  2. Test files - understand testing approach
  3. Config files - package.json, tsconfig, etc.
  4. README/docs - project overview
  5. Recent commits - understand commit style

Phase 2.5: Discover Existing Resources

Before creating custom configs, search for existing skills and MCP servers:

  1. Search skill marketplaces - SkillsMP, SkillHub.club, Claude Skills Hub
  2. Check GitHub repositories - awesome-claude-skills, themed skill collections
  3. Find relevant MCP servers - Glama, MCP Market, official registry

See references/resource-discovery.md for complete directory of sources.

Tip: Many common needs (git commit, code review, database patterns) already have well-maintained skills available.

Phase 3: Generate Configurations

1. CLAUDE.md (Required)

Create at project root with:

See references/claude-md-patterns.md.

2. Rules (If Multi-Module)

Create .claude/rules/ when:

See references/rules-patterns.md.

3. Skills (If Complex Domain)

Create .claude/skills/ when:

See references/skills-patterns.md.

4. Subagents (If Specialized Tasks)

Create .claude/agents/ for:

See references/agents-patterns.md.

5. Commands (If Common Operations)

Create .claude/commands/ for:

See references/commands-patterns.md.

6. Hooks (If Auto-Formatting Needed)

Configure .claude/settings.json for:

See references/hooks-patterns.md.

7. MCP Servers (If External Integrations)

Configure MCP for:

See references/mcp-patterns.md.

Phase 4: Validate

  1. Ask Claude to perform a typical task
  2. Verify it follows project conventions
  3. Iterate based on gaps discovered

Output Structure

Minimal (small projects):

project/
├── CLAUDE.md
└── [existing files]

Standard (team projects):

project/
├── CLAUDE.md
├── .claude/
│   ├── rules/
│   │   └── code-style.md
│   └── commands/
│       └── commit.md
└── [existing files]

Complete (enterprise):

project/
├── CLAUDE.md              # Shared project memory
├── CLAUDE.local.md        # Personal (git-ignored)
├── .claudeignore          # Files to protect
├── .claude/
│   ├── settings.json      # Hooks + permissions
│   ├── rules/
│   ├── skills/
│   ├── agents/
│   └── commands/
└── [existing files]

Reference Materials

| Reference | When to Read |

|-----------|--------------|

| examples.md | Complete real-world examples |

| resource-discovery.md | Find existing skills & MCP servers |

| advanced-patterns.md | Migrations, team collab, monorepos |

| claude-md-patterns.md | Creating CLAUDE.md |

| rules-patterns.md | Module-specific rules |

| skills-patterns.md | Domain knowledge |

| agents-patterns.md | Task specialists |

| commands-patterns.md | Quick prompts |

| hooks-patterns.md | Auto-formatting |

| mcp-patterns.md | External tools |

Templates & Bundled Skills

Templates:

Bundled skills to install in target project:

Installing Bundled Skills

Copy these skills to the target project's .claude/skills/ directory:

cp -r assets/skill-creator [target-project]/.claude/skills/
cp -r assets/skill-downloader [target-project]/.claude/skills/
cp -r assets/resource-scout [target-project]/.claude/skills/

This enables the target project to:

  1. resource-scout - Discover existing skills & MCP servers before building custom
  2. skill-downloader - Download and install skills from GitHub or archives
  3. skill-creator - Create custom skills tailored to their domain

Language Quick Reference

TypeScript/JavaScript

Python

Go

Rust

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.