Skip to main content

JSON output

Every command accepts --json. Its output is an object with ok (boolean) and command (the command name), plus the command's own fields. Before printing, skillgendev validates it against src/skillgen/schema/cli/<command>.schema.json. If the payload does not match, that is a bug in skillgendev, and it prints this instead of bad JSON:

{ "ok": false, "command": "generate", "error": "internal: output does not match its schema: …" }

An expected error (exit code 2) prints ok: false with an error message.

This is the interface an agent builds on. Read each command's schema file for exact types; the summary below lists the fields.

Fields by command​

CommandFields besides ok and command
initroot, config, app_name, app_url, is_new
routesroutes[] (route, skill, title, sources, entry_files, has_form, skip), count, found
prepareroute, skill, skill_exists, skill_folder, prompt, prompt_path, schema_path, analysis_path, slice
generateresults[] (see below), written, invalid, no_form, failed, exists, needs, open_questions
questionsquestions[] (id, skill, subject, text, choices, answer), open
answerid, skill, answer
add-ruleskill, rule, check, global, path
validateresults[] (skill, ok, problems, notes)
indexhtml, json, skills, fields
checksince, changed_files, stale, unknown, regenerated
exportpath, skills, files, plugin, skill (the bundled name; empty without --one-skill)
export-chatgptpath, skills, files, plugin
proberoute, skill, url, fields, proven, conditions, dependencies, capture
loginurl, storage_state
logslogs, latest, tail
installtarget, installed, chromium
doctorchecks[] (name, ok, detail, required), fixed

generate results​

Each entry of results:

FieldTypeMeaning
routestringThe route
skillstringThe skill name
statusenumwritten, no-form, invalid, failed, skipped, exists, needs
problemsstring[]Failed checks and notes
open_questionsintegerQuestions waiting for the developer
skill_folderstringWhere the skill was written
verifiedbooleanEvery required field was proven on the page
measured_fieldsintegerFields that got x/y with --xy; 0 otherwise
nextobjectPresent when the route stopped; see The agent handoff

next always has all eight keys: action (analyse or ask), need, reason, ask, run, then, prompt, write.

Example: an agent loop​

skillgendev generate --all --json > result.json
echo $? # 3 when any route has a next step
import json, subprocess

result = subprocess.run(
["skillgendev", "generate", "--all", "--json"], capture_output=True, text=True
)
payload = json.loads(result.stdout)
for item in payload.get("results", []):
step = item.get("next")
if step and step["action"] == "ask":
print(item["route"], "→", step["ask"])

Other schemas​

src/skillgen/schema/ also holds the schemas for skillgendev's internal documents:

SchemaFor
page.schema.jsonpage.json, the page model
page-analysis.schema.jsonWhat Claude Code returns for one page
route-listing.schema.jsonWhat Claude Code returns when it lists routes