About personalizing cloud sessions
You can use a dotfiles repository to give Copilot in the cloud your preferred instructions, reusable skills, and specialized agents across repositories. You can also use personal custom instructions to apply to every conversation you have on GitHub.com and GitHub Mobile. These personal customizations apply to your sessions, rather than configuring a repository for everyone who works in it.
Dotfiles personalization works only in cloud sandboxes. It does not apply to sessions that run on GitHub Actions.
Copilot uses the same dotfiles setting as GitHub Codespaces. You can configure it in either your personal Copilot > Cloud settings or your Codespaces settings. You do not need to create a codespace to use dotfiles with Copilot.
Personal custom instructions apply to every conversation you have with Copilot in the cloud, so Copilot always responds in your preferred language, tone, and style.
Examples of custom instructions you can add:
Always respond in Spanish.Use a helpful, collegial tone. Keep explanations brief, but provide enough context to understand the code.Always provide examples in TypeScript.
Se pueden aplicar varios tipos de instrucciones personalizadas a una solicitud enviada a Copilot. Las instrucciones personales tienen la máxima prioridad. Las instrucciones del repositorio vienen a continuación y, a continuación, las instrucciones de la organización se priorizan en último lugar. Sin embargo, se proporcionan todos los conjuntos de instrucciones pertinentes a Copilot.
Siempre que sea posible, intente evitar proporcionar conjuntos conflictivos de instrucciones. Si le preocupa la calidad de la respuesta, puede deshabilitar temporalmente las instrucciones del repositorio. Consulta Agregar instrucciones personalizadas del repositorio para GitHub Copilot.
Preparing your dotfiles repository
Your dotfiles repository must contain a .copilot directory at its root. If this directory is not present, Copilot does not install the repository's dotfiles.
Add the personal customizations you want to use to this directory. For example:
.copilot/
copilot-instructions.md
skills/
release-notes/
SKILL.md
agents/
reviewer.agent.md
These files use the same formats and home-directory locations as personal customizations for GitHub Copilot CLI. Use the following guides to write their contents:
| Customization | Location in your dotfiles repository | Guidance |
|---|---|---|
| Personal instructions | .copilot/ | Write guidance to apply across repositories, such as your preferred coding conventions or response style. See Adición de instrucciones personalizadas para GitHub Copilot CLI. |
| Personal skills | .copilot/ | Define repeatable workflows with instructions, scripts, and resources. See Adición de habilidades de agente para GitHub Copilot CLI. |
| Personal custom agents | .copilot/ | Define specialist agents with their own instructions and tools. See Creación y uso de agentes personalizados para GitHub Copilot CLI. |
Replace SKILL-NAME and AGENT-NAME with descriptive names for your skill and agent. The linked guides also describe CLI-specific commands, which are not required to set up your dotfiles repository.
Do not commit secrets or credentials to your dotfiles repository.
Enabling dotfiles for your cloud sessions
-
Create a dotfiles repository that you own on GitHub, or use an existing one.
-
Add a
.copilotdirectory at the root of the repository, with your personal customization files as described above. -
Commit and push your changes to the repository.
-
In your personal GitHub settings, under Copilot, click Cloud. Enable dotfiles and select your repository.
Alternatively, configure dotfiles in your Codespaces settings. Both settings pages share the same selection, so changing it also changes the dotfiles repository used for your codespaces.
-
Start a session in a cloud sandbox, or resume an existing cloud sandbox session. Where you can choose an environment, select Cloud, not Actions. For more information, see About cloud sandboxes for GitHub Copilot.
When the cloud sandbox is created or resumed, Copilot copies the contents of your dotfiles repository into the sandbox's home directory, making your personal customizations available under ~/.copilot.
How dotfiles are applied
If your dotfiles repository contains a root .copilot directory, Copilot copies the entire repository's contents, not just .copilot.
Unlike GitHub Codespaces, Copilot does not run dotfiles installation scripts such as install.sh or bootstrap.sh. Include your customization files directly in the repository rather than relying on a script to create them.
Changes to your dotfiles repository take effect the next time a cloud sandbox is created or resumed. They are not applied to a sandbox while it is running.
Adding personal custom instructions
To add personal custom instructions for Copilot in the cloud on GitHub:
-
Open a Copilot session.
-
In the bottom left menu, click .
-
Add natural language instructions to the text box.
Use any format. For example, a single block of text, each instruction on a new line, or instructions separated by blank lines.
-
Click Save.
Your instructions are now active and remain active until you change or remove them.
For a curated collection of examples of personal custom instructions, see Instrucciones personalizadas.