展示HN:Argus – Claude 代码会话的 VSCode 调试器
Show HN: Argus – VSCode debugger for Claude Code sessions

原始链接: https://github.com/yessGlory17/argus

## Argus:优化您的 Claude 代码开发 Argus 是一个 VS Code 扩展,旨在增强您使用 Claude Code 的 AI 辅助开发。它提供对您会话的深入了解,帮助您**节省资金、加速开发并改进 AI 工作流程。** 主要功能包括**自动会话发现**、**实时监控**和**综合分析仪表板**,包含八个强大的选项卡。Argus 识别浪费的 API 调用、重试循环和重复操作等效率低下之处,并提供**令牌使用情况和成本**的详细分解。 交互式依赖关系图和逐步执行日志等可视化工具可帮助您了解 Claude Code 的内部运作。AI 驱动的推荐会提供提示优化和最佳实践。 Argus 使用 React 和 TypeScript 构建,可与 VS Code 无缝集成,提供流畅、响应迅速的体验。它是希望**审计 AI 使用情况、管理成本并释放 Claude Code 的全部潜力**的开发人员的强大工具。可在 GitHub 上以 MIT 许可证获得。

黑客新闻 新 | 过去 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 Show HN: Argus – Claude 代码会话的 VSCode 调试器 (github.com/yessglory17) 15 分,lydionfinance 发表于 50 分钟前 | 隐藏 | 过去 | 收藏 | 讨论 帮助 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文

🔮 Named after the all-seeing giant of Greek mythology — Argus watches over your Claude Code sessions, detecting inefficiencies, tracking costs, and optimizing your AI development experience.



Argus is a powerful VS Code extension that provides deep insights into Claude Code sessions, helping developers optimize their AI-assisted workflows through intelligent analysis and beautiful visualizations.


💸

Save Money

Identify wasted API calls and optimize token usage


Speed Up Development

Detect retry loops and duplicate operations


🔬

Deep Analysis

Understand how Claude Code works under the hood


📊

Visual Insights

Beautiful dashboards with real-time monitoring


🎓

Learn & Improve

Understand patterns and optimize your prompts


🔍 Intelligent Session Discovery

Click to expand
Feature Description
🔎 Automatic Scanning Discovers all Claude Code sessions from ~/.claude/projects/
🎛️ Smart Filtering Configurable depth scanning with performance optimizations
📡 Real-time Monitoring Watch sessions update as they progress
📂 Multi-project Support Manages sessions across multiple projects simultaneously

📊 Comprehensive Analysis Dashboard

8 Powerful Analysis Tabs
Tab Features
📋 Overview Session statistics • Cost analysis • Timeline visualization • Quick summary
🔍 Analysis 6 intelligent rules: Duplicate Reads • Unused Operations • Retry Loops • Failed Tools • Context Pressure • Compaction Events
💰 Cost Step-by-step breakdown • Token visualization • Cache hit ratio • Model attribution • Spending graphs
⚡ Performance Efficiency score • Wasted cost calculations • Timing analysis • Bottleneck identification
🌊 Flow Interactive dependency graph • File operation flow • Read/Write/Edit tracking • Step relationships
🧠 Context Token usage tracking • Cache performance • Window utilization • I/O distribution
📝 Steps Detailed execution log • Tool call inspection • Input/output viewing • Per-step timing & costs
💡 Insights AI-powered recommendations • Pattern recognition • Optimization suggestions • Best practices
  • React-powered Webviews: Smooth, responsive interface built with React 19
  • Interactive Visualizations: Charts powered by Chart.js and Recharts
  • D3.js Graphs: Beautiful dependency flow diagrams
  • Dark Mode Native: Seamlessly integrates with VS Code themes
  • Lucide Icons: Modern, consistent iconography

🔧 Developer Experience

  • Tree View Integration: Sessions appear in VS Code sidebar
  • Command Palette: Quick access to all features
  • Status Bar Item: One-click dashboard access
  • Hot Reload: Vite-powered development for instant updates
  • TypeScript: Fully typed for better DX and reliability

Intelligent detection of duplicate reads, retry loops, and optimization opportunities

Analysis Tab

Detailed breakdown of token usage and API costs per step with interactive charts

Cost Tab

Session efficiency scores, wasted cost analysis, and performance metrics

Performance Tab

Interactive dependency graph showing file operations and step relationships

Flow Tab

Step-by-step execution log with detailed tool call inspection and timing

Steps Tab

Token usage tracking, cache performance, and context window utilization

Context Tab

AI-powered recommendations, pattern recognition, and optimization suggestions

Insights Tab


Option 1: From VSIX (Recommended)

# Download the latest .vsix file from releases
code --install-extension argus-0.1.0.vsix
# Clone the repository
git clone https://github.com/yessGlory17/argus.git
cd argus-vscode

# Install dependencies
npm install

# Compile TypeScript
npm run compile

# Build webview
npm run build:webview

# Package extension
npx vsce package

# Install the packaged extension
code --install-extension argus-0.1.0.vsix

Setting Up Development Environment

# Clone and install
git clone https://github.com/yessGlory17/argus.git
cd argus-vscode
npm install

Running in Development Mode

# Terminal 1: Watch TypeScript changes
npm run watch

# Terminal 2: Watch webview changes
npm run dev:webview

Then press F5 in VS Code to launch the Extension Development Host.

# Compile TypeScript
npm run compile

# Build production webview
npm run build:webview

