LeoYeAI/agent-master-skills / skills/aquaclaw-openclaw-bridge
aquaclaw-openclaw-bridge
UnverifiedUse when OpenClaw needs to join a hosted Aqua from URL + invite code, read mirror-backed or live Aqua state, inspect runtime status, or run local/hosted Aqua join, context, pulse, mirror, heartbeat, and diary-digest flows.
scripts/sync-aquaclaw-tools-md.mjs
View on GitHub#!/usr/bin/env node
import process from 'node:process';
import { parseArgValue } from './hosted-aqua-common.mjs';
import { syncManagedToolsBlock } from './aquaclaw-tools-md.mjs';
function printHelp() {
console.log(`Usage: sync-aquaclaw-tools-md.mjs [options]
Preview or refresh the derived AquaClaw managed block inside TOOLS.md.
Options:
--workspace-root <path> OpenClaw workspace root
--tools-path <path> TOOLS.md path override
--config-path <path> Hosted Aqua config path override
--repo-path <path> gateway-hub repo path override
--apply Write the managed block into TOOLS.md
--insert Append the block if it is missing, or create TOOLS.md if absent
--skip-if-missing Exit cleanly without writing if the block is missing
--help Show this message
Notes:
- \`.aquaclaw/\` remains the source of truth.
- The TOOLS.md block is only a human-readable mirror of current machine state.
- Existing user notes outside the managed block are left untouched.
`);
}
function parseOptions(argv) {
const options = {
apply: false,
configPath: process.env.AQUACLAW_HOSTED_CONFIG ?? null,
insert: false,
repoPath: process.env.AQUACLAW_REPO ?? null,
skipIfMissing: false,
toolsPath: process.env.AQUACLAW_TOOLS_PATH ?? null,
workspaceRoot: process.env.OPENCLAW_WORKSPACE_ROOT ?? null,
};
for (let index = 0; index < argv.length; index += 1) {
const arg = argv[index];
if (arg === '--help') {
printHelp();
process.exit(0);
}
if (arg === '--apply') {
options.apply = true;
continue;
}
if (arg === '--insert') {
options.insert = true;
continue;
}
if (arg === '--skip-if-missing') {
options.skipIfMissing = true;
continue;
}
if (arg.startsWith('--workspace-root')) {
options.workspaceRoot = parseArgValue(argv, index, arg, '--workspace-root').trim();
if (!arg.includes('=')) {
index += 1;
}
continue;
}
if (arg.startsWith('--tools-path')) {
options.toolsPath = parseArgValue(argv, index, arg, '--tools-path').trim();
if (!arg.includes('=')) {
index += 1;
}
continue;
}
if (arg.startsWith('--config-path')) {
options.configPath = parseArgValue(argv, index, arg, '--config-path').trim();
if (!arg.includes('=')) {
index += 1;
}
continue;
}
if (arg.startsWith('--repo-path')) {
options.repoPath = parseArgValue(argv, index, arg, '--repo-path').trim();
if (!arg.includes('=')) {
index += 1;
}
continue;
}
throw new Error(`unknown option: ${arg}`);
}
if (options.insert && options.skipIfMissing) {
throw new Error('--insert and --skip-if-missing cannot be used together');
}
return options;
}
function printPreview(result) {
console.log(`TOOLS.md target: ${result.toolsPath}`);
console.log(`TOOLS.md exists: ${result.toolsExists ? 'yes' : 'no'}`);
console.log(`Managed block present: ${result.blockPresent ? 'yes' : 'no'}`);
console.log(`Active target summary: ${result.state.activeTarget}`);
console.log('');
process.stdout.write(result.block);
}
function printApplySummary(result) {
console.log(`Managed block action: ${result.action}`);
console.log(`TOOLS.md target: ${result.toolsPath}`);
console.log(`Active target summary: ${result.state.activeTarget}`);
console.log('Source of truth remains .aquaclaw/ state files.');
}
async function main() {
const options = parseOptions(process.argv.slice(2));
const result = await syncManagedToolsBlock(options);
if (options.apply) {
printApplySummary(result);
} else {
printPreview(result);
}
}
try {
await main();
} catch (error) {
console.error(error instanceof Error ? error.message : String(error));
process.exit(1);
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |