Skip to main content

gitnexus-codebase-intelligence

GitNexus — codebase intelligence platform that transforms repos into knowledge graphs for AI agents. 7 MCP tools: symbol discovery (BM25+semantic), impact radius analysis, 360° symbol context, git-diff impact mapping, multi-file coordinated renaming,

Ir para a instalação

Informações da origem

Repositório
mahmoud20138/Tradecraft
Última atividade na origem
23 de abril de 2026 às 08:40
Idioma detectado do SKILL.md
inglês
Estrelas
15
Forks
4

Opções de instalação

Por padrão, está selecionado o prompt que primeiro revisa a origem. Você pode mudar para um comando direto ou baixar uma cópia local.

Revise os arquivos de origem

Leia o SKILL.md e os arquivos complementares exibidos pelo SkillsMP antes de decidir se vai instalar.

Exibindo SKILL.md

SKILL.md
Instruções da origem · Visualização somente leitura
name
gitnexus-codebase-intelligence
description
GitNexus — codebase intelligence platform that transforms repos into knowledge graphs for AI agents. 7 MCP tools: symbol discovery (BM25+semantic), impact radius analysis, 360° symbol context, git-diff impact mapping, multi-file coordinated renaming,
# gitnexus-codebase-intelligence USE FOR: - "understand codebase impact before editing" - "find all callers / dependents of a symbol" - "safe multi-file renaming" - "git diff impact analysis" - "MCP tool for codebase architecture understanding" - "knowledge graph of code structure" - "AI agent codebase context" tags: [MCP, codebase, knowledge-graph, Tree-sitter, symbol-search, impact-analysis, Claude-Code, Cursor, Cypher] kind: tool category: pro-code-architecture --- ## What Is GitNexus? Codebase intelligence platform — transforms repos into knowledge graphs for AI agents. - Repo: https://github.com/abhigyanpatwari/GitNexus - Web: gitnexus.vercel.app (no install) - Integrations: **Claude Code**, Cursor, Windsurf, any MCP-compatible editor - Privacy: **100% local** — code never leaves your machine > "Building a nervous system for agent context" --- ## Core Problem Solved Traditional AI assistants don't know when edits break downstream dependencies. GitNexus precomputes architectural intelligence at index time → fast, accurate impact analysis at query time. --- ## 7 MCP Tools | Tool | What It Does | |------|-------------| | `symbol_search` | BM25 + semantic hybrid search across codebase | | `symbol_context` | 360° view: incoming + outgoing relationships for any symbol | | `impact_radius` | All code that depends on a given symbol | | `git_diff_impact` | Map git diff → which symbols are affected + their dependents | | `multi_file_rename` | Coordinated safe rename across all references | | `graph_query` | Raw Cypher queries on the knowledge graph | | `discover_symbols` | List all symbols by type (functions, classes, methods) | --- ## Indexing Pipeline (6 Phases) ``` 1. Structural mapping → directory tree, file relationships 2. AST parsing → Tree-sitter extracts symbols per language 3. Import/call resolve → link usages to definitions 4. Community cluster → group related modules 5. Execution flow trace → call chains, data flow paths 6. Hybrid search index → BM25 + vector embeddings ``` --- ## Installation & Setup ```bash # Index a repository npx gitnexus analyze # Configure MCP for your editor (one-time, multi-project) npx gitnexus setup # → adds GitNexus MCP server to Claude Code / Cursor / Windsurf config ``` **Web UI** (no install): ``` https://gitnexus.vercel.app # Upload or link repo → explore in browser ``` --- ## Claude Code Integration After `npx gitnexus setup`, Claude Code gets access to all 7 MCP tools: ``` # In Claude Code session: > "What calls the processOrder function?" → Claude uses symbol_context MCP tool → instant impact map > "I'm about to rename UserService — what breaks?" → Claude uses impact_radius → lists all 47 dependent symbols > "Show me what this git diff affects" → Claude uses git_diff_impact → maps changed lines to affected call chains ``` --- ## Supported Languages | Language | Imports | Types | Frameworks | |----------|---------|-------|------------| | TypeScript / JS | ✓ | ✓ | React, Next.js | | Python | ✓ | ✓ | Django, FastAPI | | Java | ✓ | ✓ | Spring | | Go | ✓ | ✓ | — | | Rust | ✓ | ✓ | — | | C# | ✓ | ✓ | .NET | | PHP | ✓ | — | Laravel | | + 6 more | varies | varies | — | --- ## Example: Impact Radius Query ```cypher -- Raw Cypher query via graph_query tool MATCH (s:Symbol {name: "UserService"})<-[:CALLS|IMPORTS*1..3]-(dep:Symbol) RETURN dep.name, dep.file, dep.line ORDER BY dep.file ``` Returns every symbol within 3 hops that depends on `UserService`. --- # KNOWLEDGE INJECTION: OpenCV # Source: https://github.com/opencv/opencv # Routed to: development.md # Date: 2026-03-18 # SKILL: opencv name: opencv description: > OpenCV - Open Source Computer Vision Library. 86k stars, 14 modules. imgproc (filtering/contours/warp), dnn (YOLO/ONNX inference), features2d (SIFT/ORB/AKAZE matching), objdetect (Haar/HOG/QR), calib3d, tracking (KCF/CSRT). pip install opencv-contrib-python. C++ and Python. USE FOR: - image processing pipeline - contour detection and perspective warp - YOLO object detection with OpenCV dnn - feature matching SIFT ORB AKAZE - face detection Haar cascade - camera calibration undistort - object tracking KCF CSRT - chess board detection - color segmentation HSV mask - background subtraction optical flow tags: [OpenCV, computer-vision, image-processing, DNN, YOLO, SIFT, ORB, contours, tracking, Python, C++] kind: library category: programmatic-drawing --- ## What Is OpenCV? Open Source Computer Vision Library. - Repo: https://github.com/opencv/opencv - Stars: 86.6k | Forks: 56.6k | Contributors: 1,775+ - Languages: C++ (87%) with Python, Java, JS bindings - Docs: https://docs.opencv.org/4.x/ --- ## Installation ```bash pip install opencv-contrib-python # recommended (includes SIFT, tracking) pip install opencv-contrib-python-headless # no GUI (servers) ``` ```python import cv2 print(cv2.__version__) # e.g. 4.9.0 ``` --- ## Module Map | Module | Key Functions | |--------|--------------| | core | Mat, imread, imwrite, cvtColor | | imgproc | GaussianBlur, Canny, threshold, findContours, warpPerspective | | features2d | SIFT, ORB, AKAZE, BFMatcher, FLANN | | objdetect | CascadeClassifier, QRCodeDetector | | dnn | readNetFromONNX, blobFromImage, forward | | video | BackgroundSubtractor, calcOpticalFlow | | calib3d | calibrateCamera, undistort, findHomography | | tracking | TrackerKCF, TrackerCSRT, TrackerMOSSE | | ml | SVM, KMeans | | photo | inpaint, fastNlMeansDenoising | --- ## Core: Load, Convert, Save ```python import cv2, numpy as np img = cv2.imread("image.jpg") # BGR uint8 gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) hsv = cv2.cvtColor(img, cv2.COLOR_BGR2HSV) rgb = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) # for matplotlib h, w, c = img.shape roi = img[y1:y2, x1:x2] # crop cv2.imwrite("out.jpg", img) cv2.imshow("win", img); cv2.waitKey(0) ``` --- ## imgproc: Filters & Edges ```python blur = cv2.GaussianBlur(gray, (5,5), 0) median = cv2.medianBlur(gray, 5) # salt-and-pepper bilat = cv2.bilateralFilter(img, 9, 75, 75) # edge-preserving edges = cv2.Canny(blur, 50, 150) kernel = cv2.getStructuringElement(cv2.MORPH_ELLIPSE, (5,5)) opened = cv2.morphologyEx(binary, cv2.MORPH_OPEN, kernel) # remove noise closed = cv2.morphologyEx(binary, cv2.MORPH_CLOSE, kernel) # fill holes ``` --- ## imgproc: Thresholding ```python _, binary = cv2.threshold(gray, 127, 255, cv2.THRESH_BINARY) _, otsu = cv2.threshold(gray, 0, 255, cv2.THRESH_BINARY + cv2.THRESH_OTSU) adaptive = cv2.adaptiveThreshold(gray, 255, cv2.ADAPTIVE_THRESH_GAUSSIAN_C, cv2.THRESH_BINARY, 11, 2) # Color range mask lower = np.array([100, 50, 50]) upper = np.array([130, 255, 255]) mask = cv2.inRange(hsv, lower, upper) ``` --- ## imgproc: Contours ```python cnts, hier = cv2.findContours(binary, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE) for cnt in cnts: area = cv2.contourArea(cnt) if area < 500: continue peri = cv2.arcLength(cnt, True) approx = cv2.approxPolyDP(cnt, 0.02*peri, True) x,y,w,h = cv2.boundingRect(cnt) M = cv2.moments(cnt) cx = int(M["m10"] / M["m00"]) # centroid cy = int(M["m01"] / M["m00"]) cv2.drawContours(img, [cnt], 0, (0,255,0), 2) # Shape by vertex count n = len(approx) if n == 3: shape = "triangle" elif n == 4: shape = "quad/rect" elif n == 5: shape = "pentagon" else: shape = "circle" ``` --- ## imgproc: Perspective Warp ```python src = np.float32([[tl_x,tl_y],[tr_x,tr_y],[bl_x,bl_y],[br_x,br_y]]) dst = np.float32([[0,0],[W,0],[0,H],[W,H]]) M = cv2.getPerspectiveTransform(src, dst) warped = cv2.warpPerspective(img, M, (W, H)) ``` --- ## features2d: SIFT / ORB Matching ```python sift = cv2.SIFT_create() orb = cv2.ORB_create(nfeatures=1500) kp1, des1 = sift.detectAndCompute(img1, None) kp2, des2 = sift.detectAndCompute(img2, None) bf = cv2.BFMatcher(cv2.NORM_L2) # L2 for SIFT # bf = cv2.BFMatcher(cv2.NORM_HAMMING) # Hamming for ORB/AKAZE matches = bf.knnMatch(des1, des2, k=2) good = [m for m,n in matches if m.distance < 0.75*n.distance] if len(good) > 10: src_pts = np.float32([kp1[m.queryIdx].pt for m in good]).reshape(-1,1,2) dst_pts = np.float32([kp2[m.trainIdx].pt for m in good]).reshape(-1,1,2) H, mask = cv2.findHomography(src_pts, dst_pts, cv2.RANSAC, 5.0) ``` | Detector | Speed | Scale inv | Notes | |----------|-------|-----------|-------| | SIFT | Slow | Yes | Most accurate | | ORB | Fast | No | Free, real-time | | AKAZE | Medium | Yes | Balanced | | FAST | Very fast | No | Corners only | --- ## objdetect: Face & QR ```python face_cascade = cv2.CascadeClassifier( cv2.data.haarcascades + "haarcascade_frontalface_alt.xml") faces = face_cascade.detectMultiScale(gray, 1.1, 5, minSize=(30,30)) for (x,y,w,h) in faces: cv2.rectangle(img, (x,y), (x+w,y+h), (255,0,0), 2) qr = cv2.QRCodeDetector() data, pts, _ = qr.detectAndDecode(img) ``` --- ## dnn: YOLO / ONNX Inference ```python net = cv2.dnn.readNetFromONNX("yolov8n.onnx") # Optional GPU: net.setPreferableBackend(cv2.dnn.DNN_BACKEND_CUDA) blob = cv2.dnn.blobFromImage(img, 1/255, (640,640), swapRB=True) net.setInput(blob) outputs = net.forward(net.getUnconnectedOutLayersNames()) for det in outputs[0]: scores = det[5:] class_id = np.argmax(scores) confidence = scores[class_id] if confidence > 0.5: cx,cy,bw,bh = (det[:4] * np.array([W,H,W,H])).astype(int) cv2.rectangle(img, (cx-bw//2, cy-bh//2), (cx+bw//2, cy+bh//2), (0,255,0), 2) ``` Supported: ONNX | TensorFlow .pb | Caffe | Darknet YOLO | OpenVINO IR --- ## tracking: Object Trackers ```python tracker = cv2.TrackerCSRT_create() # best accuracy # tracker = cv2.TrackerKCF_create() # balanced # tracker = cv2.TrackerMOSSE_create() # fastest ok = tracker.init(frame, (x, y, w, h)) while cap.isOpened(): ok, frame = cap.read() ok, bbox = tracker.update(frame) if ok: x,y,w,h = [int(v) for v in bbox] cv2.rectangle(frame, (x,y), (x+w,y+h), (0,255,0), 2) ``` --- ## calib3d: Camera Calibration ```python objp = np.zeros((6*9,3), np.float32) objp[:,:2] = np.mgrid[0:9,0:6].T.reshape(-1,2) objpts, imgpts = [], [] for img in calib_images:
Ver no GitHub
Este SKILL.md e muito grande, entao o SkillsMP mostra aqui apenas a primeira secao. Ver no GitHub