GitHub Examples
GitHub integration workflow examples for the Loopstack automation framework.
Two ways to use the @loopstack/github-module tools:
- A scripted overview workflow — single pass, hand-rolled tool sequence
- An interactive agent workflow — Claude with the full GitHub tool set
Both share the same sign-in pattern: when a tool returns unauthorized, launch the OAuthWorkflow sub-workflow inline, then retry.
For syncing a workspace to a GitHub repository, see the GitHub Repo Sync example in @loopstack/git-examples.
Install as Source (Recommended)
npx giget@latest gh:loopstack-ai/loopstack/registry/examples/github-examples src/github-examplesThen register the module:
import { Module } from '@nestjs/common';import { LoopstackModule } from '@loopstack/loopstack-module';import { GitHubExamplesModule } from './github-examples/github-examples.module';
@Module({ imports: [LoopstackModule.forRoot(), GitHubExamplesModule],})export class AppModule {}Install as a Dependency
npm install @loopstack/github-examplesimport { GitHubExamplesModule } from '@loopstack/github-examples';Required app-module configuration
Both examples use Claude via @loopstack/llm-provider-module — @Global, configured once in your root module to set the default model:
import { Module } from '@nestjs/common';import { GitHubExamplesModule } from '@loopstack/github-examples';import { LlmProviderModule } from '@loopstack/llm-provider-module';import { LoopstackModule } from '@loopstack/loopstack-module';
@Module({ imports: [LoopstackModule.forRoot(), LlmProviderModule.forRoot({ model: 'claude-sonnet-4-6' }), GitHubExamplesModule],})export class AppModule {}GitHubExamplesModule re-imports ClaudeModule and GitHubModule. GitHubModule transitively pulls in the global OAuthModule and registers the GitHub OAuth provider — no additional OAuth wiring required in your AppModule.
Environment
ANTHROPIC_API_KEY=sk-ant-...GITHUB_CLIENT_ID=...GITHUB_CLIENT_SECRET=...Refer to @loopstack/github-module for the full OAuth setup (redirect URL, scopes).
Running
Start a workflow from Studio (app GitHub Examples) or with the Loopstack CLI:
loopstack run github_overview_example --arg owner=octocat --arg repo=Hello-Worldloopstack run github_agent_exampleOn the first run you are asked to sign in to GitHub; after that the overview renders a markdown summary of the repository, and the agent waits for your chat messages.
Examples
| Example | Studio title | Description |
|---|---|---|
| GitHub Overview | GitHub - Overview Example |
Scripted walk of GitHub read tools with markdown summary |
| GitHub Agent | GitHub - Agent Example |
Interactive Claude agent with 25 GitHub tools |
GitHub Overview
A scripted (non-agent) GitHub workflow that walks every major GitHub read tool: user info, orgs, repo details, branches, issues, PRs, directory contents, workflow runs, and code search. On any unauthorized error it pauses, launches the OAuthWorkflow sub-workflow inline, then retries from the start.
Files
github-overview-example.workflow.ts— workflow classtemplates/repoOverview.md— Handlebars markdown summary template
GitHub Agent
An interactive Claude chat agent with 25 GitHub tools wired in: repos, issues, PRs, code, actions, and search. When a tool returns unauthorized, the agent calls authenticateGitHub to launch the OAuth sub-workflow and retries.
Files
github-agent-example.workflow.ts— workflow classgithub-agent-example.ui.yaml— chat prompt-input widgettemplates/systemMessage.md— system prompt
About
Author: Jakob Klippel
License: MIT