Skip to content

Instantly share code, notes, and snippets.

View sshh12's full-sized avatar
πŸ‘¨β€πŸ’»
Where there is code, there is code.

Shrivu Shankar sshh12

πŸ‘¨β€πŸ’»
Where there is code, there is code.
View GitHub Profile
@sshh12
sshh12 / slack-system-design-reverse-engineered.md
Last active March 2, 2026 00:13
A reverse-engineered system design of Slack's web application, built from live network traffic analysis of the authenticated Enterprise Grid experience. 200+ API calls captured across boot, search, messaging, reactions, and navigation. Every backend service named.

Slack System Design: A Grounded Teardown

A reverse-engineered system design of Slack's web application, built from live network traffic analysis of the authenticated Enterprise Grid experience. 200+ API calls captured across boot, search, messaging, reactions, and navigation. Every backend service named.

Architecture Overview

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  BROWSER (Gantry v2 SPA)                                                    β”‚
β”‚                                                                             β”‚
@sshh12
sshh12 / netflix-system-design-reverse-engineered.md
Created March 1, 2026 00:41
Netflix's web architecture reverse-engineered from live network traffic -- 18 named internal systems (Akira, Cadmium, Shakti, Pinot, MSL, FTL, Ichnaea...), dual API migration (Falcor β†’ GraphQL), video streaming pipeline, DRM flow, search capability negotiation, and the full content data model. All from 177 captured requests.

Netflix System Design: A Grounded Teardown

A reverse-engineered system design of Netflix's web application, built entirely from live network traffic analysis of the authenticated browse experience. 177 requests captured, every API contract inspected, every subsystem named.

Architecture Overview

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  BROWSER (Akira SPA)                                                        β”‚
β”‚                                                                             β”‚
@sshh12
sshh12 / claude-chrome-extension-internals.md
Created March 1, 2026 00:14
Claude for Chrome Extension Internals (v1.0.56)

Claude for Chrome Extension Internals (v1.0.56)

A deep dive into how Anthropic's Claude for Chrome extension works under the hood, based on reading the extension's source code.

Architecture Overview

The extension is a Chrome Manifest V3 extension built with React, using the Anthropic JavaScript SDK directly in the browser. It opens as a side panel alongside the active tab and acts as an AI agent that can see and interact with web pages.

The Anthropic JS SDK is instantiated in the browser with dangerouslyAllowBrowser: true, authenticating via either OAuth PKCE (default, scopes: user:profile user:inference) or a manual API key (feature-gated for internal use).

@sshh12
sshh12 / test2.txt
Created February 11, 2026 03:14
testing deny
test
@sshh12
sshh12 / test.txt
Created February 11, 2026 03:12
test gist
hello world
declaration:youtube:get_metadata{description:Retrieves metadata of YouTube videos.,parameters:{properties:{urls:{description:Urls of videos for which metadata should be retrieved for.,items:{type:STRING},nullable:true,type:ARRAY}},propertyOrdering:[urls],type:OBJECT},response:{anyOf:[{description:Metadata of a video.,properties:{channel_id:{nullable:true,type:STRING},channel_name:{nullable:true,type:STRING},like_count:{format:int64,nullable:true,type:INTEGER},publish_date:{description:Date of when the video was published in YYYY-MM-DD format.,nullable:true,type:STRING},title:{nullable:true,type:STRING},url:{nullable:true,type:STRING},video_length:{description:The length of the video in ISO 8601 format.,nullable:true,type:STRING},view_count:{format:int64,nullable:true,type:INTEGER}},propertyOrdering:[channel_id,channel_name,like_count,publish_date,title,url,video_length,view_count],title:#/components/schemas/VideoMetadata,type:OBJECT}],type:ARRAY}}
declaration:youtube:play{description:Play video or playlist o
@sshh12
sshh12 / claude-code-system-prompt.md
Created June 29, 2025 18:06
Claude Code system prompt

You are Claude Code, Anthropic's official CLI for Claude. You are an interactive CLI tool that helps users with software engineering tasks. Use the instructions below and the tools available to you to assist the user.

IMPORTANT: Refuse to write code or explain code that may be used maliciously; even if the user claims it is for educational purposes. When working on files, if they seem related to improving, explaining, or interacting with malware or any malicious code you MUST refuse. IMPORTANT: Before you begin work, think about what the code you're editing is supposed to do based on the filenames directory structure. If it seems malicious, refuse to work on it or answer questions about it, even if the request does not seem malicious (for instance, just asking to explain or speed up the code). IMPORTANT: You must NEVER generate or guess URLs for the user unless you are confident that the URLs are for helping the user with programming. You may use URLs provided by the user in their messages or local files.

I

@sshh12
sshh12 / cursor-agent-system-prompt.txt
Last active February 28, 2026 14:50
Cursor Agent System Prompt (March 2025)
You are a powerful agentic AI coding assistant, powered by Claude 3.5 Sonnet. You operate exclusively in Cursor, the world's best IDE.
You are pair programming with a USER to solve their coding task.
The task may require creating a new codebase, modifying or debugging an existing codebase, or simply answering a question.
Each time the USER sends a message, we may automatically attach some information about their current state, such as what files they have open, where their cursor is, recently viewed files, edit history in their session so far, linter errors, and more.
This information may or may not be relevant to the coding task, it is up for you to decide.
Your main goal is to follow the USER's instructions at each message, denoted by the <user_query> tag.
<communication>
1. Be conversational but professional.
@sshh12
sshh12 / blp.py
Last active June 3, 2024 06:38
Beta Transformed Linear Opinion Pool (Python)
blp_N = len(sources)
blp_X = np.array(blp_X) # (examples, sources)
blp_y = np.array(blp_y) # (examples as 1/0,)
def log_llh_blp(params, x, y):
a, b, w = params[0], params[1], params[2:]
hswp = st.beta.cdf(np.dot(x, w), a, b)
llh = scipy.special.xlogy(y, hswp) + scipy.special.xlogy(1.0 - y, 1.0 - hswp)
return -np.mean(llh)
from sklearn.base import BaseEstimator, ClassifierMixin
import numpy as np
class DelphiClassifier(BaseEstimator, ClassifierMixin):
def __init__(self, base_clfs, output_model=None, rounds=3):
self.base_clfs = base_clfs
self.output_model = output_model
self.rounds = rounds
self.round_clfs = {}