Catalog
fauziyasin-s2m4qw/devtools-imports

fauziyasin-s2m4qw

devtools-imports

Conventions for importing code in Devtools to avoid build errors. Covers cross-module imports, internal imports, and the "import * as" requirement.

v1.0LATEST
NewUpdated Oct 20, 2026

Imports

This codebase follows a special convention for importing code that must be followed to avoid build errors.

In DevTools each folder of code is considered a module:

  • front_end/models/trace is the trace module.
  • front_end/panels/timeline is the timeline module.

Within each module there are multiple TypeScript files. The file that is named the same as the folder name is called the entrypoint.

  • front_end/models/trace/trace.ts is the trace module's entrypoint
  • front_end/models/trace/ModelImpl.ts is part of the implementation of the trace module.

Importing from another module

When you want to reuse code from other modules, you must import that module via its entrypoint. Imagine we are in front_end/panels/timeline/TimelinePanel.ts. This import is GOOD:

import * as Trace from '../models/trace/trace.js'; // import the entrypoint

This import is BAD because we import a file that is NOT the entrypoint:

import * as ModelImpl from '../models/trace/ModelImpl.js' // NEVER ALLOWED

Additionally, you must import using the import * as syntax.

import {ModelImpl, X, Y} from '../models/trace/trace.js'; // BAD
import * as Trace from '../models/trace/trace.js'; // GOOD

Importing from within the same module

If you are within the same module, it is OK to import from files directly rather than go via the entrypoint. You can also import specifically what you need.

For example, if you are editing front_end/models/trace/ModelImpl.ts this would be acceptable:

import {Foo} from './Foo.js'; // allowed because Foo.ts is in the same directory.

Overall Score

82/100

Grade

B

Good

Grades are signals, not a certification. Always review a skill yourself before use.

Safety

95

Quality

78

Clarity

88

Completeness

75

Summary

This skill documents TypeScript/JavaScript import conventions for a multi-module DevTools codebase, specifically the requirement to use "import * as" syntax when importing from other modules via their entrypoints. It provides clear examples of correct vs. incorrect import patterns and explains the distinction between cross-module and intra-module imports.

Detected Capabilities

code guidanceimport pattern documentationbuild convention reference

Trigger Keywords

Phrases that agents use to match this skill to user intent.

devtools import conventiontypescript module importscross-module code reuseentrypoint import patterndevtools codebase structure

Use Cases

  • Add code to DevTools codebase without build errors
  • Maintain consistent cross-module code reuse patterns
  • Import from TypeScript modules correctly
  • Understand DevTools module structure and dependencies
  • Avoid runtime failures from incorrect module imports

Quality Notes

  • Clear distinction between module vs. intra-module imports makes scope easy to understand
  • Concrete code examples (both correct and incorrect) aid comprehension and reduce ambiguity
  • Explanation of entrypoint concept establishes foundation for the import rules
  • Well-structured sections with descriptive headings guide the reader logically
  • Documentation is self-contained and requires no external context beyond basic TypeScript knowledge
  • Rule statements use strong language (GOOD, BAD, NEVER ALLOWED) which is clear but could be softened with more explanation of *why* these rules exist (e.g., circular dependency prevention, public API surface)
Model: claude-haiku-4-5-20251001Analyzed: Oct 20, 2026

Reviews

Add this skill to your library to leave a review.

No reviews yet

Be the first to share your experience.

Use fauziyasin-s2m4qw/devtools-imports in your dev environment

Command Palette

Search for a command to run...