Schema Review
Testing & Qualityschema-reviewSchema Review is an Agent Skill for testing & quality published in the GoogleCloudPlatform/magic-modules repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Stub skill for reviewing Magic Modules schemas. Currently covers Enum vs. String trade-offs.
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/GoogleCloudPlatform/magic-modules/blob/HEAD/.agents/skills/utils/schema-review/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/schema-review, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
schema-review
Note to AI Agents: You MUST read the YAML frontmatter above first. Only read the rest of this file if the
descriptionmatches your current roadblock or required task.
Prerequisites
- You must be in the
magic-modulesroot directory. - You must be reviewing or adding a field.
Execution Steps
1. Enum vs. String Trade-off
When adding a field that is defined as an Enum in the API, you must decide between Enum and String in Magic Modules.
The Trade-off:
- Prefer
Enumwhen you want strict, plan-time validation of values to fail fast. - Prefer
String(with allowed values documented) when the API is dynamic or likely to add values. This prevents Terraform from crashing with a validation error for users when the API updates before the provider catches up.
[!NOTE] This skill is a stub and will be expanded over time with more schema review checklist items (such as
api_nameoverrides, array flattening, output-only fields, etc.).
2. Verification & Handoff
Instructions on how the agent should verify the command succeeded, and what workflow or rule it should return to next.
- Proceed with your field addition or PR review based on this stylistic choice.
- Reference the
modernization_roadmap.mdfor upcoming expansions to this checklist.