agentleFS
HarambeeAIHarambeeAI/bayes-ship/skills/coding-standards-ecc/SKILL.md

coding-standards-ecc

Skill1 starsChanged 7 months agoMITView on GitHub

Universal coding conventions for naming, readability, immutability, and code quality. Applies to TypeScript, JavaScript, React, and Node.js. Auto-invoked by the code-quality-reviewer during Stage 2 review. Source: everything-claude-code.

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 8 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Always use spread operator for updates.

    line 19
  2. Distinctive:

    Always type parameters and return values in TypeScript.

    line 36
  3. Distinctive:

    Use typed errors, not string messages.

    line 40
  4. Distinctive:

    Always log the original error before wrapping.

    line 42
  5. Distinctive:

    No circular imports. If two modules import each other, extract shared code.

    line 47
  6. Distinctive:

    Prefer named exports over default exports (better refactoring).

    line 48
  7. Distinctive:

    Test behavior, not implementation.

    line 52
  8. Distinctive:

    No direct mutation of objects or arrays?

    line 59

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Coding Standards

Baseline cross-project coding conventions. This is the shared quality floor for all code produced by Bayes Ship implementers.

Naming

  • Variables and functions: camelCase, descriptive. marketSearchQuery not q.
  • Functions: verb-noun pattern. fetchMarketData() not market().
  • Booleans: is/has/should prefix. isAuthenticated not flag.
  • Constants: UPPER_SNAKE_CASE. MAX_RETRY_COUNT.
  • Types/interfaces: PascalCase. InvoiceLineItem.

Immutability

Always use spread operator for updates. Never mutate directly.

// GOOD
const updated = { ...user, name: 'New Name' }
const newItems = [...items, newItem]

// BAD — never do this
user.name = 'New Name'
items.push(newItem)

Functions

  • Single responsibility. One function does one thing.
  • Maximum 20 lines. If longer, extract helpers.
  • Pure functions preferred (no side effects).
  • Always type parameters and return values in TypeScript.

Error handling

  • Use typed errors, not string messages.
  • Catch at the boundary (controller/route), not deep in business logic.
  • Always log the original error before wrapping.

Imports

  • Group: external libs → internal modules → types → styles.
  • No circular imports. If two modules import each other, extract shared code.
  • Prefer named exports over default exports (better refactoring).

Tests

  • Test behavior, not implementation.
  • Arrange-Act-Assert pattern.
  • Descriptive test names: "returns empty array when no invoices match filter" not "test filter".

Code review checklist (for Stage 2 reviewer)

  1. Naming follows conventions above?
  2. No direct mutation of objects or arrays?
  3. Functions under 20 lines?
  4. Error handling at boundaries?
  5. TypeScript types on all parameters and returns?
  6. Tests test behavior, not implementation details?

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.