Skip to content

AElfProject/aelf-skills

aelf-skills-hub

Verified

Discovery, download, and configuration hub for the entire aelf agent skill ecosystem. Use when the user wants to: (1) explore or list available aelf skills, (2) install/bootstrap aelf skills into Cursor, Claude Desktop, OpenClaw, Codex, or Claude Code, (3) route an aelf-related intent to the correct skill, (4) check health or audit installed skills, (5) onboard a new skill into the aelf ecosystem. Covers domains: Portkey CA wallet, Portkey EOA wallet, Awaken DEX, eForest NFT marketplace, AelfScan explorer, TomorrowDAO governance, aelf node interaction.

scripts/lib/catalog.test.ts

View on GitHub
import { afterEach, describe, expect, test } from 'bun:test';
import path from 'node:path';
import { buildCatalog } from './catalog.ts';

const PREVIOUS_SKILLS_BASE = process.env.SKILLS_BASE;
const ROOT_DIR = path.resolve(import.meta.dir, '..', '..');
const FIXTURE_ROOT = path.join(ROOT_DIR, 'testdata');
const FIXTURE_WORKSPACE = path.join(FIXTURE_ROOT, 'workspace.ci.json');

afterEach(() => {
  if (PREVIOUS_SKILLS_BASE === undefined) {
    delete process.env.SKILLS_BASE;
    return;
  }
  process.env.SKILLS_BASE = PREVIOUS_SKILLS_BASE;
});

describe('catalog distribution contract', () => {
  test('buildCatalog emits machine-readable discovery and activation fields', () => {
    process.env.SKILLS_BASE = FIXTURE_ROOT;

    const catalog = buildCatalog({
      workspacePath: FIXTURE_WORKSPACE,
      includeLocalPaths: true,
    });

    const coreSkill = catalog.skills.find(skill => skill.id === 'fixture-core-skill');
    const nodeSkill = catalog.skills.find(skill => skill.id === 'fixture-node-skill');

    expect(coreSkill).toBeDefined();
    expect(nodeSkill).toBeDefined();

    expect(coreSkill?.distributionSources).toEqual(
      expect.objectContaining({
        npmPackage: '@fixture/core-skill',
      }),
    );
    expect(coreSkill?.clientInstall.openclaw).toEqual({
      source: 'npm',
      mode: 'package-setup',
      installCommand: 'bunx -p @fixture/core-skill fixture-core-setup openclaw',
    });
    expect(coreSkill?.clientInstall.ironclaw).toEqual({
      source: 'npm',
      mode: 'trusted-local-install',
      installCommand: 'bunx -p @fixture/core-skill fixture-core-setup ironclaw',
      requiresTrustPromotion: true,
    });

    expect(nodeSkill?.distributionSources).toEqual(
      expect.objectContaining({
        npmPackage: '@fixture/node-skill',
      }),
    );
    expect(nodeSkill?.dependsOn).toEqual(['fixture-core-skill']);
    expect(nodeSkill?.clientInstall.openclaw.installCommand).toBe(
      'bunx -p @fixture/node-skill fixture-node-setup openclaw',
    );
    expect(nodeSkill?.clientInstall.ironclaw.installCommand).toBe(
      'bunx -p @fixture/node-skill fixture-node-setup ironclaw',
    );
  });
});
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall