Devtools Verification
Testing & Qualitydevtools-verificationDevtools Verification is an Agent Skill for testing & quality published in the ChromeDevTools/devtools-frontend repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
MANDATORY: Activate this skill ANY TIME you need to build the project, run tests, or verify code health in DevTools. You MUST use this skill before executing commands like npm test, npm run build, autoninja, or linters, as it contains critical, repository-specific instructions on how to correctly format these commands, filter test runs, and interpret failures.
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/ChromeDevTools/devtools-frontend/blob/HEAD/.agents/skills/verification/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/devtools-verification, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Instructions on how to verify your changes
Testing
- To test a file, you can run
npm run test -- <FILEPATH>whereFILEPATHis a path to a*.test.tsfile, relative to the working directory. - Test files are usually defined alongside their implementation. So if you are working on
front_end/panels/timeline/TimelinePanel.ts, you would expect the test file to be defined infront_end/panels/timeline/TimelinePanel.test.ts. - You can also test an entire directory. For example,
npm run test -- front_end/models/tracewill run all tests in that directory.
Building & compiling
- Check for build issues by running
autoninja -C out/Default.
Linting
npm run lintwill execute ESLint and StyleLint. It will report any violations and automatically fix them where possible.- To run the linter on a specific file or directory, you can run
npm run lint -- <PATH>wherePATHis a path to a file or directory. This will also automatically fix violations where possible.
Best practices
- Run tests often to verify your changes.
- Prefer using a fast build, if it exists, to keep the feedback loop shorter.
- Periodically build to check for errors.
- Run
git cl presubmit -uat the end of your code changes.