Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Workflow for merging a DevTools submodule into its parent module. Covers BUILD.gn consolidation and updating devtools_grd_files.gni.
.claude/skills/chromedevtools-merging-devtools-module/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-11 | ✗→✓ | ▲ Improved | -16% | 0% |
| case-01 | ✗→✓ | ▲ Improved | 6% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 25% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 18% | 0% |
| case-09 | ✗→✓ | ▲ Improved | -16% | 0% |
This document outlines the process for merging a submodule (e.g., panels/timeline/extensions) into its parent module (e.g., panels/timeline) within the DevTools build system. The goal is to simplify the build configuration by consolidating BUILD.gn files while keeping the original source file directory structure.
You will need the following information:
Read the contents of the BUILD.gn file from both the child module and the parent module. Identify the following from the child's BUILD.gn:
sources in the devtools_module.ts_deps (and non-TypeScript deps) in the devtools_module.entrypoint for the devtools_entrypoint("bundle").BUILD.gnEdit the BUILD.gn file in the parent module's directory to incorporate the child module's configuration.
sources from the child's devtools_module to the parent's sources list. Remember to maintain the relative path from the parent's directory (e.g., extensions/ExtensionUI.ts).ts_deps from the child's devtools_module to the parent's ts_deps list (and merge any non-TypeScript deps). Remove any duplicate entries.ts_deps list (e.g., remove ./extensions:bundle).BUILD.gnOnce the parent BUILD.gn is updated and contains all the necessary information, the child's BUILD.gn is no longer needed. Delete it.
bashrm <child_module_path>/BUILD.gn
devtools_grd_files.gniThe global .gni file that lists all resources needs to be updated to reflect that the child module is no longer a separate, bundled entrypoint.
config/gni/devtools_grd_files.gni.grd_files_bundled_sources list. This path usually corresponds to the child's entrypoint..ts) to the grd_files_unbundled_sources list.panels/timeline/extensions into panels/timelinepanels/timelinepanels/timeline/extensionspanels/timeline/BUILD.gn ModificationBefore:
gnidevtools_module("timeline") { sources = [ ... "UIDevtoolsUtils.ts", ] ts_deps = [ ... "./components:bundle", "./extensions:bundle", "./overlays:bundle", ... ] }
After:
gnidevtools_module("timeline") { sources = [ ... "UIDevtoolsUtils.ts", "extensions/ExtensionUI.ts", # Added from child ] ts_deps = [ ... "./components:bundle", # "./extensions:bundle", # Removed "./overlays:bundle", ... # Dependencies from extensions/BUILD.gn are merged here "../../../ui/components/helpers:bundle", "../../../ui/components/render_coordinator:bundle", "../../../ui/legacy:bundle", ] }
panels/timeline/extensions/BUILD.gn Deletionbashrm front_end/panels/timeline/extensions/BUILD.gn
config/gni/devtools_grd_files.gni ModificationBefore:
gnigrd_files_bundled_sources = [ ... "front_end/panels/timeline/components/components.js", "front_end/panels/timeline/extensions/extensions.js", "front_end/panels/timeline/overlays/overlays.js", ... ] grd_files_unbundled_sources = [ ... "front_end/panels/timeline/extensions/ExtensionUI.ts", # This might not have been present before ... ]
After:
gnigrd_files_bundled_sources = [ ... "front_end/panels/timeline/components/components.js", # "front_end/panels/timeline/extensions/extensions.js", # Removed "front_end/panels/timeline/overlays/overlays.js", ... ] grd_files_unbundled_sources = [ ... "front_end/panels/timeline/extensions/extensions.ts", # Added "front_end/panels/timeline/extensions/ExtensionUI.ts", # Added ... ]
After merging modules, you may still have remaining barrel files (e.g. index.ts or extensions.ts that just re-export other files). These should be removed to simplify the module structure.
Manually updating all imports that rely on these barrels can be tedious and error-prone. The tool unbarrelify can automate this process. It analyzes your codebase and replaces imports from barrel files with direct imports from the source files.
Usage: Follow the instructions in the unbarrelify repository to install and run the tool on your project. This is highly recommended to complete the refactoring process efficiently.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-11 | fail→pass | 19,897 | 7,411 | -63% | 1 | 1 | 0% | 2,245 | 1,897 | -16% | 0 | 0 | — |
case-01 | fail→pass | 24,363 | 16,169 | -34% | 1 | 1 | 0% | 3,363 | 3,551 | +6% | 0 | 0 | — |
case-02 | fail→pass | 23,391 | 17,610 | -25% | 1 | 1 | 0% | 3,305 | 4,147 | +25% | 0 | 0 | — |
case-03 | fail→pass | 19,435 | 13,760 | -29% | 1 | 1 | 0% | 2,718 | 3,212 | +18% | 0 | 0 | — |
case-04 | pass→pass | 22,488 | 16,264 | -28% | 1 | 1 | 0% | 3,108 | 4,685 | +51% | 0 | 0 | — |
case-05 | pass→pass | 25,710 | 22,812 | -11% | 1 | 1 | 0% | 3,379 | 4,262 | +26% | 0 | 0 | — |
case-06 | pass→fail | 19,551 | 20,663 | +6% | 1 | 1 | 0% | 2,460 | 4,175 | +70% | 0 | 0 | — |
case-07 | pass→pass | 31,436 | 9,592 | -69% | 1 | 1 | 0% | 2,015 | 2,249 | +12% | 0 | 0 | — |
case-08 | pass→fail | 17,308 | 7,954 | -54% | 1 | 1 | 0% | 2,161 | 1,976 | -9% | 0 | 0 | — |
case-09 | fail→pass | 21,777 | 9,405 | -57% | 1 | 1 | 0% | 2,689 | 2,261 | -16% | 0 | 0 | — |
case-10 | pass→pass | 13,592 | 8,623 | -37% | 1 | 1 | 0% | 1,284 | 1,984 | +55% | 0 | 0 | — |
case-12 | pass→pass | 10,946 | 7,701 | -30% | 1 | 1 | 0% | 1,013 | 1,852 | +83% | 0 | 0 | — |
case-13 | fail→fail | 17,009 | 8,638 | -49% | 1 | 1 | 0% | 1,757 | 2,044 | +16% | 0 | 0 | — |
case-14 | pass→pass | 18,098 | 9,827 | -46% | 1 | 1 | 0% | 1,889 | 2,235 | +18% | 0 | 0 | — |
case-15 | fail→pass | 16,004 | 7,050 | -56% | 1 | 1 | 0% | 2,369 | 1,787 | -25% | 0 | 0 | — |
case-16 | pass→pass | 13,965 | 7,691 | -45% | 1 | 1 | 0% | 1,637 | 1,982 | +21% | 0 | 0 | — |
case-17 | fail→pass | 16,023 | 10,733 | -33% | 1 | 1 | 0% | 1,989 | 2,619 | +32% | 0 | 0 | — |
case-18 | pass→pass | 15,199 | 8,459 | -44% | 1 | 1 | 0% | 1,750 | 2,160 | +23% | 0 | 0 | — |
case-19 | pass→pass | 19,097 | 12,269 | -36% | 1 | 1 | 0% | 2,279 | 2,740 | +20% | 0 | 0 | — |
case-20 | pass→pass | 14,038 | 9,707 | -31% | 1 | 1 | 0% | 1,415 | 2,278 | +61% | 0 | 0 | — |
case-21 | fail→pass | 18,166 | 8,106 | -55% | 1 | 1 | 0% | 1,859 | 1,916 | +3% | 0 | 0 | — |
case-22 | fail→pass | 14,380 | 7,391 | -49% | 1 | 1 | 0% | 1,347 | 1,890 | +40% | 0 | 0 | — |
case-23 | fail→pass | 22,470 | 10,853 | -52% | 1 | 1 | 0% | 2,908 | 2,523 | -13% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted. The headline lift of +35 percentage points is the difference between those two pass rates over the 23 comparable cases. 2 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
| Model | Method | Date | Lift |
|---|---|---|---|
| gemini-3.6-flash | verified | 8/10/2026 | +55% |
Other measured skills in the registry, with their headline benchmark lift.