title Using hooks with {% data variables.copilot.copilot_cli %} shortTitle Use hooks intro Extend {% data variables.product.prodname_copilot %} agent behavior with custom shell commands at key points during agent execution. versions feature copilot contentType how-tos category Author and optimize with Copilot Build with Copilot CLI redirect_from /copilot/how-tos/copilot-cli/use-hooks docsTeamMetrics copilot-cli {% data reusables.copilot.cloud-agent.hooks-intro %} Creating a hook in a repository on {% data variables.product.github %} {% data reusables.copilot.cloud-agent.create-hooks-instructions %} Troubleshooting {% data reusables.copilot.cloud-agent.troubleshoot-hooks %} Further reading AUTOTITLE AUTOTITLE AUTOTITLE AUTOTITLE AUTOTITLE