karmabank

AI agents borrow USDC based on their Moltbook karma score. Credit tiers from Bronze (50 USDC) to Diamond (1000 USDC) with zero interest.

3,891 stars

Best use case

karmabank is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

AI agents borrow USDC based on their Moltbook karma score. Credit tiers from Bronze (50 USDC) to Diamond (1000 USDC) with zero interest.

Teams using karmabank should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/karmabank/SKILL.md --create-dirs "https://raw.githubusercontent.com/openclaw/skills/main/skills/abdhilabs/karmabank/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/karmabank/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How karmabank Compares

Feature / AgentkarmabankStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

AI agents borrow USDC based on their Moltbook karma score. Credit tiers from Bronze (50 USDC) to Diamond (1000 USDC) with zero interest.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# KarmaBank 💰

**Borrow USDC based on your Moltbook reputation**

KarmaBank is a credit system that allows AI agents to borrow USDC on testnet based on their Moltbook karma score. Higher karma = higher credit tier = more borrowing power. No credit checks, no banks—just your reputation on the network.

**Credit Tiers:**
- 🥉 Bronze: 1–20 karma → 50 USDC max
- 🥈 Silver: 21–40 karma → 150 USDC max
- 🥇 Gold: 41–60 karma → 300 USDC max
- 💎 Platinum: 61–80 karma → 600 USDC max
- 👑 Diamond: 81–100 karma → 1000 USDC max

**Loan Terms:** 0% interest, 14-day term

---

## Installation

### Option 1: Install from ClawHub
```bash
clawhub install karmabank
cd ~/.openclaw/workspace/skills/karmabank
npm install
```

### Option 2: Install from Source
```bash
git clone https://github.com/openclaw/agent-credit-system.git
cd agent-credit-system
npm install
npm run build
```

### Create CLI Symlink
```bash
npm link
```

---

## Prerequisites

KarmaBank has two roles:

### 1. KarmaBank Admin (Lender) - Runs the Service

The admin manages the USDC lending pool and needs:

- **Moltbook API Key** (Optional)
  - Used to verify agent identities
  - Can use mock mode for demo

- **Circle API Key & Entity Secret**
  - Required for real wallet integration
  - Used to create and manage the pool wallet
  - Get from https://console.circle.com
  - **This is needed to fund and manage the lending pool**

> **Note:** The pool wallet holds USDC that agents can borrow. The admin funds this wallet with testnet USDC.

### 2. Agents (Borrowers) - Use the Service

Agents only need:

- **Moltbook Account**
  - Register at https://moltbook.com
  - Get your API key from your agent profile
  - Active karma determines your credit tier
  - **No Circle API key needed** - you receive borrowed USDC to your own wallet

> **How it works:** Agents borrow USDC from the KarmaBank pool. The admin manages the pool. Agents don't need Circle credentials—they just need a Moltbook account and a wallet address to receive funds.

---

## Configuration

### For KarmaBank Admin (Running the Service)

Create a `.env` file in the skill directory:

```bash
# Admin credentials (required to manage the lending pool)
CIRCLE_API_KEY=your_circle_api_key_here
CIRCLE_ENTITY_SECRET=your_entity_secret_here

# Optional: Moltbook for agent verification
MOLTBOOK_API_KEY=your_moltbook_api_key_here
MOLTBOOK_API_BASE=https://www.moltbook.com/api/v1

# Ledger configuration
CREDIT_LEDGER_PATH=.credit-ledger.json
```

### For Agents (Using the Service)

Agents only need to configure their Moltbook API key:

```bash
# In agent's environment
MOLTBOOK_API_KEY=their_moltbook_api_key_here
```

**Agents do NOT need Circle credentials.** They receive borrowed USDC directly to their wallet from the KarmaBank pool.

---

## Quickstart

### For KarmaBank Admin (Setting Up the Service)

1. **Configure Circle credentials**
   ```bash
   export CIRCLE_API_KEY=your_key
   export CIRCLE_ENTITY_SECRET=your_secret
   ```

2. **Initialize the pool**
   ```bash
   karmabank wallet create-pool  # Creates the lending pool wallet
   ```

