Skip to content
ln-724-replit-cleaner logo

Ln 724 Replit Cleaner

ln-724-replit-cleaner

Removes all Replit artifacts from exported projects (configs, packages, code comments)

SKILL.md

Full skill instructions

ln-724-replit-cleaner

Type: L3 Worker Category: 7XX Project Bootstrap Parent: ln-720-structure-migrator

Completely removes Replit-specific artifacts from projects exported from Replit, preparing them for production deployment elsewhere.


Overview

AspectDetails
InputProject directory (Replit export)
OutputClean project without Replit dependencies
Duration~2-5 minutes
InvocationCalled from ln-720-structure-migrator or user-invocable

Artifacts Removed

CategoryArtifactsAction
Config Files.replit, replit.nix, .replit.nixDELETE
Directories.local/, .cache/, .upm/, .breakpointsDELETE
NPM Packages@replit/​vite-plugin-*REMOVE from package.json
Vite ConfigImports, plugins, REPL_ID checksMODIFY vite.config.ts
Custom Pluginsvite-plugin-meta-images.ts (Replit-specific)DELETE
Code Comments// @replit annotationsREMOVE
.gitignore.replit entryREMOVE line

Workflow

Phase 1: Scan
    |
    v
Phase 2: Preview
    |
    v
Phase 3: Confirm
    |
    v
Phase 4: Execute
    |
    +---> 4.1 Delete files/​directories
    +---> 4.2 Modify package.json
    +---> 4.3 Modify vite.config.ts
    +---> 4.4 Remove @replit comments
    +---> 4.5 Modify .gitignore
    |
    v
Phase 5: Verify & Report

Phase 1: Scan

Detect all Replit artifacts in the project.

Detection Rules

Files:
  - Glob: .replit, replit.nix, .replit.nix
  - Glob: vite-plugin-meta-images.ts (if uses REPLIT_* env vars)

Directories:
  - Glob: .local/, .cache/, .upm/, .breakpoints

Package.json:
  - Grep: "@replit/" in devDependencies

Vite Config:
  - Grep: "@replit/" imports
  - Grep: "REPL_ID" or "REPLIT_" environment checks

Code:
  - Grep: "// @replit" comments in *.tsx, *.ts, *.jsx, *.js

.gitignore:
  - Grep: "^\.replit$" line

Output Format

Scan Results:
  Files Found: 2
    - .replit (729 bytes)
    - vite-plugin-meta-images.ts (2333 bytes)

  Directories Found: 1
    - .local/ (6 files, 589KB)

  Package Dependencies: 3
    - @replit/​vite-plugin-cartographer
    - @replit/​vite-plugin-dev-banner
    - @replit/​vite-plugin-runtime-error-modal

  Vite Config Modifications: 4
    - Import: runtimeErrorOverlay
    - Import: metaImagesPlugin
    - Plugin: runtimeErrorOverlay()
    - Block: REPL_ID conditional (lines 14-24)

  Code Comments: 10
    - button.tsx: 5 comments
    - badge.tsx: 5 comments

  Gitignore Entries: 1
    - .replit

Phase 2: Preview

Show detailed preview of changes.

Will DELETE files:
  - .replit (729 bytes)
  - vite-plugin-meta-images.ts (2333 bytes)

Will DELETE directories:
  - .local/ (6 files, 589KB)

Will MODIFY files:
  - package.json: Remove 3 @replit/​* devDependencies
  - vite.config.ts: Remove 4 imports/​plugins/​blocks
  - client/​src/​components/​ui/​button.tsx: Remove 5 @replit comments
  - client/​src/​components/​ui/​badge.tsx: Remove 5 @replit comments
  - .gitignore: Remove ".replit" line

Summary: 2 files deleted, 1 directory deleted, 5 files modified

Phase 3: Confirm

Request user confirmation before making changes.

Proceed with Replit cleanup? [Y/​n]

Options:

  • Y (default): Execute cleanup
  • n: Cancel operation
  • Custom exclusions: User can specify files to skip

Phase 4: Execute

4.1 Delete Files and Directories

# Delete config files
rm -f .replit replit.nix .replit.nix

# Delete Replit-specific plugin
rm -f vite-plugin-meta-images.ts

# Delete Replit directories
rm -rf .local/ .cache/ .upm/ .breakpoints

4.2 Modify package.json

Remove from devDependencies:

{
  "devDependencies": {
    "@replit/​vite-plugin-cartographer": "^0.4.4",
    "@replit/​vite-plugin-dev-banner": "^0.1.1",
    "@replit/​vite-plugin-runtime-error-modal": "^0.0.4"
  }
}

Method: JSON parse, filter keys starting with @replit/, serialize.

4.3 Modify vite.config.ts

Remove imports:

// REMOVE
import runtimeErrorOverlay from "@replit/​vite-plugin-runtime-error-modal";
import { metaImagesPlugin } from "./​vite-plugin-meta-images";

Remove from plugins array:

// REMOVE
runtimeErrorOverlay(),
metaImagesPlugin(),

Remove REPL_ID conditional block:

// REMOVE entire block
...(process.env.NODE_ENV !== "production" &&
process.env.REPL_ID !== undefined
  ? [
      await import("@replit/​vite-plugin-cartographer").then((m) =>
        m.cartographer(),
      ),
      await import("@replit/​vite-plugin-dev-banner").then((m) =>
        m.devBanner(),
      ),
    ]
  : []),

4.4 Remove @replit Comments

Pattern: // @replit.*$

Files: **/​*.tsx, **/​*.ts, **/​*.jsx, **/​*.js

Method: Read file, remove lines containing // @replit, preserve indentation and structure.

4.5 Modify .gitignore

Remove line: .replit


Phase 5: Verify & Report

Final Report

Cleanup Complete!

Deleted:
  - .replit
  - vite-plugin-meta-images.ts
  - .local/ (6 files)

Modified:
  - package.json (removed 3 dependencies)
  - vite.config.ts (removed 4 imports/​plugins)
  - button.tsx (removed 5 comments)
  - badge.tsx (removed 5 comments)
  - .gitignore (removed 1 line)

Next Steps:
  1. Run `npm install` to update package-lock.json
  2. Run `npm run build` to verify build works
  3. Commit: git add . && git commit -m "chore: remove Replit artifacts"

Edge Cases

CaseHandling
No Replit artifacts foundReport "Project is clean" and exit
Project uses Webpack (not Vite)Search webpack.config.* instead
Project uses other bundlersSearch common config patterns
No package.jsonSkip NPM cleanup phase
Protected filesAsk user before modifying

Error Handling

ErrorAction
Permission deniedLog error, suggest chmod or admin rights
File in useRetry after delay, then warn user
JSON parse errorLog error, suggest manual fix
Vite config syntax errorLog error, suggest manual fix

Integration

With ln-720-structure-migrator

Called as first step before restructuring:

ln-720-structure-migrator:
  Phase 1: Detect project type
  Phase 2: Clean Replit artifacts (ln-724-replit-cleaner)  # THIS SKILL
  Phase 3: Restructure frontend (ln-721)
  Phase 4: Generate backend (ln-722)
  Phase 5: Migrate mock data (ln-723)

Standalone Usage

User: Clean my project from Replit
Claude: Invokes ln-724-replit-cleaner

References


Version: 1.0.0 Last Updated: 2026-01-10

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View