Set up Prettier in a project using `@jabraf/dev`'s shared base config. Load when the user asks to add Prettier, set up code formatting, configure `.prettierrc`, or wire up `@jabraf/dev` Prettier specifically. Do not load for general formatter questions unrelated to `@jabraf/dev`.
Ships in jabraf-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
jabraf-prettierAdds Prettier to the current project by re-exporting basePrettierConfig from
@jabraf/dev. Prose-only — no
helper scripts. You (the agent) run the commands, read the file system, and
confirm with the user before any irreversible step.
The canonical setup snippet lives in
packages/jabraf-dev/README.md.
If this file and the README disagree, trust the README.
Load when the user's prompt mentions any of:
.prettierrc", "prettier.config", "prettier setup"@jabraf/dev Prettier", "jabraf prettier"Do not load for general "format my code" requests that don't imply Prettier or
@jabraf/dev. Do not load alongside jabraf-dev-setup — the umbrella skill
will invoke this one.
Each numbered step is one agent message. Steps marked [wait for user] require a user response before continuing.
Brief acknowledge. One sentence: "I'll add Prettier via @jabraf/dev.
That's: detect package manager, install the dep if missing, write
.prettierrc.mjs, add format:check / format:fix scripts, validate. Proceed?"
[wait for user]
Detect package manager. Look for the lockfile in the project root:
pnpm-lock.yaml → pnpm, yarn.lock → yarn, package-lock.json → npm. If
none exist, default to npm and mention it. If multiple exist, ask the user
which to use. [wait for user if ambiguous]
Detect existing config. Check for any of .prettierrc, .prettierrc.{js,cjs,mjs,mts,json,yaml,yml,toml}, prettier.config.{js,cjs,mjs,mts}, or a prettier field in package.json. If found, show the file contents (or the field) and ask: "An existing Prettier config was found. Replace with the @jabraf/dev re-export, leave it alone, or keep both side by side?" [wait for user] Never overwrite silently.
Install @jabraf/dev if missing. Check package.json dependencies and devDependencies. If @jabraf/dev is absent, install it as a dev dep using the detected package manager:
npm install --save-dev @jabraf/devyarn add --dev @jabraf/devpnpm add --save-dev @jabraf/devInstall at latest (no pin) per the skill repo policy. If already installed, skip.
Write the config. Default to .prettierrc.mjs at the project root with this exact body:
import basePrettierConfig from '@jabraf/dev/prettier';
export default basePrettierConfig;
If the project's package.json has "type": "commonjs" or no type field and the user prefers a CommonJS-only setup, offer the package.json field alternative instead:
{
"prettier": "@jabraf/dev/prettier",
}
Confirm the chosen variant before writing. [wait for user]
Add scripts. Add the following to package.json scripts, but only if the script key is absent — never overwrite an existing one. If the key exists with different content, show the diff and ask. [wait for user if conflict]
{
"scripts": {
"format:check": "prettier --check .",
"format:fix": "prettier --write .",
},
}
Validate. Run <pm> run format:check (e.g. npm run format:check). Report the outcome:
format:fix will rewrite N file(s) to match the base config — run it when you're ready."Final report. Print a short summary:
@jabraf/dev was installed or already presentpackage.json scripts without explicit confirmation.@jabraf/dev to a specific version — install at latest.format:fix as part of setup. Validation runs format:check (read-only) only..prettierrc.mjs (or the chosen variant) and package.json scripts.@jabraf/dev.| Situation | Action |
|---|---|
Project has no package.json | Stop. Ask the user to initialise the project first (npm init -y). |
package.json type field is missing and you wrote .prettierrc.mjs | Confirm Node can load it (Node ≥ 14 with .mjs works regardless of type). No change needed; mention this in the final report. |
Monorepo (workspaces field present) | Ask whether to add Prettier at the repo root, in a specific workspace, or both. [wait for user] Repeat steps 3–7 in the chosen location(s). |
Existing .prettierignore | Leave it alone. The @jabraf/dev base config does not ship a .prettierignore; the user's existing one stays in effect. |
@jabraf/dev already pinned to an older version | Ask whether to upgrade to latest. [wait for user] Do not auto-upgrade. |
| Network/install failure | Surface the package manager error verbatim and stop. Do not retry silently. |
@jabraf/dev Prettier docs: packages/jabraf-dev/README.md#prettier@jabraf/dev/prettier → ./dist/config/code-formatting/prettier.base.js (see packages/jabraf-dev/package.json exports map)basePrettierConfig) exports are available; the README's default-import form is the canonical recommendation.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
17 skills in this plugin
/jabraf-app-config-setupSet up `@jabraf/app-config` end-to-end in a project — install the runtime dep, scaffold `config/make-config.ts`, augment the `FeatureMap`, gitignore the generated artifact, add `prebuild`/`predev` scripts, wire the bootstrap `setConfig` call, and (React apps) mount the in-app `FeatureFlagsPanel` toggle UI. Load when the user asks to add app config, set up feature flags, configure `@jabraf/app-config`, wire `jabraf-config build`, or add a feature flags toggle panel / floating button./jabraf-commitlintSet up commitlint in a project using `@jabraf/dev`'s shared base (conventional commits). Load when the user asks to add commitlint, enforce conventional commits, configure `commitlint.config.js`, or wire up `@jabraf/dev` commitlint specifically. Do not load for general commit-message-quality questions unrelated to `@jabraf/dev`./jabraf-/jabraf-skills:jabraf-prettierfrom jabraf-skills
npx claudepluginhub jabranr/skills --plugin jabraf-skills