fec-debug
Front-end problem diagnosis and repair: covering build failures, runtime errors, UI exceptions, and interface problems, using a unified diagnostic framework to…
Create a standard directory structure and template files for pages, features, or components according to project specifications. Usage: /fec-scaffold <type> <Name>, such as /fec-scaffold page UserDetail
> /plugin marketplace add bovinphang/frontend-craft > /plugin install frontend-craft@frontend-craft
How it fires
How this command gets triggered: by you, by Claude, or both.
/fec-scaffoldContext preview
What this command does when you run it.
Create a standard directory structure and template files for pages, features, or components according to project specifications. Usage: /fec-scaffold <type> <Name>, such as /fec-scaffold page UserDetail
name: fec-scaffold description: Create a standard directory structure and template files for pages, features, or components according to project specifications. Usage: /fec-scaffold <type> <Name>, such as /fec-scaffold page UserDetail
Create new pages, features or components according to the directory structure agreed upon by the project.
If this scaffolding involves adding or recommending `package.json` dependencies, follow the "version and dependency" conventions in the project `.claude/rules/fec-react.md` or `.claude/rules/fec-vue.md`; if there is no corresponding rule in the project, priority will be given to mainstream stable versions that are compatible with each other (align with official documents, scaffolding default values or package manager recommendations).
Parse two arguments from `$ARGUMENTS`:
If a parameter is missing, a usage example is prompted and the user is asked to add:
Usage: /fec-scaffold <type> <Name> Example: /fec-scaffold page UserDetail /fec-scaffold feature payment /fec-scaffold component DataTable
Check `package.json` for `dependencies`:
Check `src/`, `app/`, `pages/`, `features/`, `components/`, `__tests__/`, `tests/`, `vitest.config.*`, `jest.config.*`, `playwright.config.*` and existing component naming. Give priority to reusing existing directories of the project; only use the default path when there is no existing agreement:
If the target directory already exists, the user is prompted to confirm whether to continue.
Depending on the frame and type, create the following structures:
src/pages/<Name>/
├── <Name>Page.tsx
├── components/
│ └── .gitkeep
└── hooks/
└── .gitkeep`<Name>Page.tsx` Content:
export default function <Name>Page() {
return (
<div>
<h1><Name></h1>
</div>
);
}src/features/<name>/ ├── components/ │ └── .gitkeep ├── hooks/ │ └── .gitkeep ├── api.ts ├── types.ts ├── constants.ts └── index.ts
`index.ts` content:
export * from './types'; export * from './constants';
`api.ts` content (only import the corresponding client when the project already has `src/services/request.*`, `src/lib/request.*`, `src/api/client.*` or a similar API client; otherwise, keep the empty export to avoid creating non-existent alias dependencies):
export {};`types.ts` and `constants.ts` are created as empty files or minimally empty exports.
src/components/<Name>/
├── <Name>.tsx
├── <Name>.styles.css
└── __tests__/
└── <Name>.spec.tsx`<Name>.tsx` Content:
import './<Name>.styles.css';
interface <Name>Props {
children?: React.ReactNode;
}
export function <Name>({ children }: <Name>Props) {
return (
<div className="<name>">
{children}
</div>
);
}src/pages/<Name>/
├── <Name>Page.vue
├── components/
│ └── .gitkeep
└── composables/
└── .gitkeep`<Name>Page.vue` Content:
<script setup lang="ts">
</script>
<template>
<div>
<h1><Name></h1>
</div>
</template>
<style scoped>
</style>src/features/<name>/ ├── components/ │ └── .gitkeep ├── composables/ │ └── .gitkeep ├── api.ts ├── types.ts ├── constants.ts └── index.ts
`index.ts` content is the same as React.
src/components/<Name>/
├── <Name>.vue
└── __tests__/
└── <Name>.spec.ts`<Name>.vue` Content:
<script setup lang="ts">
interface Props {
}
const props = defineProps<Props>();
</script>
<template>
<div>
<slot />
</div>
</template>
<style scoped>
</style>After creation is completed, output:
frontend-craft is a universal frontend plugin that brings the same opinionated engineering standards to all 15 AI coding assistants.
Repo: bovinphang/frontend-craft
Front-end problem diagnosis and repair: covering build failures, runtime errors, UI exceptions, and interface problems, using a unified diagnostic framework to…
Sync README, docs, environment variables, scripts, API/routing/component descriptions and deployment instructions from code and project sources of truth.
Initialize frontend-craft project template, rules or downgrade instructions according to the current AI runtime.
Unified front-end planning entrance - implementation/architecture plan or testing strategy. The implementation path is taken by default; when the user clearly…
Identify and clean up front-end dead code, unused exports, outdated components, styles and dependencies under validation protection.
Build an ordered behavior-preserving frontend refactoring plan from evidence without editing business code.