Skip to content

Inline body field schema and realistic example payloads into SKILL.md - #16

Open
dm1tryG wants to merge 1 commit into
mainfrom
fix/issue-10-skill-md-body-schema
Open

Inline body field schema and realistic example payloads into SKILL.md#16
dm1tryG wants to merge 1 commit into
mainfrom
fix/issue-10-skill-md-body-schema

Conversation

@dm1tryG

@dm1tryG dm1tryG commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Summary

  • SKILL.md now lists each command's real body fields (name, type, required-ness, enums, nested objects) under it, reusing cli_generator._body_schema_help() instead of a generic --body '{...}' placeholder.
  • The Examples section now generates a realistic example JSON payload per endpoint (using schema defaults/enums where available) instead of the generic {"key": "value"}.

Test plan

  • uv run pytest — 33 passed
  • uv run ruff check . — clean
  • New tests confirm body fields and realistic values appear in SKILL.md, no literal \n escapes leak into the Markdown, and the _example_payload_json fallback still works for bodies with no properties
  • Manually inspected generated SKILL.md for the e-commerce example spec (nested objects, arrays, enums) to confirm readable formatting

Closes #10

SKILL.md previously showed a generic --body '{"key": "value"}' for
every endpoint with a request body, regardless of its actual schema.
An agent reading only SKILL.md had to run --help first to discover
the real field names, types, required-ness, and enums.

Reuses cli_generator's _body_schema_help() to list each command's real
body fields under it, and generates a realistic example payload (using
schema defaults/enums where available) instead of the generic
placeholder in the Examples section.

Closes #10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SKILL.md doesn't include request body field schema, forcing an extra --help round trip

1 participant