
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@ai-coding/github-agent
Advanced tools
A Self-iterating Autonomous Coding Agent, built for Open-Source Engineers
[!NOTE] > Status: This project is currently under development and is built on the TARS Stack. Please visit TARS Stack for more information.
A powerful GitHub Agent built on the MCP (Model Context Protocol) framework that enables intelligent interaction with GitHub repositories through natural language commands. Features automatic repository context injection for seamless GitHub operations without manual validation steps.
npm install @ai-coding/github-agent
# or
pnpm add @ai-coding/github-agent
# or
yarn add @ai-coding/github-agent
import { GithubAgent } from '@ai-coding/github-agent';
const agent = new GithubAgent({
model: {
provider: 'openai', // or your preferred provider
id: 'gpt-4',
apiKey: process.env.OPENAI_API_KEY,
},
workspace: process.cwd(), // your working directory
language: 'en', // optional: 'en', 'zh', 'ja', 'es', 'fr', 'de', 'auto'
enableCodeFormatting: false, // optional: enable automatic code formatting
});
// Use the agent
const response = await agent.run(
'Create a new issue in my repository about bug fixes',
);
console.log(response.content);
GITHUB_PERSONAL_ACCESS_TOKEN environment variableThe GitHub Agent automatically detects and injects repository context before each operation, eliminating the need for manual validation commands:
Before (Manual Validation):
# Agent had to run these commands manually:
pwd
git remote -v
# Validate GitHub repository
# Then proceed with operation
After (Automatic Injection):
// Repository context is automatically available:
// - Working directory: /path/to/your/repo
// - GitHub repository: owner/repo-name
// - Git remotes: origin, upstream, etc.
// - Validation status: valid/invalid
Performance Benefits:
How it works:
The GitHub Agent requires a GitHub Personal Access Token to interact with GitHub APIs:
export GITHUB_PERSONAL_ACCESS_TOKEN=your_github_token_here
The GitHub Agent supports multiple languages for communication:
const agent = new GithubAgent({
// ... other options
language: 'zh', // Chinese
});
// Supported languages:
// 'en' - English (default)
// 'zh' - Chinese (中文)
// 'ja' - Japanese (日本語)
// 'es' - Spanish (Español)
// 'fr' - French (Français)
// 'de' - German (Deutsch)
// 'auto' - Auto-detect from system locale
Examples:
// English Agent (default)
const enAgent = new GithubAgent({ language: 'en' });
// Chinese Agent - will create issues and PRs in Chinese
const zhAgent = new GithubAgent({ language: 'zh' });
// Auto-detect language from system
const autoAgent = new GithubAgent({ language: 'auto' });
The GitHub Agent can automatically detect and format code when making changes. This feature is disabled by default to prevent unintended formatting of existing code.
const agent = new GithubAgent({
// ... other options
enableCodeFormatting: true, // Enable automatic code formatting
});
Supported Formatters:
Smart Detection:
Configuration Files Detected:
.prettierrc, .prettierrc.json, prettier.config.jspyproject.toml, setup.cfgExample Usage:
// Enable formatting for a TypeScript project with Prettier
const agent = new GithubAgent({
workspace: '/path/to/typescript-project',
enableCodeFormatting: true, // Will use Prettier if config found
});
// Disable formatting (default behavior)
const safeAgent = new GithubAgent({
workspace: '/path/to/any-project',
enableCodeFormatting: false, // No automatic formatting
});
⚠️ Important: Code formatting is disabled by default to avoid unintended changes to existing codebases. Enable it only when you want the agent to automatically format code during development.
# Install dependencies
pnpm bootstrap
# Run example
pnpm example
# Build the project
pnpm build
# Run tests
pnpm test
# Watch mode for development
pnpm dev
The GitHub Agent leverages:
Contributions are welcome! Please feel free to submit a Pull Request.
MIT © agent-contrib
FAQs
A Self-iterating Autonomous Coding Agent, built for Open-Source Engineers
We found that @ai-coding/github-agent demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.