Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
alsk1992 avatar

Pairing

  • 14 installs
  • 610 repo stars
  • Updated June 26, 2026
  • alsk1992/cloddsbot

Pairing (in cloddsbot) is a skill that pairs and authenticates bot users, assigns trust levels, and controls channel access.

About

This skill handles user pairing, authentication, and trust management for a bot across channels like Telegram. A developer uses it to issue and approve pairing codes, assign owner or paired trust levels, and gate access so only paired users can trade. It includes code expiry, rate limiting, auto-approve rules for localhost and Tailscale, and an audit trail.

  • Pairs new users, manages trust levels, and controls access across channels
  • Time-limited pairing codes with rate limiting and an audit trail
  • Three trust levels: owner, paired, stranger

Pairing by the numbers

  • 14 all-time installs (skills.sh)
  • Ranked #1,619 of 2,203 Security skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
At a glance

pairing capabilities & compatibility

Pricing
Free
From the docs

What pairing says it does

User pairing, authentication, and trust management
SKILL.md
Pair new users to Clodds, manage trust levels, and control access across channels.
SKILL.md
npx skills add https://github.com/alsk1992/cloddsbot --skill pairing

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs14
repo stars610
Last updatedJune 26, 2026
Repositoryalsk1992/cloddsbot

What it does

Pair and authenticate bot users, then gate access by trust level.

When should I use this skill?

You need to authenticate new bot users and gate access by trust level.

What you get

Authenticated users with owner/paired/stranger trust levels and an audit trail.

By the numbers

  • 3 trust levels
  • 8-character pairing codes
  • 1-hour code expiry

Files

SKILL.mdMarkdownGitHub ↗

Pairing - Complete API Reference

Pair new users to Clodds, manage trust levels, and control access across channels.

---

Chat Commands

Pairing (New Users)

/pair                                       Request pairing (generates code)
/pair-code ABC123                           Enter pairing code
/unpair                                     Remove your pairing

Admin Commands

/pairing list                               List pending requests
/pairing approve <code>                     Approve pairing request
/pairing reject <code>                      Reject pairing request
/pairing users                              List paired users
/pairing remove <user>                      Remove user pairing

Trust Management

/trust <user> owner                         Grant owner trust
/trust <user> paired                        Standard trust
/trust list                                 List trust levels

---

TypeScript API Reference

Create Pairing Service

import { createPairingService } from 'clodds/pairing';

const pairing = createPairingService({
  // Code settings
  codeLength: 8,
  codeExpiryMinutes: 60,
  maxPendingPerChannel: 3,

  // Auto-approve settings
  autoApproveLocal: true,      // Auto-approve localhost
  autoApproveTailscale: true,  // Auto-approve Tailscale IPs
  autoApproveOwners: true,     // Owners auto-approve their requests

  // Storage
  storage: 'sqlite',
  dbPath: './pairing.db',
});

Create Pairing Request

// User requests pairing
const request = await pairing.createPairingRequest({
  channelId: 'telegram-123',
  userId: 'telegram-user-456',
  username: 'johndoe',
  displayName: 'John Doe',
});

console.log(`Pairing code: ${request.code}`);
console.log(`Expires: ${request.expiresAt}`);
console.log(`Share this code with an admin to get approved`);

Validate Code

// Check if code is valid
const valid = await pairing.validateCode({
  code: 'ABC123XY',
});

if (valid) {
  console.log(`Valid code for user: ${valid.username}`);
  console.log(`Channel: ${valid.channelId}`);
}

Approve Request

// Admin approves pairing
await pairing.approveRequest({
  code: 'ABC123XY',
  approvedBy: 'admin-user-id',
  trustLevel: 'paired',
});

Reject Request

// Admin rejects pairing
await pairing.rejectRequest({
  code: 'ABC123XY',
  rejectedBy: 'admin-user-id',
  reason: 'Unknown user',
});

Check Pairing Status

// Check if user is paired
const isPaired = await pairing.isPaired({
  channelId: 'telegram-123',
  userId: 'telegram-user-456',
});

if (isPaired) {
  console.log('User is paired and can use Clodds');
}

Get Trust Level

const trust = await pairing.getTrustLevel({
  channelId: 'telegram-123',
  userId: 'telegram-user-456',
});

console.log(`Trust level: ${trust}`);
// 'owner' | 'paired' | 'stranger'

// Check specific permission
if (trust === 'owner') {
  console.log('Full admin access');
} else if (trust === 'paired') {
  console.log('Standard trading access');
} else {
  console.log('No access - must pair first');
}

List Pending Requests

const pending = await pairing.listPendingRequests({
  channelId: 'telegram-123',  // Optional: filter by channel
});

for (const req of pending) {
  console.log(`Code: ${req.code}`);
  console.log(`User: ${req.username} (${req.displayName})`);
  console.log(`Requested: ${req.createdAt}`);
  console.log(`Expires: ${req.expiresAt}`);
}

List Paired Users

const users = await pairing.listPairedUsers({
  channelId: 'telegram-123',  // Optional: filter by channel
});

for (const user of users) {
  console.log(`${user.username}: ${user.trustLevel}`);
  console.log(`  Paired: ${user.pairedAt}`);
  console.log(`  Approved by: ${user.approvedBy}`);
}

Check Owner Status

const isOwner = await pairing.isOwner({
  channelId: 'telegram-123',
  userId: 'telegram-user-456',
});

if (isOwner) {
  console.log('User has owner privileges');
}

Remove Pairing

// Remove user's pairing
await pairing.removePairing({
  channelId: 'telegram-123',
  userId: 'telegram-user-456',
});

---

Trust Levels

LevelAccess
ownerFull admin: approve users, manage settings, trading
pairedStandard: trading, portfolio, queries
strangerNone: must pair first

---

Pairing Code Format

  • Length: 8 characters
  • Characters: Uppercase letters + numbers
  • Excludes: 0, O, 1, I, L (avoid confusion)
  • Example: ABC234XY

---

Auto-Approve Rules

ConditionBehavior
LocalhostAuto-approve with owner trust
Tailscale IPAuto-approve with owner trust
Owner requestAuto-approve their other channels

---

Security Features

FeatureDescription
Code expiryCodes expire after 1 hour
Rate limitingMax 3 pending per channel
Unambiguous codesNo confusable characters
Audit trailWho approved/rejected when

---

CLI Admin Commands

# List pending pairing requests
clodds pairing list telegram

# Approve a request
clodds pairing approve ABC234XY

# List paired users
clodds pairing users telegram

# Add user directly (bypass code)
clodds pairing add telegram user-123

# Remove user
clodds pairing remove telegram user-123

---

Best Practices

1. Share codes securely — Don't post in public channels 2. Set expiry appropriately — Shorter for sensitive systems 3. Review pending regularly — Don't let requests pile up 4. Use owner sparingly — Most users only need 'paired' 5. Audit periodically — Review who has access

Related skills

FAQ

What trust levels exist?

owner (full admin), paired (standard trading), and stranger (no access, must pair first).

How long are pairing codes valid?

Codes expire after 1 hour and are limited to 3 pending per channel.

Securityappsec

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.