Support referencing an external repo's custom commands

Most organisations leverage poly-repos. This can create a lot of duplication of prompts when tuned for generalised workflows in multiple code bases (on different languages). It would be nice to be able to reference and reuse commands from other repos simply by referencing them in the config without duplicating the prompt configuration in each repo.

To take this concept a step further the ability to extend/override (and further customise) an existing prompt in from the other repo could be achieved with the example below; by simply adding the additional keys for prompt and context to “override” the external configuration.

For example, I would like to see something based on similar patterns used by terraform and other tools.

  "commit-message": {
    "description": "Commit message for current changes",
    "prompt": "My additional context to extend the external prompt",
    "external": {
       "source": "git@github.com/my-org/my-private-repo.git?ref=v1.0.0"
    },
    "context": {
      "command": "custom command for this repo"
    }
  },

Where ?ref= allows you to target a tag or sha of the external repo there by allowing you to:

  • test and validate prompts without impacting all users.
  • provide code owners and experts in those repos to upgrade on their own timelines
  • use a latest tag or main ref would always keep up to date

If I understand you correctly, you want to use a custom command over several repositories from a single workplace?

You can store the custom commands locally to the project’s workspace or global as user for all repositories opened in VSCode. It depends on where you save the custom command.