From bun-agent
Audit ou migrate Node.js → Bun natif via le CLI n2b. TRIGGER when: user says 'migrate to bun', 'node to bun', 'bun-native', 'n2b audit', 'check for node patterns', 'rewrite to bun-native APIs', or asks about replacing fs/child_process/node-fetch with Bun equivalents. Also triggers after a major refactor where Node APIs are used.
npx claudepluginhub aphrody-code/bun-agentThis skill is limited to using the following tools:
Scan et réécrit automatiquement les usages Node legacy vers les APIs Bun natives. Binaire détecté via `$PATH`, jamais hardcodé.
Provides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
Retrieves current documentation, API references, and code examples for libraries, frameworks, SDKs, CLIs, and services via Context7 CLI. Ideal for API syntax, configs, migrations, and setup queries.
Scan et réécrit automatiquement les usages Node legacy vers les APIs Bun natives. Binaire détecté via $PATH, jamais hardcodé.
# Détection env (toujours en premier)
N2B="$(command -v n2b)" || { echo "n2b absent"; exit 1; }
PROJECT_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || echo "$PWD")"
REPORTS_DIR="${PROJECT_ROOT}/bun/reports"; mkdir -p "$REPORTS_DIR"
# Top findings
$N2B "$PROJECT_ROOT" --agent --report jsonl \
--ignore 'node_modules/**' --ignore '.next/**' --ignore 'dist/**' --ignore '**/generated/**' \
| tee "$REPORTS_DIR/n2b-baseline.jsonl" \
| jq -r '.rule_id' | sort | uniq -c | sort -rn | head
# Rapport MD lisible
$N2B "$PROJECT_ROOT" --report md > "$REPORTS_DIR/n2b-baseline.md"
# Safe (jamais sur tout le repo)
$N2B scripts/ --fix # cli/*, imports/node-prefix, ci/*, shebang/*, husky/*
# Aggressive (scope étroit, confirmation avant)
$N2B scripts/ --fix --aggressive # + api/* templateables (fs.readFileSync, Buffer, …)
cd "$PROJECT_ROOT"
bun install --frozen-lockfile
jq -e '.scripts.build' package.json > /dev/null && bun run build
jq -e '.scripts.lint' package.json > /dev/null && bun run lint
[ -f tsconfig.json ] && bun tsc --noEmit
--fix) : cli/* (40+ règles npm/pnpm/yarn/npx), imports/node-prefix (38 builtins), ci/setup-node, shebang/node, husky/*--aggressive) : api/fs-* → Bun.file/Bun.write, api/buffer-*, api/dirname-esm, api/sleep-promise, api/json-parse-readFileSync, imports/bun-native (partiel — seulement bun:*/node:*)api/execSync, api/exec, api/child-process-spawn, api/http(s)-createServer, api/crypto-createHash, api/buffer-from-base64api/process-env (portabilité SSR)Catalogue complet : ${CLAUDE_PLUGIN_ROOT}/docs/n2b/README.md ou $N2B rules --report md.
bun-explorerbun-reviewerbun-deployerbun-runner avec l'agent n2b$N2B <path>, jamais $N2B . en autofix--aggressive sur scope étroit uniquement (scripts/, utilities)--migrate : confirmation explicite obligatoire (supprime lockfiles rivaux)--no-verify**/generated/**, prisma/schema.prisma, lockfilesPour le workflow complet multi-phases → invoquer l'agent n2b via subagent_type: n2b.