add-scenario

add-scenario is a skill for Claude Code from ludeo-labs/cosmos-os. It costs 82 tokens per session (2,218 once invoked), scanned A, original, MIT.

A workflow for adding an animated user journey to the Cosmos system map. The journey shows how an action moves between services and other system components.

In plain words
What is it for?
Use it to trace and document flows such as what happens after a user action, adding missing services, topics, domains and scenario steps where needed.
Why use it?
It turns a hard-to-follow path through a codebase into a named, end-to-end sequence that can be played on the map.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Part of the cosmos plugin — 2 skills shipped together

Good fit Use it to trace and document flows such as what happens after a user action, adding missing services, topics, domains and scenario steps where needed.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ludeo-labs/cosmos-os/add-scenario
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add ludeo-labs/cosmos-os --skill add-scenario
Clone the repo
git clone --depth 1 https://github.com/ludeo-labs/cosmos-os

Made for: Claude Code.

Or install cosmos, the plugin that ships this one along with the rest of its 2 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for add-scenario

README.md
[![agentmods](https://agentmods.dev/badge/skills/ludeo-labs/cosmos-os/add-scenario/github.svg)](https://agentmods.dev/skills/ludeo-labs/cosmos-os/add-scenario)
Your own site
<a href="https://agentmods.dev/skills/ludeo-labs/cosmos-os/add-scenario"><img src="https://agentmods.dev/badge/skills/ludeo-labs/cosmos-os/add-scenario/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for add-scenario

Your own site · 80×15
<a href="https://agentmods.dev/skills/ludeo-labs/cosmos-os/add-scenario"><img src="https://agentmods.dev/badge/skills/ludeo-labs/cosmos-os/add-scenario.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 82 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,218 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00082 $0.02218
Opus 5 $0.00041 $0.01109
Sonnet 5 $0.00016 $0.00444
Haiku 4.5 $0.00008 $0.00222

Measured 11d ago against content hash 3e98ef1f5735, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

add-scenario scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/add-scenario/SKILL.md · 206 lines

How it starts

The opening of the file, as written. The whole thing — 206 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Add a scenario (flow) to the Cosmos

Use this skill when the user asks to "add a scenario", "add a flow", "show what happens when X", or "trace flow Y and add it". A scenario is a named, animated sequence of steps that plays end-to-end across services on the map.

If the service nodes involved don't exist yet, run the add-service skill first — this skill assumes all from / to / via ids already exist in SERVICES / TOPICS.


What you'll touch

File Why
src/scenarios/scenarios.ts Scenario entry (and Domain entry if new)
src/scenarios/steps/<domain>.ts Step entries for the flow
src/scenarios/data.ts Barrel — only if you add a new steps file
src/scenarios/services.ts / topics.ts Any missing services/topics
src/scenarios/types.ts Only if you need a new Tech variant

Step 1 — Gather the three inputs

Ask the user if any are missing:

  1. Domain — which domain does this flow belong to? Check DOMAINS in src/scenarios/scenarios.ts (the demo ships with shopping, fulfillment, engagement). If it doesn't fit, confirm a new domain name — you'll add a Domain entry too.
  2. User-facing trigger — what action starts the flow? ("customer clicks Buy", "webhook lands", "cron fires")
  3. Done state — what does the user see/hear when it's over? ("order confirmed banner", "email arrives", "live tracking updates")

Step 2 — Trace the real flow

Spawn an Explore agent (or grep yourself if scope is small) to map every hop end-to-end. Don't invent — read source code. For the shipped AstroMart demo there are no source repos; the demo data is illustrative. For YOUR system, this step is the whole point.

For every hop, capture:

Field Description
from service id (must match SERVICES[].id or TOPICS[].id)
to service id
via topic id — only for Kafka hops; from → topic → to renders as 2 edges
through intermediate hub id — only for 3-hop broadcast: producer → topic → hub → browser
type 'http' | 'ws' | 'kafka' | 'internal'
label short noun phrase for the timeline chip (≤35 chars)
title sentence-case side-panel header
plain 1–3 sentence narrative for the panel
payload optional headers + body + response sample
parallel optional true if this fires alongside the previous step

Read the full file on GitHub · 206 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 206 lines · 82 tokens per session scan A 3e98ef1f5735

Subscribe to this mod's changes

add-scenario is a skill published in the GitHub repository ludeo-labs/cosmos-os (3 stars, last pushed 1mo ago), licensed MIT. It adds 82 tokens to every session and 2,218 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

archify

Create polished, validated architecture, workflow, sequence, data-flow, and lifecycle/state diagrams as explorable standalone HTML with inline SVG, dark/light themes, optional trace motion, and PNG/JPEG/WebP/SVG/WebM export. Accept plain-language requirements or pasted Mermaid flowchart, sequenceDiagram, and…

tt-a1i/archify · 130 tokens

skill-curator

A Chinese-language evaluator for deciding whether developer tools and agent resources are suitable for a curated collection. It checks real repositories, installation paths, activity, duplicates, and security boundaries using evidence.

laolaoshiren/claude-code-skills-zh · 75 tokens

env-manager

An environment-variable manager for project settings stored outside the code, often in .env files. It checks variable definitions and usage while keeping secret values out of reports and terminal output.

laolaoshiren/claude-code-skills-zh · 22 tokens

git-workflow

A guide for handling Git repository work safely, including status checks, branches, commits, pushes, pull requests, and rebasing. Git is a version-control system that records code changes and coordinates work between developers.

laolaoshiren/claude-code-skills-zh · 73 tokens

i18n-helper

A helper for adding internationalization, which lets software show different languages and regional text. It finds user-visible text written directly in code and moves it into language files.

laolaoshiren/claude-code-skills-zh · 33 tokens

log-analyzer

A log-analysis helper that reads application and system logs to find unusual patterns and likely causes. Logs are records of events such as errors, requests, warnings, and service activity.

laolaoshiren/claude-code-skills-zh · 24 tokens