# Run linter
npm run lint

# Package extension
npx vsce package

Contributions are welcome! Please:

  1. 🍴 Fork the repository
  2. 🌿 Create a feature branch (git checkout -b feature/amazing-feature)
  3. ✏️ Make your changes
  4. ✅ Add tests if applicable
  5. 📝 Commit your changes (git commit -m 'Add amazing feature')
  6. 🚀 Push to the branch (git push origin feature/amazing-feature)
  7. 🎉 Open a Pull Request


Open VS Code

With the Argus extension installed


Find Argus Icon

Look for in the Activity Bar (left sidebar)


Explore Sessions

Sessions appear automatically - just click to analyze!

Access via Command Palette (Ctrl/Cmd + Shift + P):

  • Argus: Refresh Sessions - Manually refresh the session list
  • Argus: Open Session Detail - View specific session analysis

Customize Argus in VS Code Settings:

{
  "argus.scanDepth": 5,        // Directory depth for scanning (default: 5)
  "argus.language": "en"       // UI language: "en" or "tr"
}

argus-vscode/
├── src/                        # Extension source code
│   ├── extension.ts           # Main entry point
│   ├── types/                 # TypeScript definitions
│   │   ├── models.ts          # Core data models
│   │   └── parser.ts          # JSONL parsing types
│   ├── services/              # Business logic layer
│   │   ├── discoveryService.ts    # Session discovery & scanning
│   │   ├── parserService.ts       # JSONL parser
│   │   └── analyzerService.ts     # Analysis engine with rules
│   └── providers/             # VS Code API providers
│       ├── sessionTreeProvider.ts      # Tree view in sidebar
│       └── sessionWebviewProvider.ts   # React webview host
│
├── webview/                   # React UI
│   ├── src/
│   │   ├── main.tsx          # React entry point
│   │   ├── components/       # UI components
│   │   │   ├── AnalysisTab.tsx
│   │   │   ├── CostTab.tsx
│   │   │   ├── PerformanceTab.tsx
│   │   │   ├── FlowTab.tsx
│   │   │   ├── ContextTab.tsx
│   │   │   ├── StepsTab.tsx
│   │   │   ├── InsightsTab.tsx
│   │   │   ├── DependencyGraph.tsx
│   │   │   ├── LiveMonitor.tsx
│   │   │   ├── SessionNotes.tsx
│   │   │   └── GlobalSearch.tsx
│   │   └── types/            # Frontend types
│   └── index.html            # Webview template
│
├── package.json              # Extension manifest
├── tsconfig.json            # TypeScript config
└── vite.config.js          # Vite bundler config

Argus uses a rule-based analysis system:

interface AnalysisRule {
  name: string;
  analyze(steps: Step[]): Finding[];
}

// Built-in Rules:
- DuplicateReadRule       // Detects duplicate file reads
- UnusedReadRule          // Finds unused tool outputs
- RetryLoopRule           // Identifies retry patterns
- FailedToolRule          // Tracks failures
- ContextPressureRule     // Memory pressure detection
- CompactionDetectedRule  // Context compression events


Lines of Code

TypeScript Files

React Components

Analysis Rules

Visualization Types

Languages (EN/TR)

Dependencies

Dev Dependencies
  • JSONL Parsing: High-performance streaming parser for large session files
  • Cost Calculation: Accurate token-based cost estimation
  • Dependency Tracking: File operation dependency graph generation
  • Context Metrics: Cache hit ratio and token utilization analysis
  • Real-time Updates: Live session monitoring as Claude Code runs
  • Multi-session Management: Handle dozens of sessions simultaneously
  • Export Capabilities: Save analysis results for sharing
  • Search & Filter: Quick navigation across large sessions

Argus follows the "Ocular Systems" philosophy:

"See everything, understand everything, optimize everything"

  • Visibility: Make the invisible visible
  • 🎯 Precision: Accurate, actionable insights
  • ⚡ Performance: Fast, responsive, non-intrusive
  • 🎨 Beauty: Delightful UI that makes analysis enjoyable
  • 🔬 Depth: Surface-level overview to deep technical details

🔄 Ported from Wails Desktop App

Argus VS Code extension is a complete rewrite of the original Argus desktop application:

Original (Wails) VS Code Extension
Go backend TypeScript backend
React SPA React Webview
Wails bridge VS Code Extension API
Standalone desktop app Integrated VS Code experience
Manual session import Automatic discovery
  • Native Integration: Works where developers already are
  • Better UX: No app switching, seamless workflow
  • Auto Discovery: No manual session loading
  • Theming: Inherits VS Code theme automatically
  • Commands: Accessible via Command Palette

👨‍💻 For Developers

  • ✅ Understand how Claude Code approaches your problems
  • ✅ Learn which prompts are most efficient
  • ✅ Optimize your interaction patterns
  • ✅ Track AI-assisted development costs
  • ✅ Audit AI usage across projects
  • ✅ Identify best practices
  • ✅ Training material for effective Claude Code usage
  • ✅ Cost management and budgeting
  • ✅ Study LLM-based development patterns
  • ✅ Analyze tool usage patterns
  • ✅ Understand context management strategies
  • ✅ Research AI-human collaboration workflows

MIT License - see LICENSE file for details



👁️ Built with Argus, Analyzed by Argus

Made with ❤️ by developers, for developers

Report Bug Request Feature Documentation


Star us on GitHub if you find Argus useful!


联系我们 contact @ memedata.com