scratchpad

A project work log describing a planned refactor of example agents to use one shared selector for choosing AI providers and models.

In plain words
What is it for?
Use it as context when replacing hard-coded provider choices, loading API keys from environment variables, and updating agent templates and examples.
Why use it?
It records the intended direction, configuration details, and known challenges so the refactor can be carried out consistently.

Cursor rule

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/emberagi/arbitrum-vibekit/scratchpad
Clone the repo
git clone --depth 1 https://github.com/EmberAGI/arbitrum-vibekit
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 2,109 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.02109
Opus 5 $0.00000 $0.01055
Sonnet 5 $0.00000 $0.00422
Haiku 4.5 $0.00000 $0.00211

Measured 3d ago against content hash 54a887af9692, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

scratchpad scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.vibecode/provider-selector/scratchpad.mdc · 164 lines

How it starts

The opening of the file, as written. The whole thing — 164 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Project: Refactor Agents to Use Provider Selector

Last Updated: 2025-06-20T04:45:00Z Current Role: Executor

Background and Motivation

The user wants to refactor all example and template agents to use the new provider-selector from arbitrum-vibekit-core (no scoped namespace). This change will centralize and simplify AI provider configuration, making it easier to manage API keys and switch between models. The current implementation often hardcodes provider choices (e.g., openrouter(...)), which we will replace with a unified createProviderSelector() call.

Key Challenges and Analysis

  • Consistency: Ensuring all agents are updated to use the new createProviderSelector function from arbitrum-vibekit-core consistently.
  • Configuration: The new createProviderSelector function takes an object with API keys (e.g., openRouterApiKey, openaiApiKey, xaiApiKey, hyperbolicApiKey). While the function itself does not depend on environment variables directly, we will typically load these keys from the environment (e.g., process.env.OPENROUTER_API_KEY) when constructing the configuration object at runtime.
  • Dependency Management: Each agent's package.json must depend on the latest version of arbitrum-vibekit-core and remove direct dependencies on provider-specific SDK packages (@openrouter/ai-sdk-provider, @ai-sdk/openai, @ai-sdk/xai, @hyperbolic/ai-sdk-provider) unless still needed elsewhere.
  • Scope: We need to correctly identify all agents in typescript/examples and typescript/templates that require this refactoring.

High-level Task Breakdown

Task 1: Refactor Example Agents

  • Description: Update all agents in typescript/examples/ to use the createProviderSelector utility.
  • Success Criteria: All example agents instantiate their AI provider via createProviderSelector() and no longer have direct dependencies on provider-specific packages like @openrouter/ai-sdk-provider for provider instantiation.
  • Dependencies: None.
  • Status: Not Started

Read the full file on GitHub · 164 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 164 lines · 0 tokens per session scan A 54a887af9692

Subscribe to this mod's changes

scratchpad is a cursor rule published in the GitHub repository EmberAGI/arbitrum-vibekit (53 stars, last pushed 25d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,109 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.