agentsclimarketplace

Scenario refiner

Skill tough-tongue/toughtongue-skills/skills/scenario-refiner

Fix and refine live Tough Tongue AI scenarios from real session evidence via the ttai MCP server. Diagnoses whether an issue lives in ai_instructions, tools_config, or strategy, then applies the smallest possible edit with ttai:update_scenario. Use when the user says "refine the scenario", "fix the scenario", "the agent said X instead of Y", "it ended the call too early", "it skipped a step", "make it sound more natural", or pastes a transcript or complaint about a live scenario.From its SKILL.md

Install
npx -y skills add tough-tongue/toughtongue-skills --skill scenario-refiner

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 5 stars5 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

7.7 KB, as published. Nobody here has run it

Scenario Refiner

Diagnose → plan → surgical edit → verify. Never expand tokens when you can tighten. The agent runs on a system prompt that is already long — every word you add is a word the model has to ignore at runtime.

Read references/runtime-behavior.md before diagnosing anything about prompt assembly, tool registration, conductor, or silence mechanics.

Prerequisites

  • The ttai MCP server must be connected. Tool references below use the ttai: server prefix (e.g. ttai:update_scenario); some agents surface these as mcp__ttai__update_scenario. If the tools are missing, point the user at the repo README to install the plugin or add the MCP server — the client runs a browser OAuth login on first use.

Workflow

Step 1: Gather evidence

  1. Call ttai:list_organizations; pass org_id on subsequent calls if the scenario belongs to an organization.
  2. Fetch the scenario with ttai:get_scenario (needs the scenario ID — find it via ttai:list_scenarios if the user only gave a name). Read the entire ai_instructions, plus strategy, tools_config, and session_analysis.
  3. Get the failure evidence:
    • If the user pasted a transcript or complaint, use that.
    • Otherwise pull sessions: ttai:list_sessions filtered by scenario_id (and date range), pick the relevant ones (e.g. lowest scores), then ttai:get_sessions_batch for details. Fetch transcript_url contents for the actual conversation text.
  4. Identify the exact turn where things went wrong. Cross-reference: what did the scenario PRESCRIBE for that moment, and what did the agent actually DO? Quote both in your diagnosis.

If the transcript is in another language (Hindi, Hinglish, ...), do not translate — the scenario is in the same language. Quote the original.

Step 2: Diagnose root cause

Classify into one of these buckets. Each maps to a different fix location.

SymptomLikely causeFix location
Agent called end_session too early / too late / not at allTool timing instruction weak, or add_to_system_prompt: falseai_instructions end-of-call block, or tools_config.tools.end_session
Agent took the wrong conversation branchBranch trigger words too narrow, or path priority unclearai_instructions flow section (strengthen trigger list or add tie-breaker rule)
Agent used the wrong closing lineClosing rule not bound to the path it came fromai_instructions closing section (bind closings to paths explicitly)
Agent skipped a prescribed step/question"Read-the-room" rule too aggressive, or step ordering implicitai_instructions — make step 1 → step 2 a hard sequence with NEVER skip
Agent monologued / two questions in one turnStyle rules buriedBold/cap a single rule in the style section; do not add a new section
Agent revealed AI identity or said a tool name aloudGuardrails section missing or weakai_instructions GUARDRAILS / THINGS YOU MUST NEVER DO
Agent stayed silent too long, then ended the callsilence.silence_threshold too low, or silence.end_session: truestrategy.silence
Wrap-up fired during active conversationConductor time_seconds too low or end_turn: truestrategy.conductor.messages
Wrong voice / language / accentVoice or language configappearance.voice, appearance.language_code, transcribe_config
Agent said a placeholder like {{ firstname }} literallyMissing-context fallback not specifiedai_instructions CONTEXT section — add "If blank, do X"
Browser demo step fails, or always clicks/scrolls the FIRST item in a listSelector broken or outside the supported XPath subset (silently simplified)tools_config.tools.browser.tool_settings.steps — fix per the browser-demo-builder skill's selector guide
Robotic opening / restarts opening when interruptedQuoted speech in welcome_instructionsstrategy.welcome_instructions — rewrite in directive form