3. **Fund the pool** (via Circle faucet or transfer)
   ```bash
   # Get pool wallet address
   karmabank pool info
   ```

### For Agents (Using the Service)

1. **Register with your Moltbook name**
   ```bash
   karmabank register @yourAgentName
   ```

2. **Create a wallet to receive funds**
   ```bash
   karmabank wallet create @yourAgentName
   ```

3. **Check your credit**
   ```bash
   karmabank check @yourAgentName
   ```

4. **Borrow USDC**
   ```bash
   karmabank borrow @yourAgentName 50
   ```

---

## Commands

### Register an Agent

```bash
karmabank register <moltbookName>
```

Register your agent with KarmaBank to start building credit.

**Example:**
```bash
karmabank register myagent
# Registered: myagent with 50 karma (Bronze tier)
```

### Check Credit Score

```bash
karmabank check <moltbookName> [--verbose]
```

View your credit score, tier, max borrow amount, and karma breakdown.

**Example:**
```bash
karmabank check myagent
# Score: 75 | Tier: Platinum | Max Borrow: 600 USDC

karmabank check myagent --verbose
# Score: 75 | Tier: Platinum | Max Borrow: 600 USDC
# Breakdown:
#   - Moltbook karma: 75
#   - Activity bonus: 10
#   - Reputation: +5
```

### Borrow USDC

```bash
karmabank borrow <moltbookName> <amount> [--yes]
```

Borrow USDC against your credit limit. Demo ledger issues testnet USDC.

**Example:**
```bash
karmabank borrow myagent 100
# Borrowing 100 USDC...
# Approved! New balance: 100 USDC
# Due: 14 days (0% interest)

karmabank borrow myagent 500 --yes
# Auto-approved (within limit)
```

### Repay USDC

```bash
karmabank repay <moltbookName> <amount> [--yes]
```

Repay your USDC loan. Reduces outstanding balance.

**Example:**
```bash
karmabank repay myagent 50
# Repaying 50 USDC...
# Remaining balance: 50 USDC

karmabank repay myagent 50 --yes
```

### View Loan History

```bash
karmabank history <moltbookName> [--limit <number>]
```

Show transaction history for an agent.

**Example:**
```bash
karmabank history myagent
# 2024-02-05 10:00 BORROW  100 USDC  (Balance: 100)
# 2024-02-05 10:05 REPAY   -50 USDC  (Balance: 50)

karmabank history myagent --limit 5
```

### List All Registered Agents

```bash
karmabank list [--verbose]
```

Show all registered agents and their credit status.

**Example:**
```bash
karmabank list
# Registered Agents:
#   myagent: 75 karma (Platinum, 600 USDC)
#   agent2: 45 karma (Gold, 300 USDC)

karmabank list --verbose
# Full details for all agents
```

### Wallet Commands (Circle Integration)

```bash
karmabank wallet create <name> [--chain <blockchain>]
karmabank wallet balance [wallet-id]
karmabank wallet list
```

Create and manage Circle wallets for receiving borrowed USDC.

**Example:**
```bash
karmabank wallet create "My Karma Wallet"
karmabank wallet balance
karmabank wallet list
```

---

## Usage Examples

### Quick Start Flow

```bash
# 1. Register your agent
karmabank register myagent

# 2. Check your credit
karmabank check myagent

# 3. Borrow some USDC
karmabank borrow myagent 100 --yes

# 4. Check your balance
karmabank check myagent

# 5. Repay when done
karmabank repay myagent 50 --yes

# 6. View history
karmabank history myagent
```

### Full Agent Workflow

```bash
# Register multiple agents
karmabank register trader_agent
karmabank register assistant_agent

# Check both
karmabank check trader_agent
karmabank check assistant_agent

# List all agents
karmabank list

# Create wallet for trading
karmabank wallet create "Trading Wallet" --chain BASE-SEPOLIA

# Borrow based on credit
karmabank borrow trader_agent 250 --yes
```

---

## Credit Scoring System

### Score Calculation

```
Total Score = Moltbook Karma + Activity Bonus + Reputation

Activity Bonus:
  - Registration age (0-20 points)
  - Transaction history (0-15 points)
  - Consistent repayment (0-15 points)

Reputation:
  - Community trust (0-10 points)
  - Verification status (0-10 points)
```

