add-scenario

Append sanitized JSON scenarios to Texter's src/data/scenarios.ts with TypeScript-safe validation.

1|Updated Jul 17, 2025
One-click install
npx skills add https://github.com/whatsper/texterdocs --skill add-scenario-whatsper
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-scenario
Source: https://github.com/whatsper/texterdocs/tree/main/.claude/skills/add-scenario
Command: npx skills add https://github.com/whatsper/texterdocs --skill add-scenario-whatsper

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a streamlined workflow to extend the Texter Scenario Marketplace by adding new scenarios to the central data file, src/data/scenarios.ts, with safeguards for data structure compatibility and secret sanitization.

Core Features & Use Cases

  • Read and validate the existing src/data/scenarios.ts, then append a new sanitized SCENARIOS entry.
  • Sanitize credentials in the incoming JSON payload by replacing sensitive values with placeholders, while preserving structure and context.
  • Generate a proper TS object for the new scenario, including id, name, tags, triggerEvents, description, configuration, relatedScenarios, and json, ensuring TypeScript types remain valid.

Quick Start

Provide a raw JSON scenario payload and run the add-scenario workflow to append it to src/data/scenarios.ts.

Frequently Asked Questions about add-scenario

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

FAQPage Schema
How do I add a new scenario to a TypeScript data model file?

To add a new scenario to a TypeScript data model file, you append a new sanitized entry to scenarios.ts while enforcing required fields like id, name, tags, and json. This preserves the original structure and ensures TypeScript compilation succeeds.

How do you sanitize sensitive fields in a JSON payload before appending it to scenarios.ts?

Sanitizing sensitive fields in a JSON payload involves replacing credential values with placeholders while preserving the surrounding structure and context. This ensures the integrated scenario data model remains safe without breaking compatibility.

What fields are required when integrating a new scenario into Texter's data model?

Integrating a new scenario into Texter's data model requires the fields id, name, tags, triggerEvents, description, configuration, relatedScenarios, and json. These fields generate a UI-ready configuration and validate types to prevent TypeScript errors.

Can I generate UI-ready configuration items from a raw JSON payload automatically?

Yes, you can generate UI-ready configuration items from a raw JSON payload by validating the existing scenarios.ts structure and appending the new entry. The workflow enforces field requirements and generates the necessary TypeScript object for the UI.

Why does adding a scenario to scenarios.ts cause TypeScript compilation errors?

Adding a scenario to scenarios.ts causes TypeScript compilation errors when the new entry lacks required fields or has incorrect types. Validating the data model against the expected TypeScript types before appending prevents these errors.

Does the add-scenario workflow preserve the original structure of scenarios.ts when appending data?

Yes, the add-scenario workflow preserves the original structure of scenarios.ts when appending data. It reads and validates the existing file, sanitizes the incoming JSON payload, and appends the new entry while maintaining structural compatibility.