@nexart/claude-skill
v0.2.1
Published
Verifiable AI execution layer — a standalone, Claude-compatible skill that wraps the NexArt CLI.
Maintainers
Readme
@nexart/claude-skill
Verifiable AI execution layer — a standalone, Claude-compatible skill that wraps
the @nexart/cli binary.
The package exposes a single public API: createNexartSkill(). It returns an
agent-ready tool object that produces a cryptographic proof for an execution and
returns one structured verdict. All cryptography, canonicalisation, and
verification live in the CLI/SDK beneath — this package is only a thin boundary.
Install
npm install @nexart/claude-skillThe skill invokes npx @nexart/cli at runtime. Make sure @nexart/cli is
installable in the runtime environment, or set NEXART_CLI_BIN (e.g.
node /path/to/cli/dist/index.js) to point at a local build.
Usage
import { createNexartSkill } from '@nexart/claude-skill';
const agent = new ClaudeAgent({
tools: [createNexartSkill()],
});createNexartSkill(options?) accepts an optional default mode:
createNexartSkill(); // 'dev' — seal + offline verify
createNexartSkill({ mode: 'production' }); // 'production' — seal + certify + online verifyThe returned object:
{
name: 'nexart_execute',
description: 'Verifiable AI execution layer',
handler: (input, options?) => Promise<NexArtExecuteResult>,
routing: (userIntent?, context?) => boolean,
}handler({ data, mode? })—datais a full execution object, a JSON string, or a path to a JSON file. Returns a single{ status, mode, integrity, ... }verdict.Loose mode —
datamay also be a minimal input that is auto-completed into a valid execution before sealing:- a bare string → treated as the execution
output - an object with only
{ output }→ wrapped into a valid execution
Auto-filled when absent:
executionId(random UUID),provider("unknown"),model("unknown"),prompt(""),input(same asoutput), andparameters. Parameters are always fully defined with finite numbers: defaults are{ temperature: 0.7, maxTokens: 256, topP: 1, seed: 0 }, and any providedparametersare merged over these defaults with each field validated to a finite number (no field is everundefinedornull). An object that already carries anexecutionIdis sealed verbatim except itsparameters, which are always normalized to finite numbers so the CLI never rejects an empty or partialparametersblock.- a bare string → treated as the execution
routing(userIntent, context?)— a heuristic that returnstruewhen an output is worth routing through the skill (a decision, a report/summary/recommendation, or something sent/shared/submitted).
License
MIT
