nanocoai/nanoclaw / .claude/skills/add-iron-proxy
add-iron-proxy
FlaggedInstall or refresh Iron Proxy and its official Iron Control web console for NanoClaw. Use when selecting the Iron gateway, adding its management UI, configuring credentials and grants, or restoring the proxy, approval bridge, and agent guidance.
scripts/detect.ts
View on GitHubimport { execFileSync } from 'node:child_process';
import fs from 'node:fs';
import path from 'node:path';
import { pathToFileURL } from 'node:url';
function configuredContainer(projectRoot: string): string {
try {
return (
fs
.readFileSync(path.join(projectRoot, '.env'), 'utf8')
.match(/^NANOCLAW_IRON_PROXY_CONTAINER=(\S+)$/m)?.[1]
?.trim() ?? ''
);
} catch {
return '';
}
}
// Standalone: this runs before the payload is installed, so it cannot import
// CONTAINER_RUNTIME_BIN. Keep the literal in step with src/container-runtime.ts.
const CONTAINER_RUNTIME_BIN = 'docker';
function containerRunning(name: string): boolean {
try {
return (
execFileSync(CONTAINER_RUNTIME_BIN, ['inspect', '-f', '{{.State.Running}}', name], {
encoding: 'utf8',
stdio: ['ignore', 'pipe', 'ignore'],
timeout: 5_000,
}).trim() === 'true'
);
} catch {
return false;
}
}
export function detectInstalledIronProxy(
projectRoot = process.cwd(),
inspect: (name: string) => boolean = containerRunning,
): boolean {
const container = configuredContainer(projectRoot);
return container !== '' && inspect(container);
}
if (
process.argv[1] &&
fs.existsSync(process.argv[1]) &&
import.meta.url === pathToFileURL(fs.realpathSync(process.argv[1])).href
) {
console.log(detectInstalledIronProxy() ? 'installed' : 'absent');
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |