Skip to content

Instantly share code, notes, and snippets.

View ruvnet's full-sized avatar
💭
hacking the multiverse.

rUv ruvnet

💭
hacking the multiverse.
View GitHub Profile
@ruvnet
ruvnet / npx.md
Created April 10, 2025 14:25
By following these steps, you can create powerful, reusable NPX components using Vite.js that others can easily execute without installation or use in their projects via npm install[2][4].

Creating Custom NPX Components with Vite.js

Creating custom components that can be installed and executed via NPX is a powerful way to share your code across multiple projects. With Vite.js, this process becomes more streamlined. Here's a comprehensive guide on how to build and publish your own NPX components.

Setting Up Your Project

First, you need to create a new Vite project:

npm create vite@latest my-npx-component
@ruvnet
ruvnet / VS-MCP.md
Created April 4, 2025 22:19
This comprehensive guide outlines how to create a Model Context Protocol (MCP) server for VSCode that enables multiple workspaces or codespaces to collaborate seamlessly through STDIO communication. The implementation supports shared terminals, extension state synchronization, and collaborative editing.

Building a VSCode Remote Access MCP Server for Collaborative Agentic Development

Before diving into the implementation, let's understand what makes this solution valuable: it creates a bridge between isolated development environments, enabling real-time collaboration without the limitations of traditional remote development approaches.

MCP Server Architecture

The MCP (Model Context Protocol) server architecture consists of several key components that work together to facilitate communication between multiple VSCode instances:

  1. A centralized MCP server that handles message routing and state synchronization
  2. Client connections from multiple workspaces or codespaces
@ruvnet
ruvnet / .clinerules
Last active April 15, 2025 19:56
SPARC Cursor/Cline Rules guide structured agentic coding through simplicity, iteration, clear documentation, symbolic reasoning, rigorous testing, and focused AI-human collaboration, ensuring maintainable, secure, high-quality outcomes.
# SPARC Agentic Development Rules
Core Philosophy
1. Simplicity
- Prioritize clear, maintainable solutions; minimize unnecessary complexity.
2. Iterate
- Enhance existing code unless fundamental changes are clearly justified.
@ruvnet
ruvnet / .roomodes.json
Created March 30, 2025 15:12
This guide introduces Roo Code and the innovative Boomerang task concept, now integrated into SPARC Orchestration. By following the SPARC methodology (Specification, Pseudocode, Architecture, Refinement, Completion) and leveraging advanced reasoning models such as o3, Sonnet 3.7 Thinking, and DeepSeek, you can efficiently break down complex proj…
{
"customModes": [
{
"slug": "sparc",
"name": "⚡️ SPARC Orchestrator",
"roleDefinition": "You are SPARC, the orchestrator of complex workflows. You break down large objectives into delegated subtasks aligned to the SPARC methodology. You ensure secure, modular, testable, and maintainable delivery using the appropriate specialist modes.",
"customInstructions": "Follow SPARC:\n\n1. Specification: Clarify objectives and scope. Never allow hard-coded env vars.\n2. Pseudocode: Request high-level logic with TDD anchors.\n3. Architecture: Ensure extensible system diagrams and service boundaries.\n4. Refinement: Use TDD, debugging, security, and optimization flows.\n5. Completion: Integrate, document, and monitor for continuous improvement.\n\nUse `new_task` to assign:\n- spec-pseudocode\n- architect\n- code\n- tdd\n- debug\n- security-review\n- docs-writer\n- integration\n- post-deployment-monitoring-mode\n- refinement-optimization-mode\n\nValidate:\n✅ Files < 500 lines\n✅ No hard-coded
@ruvnet
ruvnet / Gemini.md
Last active April 14, 2025 16:25
Free & Secure API Key Rotator for Google Gemini 2.5 Pro (Deno Edge Functions)

Great. I’ll develop a phased implementation plan, edge function code, deployment strategy, user guide, and full documentation for a key rotator using Deno Edge Functions. This will focus on rotating Gemini 2.5 Pro API keys to handle 429 rate limits efficiently.

I’ll return with a clear breakdown of components, including a secure architecture, key storage and cycling logic, usage limits, and guidance for setup and customization.

Secure API Key Rotator for Google Gemini 2.5 Pro (Deno Edge Functions)

Overview: This solution is an edge-deployed proxy that securely rotates through a pool of Google Gemini 2.5 Pro API keys to avoid hitting per-key rate limits (e.g. free-tier limit of ~2 requests/minute (Gemini 2.5 Pro via OpenRouter triggers RESOURCE_EXHAUSTED despite API key and usage being within free-tier limits · Issue #2000 · RooVetGit/Roo-Code · GitHub)). By

@ruvnet
ruvnet / reasoning.md
Last active April 8, 2025 14:21
Tutorial: Building an Agentic AI System with Deductive & Inductive Reasoning

Tutorial: Building an Agentic AI System with Deductive & Inductive Reasoning

1. Introduction

Modern AI systems increasingly require the ability to make decisions in complex and dynamic environments. One promising approach is to create an agentic AI system that combines:

  • Deductive Reasoning: Rule-based logic that guarantees conclusions when premises hold true.
  • Inductive Reasoning: Data-driven inference that generalizes from specific cases to handle uncertainty.

By integrating these two methods, often referred to as neuro-symbolic AI, an agent can provide transparent, explainable decisions while also adapting to new data. This tutorial explains the concepts behind this approach and shows you how to build an edge-deployable ReAct agent using Deno.

@ruvnet
ruvnet / agentic-robots.txt.md
Created February 28, 2025 01:05
agentic-robots.txt: Dynamic Robots.txt with MCP Integration

agentic-robots-txt: Dynamic Robots.txt with MCP Integration

agentic-robots-txt is a Node.js package that generates a dynamic robots.txt file with extended directives for AI agents, and exposes those rules via Anthropic’s Model Context Protocol (MCP). It helps web developers control standard web crawlers and guide AI model agents by providing an agentic manifest and agent guide references in the robots.txt. The package also includes an MCP server so AI agents (MCP clients) can retrieve these rules programmatically. Key features include dynamic rule generation, MCP compliance, security controls, and easy integration into frameworks like Express.

Dynamic robots.txt Generation

A robots.txt file defines crawl rules for bots (traditionally search engines) by specifying allowed and disallowed paths (The ultimate guide to robots.txt • Yoast). agentic-robots-txt automates creatin

@ruvnet
ruvnet / notebook.ipynb
Last active March 11, 2025 00:25
Diffusion-Based Coding Model with PyTorch
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ruvnet
ruvnet / claude_code.js
Last active February 25, 2025 15:53
Source Code: Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.
This file has been truncated, but you can view the full file.
#!/usr/bin/env -S node --no-warnings=ExperimentalWarning --enable-source-maps
// Claude Code is a Beta product per Anthropic's Commercial Terms of Service.
// By using Claude Code, you agree that all code acceptance or rejection decisions you make,
// and the associated conversations in context, constitute Feedback under Anthropic's Commercial Terms,
// and may be used to improve Anthropic's products, including training models.
// You are responsible for reviewing any code suggestions before use.
// (c) Anthropic PBC. All rights reserved. Use is subject to Anthropic's Commercial Terms of Service (https://www.anthropic.com/legal/commercial-terms).
@ruvnet
ruvnet / GPT-Customization.txt
Created February 24, 2025 14:14
This template helps customize ChatGPT’s memory and preferences for hyper-personalized AI interactions. It optimizes responses using neuro-symbolic reasoning, abstract algebra, and structured logic while refining clarity, segmentation, and iterative learning. Designed for professionals, it ensures responses align with specific expertise, linguist…
Objective:
Enhance [Your Name]’s [Field/Expertise] through [Key Approach] to refine [Core Focus Areas] and achieve [Desired Outcomes].
Instructions:
1. Clarity: Use structured steps, examples, and definitions.
2. References: Cite sources at the end.
3. Segmentation: Break complex topics into logical sections.
4. Interactivity: Encourage refinement through feedback.
5. Tools: Specify relevant code, methods, or frameworks.
6. Feedback: Use benchmarks for continuous improvement.