intent-metadata-consumer

Reads Intent Architect stereotypes and model metadata through generated typed accessors in templates.

23|10|Updated Aug 31, 2017
One-click install
npx skills add https://github.com/IntentArchitect/Intent.Modules --skill intent-metadata-consumer-intentarchitect
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: intent-metadata-consumer
Source: https://github.com/IntentArchitect/Intent.Modules/tree/main/Tests/ModuleBuilderSkills/.opencode/skills/intent-metadata-consumer
Command: npx skills add https://github.com/IntentArchitect/Intent.Modules --skill intent-metadata-consumer-intentarchitect

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? When writing Intent Architect templates or factory extensions, developers often fall back to raw string-based stereotype and property lookups, which are brittle, error-prone, and break when metadata changes. This Skill enforces the use of generated typed extension methods so template logic that branches on stereotypes, properties, or model values stays type-safe and maintainable. ## Core Features & Use Cases - Typed Stereotype Access: Enforces use of generated *StereotypeExtensions.cs accessors (Has/Get/TryGet tiers) instead of GetStereotype("Name") string calls. - Safe Property Consumption: Requires null guards, .AsEnum() and .IsX() enum helpers, and TypeCheckExtensions primitive checks instead of raw string comparisons. - Fallback Guidance: Provides a GUID (DefinitionId)-based lookup pattern and a recipe for promoting it to a full typed extension when no generated accessor exists. - Use Case: While writing a template that conditionally adds a DisallowConcurrentExecution attribute, use this Skill to read the Scheduling stereotype via model.GetScheduling().DisallowConcurrentExecution() rather than string lookups. ## Quick Start Ask the assistant to read a stereotype or property value inside an Intent Architect template using the generated typed extension methods to drive the generated output.

Frequently Asked Questions about intent-metadata-consumer

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

FAQPage Schema
How do I read a stereotype value in an Intent Architect template?▼

Use the generated typed extension methods such as model.GetXxx() or TryGet patterns rather than calling GetStereotype with a string name. Guard optional accessors with null-conditional operators before reading property values.

How do I branch on a stereotype enum option in Intent Architect?▼

Use the .AsEnum() method with a switch statement or the generated .IsX() boolean helpers like IsT4Template(). Never compare the raw .Value string against a literal, since display names can change.

What should I do when no typed extension exists for a stereotype?▼

Fall back to resolving the stereotype by its DefinitionId GUID using HasStereotype and GetStereotype, never by display name. Then promote that fallback into a full typed extension class in Api/Extensions/ following the three-tier Has/Get/TryGet pattern.

When should I not use the intent-metadata-consumer skill?▼

Do not use it for emitting C# builder statements, which belongs to file-builder-expert, or for cross-module DI wiring, which belongs to intent-module-orchestrator. It also does not cover installing or referencing designer modules to reach their models.

Why does my stereotype lookup break after renaming it in the designer?▼

String-based lookups by display name break when stereotypes are renamed, while DefinitionId GUID lookups remain stable. Typed generated accessors internally use the DefinitionId, which is why they are the required pattern.