agentleFS
VelimirMuellerVelimirMueller/claude-skills/skills/frontend/clean-frontend-scaffolding/SKILL.md

clean-frontend-scaffolding

Skill7 starsChanged 17 days agoMITView on GitHub

Use when a freshly scaffolded Vite app still has the demo App, default styles, sample assets and placeholder title; reduces them to a minimal shell before real structure is added.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 3 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read .claude/stack-profile.md if present: frontend.framework (react | vue) decides the branch.

    line 10
  2. Distinctive:

    Look for the markers of the create-vite templates (Vite 8):

    line 12
  3. Distinctive:

    If none of these exist or match, exit early with: "Scaffold cleanup not needed — files appear customized."

    line 19
  4. Distinctive:

    All scaffold defaults present → full clean (proceed to step 3).

    line 23
  5. Very specific:

    Delete src/App.css; the reduced App.tsx no longer imports it, and nothing else does.

    line 54
  6. Very specific:

    Delete src/assets/ (hero.png, react.svg, vite.svg) and public/icons.svg (the demo's social-icon sprite).

    line 61
  7. Very specific:

    Update index.html <title> (Vite + React + TS) to the project name (ask via AskUserQuestion if unknown).

    line 62
  8. Very specific:

    Delete src/assets/ (hero.png, vite.svg, vue.svg), public/icons.svg and src/components/HelloWorld.vue.

    line 86
  9. Very specific:

    Update index.html <title> (Vite + Vue + TS) to the project name.

    line 87

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Clean Frontend Scaffolding

1. Audit current state

Read .claude/stack-profile.md if present: frontend.framework (react | vue) decides the branch; otherwise detect it from package.json (react or vue in dependencies). frontend.meta of nuxt or next → exit; those scaffolds have their own layout.

Look for the markers of the create-vite templates (Vite 8):

grep -l "assets/hero.png\|assets/react.svg\|assets/vue.svg\|HelloWorld\|Get started" src/App.* src/components/*.vue 2>/dev/null
grep -l "Vite + " index.html 2>/dev/null          # <title>Vite + React + TS</title>
ls src/assets src/App.css public 2>/dev/null       # hero.png, react.svg, vue.svg, vite.svg, favicon.svg, icons.svg

If none of these exist or match, exit early with: "Scaffold cleanup not needed — files appear customized."

2. Decide what to do

  • All scaffold defaults present → full clean (proceed to step 3).
  • Partially customized → remove only the default items still present.
  • Already customized → exit.

3. Purge boilerplate

React

  1. Reduce src/App.tsx to:

    export default function App() {
      return <div>App shell</div>;
    }
  2. Reduce src/main.tsx to a clean root render:

    import { StrictMode } from 'react';
    import { createRoot } from 'react-dom/client';
    import App from './App';
    import './index.css';
    
    createRoot(document.getElementById('root')!).render(
      <StrictMode>
        <App />
      </StrictMode>,
    );
  3. Delete src/App.css; the reduced App.tsx no longer imports it, and nothing else does.
  4. Replace src/index.css content with the Tailwind v4 import (v4 dropped the three @tailwind directives for a single @import):

    @import "tailwindcss";
  5. Delete src/assets/ (hero.png, react.svg, vite.svg) and public/icons.svg (the demo's social-icon sprite). Keep public/favicon.svg until the project has its own icon; it is the Vite logo.
  6. Update index.html <title> (Vite + React + TS) to the project name (ask via AskUserQuestion if unknown).

Vue

  1. Reduce src/App.vue to:

    <script setup lang="ts"></script>
    <template>
      <div>App shell</div>
    </template>
  2. Reduce src/main.ts to:

    import { createApp } from 'vue';
    import App from './App.vue';
    import './style.css';
    
    createApp(App).mount('#app');
  3. Replace src/style.css with the Tailwind v4 import only (see React step 4).
  4. Delete src/assets/ (hero.png, vite.svg, vue.svg), public/icons.svg and src/components/HelloWorld.vue. Keep public/favicon.svg until the project has its own icon.
  5. Update index.html <title> (Vite + Vue + TS) to the project name.

4. Verify

pnpm dev

Expected: dev server starts; visiting the app shows the empty shell with no console errors. Stop the server. pnpm build must also pass: it runs tsc -b/vue-tsc -b, which catches an import of a deleted asset.

References

  • ./boilerplate-removal.md — exact files and patterns per framework, with examples and anti-patterns.
  • ../_shared/conventions.md — path alias and source-root conventions.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.