extend-signal-schema
Extend AFI Signal Schemas Safely
Schema changes can break validators, downstream types, and migration paths. This skill guides Claude, Codex, and Claude Code through scoped AFI signal schema updates with tests and governance checks.
Download the skill ZIP
Upload in Claude
Go to Settings → Capabilities → Skills → Upload skill
Toggle on and start using
Agent-readable resources
Use these links when an AI agent, crawler, or script needs clean context instead of reading the full page.
Test it
Using "extend-signal-schema". Request to add an optional macro regime field to Enriched signals.
Expected outcome:
A short implementation summary naming the lifecycle stage, field type, optional status, changed schema and test files, passing build results, and compatibility notes.
Using "extend-signal-schema". Request to add PoInsight as a signal field.
Expected outcome:
A refusal to implement the change, with an explanation that PoI and PoInsight belong at the validator level and require human escalation.
Using "extend-signal-schema". Request to make a currently optional field required.
Expected outcome:
A migration plan using an optional-first approach or a safe default, plus tests and open questions for maintainers.
Security Audit
SafeStatic analysis reported many high-risk patterns, but review found they are false positives caused by Markdown inline code, documentation examples, and ordinary words such as description. The skill is a procedural guide for schema changes and contains no executable script, no prompt injection attempt, no credential handling, and no data exfiltration behavior.
Low Risk Issues (3)
Quality Score
What You Can Build
Add Optional Signal Metadata
Add a backwards-compatible field to an Enriched or Analyzed signal schema with validation and tests.
Review Required Field Changes
Plan a required field change with defaults, migration notes, and explicit approval points.
Keep Validators Aligned
Update schema-adjacent validators and exported types after a schema shape changes.
Try These Prompts
Add an optional field to the Enriched signal schema. The field name is macro_regime, the values are risk_on, risk_off, and neutral, and it should remain backwards compatible.
Refine the action field validation for Scored signals. Keep existing values working, add close and reduce, update tests, and explain any compatibility impact.
Extend the Scored signal schema with an optional risk_breakdown object containing market_risk, liquidity_risk, and execution_risk scores. Add validator checks and focused tests.
Evaluate making content required across all signal lifecycle stages. Propose a migration-safe implementation, identify approval points, and do not edit files until the plan is confirmed.
Best Practices
- Start by confirming the lifecycle stage, field shape, optionality, and migration impact.
- Prefer optional fields or defaults when existing data may lack the new field.
- Run the build and focused schema tests before reporting the change as complete.
Avoid
- Do not add PoI or PoInsight as signal-level fields.
- Do not change orchestration, token economics, deployment, or agent runtime code through this skill.
- Do not remove or rename existing fields without an approved migration path.