@chromedevtools/devtools-imports
AConventions for importing code in Devtools to avoid build errors. Covers cross-module imports, internal imports, and the "import * as" requirement.
Install
agr install @chromedevtools/devtools-imports --target claudeWrites 1 file into .claude/skills/, pinned to git-4f2ead12.
- .claude/skills/devtools-imports/SKILL.md
Document
name: devtools-imports description: Conventions for importing code in Devtools to avoid build errors. Covers cross-module imports, internal imports, and the "import * as" requirement.
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/traceis the trace module.front_end/panels/timelineis 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.tsis the trace module's entrypointfront_end/models/trace/ModelImpl.tsis 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.
Trustgrade A
- passBody integrity
Whether the stored document is plausibly the kind of file the artifact declares, rather than something fetched by mistake.
- passType matchnot applicable to this artifact type
Whether the artifact is really the kind of thing its metadata claims it is.
- passFreshness
How long since the source repository was last pushed to.
- passPrompt injection
Scans the artifact's own text for instructions aimed at your agent rather than at you.
- passLicense
Whether the source repository declares an SPDX license permissive enough to redistribute.
How the grade is calculated
Each check contributes 0 points when it passes, 1 when it warns, and 2 when it fails. The total maps to a letter:
- Aevery check passed
- Bone warning
- Ctwo warnings
- Dprompt injection or body integrity failed, or three warnings
- Fone of those failed, and something else is wrong
These are automated hygiene checks, not a security audit, and not a dependency or vulnerability scan. A grade of A means nothing was flagged — not that the artifact is safe.
Versions
git-4f2ead126a8c2026-07-31