oss-code-analysis

Explore open-source GitHub repository source trees via web browsing to analyze and compare feature implementations at the code level. Supports two modes: cross-project comparison and single-project deep dive. Use when evaluating how OSS projects implement a specific feature, choosing architecture patterns, or benchmarking implementation strategies.

25 stars

Best use case

oss-code-analysis is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Explore open-source GitHub repository source trees via web browsing to analyze and compare feature implementations at the code level. Supports two modes: cross-project comparison and single-project deep dive. Use when evaluating how OSS projects implement a specific feature, choosing architecture patterns, or benchmarking implementation strategies.

Teams using oss-code-analysis should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/oss-code-analysis/SKILL.md --create-dirs "https://raw.githubusercontent.com/ComeOnOliver/skillshub/main/skills/comsky/remy-skill-recipes/oss-code-analysis/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/oss-code-analysis/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How oss-code-analysis Compares

Feature / Agentoss-code-analysisStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Explore open-source GitHub repository source trees via web browsing to analyze and compare feature implementations at the code level. Supports two modes: cross-project comparison and single-project deep dive. Use when evaluating how OSS projects implement a specific feature, choosing architecture patterns, or benchmarking implementation strategies.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Skill: OSS Code-Level Feature Analysis

**Type:** Execution

## Purpose

Explore open-source GitHub repositories at the **source code level** to understand
how specific features are implemented.

Two analysis modes:

- **Compare:** Analyze the same feature across multiple OSS projects
- **Deep Dive:** Deeply analyze a single project's feature implementation

The goal is to extract actionable implementation insights — not to copy code,
but to understand architectural decisions, trade-offs, and proven patterns.

---

## When to Use

- Before implementing a feature, to study how mature OSS projects solved it
- When choosing between architectural patterns and needing code-level evidence
- When evaluating libraries or frameworks by reading their internals
- When comparing implementation strategies across multiple projects
- When reverse-engineering how a specific OSS feature works under the hood

---

## When NOT to Use

- UX/interaction-level comparison (use `competitive-feature-benchmark` instead)
- Pricing, licensing, or business model comparison
- Projects hosted on private repositories without access
- Analyzing proprietary/closed-source software
- Simple API usage questions answerable from official documentation

---

## Inputs Required

Do not run this skill without:

- [ ] Target feature to analyze (name and scope)
- [ ] Analysis mode (`compare` or `deep-dive`)

Optional but recommended:

- [ ] GitHub repository URLs (1 for deep-dive, 2–5 for compare)
- [ ] Specific aspects to focus on (e.g., error handling, caching strategy)
- [ ] Our current implementation or design proposal for contextual comparison

If repository URLs are not provided, identify 3–5 relevant OSS projects via web search.

---

## Output Format

1. Repository Overview
2. Source Tree Map
3. Architecture Analysis
4. Key Code Walkthrough
5. Technology Stack Summary
6. Comparison Table (compare mode) / Findings Summary (deep-dive mode)
7. Strategic Recommendations

---

## Procedure

### Step 1 – Mode Selection & Input Validation

Confirm with the user:

- Which feature to analyze
- Which mode: `compare` or `deep-dive`
- Target repositories (URLs)

If repositories are not specified:

- Use web search to find 3–5 well-maintained OSS projects implementing the target feature
- Prefer projects with: >1k stars, recent commits within 6 months, clear documentation
- Present the candidate list to the user for confirmation before proceeding

---

### Step 2 – Repository Structure Exploration

For each target repository, browse the GitHub web interface:

**2-1. Project overview**

- Read the repository root page (README, top-level files)
- Note: star count, last commit date, primary language, license

**2-2. Directory tree mapping**

- Browse the top-level directory structure
- Identify architectural layers from folder names (e.g., `src/`, `lib/`, `internal/`, `packages/`)
- Map the folder hierarchy relevant to the target feature

**2-3. Build system & package configuration**

- Read dependency manifest files: `package.json`, `Cargo.toml`, `go.mod`, `pyproject.toml`, `pom.xml`, etc.
- Note framework versions and key dependencies

#### GitHub Source Browsing Guide

Use these URL patterns for efficient navigation:

| Purpose | URL Pattern |
|---|---|
| Repository root | `https://github.com/{owner}/{repo}` |
| Directory listing | `https://github.com/{owner}/{repo}/tree/{branch}/{path}` |
| Raw file content | `https://raw.githubusercontent.com/{owner}/{repo}/{branch}/{path}` |
| GitHub API (directory) | `https://api.github.com/repos/{owner}/{repo}/contents/{path}` |
| GitHub API (tree, recursive) | `https://api.github.com/repos/{owner}/{repo}/git/trees/{branch}?recursive=1` |
| Search within repo | `https://github.com/{owner}/{repo}/search?q={keyword}&type=code` |

