Aller au contenu
Skillpedia
Tests13k · #11383

chrome-devtools-cli

Ce qu’il fait

Cette compétence fournit à l'agent IA un outil en ligne de commande qui pilote Chrome via DevTools. Elle s'adresse aux personnes qui veulent automatiser des tâches de navigateur ou tester un site web à partir de scripts.

Quand l’utiliser

  • ✓Quand vous voulez un script qui ouvre une page web, clique sur des boutons ou remplit des formulaires.
  • ✓Quand vous avez besoin d'un instantané d'une page pour trouver les éléments d'un test automatisé.
  • ✓Quand vous voulez vérifier le comportement d'une page web depuis le terminal.

Lien du skill

https://github.com/humanlayer/humanlayer/blob/main/.claude/skills/chrome-devtools-cli/SKILL.md

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/humanlayer/humanlayer/blob/main/.claude/skills/chrome-devtools-cli/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“Ouvre mon site dans Chrome, remplis le formulaire de contact et dis-moi s'il a été envoyé.”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

L'agent prend un instantané textuel de la page pour trouver chaque élément, puis clique ou saisit dessus. La session du navigateur reste ouverte entre les commandes, donc les étapes peuvent s'enchaîner.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis GitHub.

The chrome-devtools-mcp CLI lets you interact with the browser from your terminal.

Setup

Note: If this is your very first time using the CLI, see references/installation.md for setup. Installation is a one-time prerequisite and is not part of the regular AI workflow.

AI Workflow

  1. Execute: Run tools directly (e.g., chrome-devtools list_pages). The background server starts implicitly; do not run start/status/stop before each use.
  2. Inspect: Use take_snapshot to get an element <uid>.
  3. Act: Use click, fill, etc. State persists across commands.

Snapshot example:

uid=1_0 RootWebArea "Example Domain" url="https://example.com/"
  uid=1_1 heading "Example Domain" level="1"

Command Usage

chrome-devtools <tool> [arguments] [flags]

Use --help on any command. Output defaults to Markdown, use --output-format=json for JSON.

Input Automation (<uid> from snapshot)

chrome-devtools take_snapshot --help # Help message for commands, works for any command.
chrome-devtools take_snapshot # Take a text snapshot of the page to get UIDs for elements
chrome-devtools click "id" # Clicks on the provided element
chrome-devtools click "id" --dblClick true --includeSnapshot true # Double clicks and returns a snapshot
chrome-devtools drag "src" "dst" # Drag an element onto another element
chrome-devtools drag "src" "dst" --includeSnapshot true # Drag an element and return a snapshot
chrome-devtools fill "id" "text" # Type text into an input or select an option
chrome-devtools fill "id" "text" --includeSnapshot true # Fill an element and return a snapshot
chrome-devtools handle_dialog accept # Handle a browser dialog
chrome-devtools handle_dialog dismiss --promptText "hi" # Dismiss a dialog with prompt text
chrome-devtools hover "id" # Hover over the provided element
chrome-devtools hover "id" --includeSnapshot true # Hover over an element and return a snapshot
chrome-devtools press_key "Enter" # Press a key or key combination
chrome-devtools press_key "Control+A" --includeSnapshot true # Press a key and return a snapshot
chrome-devtools type_text "hello" # Type text using keyboard into a focused input
chrome-devtools type_text "hello" --submitKey "Enter" # Type text and press a submit key
chrome-devtools upload_file "id" "file.txt" # Upload a file through a provided element
chrome-devtools upload_file "id" "file.txt" --includeSnapshot true # Upload a file and return a snapshot

Navigation

chrome-devtools close_page 1 # Closes the page by its index
chrome-devtools list_pages # Get a list of pages open in the browser
chrome-devtools navigate_page --url "https://example.com" # Navigates the currently selected page to a URL
chrome-devtools navigate_page --type "reload" --ignoreCache true # Reload page ignoring cache
chrome-devtools navigate_page --url "https://example.com" --timeout 5000 # Navigate with a timeout
chrome-devtools navigate_page --handleBeforeUnload "accept" # Handle before unload dialog
chrome-devtools navigate_page --type "back" --initScript "foo()" # Navigate back and run an init script
chrome-devtools new_page "https://example.com" # Creates a new page
chrome-devtools new_page "https://example.com" --background true --timeout 5000 # Create new page in background
chrome-devtools new_page "https://example.com" --isolatedContext "ctx" # Create new page with isolated context
chrome-devtools select_page 1 # Select a page as a context for future tool calls
chrome-devtools select_page 1 --bringToFront true # Select a page and bring it to front

Emulation

chrome-devtools emulate --networkConditions "Offline" # Emulate network conditions
chrome-devtools emulate --cpuThrottlingRate 4 --geolocation "0,0" # Emulate CPU throttling and geolocation
chrome-devtools emulate --colorScheme "dark" --viewport "1920x1080" # Emulate color scheme and viewport
chrome-devtools emulate --userAgent "Mozilla/5.0..." # Emulate user agent
chrome-devtools resize_page 1920 1080 # Resizes the selected page's window

Performance

chrome-devtools performance_analyze_insight "1" "LCPBreakdown" # Get more details on a specific Performance Insight
chrome-devtools performance_start_trace true false # Starts a performance trace recording
chrome-devtools performance_start_trace true true --filePath t.gz # Start trace and save to a file
chrome-devtools performance_stop_trace # Stops the active performance t
Questions fréquentes

Dois-je configurer quelque chose au préalable ?

Oui. Une installation unique est nécessaire avant la première utilisation, comme décrit dans les notes de configuration de la compétence.

Puis-je obtenir la sortie sous forme de données ?

Oui. L'option de sortie JSON renvoie des résultats structurés au lieu de Markdown.

Pourquoi l'agent prend-il d'abord un instantané ?

L'instantané liste chaque élément avec un identifiant, dont l'agent a besoin pour cliquer sur cet élément ou le remplir.

Détails

Description originale de l’auteur

Use this to skill to write shell scripts or run shell commands to automate tasks in the browser or otherwise use Chrome DevTools via CLI.

repo: humanlayer/humanlayer

Popularité

Étoiles GitHub
13k
Position au classement
#11383
Licence
Apache-2.0
Mis à jour
31/10/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires