Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
One-time setup that gathers your project's design context and saves it to CLAUDE.md for future sessions.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
scripts/detect.mjs
1#!/usr/bin/env node23import fs from 'node:fs';4import path from 'node:path';5import { pathToFileURL, fileURLToPath } from 'node:url';67const __dirname = path.dirname(fileURLToPath(import.meta.url));8const candidates = [9path.join(__dirname, 'detector', 'detect-antipatterns.mjs'),10path.join(__dirname, '..', '..', 'cli', 'engine', 'detect-antipatterns.mjs'),11];12const detectorPath = candidates.find(p => fs.existsSync(p));1314if (!detectorPath) {15process.stderr.write('Error: bundled detector not found.\n');16process.exit(1);17}1819const { detectCli } = await import(pathToFileURL(detectorPath));2021await detectCli();22