following-code-style

Enforces ESM, logging, naming, and SQL conventions when writing JavaScript in this repository.

2|1|Updated Jun 29, 2026
One-click install
npx skills add https://github.com/frederico-kluser/newsletter-crawler --skill following-code-style-frederico-kluser
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: following-code-style
Source: https://github.com/frederico-kluser/newsletter-crawler/tree/main/.agents/skills/following-code-style
Command: npx skills add https://github.com/frederico-kluser/newsletter-crawler --skill following-code-style-frederico-kluser

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? This repository has no linter, formatter, or type-checker configured, so code style rules exist only as prose. Without a shared reference, contributors and AI assistants can introduce inconsistent imports, scattered SQL, console logging, or forbidden dependencies like axios. ## Core Features & Use Cases - ESM and import conventions: Enforces import/export with "type":"module" and the node-core → third-party → local import order. - Logging and defensive parsing: Routes output through log/warn/errorLog helpers and requires fail-open try/catch around untrusted data (URLs, LLM JSON, HTML). - Centralized SQL and naming rules: Keeps all queries in the single stmts object in db.js and defines camelCase, SCREAMING_SNAKE, and _prefixed naming patterns. - Use Case: Before adding a new module under src/, load this Skill to confirm the import order, use got instead of axios, and place new queries in the stmts object rather than scattering db.prepare calls. ## Quick Start Review my new src/ module against the repo's code style conventions before I commit it.

Frequently Asked Questions about following-code-style

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I follow code style conventions in a JavaScript repo without a linter?

Mirror the file you are editing and apply the documented prose rules: ESM imports in node-core, third-party, local order, logging through util helpers, and SQL centralized in db.js. The conventions act as the enforcement layer since no linter or formatter is configured.

What import order should ESM modules use in Node.js projects?

Order imports as node-core modules with the node: prefix first, then third-party packages, then local modules. This repo uses "type":"module" with no bundler, so a stray CommonJS require fails at runtime.

Can I use axios for HTTP requests in this repository?

No, axios is banned due to a supply-chain incident documented in the README. All HTTP requests must go through the got library instead.

How should errors be handled when parsing external data in Node.js?

Wrap parsing of untrusted data such as URLs, LLM JSON, HTML, and robots.txt in try/catch and return null, false, or an empty array rather than throwing. Reserve throwing for genuinely unrecoverable internal bugs so one bad page cannot kill a long crawl.

Where should SQL queries live in a better-sqlite3 style project?

Keep all SQL in a single stmts object in db.js, using named @field parameters for writes and positional ? placeholders for simple reads. Do not scatter db.prepare calls across other modules.