Skip to content

Support configurable user-level discovery paths for agents, skills, hooks, and instructions #4622

Description

@btardif

Copilot CLI currently discovers shared user-level artifacts from fixed locations such as:

%USERPROFILE%\.agents

This is useful as a cross-tool default, but there is no supported way to relocate that discovery root for managed or XDG-style profile layouts.

COPILOT_CUSTOM_INSTRUCTIONS_DIRS only adds instruction directories. It does not provide equivalent discovery overrides for:

  • Agents
  • Skills
  • Hooks
  • Shared manifests or related metadata

COPILOT_HOME is not an appropriate substitute because it relocates broader Copilot application state, including sessions, databases, packages, caches, and lock files.

Requested behavior

Provide one or more documented environment variables or configuration settings for additional user-level discovery roots.

For example:

COPILOT_AGENT_DIRS
COPILOT_SKILL_DIRS
COPILOT_HOOK_DIRS
COPILOT_CUSTOM_INSTRUCTIONS_DIRS

Alternatively, support a unified root:

COPILOT_USER_CONFIG_DIR=C:\Users\<user>\.config\agents

with documented subdirectories:

agents\
skills\
hooks\
instructions\

Compatibility

The existing %USERPROFILE%\.agents location should remain a default discovery path. Configured paths should augment or override it through clearly documented precedence rules.

This would preserve the .agents interoperability convention while allowing:

  • Enterprise-managed profile layouts
  • XDG-style configuration separation
  • Portable development environments
  • Machines where the profile root should remain free of tool-owned directories

Related issues

This request is complementary to #4204: that issue proposes broader .agents discovery, while this issue requests a supported way to configure where that user-level discovery tree lives.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:agentsSub-agents, fleet, autopilot, plan mode, background agents, and custom agentsarea:configurationConfig files, instruction files, settings, and environment variablesarea:pluginsPlugin system, marketplace, hooks, skills, extensions, and custom agents

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions