Skip to content

nanocoai/nanoclaw / .claude/skills/add-cursor

add-cursor

Flagged

Use Cursor (local Agent SDK) as a full agent provider — planning, tool orchestration, MCP tools, session resume — alongside or instead of Claude. Cursor-account sign-in or API key, held by the credential gateway. Per-group via `ncl groups config update --provider cursor`. Distinct from using Cursor as a cloud agent (those run on Cursor VMs and are not this provider).

payload/container/agent-runner/src/providers/cursor-registration.test.ts

View on GitHub
/**
 * Integration test for the cursor provider's CONTAINER-side reach-in: the
 * self-registration import in container/agent-runner/src/providers/index.ts.
 * Importing the barrel runs cursor.ts's top-level registerProvider('cursor', …);
 * without that import line createProvider('cursor') throws 'Unknown provider'.
 *
 * Behavior, not structural, and BARREL-ONLY: it imports the real barrel
 * (./index.js), never ./cursor.js directly. Importing the provider module
 * directly (as cursor.factory.test.ts does) self-registers it and would stay
 * GREEN even if the barrel line were deleted. This test also pulls in
 * `@cursor/sdk` unmocked — a missing package goes red.
 */
import { describe, it, expect } from 'bun:test';
import fs from 'fs';
import path from 'path';

import { listProviderNames } from './provider-registry.js';
import './index.js';

describe('cursor provider registration', () => {
  it('registers cursor via the provider barrel', () => {
    expect(listProviderNames()).toContain('cursor');
  });

  it('loads the pinned Cursor SDK under Bun', async () => {
    const sdk = await import('@cursor/sdk');
    expect(typeof sdk.Agent.create).toBe('function');
  });

  it('pins @cursor/sdk in container/agent-runner/package.json (no CLI manifest)', () => {
    const pkg = JSON.parse(fs.readFileSync(path.join(import.meta.dir, '../../package.json'), 'utf-8')) as {
      dependencies?: Record<string, string>;
    };
    expect(pkg.dependencies?.['@cursor/sdk']).toBe('1.0.28');

    const manifestPath = path.join(import.meta.dir, '../../../cli-tools.json');
    if (fs.existsSync(manifestPath)) {
      const tools = JSON.parse(fs.readFileSync(manifestPath, 'utf-8')) as Array<{ name?: string }>;
      expect(tools.some((t) => t.name === '@cursor/sdk' || t.name === 'cursor-agent')).toBe(false);
    }
  });
});
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall