ookami-coding-style-web

ookami team web frontend coding style conventions. Use this skill whenever writing, modifying, or reviewing JavaScript, JSX, SCSS, React components, hooks, selectors, containers, or frontend test files. Also use when the user asks about React component structure, Atomic Design conventions, CSS Modules, Prettier formatting, Airbnb style guide usage, file naming for .jsx/.js/.scss, or how to structure frontend tests with describe/it.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "ookami-coding-style-web" with this command: npx skills add ookamiinc/guides/ookamiinc-guides-ookami-coding-style-web

Web Coding Style

Follow these conventions when writing web frontend code. Full reference: https://github.com/ookamiinc/guides/blob/master/coding_style/web.md

General

Check Your Code

Run the linter before submitting:

yarn run lint

Code Formatting

Use Prettier for code formatting.

File Extensions

  • .js — standard JavaScript only (no JSX).
  • .jsx — files containing JSX.
  • .test.js — unit tests.
  • .test.e2e.js — end-to-end tests.
  • .worker.js — web workers.

Action Types

Define action type constants in SCREAMING_SNAKE_CASE:

const FOO_BAR = 'FOO_BAR';

Directory & Naming Conventions

src/components (Atomic Design)

atoms/FooBar/
  |- FooBar.jsx
  |- FooBar.scss
  |- index.js

src/containers

  • File name: FooBarContainer.jsx
  • Export name: FooBarContainer

src/hooks

  • File name: useFooBar.js
  • Hook name: useFooBar

src/selectors

  • File name: fooBar.js
  • Selector name: fooBarSelector

Tests

  • Use describe to group by function and condition.
  • Prefer it over test.

Example:

describe('Button', () => {
  it('renders button', () => {
    const { button } = setup(props);
    expect(button).toBeDefined();
  });

  it('calls onClick function', () => {
    const { button } = setup(props);
    fireEvent.click(button);
    expect(props.onClick).toHaveBeenCalledTimes(1);
  });

  it('matches its snapshot', () => {
    const { asFragment } = setup(props);
    expect(asFragment()).toMatchSnapshot();
  });
});

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

ookami-design-principles

No summary provided by upstream source.

Repository SourceNeeds Review
General

ookami-unit-testing

No summary provided by upstream source.

Repository SourceNeeds Review
General

ookami-coding-style-rails

No summary provided by upstream source.

Repository SourceNeeds Review