GitHub
Run Kodine from GitHub issues and pull requests.
Kodine plugs straight into your GitHub workflow. Drop /kodine or /oc into any comment, and Kodine picks the task up inside your own GitHub Actions runner.
The hosted GitHub app backend is in early access rollout. The
kodine github installflow and thekodine-agentGitHub app may not be available in all regions yet — the manual workflow setup below works today with any provider API key.
Features
- Triage issues: Have Kodine dig into an issue and break it down for you.
- Fix and implement: Hand a bug or feature request to Kodine. It does the work on a fresh branch and opens a PR containing the changes.
- Secure: Everything executes on your own GitHub runners.
Installation
From a project that lives in a GitHub repository, run:
kodine github installThe installer guides you through adding the GitHub app, generating the workflow file, and configuring secrets.
Manual Setup
Prefer to wire everything up yourself? That works too.
-
Install the GitHub app
Visit github.com/apps/kodine-agent and install it on the repository you want to automate.
-
Add the workflow
Commit the workflow below as
.github/workflows/kodine.ymlin your repository. Set a suitablemodeland supply whatever API keys your provider needs underenv..github/workflows/kodine.yml name: kodineon:issue_comment:types: [created]pull_request_review_comment:types: [created]jobs:kodine:if: |contains(github.event.comment.body, '/oc') ||contains(github.event.comment.body, '/kodine')runs-on: ubuntu-latestpermissions:id-token: writesteps:- name: Checkout repositoryuses: actions/checkout@v6with:fetch-depth: 1persist-credentials: false- name: Run Kodineuses: kodine-ai/kodine/github@latestenv:ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}with:model: anthropic/claude-sonnet-4-20250514# share: true -
Store the API keys in secrets
Open your organization or repository settings, expand Secrets and variables in the sidebar, choose Actions, and enter each required API key.
Configuration
-
model: Which model Kodine should run, written asprovider/model. This setting is required. -
agent: Which agent handles the request. Only primary agents are valid. When omitted, Kodine falls back todefault_agentfrom your config, or"build"if that is missing. -
share: Controls session sharing. Public repositories default to true. -
prompt: An optional prompt that replaces the built-in behavior, letting you shape how Kodine handles incoming requests. -
mentions: Comma-separated trigger phrases, matched case-insensitively. Defaults to/kodine,/oc. -
variant: A model variant selecting provider-specific reasoning effort, such ashigh,max, orminimal. -
oidc_base_url: Base URL of the OIDC token exchange API. Only relevant for custom GitHub App installations. Defaults tohttps://api.kodine.net. -
use_github_token: Whentrue, Kodine authenticates with a caller-suppliedGITHUB_TOKENrather than exchanging an OIDC token for a Kodine App installation token. Defaults tofalse.This mode lets you skip installing the Kodine GitHub App entirely. Supply the token via
envand grant whichever permissions your workflow requires:permissions:contents: writepull-requests: writeissues: writesteps:- uses: kodine-ai/kodine/github@latestenv:ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}with:model: anthropic/claude-sonnet-4-20250514use_github_token: trueBecause no OIDC exchange happens here,
id-token: writecan be omitted. A personal access token or a token from another GitHub App also works — save it as a secret and forward that secret throughGITHUB_TOKEN.
Supported Events
These GitHub events can kick off a Kodine run:
| Event Type | Triggered By | Details |
|---|---|---|
issue_comment | A comment added to an issue or PR | Include /kodine or /oc in the body. Kodine picks up the surrounding context and can branch, open PRs, or reply. |
pull_request_review_comment | An inline review comment on PR code | Use /kodine or /oc while reviewing. Kodine sees the file path, the line range, and the diff around it. |
issues | An issue being opened or edited | Runs Kodine automatically when issues appear or change. The prompt input is required. |
pull_request | A PR being opened or updated | Runs Kodine when PRs open, sync, or reopen — handy for automated reviews. |
schedule | A cron schedule | Runs Kodine periodically. The prompt input is required. Results land in logs and PRs (no issue to reply to). |
workflow_dispatch | Manual launch from the GitHub UI | Start Kodine on demand from the Actions tab. The prompt input is required. Results land in logs and PRs. |
Schedule Example
Set up a recurring Kodine run for automated maintenance tasks:
name: Scheduled Kodine Task
on: schedule: - cron: "0 9 * * 1" # Every Monday at 9am UTC
jobs: kodine: runs-on: ubuntu-latest permissions: id-token: write contents: write pull-requests: write issues: write steps: - name: Checkout repository uses: actions/checkout@v6 with: persist-credentials: false
- name: Run Kodine uses: kodine-ai/kodine/github@latest env: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} with: model: anthropic/claude-sonnet-4-20250514 prompt: | Review the codebase for any TODO comments and create a summary. If you find issues worth addressing, open an issue to track them.Scheduled runs have no comment to draw instructions from, so the prompt input is required. They also execute without a user context to authorize, which means the workflow itself must allow contents: write and pull-requests: write whenever Kodine should push branches or open PRs.
Pull Request Example
Let Kodine review every PR as it opens or receives updates:
name: kodine-review
on: pull_request: types: [opened, synchronize, reopened, ready_for_review]
jobs: review: runs-on: ubuntu-latest permissions: id-token: write contents: read pull-requests: read issues: read steps: - uses: actions/checkout@v6 with: persist-credentials: false - uses: kodine-ai/kodine/github@latest env: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: model: anthropic/claude-sonnet-4-20250514 use_github_token: true prompt: | Review this pull request: - Check for code quality issues - Look for potential bugs - Suggest improvementsOn pull_request events, Kodine falls back to a standard pull request review when no prompt is given.
Issues Triage Example
Triage incoming issues automatically. The example below skips accounts younger than 30 days as a spam guard:
name: Issue Triage
on: issues: types: [opened]
jobs: triage: runs-on: ubuntu-latest permissions: id-token: write contents: write pull-requests: write issues: write steps: - name: Check account age id: check uses: actions/github-script@v7 with: script: | const user = await github.rest.users.getByUsername({ username: context.payload.issue.user.login }); const created = new Date(user.data.created_at); const days = (Date.now() - created) / (1000 * 60 * 60 * 24); return days >= 30; result-encoding: string
- uses: actions/checkout@v6 if: steps.check.outputs.result == 'true' with: persist-credentials: false
- uses: kodine-ai/kodine/github@latest if: steps.check.outputs.result == 'true' env: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} with: model: anthropic/claude-sonnet-4-20250514 prompt: | Review this issue. If there's a clear fix or relevant docs: - Provide documentation links - Add error handling guidance for code examples Otherwise, do not comment.On issues events there is no comment to mine for instructions, so the prompt input is required.
Custom prompts
Supply your own prompt to shape how Kodine behaves inside a given workflow.
- uses: kodine-ai/kodine/github@latest with: model: anthropic/claude-sonnet-4-5 prompt: | Review this pull request: - Check for code quality issues - Look for potential bugs - Suggest improvementsThis comes in handy when you want consistent review criteria, house style rules, or a particular area of focus for your project.
Examples
A few ways to put Kodine to work on GitHub.
-
Explain an issue
Post this comment on a GitHub issue.
/kodine explain this issueKodine goes through the full discussion, comments included, and answers with a clear explanation.
-
Fix an issue
Write the following on a GitHub issue:
/kodine fix thisKodine then branches off, implements the fix, and opens a PR containing the work.
-
Review PRs and make changes
Drop a comment like this onto a GitHub PR.
Delete the attachment from S3 when the note is removed /ocKodine applies the change and pushes the commit straight onto that same PR.
-
Review specific code lines
Comment inline on specific lines from the PR’s “Files” tab. Kodine picks up the file, the line numbers, and the surrounding diff on its own, so answers stay precise.
[Comment on specific lines in Files tab]/oc add error handling hereInline comments hand Kodine:
- The precise file under review
- The highlighted lines of code
- The diff around those lines
- Line-number details
That means far more targeted requests, without typing out file paths or line numbers yourself.