If the cause is architectural (template selection, tool registration, conductor injection), open references/runtime-behavior.md and cite the relevant mechanism. Don't guess.

Step 3: Plan the edit

Before calling any tool, write the edit out — old text and new text side by side — and check it against these principles:

Token discipline (in priority order):

  1. Replace existing text > tighten existing text > add new text
  2. If you must add, ask: can I delete something stale to compensate?
  3. Flag the user if the total ai_instructions delta exceeds +50 tokens (~3 lines)
  4. Never add a "while I'm here" change. One issue = one edit.

Effective prompt writing:

  • Imperative voice: "NEVER call end_session before X" not "The agent should not call end_session before X"
  • NEVER / ALWAYS / ONLY caps markers for hard constraints
  • One concrete example beats three abstract rules
  • Bind rules to triggers: "When customer says X → do Y" beats "Be empathetic"
  • Forbid the failure mode by name: if the agent skipped a step, write "NEVER skip [step], even if the issue seems minor"

Where to put a new rule inside ai_instructions:

  • Hard prohibition → ## GUARDRAILS or ## THINGS YOU MUST NEVER DO
  • Conditional behavior → inside the matching phase / path
  • Tool timing → right after the prescribed closing lines
  • Tone / style → the style rules block near the top

Step 4: Apply via ttai:update_scenario

  1. Send only id plus the fields you changed — partial updates are supported, and untouched fields must not be re-sent (avoids clobbering concurrent edits).
  2. For an ai_instructions edit: apply your surgical replacement to the full fetched string and send the complete updated field. Verify no collateral changes (whitespace, adjacent bullets).
  3. Pass org_id if the scenario belongs to an organization.

Step 5: Verify and report

  1. Re-fetch with ttai:get_scenario and confirm the change landed as planned.
  2. Conclude with exactly this structure:
    • Diagnosis (1-2 sentences) — what went wrong and why
    • Change — field + before/after summary
    • Token delta — estimate (e.g. "+38 tokens, under the 50-token threshold")
    • Reminder — the change applies to new sessions only; running sessions keep their compiled system prompt

Quick recipes

"Agent ended the call too early"

  1. Search ai_instructions for end_session. Is there an explicit "ONLY after closing line AND customer farewell" rule?
  2. If not, add a 3-4 bullet rule block right after the closing templates.
  3. Check tools_config.tools.end_session.tool_settings.disconnectDelaySeconds — too low (< 8) on emotional calls feels abrupt.

"Closing line was generic instead of path-specific"

Strengthen the closing section with: "Based on the path you actually took above, pick the matching closing — never substitute a generic 'thank you'."

"Scenario scores dropped after a change"

Pull sessions before and after the change date with ttai:list_sessions (from_date / to_date), compare evaluation_results, and check whether the prior edit introduced the regression before adding anything new.

What ships with it: 2 files

7.9 KB alongside SKILL.md

agents/

references/

Gives 0 of the 12 instructions most mcp tooling skills give

Counted across 780 of the 1,136 authors here whose files we hold, read 2026-09-06

  • Use Zod for input validationin 34 of 780, across 21 files
  • Use stdio for local clientsin 27 of 780, across 10 files
  • Restart Claude Code after configurationin 26 of 780, across 23 files
  • Verify MCP server connection before using toolsin 23 of 780, across 17 files
  • Define input schemas for every toolin 20 of 780, across 11 files
  • Use Streamable HTTP for remote clientsin 18 of 780, across 8 files
  • Pin SDK version in package.jsonin 17 of 780, across 6 files
  • Keep server logic independent of transportin 16 of 780, across 6 files
  • Verify SDK methods against official documentationin 15 of 780, across 5 files
  • Format evaluation results as an XML filein 15 of 780, across 12 files
  • Test servers using the MCP Inspectorin 15 of 780, across 14 files
  • Create ten complex and independent evaluation questionsin 14 of 780, across 11 files

Said here and by no other author read

  • Read runtime behavior documentation before diagnosing
  • Identify the exact turn where the failure occurred
  • Quote the prescribed behavior and the actual agent action
  • Do not translate non-English transcripts
  • Replace existing text before adding new text
  • Limit total instruction delta to fifty tokens

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once.

Keep looking

Skills are one crate of 613,373. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.