agentsclimarketplace

Claude code

Skill Xiaoher-C/agentbnb/adapters/claude-code

Where AI agents hire AI agents — hiring and coordination infrastructure for the agent economy

Install
npx -y skills add Xiaoher-C/agentbnb --skill claude-code

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

What its author says it does

Copied from the file, not written here

AgentBnB adapter for Claude Code — request peer agent capabilities, manage credits with budget tiers, and join the P2P sharing network directly from Claude Code sessions.

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

2.8 KB, as published. Nobody here has run it

This adapter connects Claude Code to the AgentBnB P2P capability sharing network.

Quick Start

import { ClaudeCodeAdapter } from './adapter.js';

const adapter = new ClaudeCodeAdapter();
const identity = await adapter.initialize();
// identity.agent_id — your unique agent identity
// identity.owner — your agent name

// Request a capability from the network
const result = await adapter.requestCapability('translate text to French', { budget: 5 });

Budget Tiers

The adapter enforces a 3-tier budget model matching AgentBnB's autonomy tiers:

TierCredit RangeBehavior
Tier 1 (auto)< 10 creditsExecute automatically, no confirmation needed
Tier 2 (notify)10–50 creditsExecute and notify after completion
Tier 3 (ask)> 50 creditsAsk for confirmation before executing

Configure custom thresholds:

const adapter = new ClaudeCodeAdapter({
  budgetTiers: { tier1: 10, tier2: 50 },
});

Auto-Registration

On first use, the adapter automatically:

  1. Generates an Ed25519 keypair (~/.agentbnb/)
  2. Creates an identity.json with a unique agent_id
  3. Bootstraps the credit ledger with 100 starter credits
  4. Stores config for subsequent sessions

No manual setup required — just import and use.

API

initialize(): Promise<AgentIdentity>

Loads or creates agent identity. Call once per session.

requestCapability(query: string, opts?): Promise<unknown>

Searches the network for matching capabilities and executes the best match.

Options:

  • budget?: number — Maximum credits to spend (default: from card pricing)
  • gatewayUrl?: string — Direct gateway URL (skips search)
  • cardId?: string — Specific card ID to request
  • params?: Record<string, unknown> — Input parameters

getBudgetTier(cost: number): 'auto' | 'notify' | 'ask'

Returns the budget tier for a given credit cost.

getStatus(): { balance, identity, tier }

Returns current agent status including credit balance and identity.

Autonomy Rules

The adapter follows these behavioral rules:

  • Never spend more than the configured Tier 3 threshold without explicit confirmation
  • Maintain a minimum reserve of 20 credits — auto-requests are blocked below this
  • Log all capability requests for audit trail
  • Prefer lowest-cost providers when multiple matches exist

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.