Reusable AI capability
Validate TypeScript Runtime Data Boundaries
Find where untrusted runtime inputs can bypass TypeScript’s compile-time assumptions, then specify focused validation, compatible error handling, and regression checks for affected consumers.
This Skill is a reusable set of instructions based on the linked Amo.ng Prompt or Workflow. It tells you what to provide, how to apply the method and how to know when the task is complete. It does not run automatically.
# Validate TypeScript Runtime Data Boundaries Skill ID: AMO-S-000046 Skill URL: https://amo.ng/skills/validate-typescript-runtime-data-boundaries Purpose: Audit TypeScript application boundaries where API responses, webhooks, stored data, environment variables, SDK inputs, or user payloads enter typed code, and produce an evidence-backed remediation plan for runtime validation without overstating execution or merge readiness. Required inputs: - Repository context or relevant TypeScript files, including boundary code, consumers, types, schemas, and error handling paths. - Description of the untrusted data source: API, webhook, storage, configuration, queue, file import, user input, or SDK boundary. - Observed failures, incidents, examples of malformed data, test failures, logs, or known risk scenarios, if available. - Current validation libraries or conventions, such as Zod, Valibot, io-ts, JSON Schema, custom guards, or framework validation. - Compatibility constraints, public API contracts, error-format expectations, rollout limits, and authorization to inspect or propose changes. How to use: When to use: - A TypeScript codebase trusts external or persisted data based mainly on interfaces, casts, generated types, or unchecked assumptions. - A defect, incident, or review suggests unsafe `as` assertions, missing schema validation, invalid API payload handling, or brittle environment configuration. - A team needs a bounded plan for adding runtime validation while preserving public contracts and compatible behavior. - Generated or AI-assisted TypeScript code needs review for unsupported assumptions about dependency, API, or payload shapes. When not to use: - Do not use as a general TypeScript style review when no runtime trust boundary or data-shape risk is involved. - Do not use to rewrite an entire validation architecture without a specific boundary, input source, or failure mode. - Do not use as proof that code is secure, correct, or production-ready unless the required tests and reviews have actually been run by authorized people. - Do not use for purely static type errors that do not involve runtime data, serialization, or external inputs. Instructions: 1. Open AMO-P-000240, supply its required inputs, and run the complete source Prompt in Codex. Review its evidence register and limitations before using the result. Use the authorized repository environment; a text-provider relay cannot inspect or change the repository for you. Inspect repository instructions and existing changes first, preserve unrelated work, and keep edits, commands and external actions within explicit authorization. 2. Identify each runtime trust boundary and separate supplied facts, code evidence, inferred risk, assumptions, missing information, and uncertainty. 3. Trace how data flows from entry point to typed consumers, noting unchecked casts, unsafe narrowing, optional-field assumptions, generated-type mismatches, partial parsing, and error handling gaps. 4. Rank findings by potential user impact, exploitability or operational risk, breadth of affected consumers, and ease of targeted remediation. 5. Propose the smallest compatible validation and error-handling changes first, preserving existing external contracts unless an explicit breaking-change decision is authorized. 6. Define regression checks for valid, invalid, missing, extra, stale-version, and boundary-case payloads, including compatibility checks for downstream callers or UI states. 7. If code changes are requested, distinguish proposed changes from changes that are authorized, implemented, unverified, or blocked; never imply tests or execution occurred unless evidence is supplied. Expected output: A trust-boundary review containing boundary inventory, evidence-linked findings, risk ranking, targeted validation recommendations, compatibility notes, regression test plan, unresolved evidence gaps, and human-review or release gates for consequential changes. Constraints and boundaries: - Require evidence for factual claims about code behavior, dependency APIs, payload shapes, or test results. - Do not invent package capabilities, schema fields, runtime errors, or repository conventions not supported by supplied evidence. - Keep recommended fixes bounded to the identified trust boundary unless the user explicitly asks for broader architecture work. - Require human authorization before merging code, changing public contracts, modifying production configuration, or deploying validation changes. - Keep transport/parsing, structural validation, normalization, domain rules and consequential side effects distinct. Validate before trusted use; preserve old stored-data and consumer compatibility. Use minimized synthetic/redacted payloads, never credentials. Do not add dependencies or change public contracts without authorization; define rollback for rejected legacy data. Based on Prompt: TypeScript Runtime Data Boundary Check Source ID: AMO-P-000240 https://amo.ng/prompts/typescript-runtime-data-boundary-check Completion criteria: Complete when: - Every finding cites a code location, supplied artifact, log, payload example, or clearly labeled inference. - The output distinguishes compile-time type assumptions from runtime validation evidence. - Recommended validation covers both accepted and rejected payload behavior and names affected consumers. - Regression checks include negative cases and compatibility expectations, not only happy-path tests. - The final status clearly states what is verified, unverified, assumed, missing, and awaiting human decision. Use this Amo.ng Skill with your preferred AI tool. Supply the required inputs and follow the usage instructions. # Validate TypeScript Runtime Data Boundaries Skill ID: AMO-S-000046 Skill URL: https://amo.ng/skills/validate-typescript-runtime-data-boundaries Purpose: Audit TypeScript application boundaries where API responses, webhooks, stored data, environment variables, SDK inputs, or user payloads enter typed code, and produce an evidence-backed remediation plan for runtime validation without overstating execution or merge readiness. Required inputs: - Repository context or relevant TypeScript files, including boundary code, consumers, types, schemas, and error handling paths. - Description of the untrusted data source: API, webhook, storage, configuration, queue, file import, user input, or SDK boundary. - Observed failures, incidents, examples of malformed data, test failures, logs, or known risk scenarios, if available. - Current validation libraries or conventions, such as Zod, Valibot, io-ts, JSON Schema, custom guards, or framework validation. - Compatibility constraints, public API contracts, error-format expectations, rollout limits, and authorization to inspect or propose changes. How to use: When to use: - A TypeScript codebase trusts external or persisted data based mainly on interfaces, casts, generated types, or unchecked assumptions. - A defect, incident, or review suggests unsafe `as` assertions, missing schema validation, invalid API payload handling, or brittle environment configuration. - A team needs a bounded plan for adding runtime validation while preserving public contracts and compatible behavior. - Generated or AI-assisted TypeScript code needs review for unsupported assumptions about dependency, API, or payload shapes. When not to use: - Do not use as a general TypeScript style review when no runtime trust boundary or data-shape risk is involved. - Do not use to rewrite an entire validation architecture without a specific boundary, input source, or failure mode. - Do not use as proof that code is secure, correct, or production-ready unless the required tests and reviews have actually been run by authorized people. - Do not use for purely static type errors that do not involve runtime data, serialization, or external inputs. Instructions: 1. Open AMO-P-000240, supply its required inputs, and run the complete source Prompt in Codex. Review its evidence register and limitations before using the result. Use the authorized repository environment; a text-provider relay cannot inspect or change the repository for you. Inspect repository instructions and existing changes first, preserve unrelated work, and keep edits, commands and external actions within explicit authorization. 2. Identify each runtime trust boundary and separate supplied facts, code evidence, inferred risk, assumptions, missing information, and uncertainty. 3. Trace how data flows from entry point to typed consumers, noting unchecked casts, unsafe narrowing, optional-field assumptions, generated-type mismatches, partial parsing, and error handling gaps. 4. Rank findings by potential user impact, exploitability or operational risk, breadth of affected consumers, and ease of targeted remediation. 5. Propose the smallest compatible validation and error-handling changes first, preserving existing external contracts unless an explicit breaking-change decision is authorized. 6. Define regression checks for valid, invalid, missing, extra, stale-version, and boundary-case payloads, including compatibility checks for downstream callers or UI states. 7. If code changes are requested, distinguish proposed changes from changes that are authorized, implemented, unverified, or blocked; never imply tests or execution occurred unless evidence is supplied. Expected output: A trust-boundary review containing boundary inventory, evidence-linked findings, risk ranking, targeted validation recommendations, compatibility notes, regression test plan, unresolved evidence gaps, and human-review or release gates for consequential changes. Constraints and boundaries: - Require evidence for factual claims about code behavior, dependency APIs, payload shapes, or test results. - Do not invent package capabilities, schema fields, runtime errors, or repository conventions not supported by supplied evidence. - Keep recommended fixes bounded to the identified trust boundary unless the user explicitly asks for broader architecture work. - Require human authorization before merging code, changing public contracts, modifying production configuration, or deploying validation changes. - Keep transport/parsing, structural validation, normalization, domain rules and consequential side effects distinct. Validate before trusted use; preserve old stored-data and consumer compatibility. Use minimized synthetic/redacted payloads, never credentials. Do not add dependencies or change public contracts without authorization; define rollback for rejected legacy data. Based on Prompt: TypeScript Runtime Data Boundary Check Source ID: AMO-P-000240 https://amo.ng/prompts/typescript-runtime-data-boundary-check Completion criteria: Complete when: - Every finding cites a code location, supplied artifact, log, payload example, or clearly labeled inference. - The output distinguishes compile-time type assumptions from runtime validation evidence. - Recommended validation covers both accepted and rejected payload behavior and names affected consumers. - Regression checks include negative cases and compatibility expectations, not only happy-path tests. - The final status clearly states what is verified, unverified, assumed, missing, and awaiting human decision.Copy Skill copies the full Skill instructions. Use with AI copies those instructions with a short guide for your chosen AI tool. Both actions only copy text—they do not send anything to an AI provider or run the Skill.
Purpose
Audit TypeScript application boundaries where API responses, webhooks, stored data, environment variables, SDK inputs, or user payloads enter typed code, and produce an evidence-backed remediation plan for runtime validation without overstating execution or merge readiness.
Required inputs
Have these details available before following the usage instructions.
- Repository context or relevant TypeScript files, including boundary code, consumers, types, schemas, and error handling paths.
- Description of the untrusted data source: API, webhook, storage, configuration, queue, file import, user input, or SDK boundary.
- Observed failures, incidents, examples of malformed data, test failures, logs, or known risk scenarios, if available.
- Current validation libraries or conventions, such as Zod, Valibot, io-ts, JSON Schema, custom guards, or framework validation.
- Compatibility constraints, public API contracts, error-format expectations, rollout limits, and authorization to inspect or propose changes.
How to use this Skill
When to use:
- A TypeScript codebase trusts external or persisted data based mainly on interfaces, casts, generated types, or unchecked assumptions.
- A defect, incident, or review suggests unsafe `as` assertions, missing schema validation, invalid API payload handling, or brittle environment configuration.
- A team needs a bounded plan for adding runtime validation while preserving public contracts and compatible behavior.
- Generated or AI-assisted TypeScript code needs review for unsupported assumptions about dependency, API, or payload shapes.
When not to use:
- Do not use as a general TypeScript style review when no runtime trust boundary or data-shape risk is involved.
- Do not use to rewrite an entire validation architecture without a specific boundary, input source, or failure mode.
- Do not use as proof that code is secure, correct, or production-ready unless the required tests and reviews have actually been run by authorized people.
- Do not use for purely static type errors that do not involve runtime data, serialization, or external inputs.
Instructions:
1. Open AMO-P-000240, supply its required inputs, and run the complete source Prompt in Codex. Review its evidence register and limitations before using the result. Use the authorized repository environment; a text-provider relay cannot inspect or change the repository for you. Inspect repository instructions and existing changes first, preserve unrelated work, and keep edits, commands and external actions within explicit authorization.
2. Identify each runtime trust boundary and separate supplied facts, code evidence, inferred risk, assumptions, missing information, and uncertainty.
3. Trace how data flows from entry point to typed consumers, noting unchecked casts, unsafe narrowing, optional-field assumptions, generated-type mismatches, partial parsing, and error handling gaps.
4. Rank findings by potential user impact, exploitability or operational risk, breadth of affected consumers, and ease of targeted remediation.
5. Propose the smallest compatible validation and error-handling changes first, preserving existing external contracts unless an explicit breaking-change decision is authorized.
6. Define regression checks for valid, invalid, missing, extra, stale-version, and boundary-case payloads, including compatibility checks for downstream callers or UI states.
7. If code changes are requested, distinguish proposed changes from changes that are authorized, implemented, unverified, or blocked; never imply tests or execution occurred unless evidence is supplied.
Expected output:
A trust-boundary review containing boundary inventory, evidence-linked findings, risk ranking, targeted validation recommendations, compatibility notes, regression test plan, unresolved evidence gaps, and human-review or release gates for consequential changes.
Constraints and boundaries:
- Require evidence for factual claims about code behavior, dependency APIs, payload shapes, or test results.
- Do not invent package capabilities, schema fields, runtime errors, or repository conventions not supported by supplied evidence.
- Keep recommended fixes bounded to the identified trust boundary unless the user explicitly asks for broader architecture work.
- Require human authorization before merging code, changing public contracts, modifying production configuration, or deploying validation changes.
- Keep transport/parsing, structural validation, normalization, domain rules and consequential side effects distinct. Validate before trusted use; preserve old stored-data and consumer compatibility. Use minimized synthetic/redacted payloads, never credentials. Do not add dependencies or change public contracts without authorization; define rollback for rejected legacy data.
Based on an Amo.ng Prompt
TypeScript Runtime Data Boundary Check
Open the linked Prompt to read the instructions this Skill is based on.
Completion criteria
Complete when:
- Every finding cites a code location, supplied artifact, log, payload example, or clearly labeled inference.
- The output distinguishes compile-time type assumptions from runtime validation evidence.
- Recommended validation covers both accepted and rejected payload behavior and names affected consumers.
- Regression checks include negative cases and compatibility expectations, not only happy-path tests.
- The final status clearly states what is verified, unverified, assumed, missing, and awaiting human decision.
Was this useful?
Related Prompts
Browse PromptsBuild a Searchable Directory from an Approved Listing Specification
Implement an approved searchable directory with validated listing ingestion, filters, deterministic pagination, moderation boundaries, access controls, and test-backed handoff evidence.
Build an Offline-Capable Progressive Web App Feature
Implement one approved installable, offline-aware PWA feature with bounded caching, sync conflict handling, device tests, and a reversible release handoff.
Build a Retrieval-Grounded Knowledge Assistant from an Approved Architecture
Implement an approved RAG knowledge assistant with entitlement-safe ingestion, traceable citations, abstention, evaluation evidence, and a reversible release handoff.
Build a Hosted-Checkout E-commerce Vertical Slice
Implement one approved catalog-to-order journey using hosted checkout in a payment sandbox, with server-verified prices, signed webhooks, order-state integrity, reconciliation, and disabled fulfilment.
Build a Conflict-Safe Booking Feature from Approved Requirements
Implement one approved booking journey with explicit states, capacity invariants, transactional conflict prevention, timezone handling, sandboxed integrations, recovery, and concurrency evidence.
Build a Multi-Tenant SaaS Vertical Slice from an Approved Specification
Implement one approved multi-tenant application journey with server-side tenant isolation across authorization, persistence, jobs, caches, storage, search, exports, tests, and rollback.