Skip to content
Development
Command

/fec-init

Initialize frontend-craft project template, rules or downgrade instructions according to the current AI runtime.

From plugin
frontend-craft
2211 skills14 agents11 commands5 hooks
+1
> /plugin marketplace add bovinphang/frontend-craft
> /plugin install frontend-craft@frontend-craft

Command definition

fec-init.md
name: fec-init
description: Initialize frontend-craft project template, rules or downgrade instructions according to the current AI runtime.

Copy the project template provided by frontend-craft to the configuration directory corresponding to the runtime of the current project. Priority will be given to judging the runtime based on the existing configuration in the current directory; if it cannot be judged, it will be selected based on the tool the user is using.

Execution steps

1. Detect runtime:

  • Existence of `.claude/` or Claude Code plug-in environment → `claude`
  • `.codex/` or `AGENTS.md` exists → `codex`
  • Existence of `.openclaw/`, `OPENCLAW-CONFIG.md` or `openclaw.plugin.json` → `openclaw`
  • Existence of `.qoder/`, `.qoder/settings.json`, `.qoder/rules/` or `.qoder/skills/` → `qoder`
  • exists `.cursor/` → `cursor`
  • exists `.windsurf/` → `windsurf`
  • exists `.opencode/` → `opencode`
  • exists `.kilo/` → `kilo`
  • exists `.gemini/` or `GEMINI.md` → `gemini`
  • Exist `.github/copilot-instructions.md` or `.github/instructions/` → `copilot`
  • When `.trae/`, `.augment/`, `.codebuddy/`, `.clinerules` exist, they will be processed according to the corresponding runtime
  • When still unable to determine, ask the user for the runtime currently to be initialized.

2. Initialize by runtime, do not overwrite existing files without confirmation:

  • `claude`: Copy Claude templates, hooks, commands, agents, skills and shared rules to `.claude/`; if `.claude/CLAUDE.md` already exists, confirm first.
  • `codex`: Copy `templates/codex/AGENTS.md` to the project root (if it does not exist), `templates/codex/config.toml` to `.codex/config.toml`, shared rules to `.codex/rules/`; skills/agents should be taken care of by the CLI installation process.
  • `openclaw`: Copy `templates/openclaw/*.md` to the project root directory and commands/skills to `.openclaw/`; if the file already exists, confirm first.
  • `qoder`: Copy skills to `.qoder/skills/`, commands to `.qoder/commands/`, agents to `.qoder/agents/`, shared rules to `.qoder/rules/`, hook scripts to `.qoder/hooks/`, and generate or merge the hooks configuration of `.qoder/settings.json`.
  • `cursor`: Copy shared rules to `.cursor/rules/*.mdc`, retain the `fec-` skills directory; Note that Cursor does not support hooks of this plug-in.
  • `windsurf`: Copy commands to `.windsurf/workflows/`, shared rules to `.windsurf/rules/`, and skills to `.windsurf/skills/`.
  • `opencode` / `kilo`: Copy commands to `.opencode/command/` or `.kilo/command/`, and skills to the corresponding `skills/`; OpenCode can complement `.opencode/opencode.jsonc`.
  • `gemini`: Copy skills to `.gemini/extensions/frontend-craft/skills/`. If there is no `GEMINI.md`, it will be generated by rewriting the Claude template.
  • `copilot`: merge shared rules into `.github/instructions/frontend-craft.instructions.md`, commands into `.github/prompts/`.
  • `trae` / `cline`: Write only rules bundles, and make it clear that this is rules-only downgrade mode.
  • `antigravity` / `augment` / `codebuddy`: only install skills; output "This runtime currently has no commands/hooks native adaptation".

3. Under Claude runtime, copy the following template files from the plug-in's `${FRONTEND_CRAFT_ROOT}/templates/claude/` and `${FRONTEND_CRAFT_ROOT}/templates/shared/rules/` to `.claude/` in the project root directory:

  • `templates/claude/CLAUDE.md` → `.claude/CLAUDE.md`
  • `templates/claude/settings.json` → `.claude/settings.json`
  • `templates/shared/rules/fec-vue.md` → `.claude/rules/fec-vue.md`
  • `templates/shared/rules/fec-react.md` → `.claude/rules/fec-react.md`
  • `templates/shared/rules/fec-design-system.md` → `.claude/rules/fec-design-system.md`
  • `templates/shared/rules/fec-testing.md` → `.claude/rules/fec-testing.md`
  • `templates/shared/rules/fec-git-conventions.md` → `.claude/rules/fec-git-conventions.md`
  • `templates/shared/rules/fec-i18n.md` → `.claude/rules/fec-i18n.md`
  • `templates/shared/rules/fec-performance.md` → `.claude/rules/fec-performance.md`
  • `templates/shared/rules/fec-source-driven-development.md` → `.claude/rules/fec-source-driven-development.md`
  • `templates/shared/rules/fec-responsive-design.md` → `.claude/rules/fec-responsive-design.md`
  • `templates/shared/rules/fec-rendering-patterns.md` → `.claude/rules/fec-rendering-patterns.md`
  • `templates/shared/rules/fec-api-layer.md` → `.claude/rules/fec-api-layer.md`
  • `templates/shared/rules/fec-state-management.md` → `.claude/rules/fec-state-management.md`- `templates/shared/rules/fec-error-handling.md` → `.claude/rules/fec-error-handling.md`
  • `templates/shared/rules/fec-naming-conventions.md` → `.claude/rules/fec-naming-conventions.md`
  • `templates/shared/rules/fec-typescript.md` → `.claude/rules/fec-typescript.md`
  • `templates/shared/rules/fec-code-comments.md` → `.claude/rules/fec-code-comments.md`
  • `templates/shared/rules/fec-ci-cd.md` → `.claude/rules/fec-ci-cd.md`
  • `templates/shared/rules/fec-refactoring.md` → `.claude/rules/fec-refactoring.md`
  • `templates/shared/rules/fec-agent-workflow.md` → `.claude/rules/fec-agent-workflow.md`
  • `templates/shared/rules/fec-working-modes.md` → `.claude/rules/fec-working-modes.md`

4. Don’t just output a reminder after copying is complete. First check `package.json`, common framework configuration files and `.github/workflows/` in the project root directory, infer applicable rules, and then provide post-initialization configuration options to the user:

  • Recommendation: Automatically detect and tailor rules (default recommendation). The rules recommended to be retained and recommended to be removed are displayed based on the detection results. The user can modify the rule import section at the bottom of `.claude/CLAUDE.md` after confirmation.
  • Manually select rules to keep. List the copied rule files, let the user select the rules to keep, and then
Read more
@bovinphang
Ships withfrontend-craft

frontend-craft is a universal frontend plugin that brings the same opinionated engineering standards to all 15 AI coding assistants.

2256 skills14 agents6 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
22
Star history of bovinphang/frontend-craft on GitHub, a chart by star-history.com

Other commands on frontend-craft.

fec-debug

fec-debug

Command

Front-end problem diagnosis and repair: covering build failures, runtime errors, UI exceptions, and interface problems, using a…

fec-doc-sync

fec-doc-sync

Command

Sync README, docs, environment variables, scripts, API/routing/component descriptions and deployment instructions from code and…

fec-plan

fec-plan

Command

Unified front-end planning entrance - implementation/architecture plan or testing strategy. The implementation path is taken by…

fec-refactor

fec-refactor

Command

Execute controlled behavior-preserving frontend refactoring with small steps, verification, rollback, and proof reporting.

More commands from other plugins.

build
Auto-invoked

build

Command

Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.

@addyosmani@addyosmaniInstall Command