From 7f86fe3f6141bef31cdab166a60269143b78dcc5 Mon Sep 17 00:00:00 2001
From: Daniel Polito <danielbpolito@gmail.com>
Date: Thu, 4 Dec 2025 15:10:56 -0300
Subject: add optional prompt Input to Github Action (#4828)

Co-authored-by: Github Action <action@github.com>
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
---
 packages/web/src/content/docs/github.mdx | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

(limited to 'packages/web/src/content/docs/github.mdx')

diff --git a/packages/web/src/content/docs/github.mdx b/packages/web/src/content/docs/github.mdx
index 19c7782ef..b0e0397e1 100644
--- a/packages/web/src/content/docs/github.mdx
+++ b/packages/web/src/content/docs/github.mdx
@@ -82,6 +82,7 @@ Or you can set it up manually.
 
 - `model`: The model to use with opencode. Takes the format of `provider/model`. This is **required**.
 - `share`: Whether to share the opencode session. Defaults to **true** for public repositories.
+- `prompt`: Optional custom prompt to override the default behavior. Use this to customize how opencode processes requests.
 - `token`: Optional GitHub access token for performing operations such as creating comments, committing changes, and opening pull requests. By default, opencode uses the installation access token from the opencode GitHub App, so commits, comments, and pull requests appear as coming from the app.
 
   Alternatively, you can use the GitHub Action runner's [built-in `GITHUB_TOKEN`](https://docs.github.com/en/actions/tutorials/authenticate-with-github_token) without installing the opencode GitHub App. Just make sure to grant the required permissions in your workflow:
@@ -98,6 +99,25 @@ Or you can set it up manually.
 
 ---
 
+## Custom prompts
+
+Override the default prompt to customize opencode's behavior for your workflow.
+
+```yaml title=".github/workflows/opencode.yml"
+- uses: sst/opencode/github@latest
+  with:
+    model: anthropic/claude-sonnet-4-5
+    prompt: |
+      Review this pull request:
+      - Check for code quality issues
+      - Look for potential bugs
+      - Suggest improvements
+```
+
+This is useful for enforcing specific review criteria, coding standards, or focus areas relevant to your project.
+
+---
+
 ## Examples
 
 Here are some examples of how you can use opencode in GitHub.
-- 
cgit v1.2.3

