home / skills / tlabs-xyz / tbtc-v2-performance / global--validation

global--validation skill

/.codex/skills/global--validation

This skill enforces the agent-os global validation standard across codebases, ensuring consistent validation practices and reliable data integrity.

npx playbooks add skill tlabs-xyz/tbtc-v2-performance --skill global--validation

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
363 B
---
name: global--validation
description: Apply the Agent OS standard for global validation.
tags: [agent-os, standard, global]
---

# Global Validation

Use this skill when working on global validation in this repo.

## Instructions

- Follow the standard in `agent-os/standards/global/validation.md`.

## References

- `agent-os/standards/global/validation.md`

Overview

This skill applies the Agent OS standard for global validation across projects. It standardizes how inputs, configurations, and inter-module contracts are validated to ensure consistent behavior and error handling. Use it to enforce a single source of truth for validation logic and reduce runtime surprises.

How this skill works

The skill inspects validation rules, schemas, and validation entry points across the codebase and aligns them to the Agent OS global validation convention. It enforces consistent validators, error formats, and integration points so modules validate inputs uniformly. The skill also highlights mismatches and recommends refactors to centralize validation logic.

When to use it

  • When introducing or updating cross-cutting validation rules
  • Before merging changes that affect public APIs or configuration surfaces
  • During code audits to ensure consistent error handling and schema usage
  • When consolidating duplicated validation logic into shared validators
  • When onboarding new contributors to validation conventions

Best practices

  • Define canonical schemas and validators in one shared location and import them where needed
  • Prefer explicit, typed validation results over exceptions for predictable handling
  • Normalize error shapes and messages to a small set of well-documented types
  • Write unit tests that assert validation behavior for edge cases and malformed inputs
  • Document validation contracts alongside the modules that expose them

Example use cases

  • Centralizing input schemas for service endpoints to prevent divergent requirements
  • Replacing ad-hoc validation logic with shared, typed validators to reduce bugs
  • Ensuring CLIs, config loaders, and APIs use the same validation rules for common options
  • Auditing a large codebase to find and remediate inconsistent error formats
  • Preparing a release by validating all public interfaces for backward compatibility

FAQ

What does “global validation” mean here?

It means a consistent, centralized approach to validating inputs and configuration across modules so behavior and errors are predictable.

How do I handle backward compatibility when tightening rules?

Introduce stricter validation behind feature flags or new API versions, add migration guidance, and include tests that cover old and new formats.