Preferred tools (in order of reliability):

1. `raw.githubusercontent.com` URLs for direct file content access (plain text, no HTML parsing)
2. GitHub API endpoints for directory trees and structured metadata (JSON responses)
3. `WebFetch` for GitHub pages when API is unavailable (HTML parsing may be needed)
4. `WebSearch` for finding relevant files when directory structure is unclear

---

### Step 3 – Entry Point & Core Module Identification

Locate the code that implements the target feature:

**3-1. Entry point discovery**

- Check README, CONTRIBUTING.md, or docs/ for architecture guides
- Look for obvious entry points: `main.*`, `index.*`, `app.*`, `server.*`
- Trace from CLI commands, API routes, or exported modules

**3-2. Feature-specific module location**

- Search for feature-related keywords in file/folder names
- Read import statements and module declarations to trace dependencies
- Follow the call chain from entry point to the target feature's core logic

**3-3. Key file inventory**

Produce a list of key files with their roles:

- **Compare mode:** 5–8 key files per repository (focus on the most
  relevant to the target feature)
- **Deep-dive mode:** 8–15 key files (broader coverage acceptable)

```
path/to/file.ts — Role description (e.g., "Main scheduler loop")
path/to/types.ts — Role description (e.g., "Core data structures")
```

---

### Step 4 – Code-Level Deep Reading

> **SCOPING RULE:** For each key file, first read **exported symbols,
> type signatures, and function headers only** (first pass).
> Then full-read only the functions/sections directly relevant to the
> target feature (second pass). For files exceeding 500 lines, always
> use line-range reading restricted to the relevant sections.
> Maximum full-read budget: **10 files per repository** in compare mode,
> **15 files** in deep-dive mode.

Read each key file and analyze:

#### A. Architecture Pattern

- Overall pattern: MVC, Clean Architecture, Hexagonal, Event-Driven, Pipeline, etc.
- Module boundaries and coupling strategy
- Dependency direction (inward vs outward)

#### B. Core Data Structures

- Primary types, interfaces, structs, or classes
- State management approach
- Data flow between modules

#### C. Key Algorithms & Logic

- Core processing logic and control flow
- Concurrency/parallelism strategy (if applicable)
- Performance-critical paths

#### D. Error Handling & Resilience

- Error propagation strategy (exceptions, Result types, error codes)
- Retry, fallback, and circuit breaker patterns
- Validation and input sanitization

#### E. Extension Points

- Plugin/middleware architecture
- Configuration and customization hooks
- Public API surface

---

### Step 5 – Technology Stack Analysis

Compile for each repository:

| Category | Details |
|---|---|
| Language & version | e.g., TypeScript 5.3, Rust 1.75 |
| Framework | e.g., Next.js 14, Actix-web 4 |
| Key libraries | Role of each major dependency |
| Build tooling | Bundler, compiler, task runner |
| Test framework | Unit, integration, E2E tools |
| CI/CD | Pipeline configuration if visible |

---

### Step 6 – Synthesis

#### Compare Mode: Comparative Table

Create a structured comparison across all analyzed repositories:

| Dimension | Repo A | Repo B | Repo C |
|---|---|---|---|
| Architecture pattern | | | |
| Core data model | | | |
| Key algorithm approach | | | |
| Error handling strategy | | | |
| Extension mechanism | | | |
| External dependencies | | | |
| Code complexity | | | |
| Test coverage approach | | | |

For each dimension, note the trade-offs of each approach.

#### Deep-Dive Mode: Findings Summary

Produce:

- Architecture diagram (Mermaid) showing module relationships
- Data flow diagram for the target feature
- Call chain from entry point to core logic
- Key design decisions and their rationale (inferred from code/comments)

---

### Step 7 – Strategic Recommendations

Answer:

1. Which implementation pattern is most suitable for our context and why?
2. What are the key trade-offs between the approaches observed?
3. What pitfalls or anti-patterns were found that we should avoid?
4. What design decisions should we adopt or adapt?
5. Are there reusable components or libraries worth considering?

Provide a clear, prioritized recommendation with justification.

---

## Guardrails