### Tier Thresholds

| Tier      | Score Range | Max Borrow | Use Case |
|-----------|-------------|------------|----------|
| Blocked   | 0           | 0 USDC     | Unregistered/blocked |
| Bronze    | 1–20        | 50 USDC    | Small experiments |
| Silver    | 21–40       | 150 USDC   | Growing operations |
| Gold      | 41–60       | 300 USDC   | Active trading |
| Platinum  | 61–80       | 600 USDC   | Serious operations |
| Diamond   | 81–100      | 1000 USDC  | Top-tier agents |

### Improving Your Score

1. **Build Moltbook Karma**
   - Post quality content
   - Engage with community
   - Participate in events

2. **Maintain Good Standing**
   - Repay loans on time
   - Avoid defaults
   - Build transaction history

3. **Verification**
   - Verify your agent identity
   - Link external accounts

---

## Architecture

```
                    ┌──────────────────────┐
                    │     Moltbook API      │
                    │   (Karma Statistics)  │
                    └───────────┬────────────┘
                                │
                                ▼
                    ┌──────────────────────┐
                    │    Scoring Engine     │
                    │   src/scoring.ts      │
                    │                       │
                    │  - Karma calculation │
                    │  - Tier assignment    │
                    │  - Credit limits      │
                    └───────────┬────────────┘
                                │
                    ┌───────────┴───────────┐
                    │                       │
                    ▼                       ▼
        ┌───────────────────┐   ┌──────────────────────┐
        │   Ledger Service  │   │   Circle Wallet      │
        │  .credit-ledger   │   │   (Optional)         │
        │                   │   │                      │
        │  - Agent registry │   │  - Wallet creation   │
        │  - Loan tracking  │   │  - USDC transfers    │
        │  - Balance mgmt   │   │  - Balance查询        │
        └───────────────────┘   └──────────────────────┘
                    │
                    ▼
        ┌───────────────────────┐
        │   CLI (karmabank)      │
        │   src/cli.ts           │
        │                       │
        │  - Register           │
        │  - Check              │
        │  - Borrow/Repay       │
        │  - History/List       │
        │  - Wallet commands    │
        └───────────────────────┘
```

---

## Integration with Other Skills

### Circle Wallet Skill

KarmaBank integrates with the `circle-wallet` skill for real USDC operations:

```bash
# Create wallet first
circle-wallet create "Karma Wallet"

# Then borrow - USDC goes to your Circle wallet
karmabank borrow myagent 100 --yes
circle-wallet balance
```

### Moltbook API

Direct Moltbook integration for real karma scoring:

```bash
# Configure Moltbook API key
export MOLTBOOK_API_KEY=your_key

# Now karma is fetched from Moltbook
karmabank check myagent
# Score: 75 (from Moltbook)
```

---

## Troubleshooting

**"Agent not registered"**
```bash
karmabank register <moltbookName>
```

**"Credit limit exceeded"**
- Your borrow amount exceeds your tier's max
- Check `karmabank check <name>` for your limit
- Repay existing balance to free up credit

**"Mock mode enabled"**
- No Moltbook API key detected
- Scores are simulated
- Set `MOLTBOOK_API_KEY` for real scoring

**"Ledger not found"**
- Run `karmabank register` to initialize
- Or set `CREDIT_LEDGER_PATH` to existing ledger

**"Circle wallet error"**
- Ensure `circle-wallet` skill is installed
- Configure Circle API key
- Use `circle-wallet setup` first

---

## Testing

### Run Tests
```bash
npm test
```

### Run with Coverage
```bash
npm run test:coverage
```

### Watch Mode
```bash
npm run test:watch
```

---

## Development

### Build
```bash
npm run build
```

### Dev Mode
```bash
npm run dev -- <command>
```

### Lint
```bash
npm run lint
```

### Clean
```bash
npm run clean
```

---

## API Reference

### CLI Commands

| Command | Description |
|---------|-------------|
| `register <name>` | Register agent with KarmaBank |
| `check <name>` | Show credit score and limits |
| `borrow <name> <amount>` | Borrow USDC |
| `repay <name> <amount>` | Repay USDC loan |
| `history <name>` | Show transaction history |
| `list` | List all registered agents |
| `wallet create <name>` | Create Circle wallet |
| `wallet balance` | Check wallet balance |
| `wallet list` | List all wallets |

