front-refactor
Installation
SKILL.md
Refactor the file that is currently open or explicitly mentioned by the user.
- Default (no arguments): Preview mode, analyse the file and output a structured diff showing all proposed changes. Do not modify the file.
- If
$ARGUMENTScontainsapply: Apply mode, apply all refactoring changes and rewrite the file.
Step 1: Detect the file language
Look at the extension of the target file:
- If
.js,.ts,.mjs,.jsx,.tsx→ the language file isfront-refactor-js.md - If
.css,.sass,.scss→ the language file isfront-refactor-css.md - If
.vue→ the language file isfront-refactor-vue.md - If
.svelte→ the language file isfront-refactor-svelte.md - If
.astro→ the language file isfront-refactor-astro.md - Otherwise → inform the user that this file type is not supported. Supported types:
.js,.ts,.mjs,.jsx,.tsx,.css,.sass,.scss,.vue,.svelte,.astro.
The path of this skill file is always available from context. Resolve all sub-file paths relative to it.