invalid-undeclared-variable

Detect undeclared placeholders in SKILL.md frontmatter and report their locations.

1|Updated Apr 1, 2026
One-click install
npx skills add https://github.com/charleshall888/cortex-command --skill invalid-undeclared-variable
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: invalid-undeclared-variable
Source: https://github.com/charleshall888/cortex-command/tree/main/tests/fixtures/contracts/invalid-undeclared-variable
Command: npx skills add https://github.com/charleshall888/cortex-command --skill invalid-undeclared-variable

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Detects when a skill body references a variable not declared in its inputs, preventing runtime errors and ambiguous behavior.

Core Features & Use Cases

  • Input validation: checks that all placeholders used in the body have corresponding entries in inputs.
  • Error reporting: surfaces a clear message pinpointing the undeclared variable and its location in the body.
  • Debug assistance: helps developers fix templates quickly during local testing and CI.

Quick Start

Declare every placeholder variable in the inputs section to ensure the skill body runs without undeclared references.

Frequently Asked Questions about invalid-undeclared-variable

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check for undeclared variables in skill templates?

Validation checks all placeholders used in the skill body against declared inputs to catch undeclared variables. It reports the exact missing variable and its location to prevent runtime errors from missing inputs.

Why does my skill body throw a runtime error from missing inputs?

Runtime errors occur when the skill body references placeholders not declared in the inputs section. Declaring every placeholder variable in inputs ensures the skill body runs without undeclared references.

Can I find the exact location of an undeclared variable during template debugging?

Yes, validation surfaces clear error messages pinpointing the exact undeclared variable and its location within the body. This debug assistance helps developers fix templates quickly during local testing and CI.

What is the best way to validate placeholders across multiple SKILL.md frontmatters?

Apply input validation across all SKILL.md frontmatters to verify every body placeholder is declared in inputs. This systematically prevents missing variable errors and ambiguous behavior across templates.

Does input validation prevent ambiguous behavior from undeclared variables in templates?

Yes, input validation detects when a skill body references a variable not declared in its inputs, preventing ambiguous behavior. Checking that all placeholders have corresponding input entries eliminates undefined references.