- If a repository is inaccessible (private, deleted, rate-limited), report the gap immediately and proceed with available repositories.
- Do not clone, fork, or download repositories. Analysis is read-only via web browsing.
- Do not fabricate code snippets or architecture details not found in the source.
- For large repositories (>10k files), restrict analysis scope to the target feature's relevant modules only.
- Always record the license type of each analyzed repository.
- Explicitly state when analysis is based on inference rather than direct code reading.
- Do not compare code quality subjectively without citing specific patterns or metrics.
- When quoting code snippets, always include the file path and approximate line range.

---

## Failure Patterns

Common bad outputs:

- Listing repositories without actually reading their source code
- Producing architecture descriptions based on README alone without verifying against actual code
- Comparing projects at different abstraction levels (one at code level, another at documentation level)
- Missing the comparison table in compare mode
- Ignoring error handling and edge case analysis
- Recommending a pattern without explaining trade-offs
- Analyzing the entire repository instead of focusing on the target feature
- Presenting outdated information from an old branch instead of the default branch
- Failing to distinguish between the project's public API and internal implementation

---

## Example 1 (Minimal Context)

**Input:**

Feature: real-time collaboration (CRDT-based)
Mode: compare
Repositories: not specified

**Output:**

1. Repository Overview: Yjs (14k stars, TypeScript), Automerge (3k stars, Rust+WASM), Diamond-types (1k stars, Rust)
2. Source Tree Map: core CRDT modules, network sync layers, storage adapters per project
3. Architecture Analysis:
   - Yjs: monolithic core with plugin-based extensions (awareness, undo-manager)
   - Automerge: Rust core compiled to WASM with thin JS wrapper
   - Diamond-types: pure Rust, optimized for text editing performance
4. Key Code Walkthrough: CRDT merge logic, operation encoding, conflict resolution per project
5. Technology Stack: Yjs (pure TS, no deps), Automerge (Rust + wasm-bindgen), Diamond-types (Rust, no runtime deps)
6. Comparison Table: architecture pattern, merge algorithm (Yjs: YATA, Automerge: RGA variant, Diamond: Fugue), memory model, WASM usage, extensibility, document size overhead
7. Strategic Recommendation: Yjs for rapid integration with existing JS ecosystem; Automerge for cross-platform with Rust performance; Diamond-types if text-only editing with maximum performance is the priority

---

## Example 2 (Realistic Scenario)

**Input:**

Feature: authentication middleware implementation
Mode: deep-dive
Repository: https://github.com/nextauthjs/next-auth
Focus: how session management and JWT handling are implemented internally

**Output:**

1. Repository Overview: NextAuth.js — 25k stars, TypeScript, ISC license, actively maintained with weekly releases
2. Source Tree Map:
   ```
   packages/
   ├── core/src/          — Framework-agnostic auth logic
   │   ├── lib/           — Session, CSRF, callback handlers
   │   ├── providers/     — OAuth, Email, Credentials provider implementations
   │   └── types.ts       — Core type definitions
   ├── next-auth/src/     — Next.js-specific adapter
   └── frameworks-*/      — SvelteKit, Express adapters
   ```
3. Architecture Analysis: Provider pattern with framework adapters. Core auth logic is framework-agnostic in `packages/core/`, each framework has a thin adapter layer. Session handling branches into JWT (stateless) and database (stateful) strategies via a strategy interface.
4. Key Code Walkthrough:
   - `packages/core/src/lib/actions/session.ts` — Session retrieval: decodes JWT or queries DB adapter based on `session.strategy` config
   - `packages/core/src/jwt.ts` — JWT encode/decode using `jose` library, supports JWE encryption
   - `packages/core/src/lib/actions/callback/index.ts` — OAuth callback flow: validates state, exchanges code for tokens, calls user-defined callbacks
   - `packages/core/src/providers/oauth.ts` — Generic OAuth provider with PKCE support, token endpoint configuration
5. Technology Stack: TypeScript 5.x, `jose` for JWT/JWE, `oauth4webapi` for OAuth 2.0, `@panva/hkdf` for key derivation, Turborepo monorepo, Vitest for testing
6. Findings Summary:
   - Mermaid architecture diagram showing Core → Provider → Adapter → Framework layer relationships
   - JWT flow: request → session middleware → decode JWT → validate expiry → attach to context → call user callback
   - Design decisions: framework-agnostic core enables multi-framework support; provider pattern allows easy addition of new OAuth providers; adapter pattern abstracts database operations
7. Strategic Recommendations:
   - Adopt the framework-agnostic core + thin adapter pattern for multi-framework auth libraries
   - The provider pattern with typed configuration objects is highly extensible — recommended for any pluggable authentication system
   - Consider: JWT-only strategy avoids database dependency but complicates token revocation; NextAuth solves this with short-lived JWTs + rotation

