github / github/copilot-cli

Feature: Prompt injection hooks for model

Open
#1,023 0 comments 7 reactions 0 assignees View on GitHub
area:models area:plugins
Dominant language
Shell
Stars
11.2k
Forks
1.9k
Avg merge
14h 16m
Merged PRs (30d)
6

Description

## Description

Add support for hooks that can inject content into prompts before they're sent to the model.

## Use Case

Currently, hooks like user prompt submit hooks can only execute scripts. This feature request is for hooks that can:
- Inject custom commands into user prompts before submission
- Not just execute side-effect scripts, but actively modify/enhance the user's prompt
- Inject context, instructions, or commands into the model request

## Example

A hook that could automatically inject environment-specific instructions or context into every prompt sent to the model, without requiring the user to manually type it each time.

## Benefits

- Automate prompt enhancement and context injection
- Create reusable prompt templates and patterns
- Enforce prompt standards across teams
- Enhance model responses with injected context

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.