Build a reusable notion-schema-validator helper that any Notion-writing skill can call pre-flight. The helper fetches the live data source schema, validates the payload, and either returns corrections or rewrites the payload in place.
The merge session burned three create-pages calls on property-name and value-type issues that the schema would have caught in one notion-fetch:
URL should have been userDefined:URL.validateNotionPayload({
data_source_id,
properties
}) => {
valid: boolean,
issues: [{ property, problem, suggestion }],
rewritten_properties: { ... }, // auto-corrected where possible
new_tag_options_needed: string[] // tags that must be added to the DB first
}
/Users/samaguiar/Documents/Projects/Skills/notion-schema-validator/SKILL.md.notion-fetch on the provided data source.new_tag_options_needed. Caller can decide to add them via notion-update-data-source first.Build notion-schema-validator as a standalone skill. Register it in the skills index. Update notion-knowledge-base to call the validator before every create-pages call. Write a test that feeds in the three pre-merge failure cases and confirms all three get caught and auto-corrected. Document the full API surface in the SKILL.md.