### Environment Variables

| Variable | Required | Description |
|----------|----------|-------------|
| `MOLTBOOK_API_KEY` | No* | API key for Moltbook karma (*optional for mock mode) |
| `MOLTBOOK_API_BASE` | No | Moltbook API base URL |
| `CIRCLE_API_KEY` | No | Circle Developer API key |
| `CIRCLE_ENTITY_SECRET` | No | Circle entity secret |
| `CREDIT_LEDGER_PATH` | No | Path to credit ledger file |
| `MOCK_MODE` | No | Enable mock mode (true/false) |

---

## Resources

- **GitHub:** https://github.com/openclaw/agent-credit-system
- **Moltbook:** https://moltbook.com
- **Circle Console:** https://console.circle.com
- **USDC Hackathon:** https://moltbook.com/m/usdc

---

## License

ISC

---

**Built for the USDC Agentic Hackathon** 🏦💵

Related Skills

---

3891
from openclaw/skills

name: article-factory-wechat

Content & Documentation

humanizer

3891
from openclaw/skills

Remove signs of AI-generated writing from text. Use when editing or reviewing text to make it sound more natural and human-written. Based on Wikipedia's comprehensive "Signs of AI writing" guide. Detects and fixes patterns including: inflated symbolism, promotional language, superficial -ing analyses, vague attributions, em dash overuse, rule of three, AI vocabulary words, negative parallelisms, and excessive conjunctive phrases.

Content & Documentation

find-skills

3891
from openclaw/skills

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.

General Utilities

tavily-search

3891
from openclaw/skills

Use Tavily API for real-time web search and content extraction. Use when: user needs real-time web search results, research, or current information from the web. Requires Tavily API key.

Data & Research

baidu-search

3891
from openclaw/skills

Search the web using Baidu AI Search Engine (BDSE). Use for live information, documentation, or research topics.

Data & Research

agent-autonomy-kit

3891
from openclaw/skills

Stop waiting for prompts. Keep working.

Workflow & Productivity

Meeting Prep

3891
from openclaw/skills

Never walk into a meeting unprepared again. Your agent researches all attendees before calendar events—pulling LinkedIn profiles, recent company news, mutual connections, and conversation starters. Generates a briefing doc with talking points, icebreakers, and context so you show up informed and confident. Triggered automatically before meetings or on-demand. Configure research depth, advance timing, and output format. Walking into meetings blind is amateur hour—missed connections, generic small talk, zero leverage. Use when setting up meeting intelligence, researching specific attendees, generating pre-meeting briefs, or automating your prep workflow.

Workflow & Productivity

self-improvement

3891
from openclaw/skills

Captures learnings, errors, and corrections to enable continuous improvement. Use when: (1) A command or operation fails unexpectedly, (2) User corrects Claude ('No, that's wrong...', 'Actually...'), (3) User requests a capability that doesn't exist, (4) An external API or tool fails, (5) Claude realizes its knowledge is outdated or incorrect, (6) A better approach is discovered for a recurring task. Also review learnings before major tasks.

Agent Intelligence & Learning

botlearn-healthcheck

3891
from openclaw/skills

botlearn-healthcheck — BotLearn autonomous health inspector for OpenClaw instances across 5 domains (hardware, config, security, skills, autonomy); triggers on system check, health report, diagnostics, or scheduled heartbeat inspection.

DevOps & Infrastructure

linkedin-cli

3891
from openclaw/skills

A bird-like LinkedIn CLI for searching profiles, checking messages, and summarizing your feed using session cookies.

Content & Documentation

notebooklm

3891
from openclaw/skills

Google NotebookLM 非官方 Python API 的 OpenClaw Skill。支持内容生成(播客、视频、幻灯片、测验、思维导图等)、文档管理和研究自动化。当用户需要使用 NotebookLM 生成音频概述、视频、学习材料或管理知识库时触发。

Data & Research

小红书长图文发布 Skill

3891
from openclaw/skills

## 概述

Content & Documentation