---

## Notes

**FAST MODE** (only if explicitly requested):

- Limit to 3 key files per repository
- Skip Step 5 (Technology Stack Analysis)
- In compare mode, limit to 3 repositories maximum

---

- This skill complements `competitive-feature-benchmark` which operates at the UX/interaction level. Use both together for a complete picture: code-level implementation (this skill) + user-facing design (competitive-feature-benchmark).
- For very large repositories, consider analyzing only the most recent tagged release rather than the HEAD of the default branch to ensure stability of analysis.
- GitHub API has rate limits (60 requests/hour unauthenticated, 5000/hour with token). If rate-limited, switch to `raw.githubusercontent.com` URLs or `WebFetch` on regular GitHub pages.

Related Skills

Betting Analysis

25
from ComeOnOliver/skillshub

Before writing queries, consult `references/api-reference.md` for odds formats, command parameters, and key concepts.

performing-regression-analysis

25
from ComeOnOliver/skillshub

This skill empowers Claude to perform regression analysis and modeling using the regression-analysis-tool plugin. It analyzes datasets, generates appropriate regression models (linear, polynomial, etc.), validates the models, and provides performance metrics. Use this skill when the user explicitly requests regression analysis, prediction based on data, or mentions terms like "linear regression," "polynomial regression," "regression model," or "predictive modeling." This skill is also helpful when the user needs to understand the relationship between variables in a dataset.

regression-analysis-helper

25
from ComeOnOliver/skillshub

Regression Analysis Helper - Auto-activating skill for Data Analytics. Triggers on: regression analysis helper, regression analysis helper Part of the Data Analytics skill category.

log-analysis-security

25
from ComeOnOliver/skillshub

Log Analysis Security - Auto-activating skill for Security Advanced. Triggers on: log analysis security, log analysis security Part of the Security Advanced skill category.

impact-analysis-helper

25
from ComeOnOliver/skillshub

Impact Analysis Helper - Auto-activating skill for Enterprise Workflows. Triggers on: impact analysis helper, impact analysis helper Part of the Enterprise Workflows skill category.

funnel-analysis-builder

25
from ComeOnOliver/skillshub

Funnel Analysis Builder - Auto-activating skill for Data Analytics. Triggers on: funnel analysis builder, funnel analysis builder Part of the Data Analytics skill category.

cohort-analysis-creator

25
from ComeOnOliver/skillshub

Cohort Analysis Creator - Auto-activating skill for Data Analytics. Triggers on: cohort analysis creator, cohort analysis creator Part of the Data Analytics skill category.

churn-analysis-helper

25
from ComeOnOliver/skillshub

Churn Analysis Helper - Auto-activating skill for Data Analytics. Triggers on: churn analysis helper, churn analysis helper Part of the Data Analytics skill category.

project-workflow-analysis-blueprint-generator

25
from ComeOnOliver/skillshub

Comprehensive technology-agnostic prompt generator for documenting end-to-end application workflows. Automatically detects project architecture patterns, technology stacks, and data flow patterns to generate detailed implementation blueprints covering entry points, service layers, data access, error handling, and testing approaches across multiple technologies including .NET, Java/Spring, React, and microservices architectures.

datanalysis-credit-risk

25
from ComeOnOliver/skillshub

Credit risk data cleaning and variable screening pipeline for pre-loan modeling. Use when working with raw credit data that needs quality assessment, missing value analysis, or variable selection before modeling. it covers data loading and formatting, abnormal period filtering, missing rate calculation, high-missing variable removal,low-IV variable filtering, high-PSI variable removal, Null Importance denoising, high-correlation variable removal, and cleaning report generation. Applicable scenarios arecredit risk data cleaning, variable screening, pre-loan modeling preprocessing.

Coverage Analysis

25
from ComeOnOliver/skillshub

Coverage analysis is essential for understanding which parts of your code are exercised during fuzzing. It helps identify fuzzing blockers like magic value checks and tracks the effectiveness of harness improvements over time.

product-analysis

25
from ComeOnOliver/skillshub

Multi-path parallel product analysis with cross-model test-time compute scaling. Spawns parallel agents (Claude Code agent teams + Codex CLI) to explore product from multiple perspectives, then synthesizes findings into actionable optimization plans. Can invoke competitors-analysis for competitive benchmarking. Use when "product audit", "self-review", "发布前审查", "产品分析", "analyze our product", "UX audit", or "信息架构审计".