Skip to content

didww/ai / skills/didww-to-livekit

didww-to-livekit

Verified

Connect a DIDWW phone number to a LiveKit Agents worker over SIP, on LiveKit Cloud or self-hosted: inbound trunk, dispatch rule to a named agent, optional outbound trunk. Use whenever the user wants a LiveKit agent (any STT, LLM and TTS combination, including Claude as the brain) answering a real number via DIDWW, mentions sip.livekit.cloud, SIP inbound trunks or dispatch rules, lk sip commands, agent_name dispatch, or debugging calls between DIDWW and LiveKit. This is the bring-your-own-brain pairing: the agent is code the user runs.

FileKindSize
.npmignoreother66 B
LICENSEother1.1 KB
README.mdmarkdown1.3 KB
SKILL.mdskill md10.9 KB
bin/install.jsexecutablescript5.3 KB
install.shexecutablescript1.0 KB
package.jsonmanifest924 B
publish.shexecutablescript604 B
scripts/connect.pyscript12.7 KB
test.shexecutablescript488 B
tests/test_connect.pyscript12.2 KB

bin/install.js

View on GitHub
#!/usr/bin/env node
'use strict';

// Installs this skill into the user's Claude skills directory. Copies files
// and nothing else: it does not run the skill and touches nothing outside
// ~/.claude (or the --dest you give it).

const fs = require('fs');
const os = require('os');
const path = require('path');

const pkg = require('../package.json');
const SKILL = pkg.name;
const src = path.resolve(__dirname, '..');
const REQUIRED = ['SKILL.md', 'scripts'];
const OPTIONAL = ['references'];
const PARTS = REQUIRED.concat(OPTIONAL.filter((p) => fs.existsSync(path.join(src, p))));

const argv = process.argv.slice(2);
const has = (f) => argv.includes(f);
const dryRun = has('--dry-run') || has('-n');

if (has('--help') || has('-h')) {
  console.log(`
  ${SKILL} — installer

  Usage
    npx ${SKILL} [options]

  Options
    -n, --dry-run   Show what would be written, change nothing
        --dest DIR  Install to DIR instead of ~/.claude/skills/${SKILL}
    -h, --help      This

  Copies the skill's files into your Claude skills directory. An existing
  install is moved to ~/.claude/skill-backups/ first: never overwritten, and
  never left inside skills/, where a backup would register as a second skill.
`);
  process.exit(0);
}

const fail = (msg) => {
  console.error(`  ${msg}`);
  console.error('  Nothing was changed.\n');
  process.exit(1);
};

const known = new Set(['--dry-run', '-n', '--dest']);
const destFlag = argv.indexOf('--dest');
if (destFlag !== -1 && (!argv[destFlag + 1] || argv[destFlag + 1].startsWith('-'))) {
  fail('--dest needs a directory.');
}
const unknown = argv.filter((a, i) => !known.has(a) && i !== destFlag + 1);
if (unknown.length) fail(`Unknown option ${unknown[0]}; see --help.`);

const home = os.homedir();
const dest = destFlag !== -1
  ? path.resolve(argv[destFlag + 1])
  : path.join(home, '.claude', 'skills', SKILL);
const backupRoot = path.join(home, '.claude', 'skill-backups');

// An existing dest is moved to the backups, so it must be a directory this
// installer owns: never home, a skills root, the package itself, or a
// folder holding anything other than this skill.
const inside = (child, parent) => {
  const rel = path.relative(parent, child);
  return rel === '' || (!rel.startsWith('..') && !path.isAbsolute(rel));
};
const protectedDirs = [path.parse(dest).root, home, path.join(home, '.claude'),
  path.join(home, '.claude', 'skills'), backupRoot];
if (protectedDirs.includes(dest)) fail(`Refusing to install into ${dest}: pick a folder for this skill.`);
if (inside(dest, src) || inside(src, dest)) fail(`Refusing to install into ${dest}: it overlaps the package.`);

const skillName = (dir) => {
  try {
    const head = fs.readFileSync(path.join(dir, 'SKILL.md'), 'utf8').split(/^---$/m)[1] || '';
    const m = head.match(/^name:\s*(\S+)\s*$/m);
    return m ? m[1] : null;
  } catch (e) {
    return null;
  }
};
let existing = false;
if (fs.existsSync(dest)) {
  if (!fs.statSync(dest).isDirectory()) fail(`Refusing to install: ${dest} is a file.`);
  const entries = fs.readdirSync(dest).filter((f) => f !== '.DS_Store');
  if (entries.length && skillName(dest) !== SKILL) {
    fail(`Refusing to install: ${dest} exists and is not a ${SKILL} install.`);
  }
  existing = entries.length > 0;
}

const say = (s) => console.log(s);
const tick = (s) => say(`  ✓ ${s}`);

say(`\n  ${SKILL} v${pkg.version}`);
say(`  from ${src}`);
say(`  to   ${dest}${dryRun ? '   (dry run)' : ''}\n`);

// Refuse to run from a tree that is missing its own content, which would
// otherwise install a hollow skill over a working one.
const missing = REQUIRED.filter((p) => !fs.existsSync(path.join(src, p)));
if (missing.length) {
  console.error(`  Cannot install: this package is missing ${missing.join(', ')}.`);
  console.error('  Nothing was changed.\n');
  process.exit(1);
}

// Back up any existing install. Backups go OUTSIDE skills/ deliberately:
// anything with a SKILL.md under skills/ is discovered as a skill.
if (existing) {
  const stamp = new Date().toISOString().replace(/[-:]/g, '').replace(/\..+/, '').replace('T', '-');
  const backup = path.join(backupRoot, `${SKILL}-${stamp}`);
  if (dryRun) {
    tick(`would back up existing install to ${backup}`);
  } else {
    fs.mkdirSync(backupRoot, { recursive: true });
    fs.renameSync(dest, backup);
    tick(`backed up existing install to ${backup}`);
  }
}

if (!dryRun) fs.mkdirSync(dest, { recursive: true });

const skip = (p) => !/__pycache__|\.DS_Store|\.pyc$/.test(p);
for (const part of PARTS) {
  const from = path.join(src, part);
  const to = path.join(dest, part);
  if (dryRun) {
    const st = fs.statSync(from);
    tick(`would copy ${part}${st.isDirectory() ? ` (${fs.readdirSync(from).filter(skip).length} entries)` : ''}`);
    continue;
  }
  fs.cpSync(from, to, { recursive: true, filter: skip });
  tick(`copied ${part}`);
}

// The scripts run as `python3 scripts/<name>.py`; the bit is a courtesy.
if (!dryRun) {
  const scripts = path.join(dest, 'scripts');
  for (const f of fs.readdirSync(scripts)) {
    if (/\.(py|sh)$/.test(f)) fs.chmodSync(path.join(scripts, f), 0o755);
  }
  tick('made scripts executable');
}

say(dryRun ? `
  Dry run. Nothing was written.
` : `
  Done. Restart Claude Code. It triggers on its own when you mention DIDWW together with LiveKit.
  The carrier side wants the DIDWW MCP (https://api.didww.com/mcp, OAuth sign-in).
`);
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: 472kUpdated 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