Back to list
levnikolaevich

ln-724-replit-cleaner

by levnikolaevich

Greate Claude Code skills collection. Production-ready skills that cover the full delivery workflow — from research and discovery to epic planning, task breakdown, implementation, testing, code review, and quality gates.

52🍴 12📅 Jan 23, 2026

SKILL.md


name: ln-724-replit-cleaner description: Removes all Replit artifacts from exported projects (configs, packages, code comments)

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

Score

Total Score

80/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

+10
人気

GitHub Stars 100以上

0/15
最近の活動

1ヶ月以内に更新

+10
フォーク

10回以上フォークされている

+5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

+5

Reviews

💬

Reviews coming soon