GitHub
Use OpenCtrlC in GitHub issues and pull requests.
OpenCtrlC runs inside your GitHub Actions runner. Mention /openctrlc or /oc in an issue or pull request comment, and it can explain the context, edit the checkout, and open a pull request.
What you need
- A GitHub repository with Actions enabled.
- Write permissions for
contents,issues, andpull-requests. - An API key for the provider and model you want to use.
OpenCtrlC does not require a GitHub App or an OpenCtrlC-hosted account. The workflow uses GitHub’s built-in GITHUB_TOKEN and your provider key.
Setup
Create .github/workflows/openctrlc.yml in the repository:
name: OpenCtrlC
on: issue_comment: types: [created] pull_request_review_comment: types: [created]
jobs: openctrlc: if: | contains(github.event.comment.body, '/oc') || contains(github.event.comment.body, '/openctrlc') runs-on: ubuntu-latest permissions: contents: write issues: write pull-requests: write steps: - name: Check out repository uses: actions/checkout@v6 with: fetch-depth: 1 persist-credentials: false
- name: Run OpenCtrlC uses: ponponon/openctrlc/github@latest env: GITHUB_TOKEN: ${{ github.token }} ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} with: model: anthropic/claude-sonnet-4-20250514 use_github_token: trueReplace the model and provider secret with the provider you use. Store provider API keys under Settings → Secrets and variables → Actions. Do not commit API keys to the repository.
The shortcut command can generate a starter workflow from a local checkout:
openctrlc github installThis command only writes the workflow file and prints the required secret names. It does not install a GitHub App.
Configuration
modelis required and uses theprovider/modelformat.agentselects the primary agent; it falls back to the configured default agent.promptoverrides the comment text for scheduled, issue, and pull-request workflows.use_github_tokendefaults totrueand uses the runner’s token directly.sharedefaults tofalse. Sharing requires an external service configured throughSHARE_URL; OpenCtrlC does not host session sharing.oidc_base_urlis only for teams that operate a compatible private token-exchange service and explicitly setuse_github_token: false.
Supported events
issue_comment: react to/openctrlcor/ocin an issue or pull request.pull_request_review_comment: review the commented code and its diff context.issues,pull_request,schedule, andworkflow_dispatch: run with an explicitprompt.
For pull requests from forks, GitHub may restrict write access. Review the repository’s fork and Actions permission settings before enabling automatic changes.
Security notes
Keep provider keys in GitHub Actions secrets. Use the smallest permissions your workflow needs, review third-party workflow changes, and avoid enabling write access for untrusted pull-request code.
See the GitHub Action source and GitHub discussions for implementation details and support.