๐Ÿค– Claude Code Agent

September 24, 2025 ยท View on GitHub

     โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•—      โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•—   โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—
    โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•โ–ˆโ–ˆโ•‘     โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•
    โ–ˆโ–ˆโ•‘     โ–ˆโ–ˆโ•‘     โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘  โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—  
    โ–ˆโ–ˆโ•‘     โ–ˆโ–ˆโ•‘     โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘  โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ•  
    โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘  โ–ˆโ–ˆโ•‘โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—
     โ•šโ•โ•โ•โ•โ•โ•โ•šโ•โ•โ•โ•โ•โ•โ•โ•šโ•โ•  โ•šโ•โ• โ•šโ•โ•โ•โ•โ•โ• โ•šโ•โ•โ•โ•โ•โ• โ•šโ•โ•โ•โ•โ•โ•โ•
    
          ๐Ÿš€ Bitbucket Webhook Integration

โœจ Description

Claude Code Agent is an intelligent Bitbucket webhook service that supercharges your pull requests with AI-powered insights. Built with Claude AI, this service automatically analyzes your code changes and provides:

  • ๐Ÿ” Smart PR Descriptions - AI-generated summaries appended to pull request descriptions
  • ๐Ÿ“ Code Reviews - Comprehensive feedback posted as PR comments
  • ๐Ÿ’ก Inline Suggestions - Contextual improvements directly on specific code lines
  • โšก Real-time Processing - Instant analysis triggered by Bitbucket webhook events

Transform your development workflow with intelligent code analysis that helps teams ship better code faster.

๐Ÿš€ Getting Started

Prerequisites

  • Docker & Docker Compose
  • Bitbucket workspace access
  • Claude API credentials

Quick Setup

  1. Clone the repository

    git clone <repository-url>
    cd claude-code-agent
    
  2. Configure & Launch

    docker compose run --rm webhook sh -lc 'claude --version && claude login'
    
  3. Set Environment Variables Configure your .env file with:

    • BB_CLIENT_ID - Bitbucket OAuth client ID
    • BB_CLIENT_SECRET - Bitbucket OAuth client secret
    • WEBHOOK_SECRET - Webhook signature verification secret
  4. Start the Service

    docker compose up -d
    

Your Claude Code Agent will be running on http://localhost:8080 ๐ŸŽ‰

๐Ÿ› ๏ธ Features

FeatureDescriptionEnvironment Variable
๐Ÿค– AI DescriptionsAuto-generate PR summariesENABLE_DESCRIBE=1
๐Ÿ“‹ Code ReviewsComprehensive PR analysisENABLE_REVIEW=1
๐Ÿ’ฌ Inline CommentsLine-specific suggestionsENABLE_INLINE=1
โš™๏ธ Query ControlRuntime feature toggling?describe=false&review=false&inline=false

๐Ÿ“ก Webhook Endpoint

Configure your Bitbucket webhook to point to:

POST /webhook/bitbucket

The service automatically processes pullrequest:* events and applies the configured AI analysis features.

๐Ÿ”ง Configuration

VariableDefaultDescription
PORT8080Server port
MAX_INLINE_COMMENTS10Maximum inline comments per PR
MAX_DESC_APPEND_CHARS2500Character limit for description append

๐Ÿ—๏ธ Architecture

Built with:

  • Node.js + TypeScript - Modern JavaScript runtime
  • Express.js - Fast, minimalist web framework
  • Claude AI - Advanced code analysis capabilities
  • Docker - Containerized deployment
  • Bitbucket API - Seamless repository integration

Made with โค๏ธ and Claude AI

Empowering developers with intelligent code insights