nanocoai/nanoclaw / .claude/skills/add-atomic-chat-tool
add-atomic-chat-tool
VerifiedAdd Atomic Chat MCP server so the container agent can call local models served by the Atomic Chat desktop app via its OpenAI-compatible API.
| File | Kind | Size |
|---|---|---|
| REMOVE.md | markdown | 1.6 KB |
| SKILL.md | skill md | 10.2 KB |
| atomic-chat-env.ts | script | 1.0 KB |
| atomic-chat-mcp-stdio.ts | script | 6.8 KB |
| atomic-chat-registration.test.ts | script | 2.3 KB |
| atomic-chat-wiring.test.ts | script | 2.1 KB |
atomic-chat-wiring.test.ts
View on GitHub/**
* Wiring test for the host-side env-forwarding integration point (host/vitest tree).
*
* The env helper is behavior-tested in isolation, but that does not prove
* composeSessionSpec actually uses it — a direct unit test stays green even if
* the reach-in is deleted. composeSessionSpec is entangled with the gateway
* provider and not cheaply invocable here, so we assert the integration
* structurally: inside composeSessionSpec there is a `...atomicChatEnv()`
* spread. Delete the reach-in and this goes red.
*/
import fs from 'fs';
import path from 'path';
import { describe, it, expect } from 'vitest';
import ts from 'typescript';
function sourceFile(): ts.SourceFile {
const p = path.resolve(process.cwd(), 'src/container-runner.ts');
return ts.createSourceFile(p, fs.readFileSync(p, 'utf8'), ts.ScriptTarget.Latest, true);
}
function findFunction(sf: ts.SourceFile, name: string): ts.FunctionDeclaration | undefined {
let found: ts.FunctionDeclaration | undefined;
const visit = (node: ts.Node) => {
if (ts.isFunctionDeclaration(node) && node.name?.text === name) found = node;
if (!found) ts.forEachChild(node, visit);
};
visit(sf);
return found;
}
/** Is this node a `...atomicChatEnv()` spread (object or array position)? */
function isEnvSpread(node: ts.Node): boolean {
const spreadExpression = ts.isSpreadAssignment(node) || ts.isSpreadElement(node) ? node.expression : undefined;
return (
spreadExpression !== undefined &&
ts.isCallExpression(spreadExpression) &&
ts.isIdentifier(spreadExpression.expression) &&
spreadExpression.expression.text === 'atomicChatEnv'
);
}
describe('container-runner.ts wires in atomicChatEnv', () => {
const sf = sourceFile();
const fn = findFunction(sf, 'composeSessionSpec');
it('finds composeSessionSpec', () => {
expect(fn).toBeDefined();
});
it('spreads ...atomicChatEnv() inside composeSessionSpec', () => {
let wired = false;
const visit = (node: ts.Node) => {
if (isEnvSpread(node)) wired = true;
if (!wired) ts.forEachChild(node, visit);
};
if (fn?.body) visit(fn.body);
expect(wired).toBe(true);
});
});
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| 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: 472k | Updated | Claude CodeCodex | Verified | Install |
| 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: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| 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 available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |