Runs the end-to-end SOMA content pipeline, managing TI, HW, and CR tasks with automated validation.

Install

mkdir -p .claude/skills/soma-run && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/11045" && unzip -o skill.zip -d .claude/skills/soma-run && rm skill.zip

Installs to .claude/skills/soma-run

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

End-to-end SOMA pipeline runner: validates input, runs TI → HW → CR sequentially, captures outputs at each step, writes evo-logs to Obsidian, and logs winners. One skill call replaces manual as_chat_with_agent + evo-log-writer + winners-log-logger.
248 charsno explicit “when” trigger
Advanced

Key capabilities

  • Validate pipeline inputs
  • Run trend intelligence
  • Execute hook writing
  • Perform content repurposing
  • Log winners and quality reports

How it works

It executes the full SOMA pipeline sequentially, capturing outputs, detecting drift, and logging results at each stage.

Inputs & outputs

You give it
Trend input
You get back
Pipeline execution report

When to use soma-run

  • Running a full SOMA content pipeline
  • Validating pipeline trend inputs
  • Debugging pipeline output drift
  • Logging winners and quality reports

About this skill

Skill: soma-run

Version: 1.1.0 v1.0.0: initial implementation — live-verified 2026-05-16 v1.1.0 changes (2026-05-16): FIX 1 — Winners-log written immediately after HW (not end-of-pipeline) to prevent hook text loss on session compaction FIX 2 — Intermediate output persistence: each agent output saved to temp vault note; cleaned up on success FIX 3 — TI drift detection: original_input vs ti_trend comparison; logged in evo-log FIX 4 — Score cross-validation: HW scores vs CR scores; degradation flagged in report FIX 5 — Retry logic: 1 retry per agent on timeout or abort sentinel (+30s timeout on retry) FIX 6 — CR quality violations gate: if CR detects violations, amend winners-log with warning


Purpose

Runs the full SOMA content pipeline in a single skill invocation:

[User input] → VALIDATE → TI → HW → [Winners-log] → CR → [Evo-logs] → [Report]

Key change from v1.0.0: winners-log is written immediately after HW completes, while hook texts are still in context. Evo-logs are written after CR completes.


Hard rules — zero hallucination

  • Never fabricate agent outputs, scores, hook text, or log entries
  • Every evo-log entry must contain only data extracted from actual agent responses
  • If an agent times out or returns an error → log FAILED — never invent a plausible output
  • All Obsidian paths are fixed (confirmed 2026-05-16) — do NOT invent new paths
  • Retry is limited to 1 attempt per agent — never retry more than once

Confirmed constants (live-verified 2026-05-16)

TIMEOUTS (primary attempt):
  TI  → timeout_seconds: 180
  HW  → timeout_seconds: 120
  CR  → timeout_seconds: 120

TIMEOUTS (retry — +30s each):
  TI retry  → timeout_seconds: 210
  HW retry  → timeout_seconds: 150
  CR retry  → timeout_seconds: 150

EVO-LOG PATHS:
  TI  → agents/trend-intelligence/evo-log.md
  HW  → agents/hook-writer/evo-log.md
  CR  → agents/content-repurposer/evo-log.md

WINNERS-LOG PATH:
  → agents/hook-writer/winners-log.md
  → Threshold: score ≥ 17/20

TEMP NOTE PATHS (deleted after successful run):
  TI output  → temp/soma-run-{run_id}-ti.md
  HW output  → temp/soma-run-{run_id}-hw.md
  CR output  → temp/soma-run-{run_id}-cr.md

EVO-LOG FORMATS:
  TI: date | original_input (≤60 chars) | trend_found [DRIFT if detected] | confidence | angle_suggested | hook_writer_triggered
  HW: date | trend | platforms | scores | winner_platform | winner_score | flags
  CR: date | trend | platforms_completed | scores | flag | notes

WINNERS-LOG FORMAT:
  date | trend | platform | hook_text | score | pattern

HW SCORE PATTERN (regex): LI:\d+ X:\d+ YT:\d+ IG:\d+ TT:\d+

DRIFT THRESHOLD:
  If fewer than 3 words from original_input appear in ti_trend → flag as DRIFT

SCORE DEGRADATION THRESHOLD:
  If any platform score in CR is more than 2 points below HW score → flag as DEGRADED

ABORT SENTINELS (case-insensitive):
  - empty string or len < 50 characters
  - starts with "I cannot"
  - starts with "I don't have"
  - starts with "I'm unable"
  - starts with "I'm sorry, I"
  - contains "As an AI, I"

STEP 0 — Task List

Create tasks before starting:

  • "VALIDATE — input gate"
  • "TI — Trend Intelligence run"
  • "HW — Hook Writer run + winners-log"
  • "CR — Content Repurposer run"
  • "LOG — Write evo-logs"
  • "CLEANUP — Remove temp notes"
  • "REPORT — Final summary"

Mark each in_progress before starting, completed when done.


STEP 1 — Determine Pipeline Scope

Full pipeline (default)

Run all three agents: TI → HW → CR.

Partial pipeline (scope override)

If user explicitly specifies a shorter scope:

User saysScope
"samo TI" / "run TI only"Run only TI. Stop after TI log.
"TI i HW" / "TI and HW" / "stop before CR"Run TI → HW. Stop after HW log + winners-log.
(anything else)Full pipeline: TI → HW → CR

Store as pipeline_scope: "TI" / "TI+HW" / "FULL".


STEP 2 — VALIDATE: Input Gate

2a — Validator recommendation

Before running, check if the user has already run pipeline-input-validator on this input. If they have not, recommend it:

"💡 Preporučujem da prvo pokreneš pipeline-input-validator na ovom inputu. Ako je status PASS ili WARN+, nastavi sa soma-run. Nastavljamo svejedno?"

If user confirms (or if they already have a PASS/WARN+ result) → proceed to 2b. If user has a WARN- or FAIL result → warn but allow override: "Input ima slab score. Sigurno želiš da ga pustiš kroz pipeline?"

2b — Minimum input check

Extract the raw trend input from the user's message. Apply:

CheckAbort condition
EmptyInput is empty or whitespace only → ABORT
Too shortInput is < 20 characters → ABORT: "Input je prekratak. Opiši trend konkretno."
Abort sentinel in inputInput contains an abort sentinel string → ABORT: "Input sadrži nevalidan sadržaj."

If input passes → store as {trend_input}. Store also as {original_input} (immutable copy, used for drift detection in Step 4). Proceed to Step 3.


STEP 3 — Generate run_id

Generate run ID using current date and time:

run_id = YYYY-MM-DD-HHMMSS   (e.g. 2026-05-16-143022)

Use today's actual date. Do not guess or fabricate. If unsure of current time, use YYYY-MM-DD only as the run_id.

Store as {run_id}. This ID appears in evo-log entries and temp note paths.

Initialize retry counters: {ti_retries} = 0, {hw_retries} = 0, {cr_retries} = 0.


STEP 4 — TI: Run Trend Intelligence

4a — Mark task in_progress

4b — Build TI message

Construct the message as follows (date injection is mandatory):

Today is {YYYY-MM-DD}. {trend_input}

Example:

Today is 2026-05-16. Anthropic released Claude Sonnet 4 — 40% SWE-bench improvement.

CRITICAL: The Today is {date} prefix MUST be included. Without it, TI runs without date context and may misclassify freshness. Confirmed bug on 2026-05-15.

4c — Call TI (with retry)

Primary attempt:

as_chat_with_agent(
  agent_name:      "Trend Intelligence",
  message:         "Today is {YYYY-MM-DD}. {trend_input}",
  timeout_seconds: 180
)

On ABORT or timeout (retry — max 1): If {ti_retries} == 0:

  • Set {ti_retries} = 1
  • Wait 5 seconds
  • Retry with timeout_seconds: 210
  • Log: "⚠️ TI retry 1/1 — original attempt failed."

If retry also fails → mark TI as FAILED. Report ABORT. Stop pipeline. Do NOT attempt a 3rd call.

4d — Capture output

Store the full reply text as {ti_output}.

4e — Save TI output to temp note

Call obsidian_create_note:

path:    "temp/soma-run-{run_id}-ti.md"
content: "# TI Output — soma-run {run_id}\n\n{ti_output}"

If this call fails → log warning but continue. Temp note is a safety net, not a blocker.

4f — Validate TI output

Check {ti_output} against abort sentinels:

  • If ABORT condition matched → mark TI as FAILED. Stop pipeline. Report: "⛔ TI vrati prazan ili nevalidan output. Pipeline abortiran."
  • If OK → proceed to 4g.

4g — Extract TI data

From {ti_output}, extract:

  • {ti_trend}: the trend name/title TI identified (first headline or sentence)
  • {ti_confidence}: confidence rating (⭐⭐⭐ = HIGH, ⭐⭐ = MED, ⭐ = LOW/EVERGREEN)
  • {ti_angle}: the content angle TI suggested
  • Set {ti_status} = "yes" (hook_writer_triggered)

4h — Drift detection (FIX 3)

Compare {original_input} to {ti_trend}:

  1. Tokenize both strings (split on spaces, lowercase, strip punctuation)
  2. Count how many tokens from {original_input} appear in {ti_trend}

Drift rule:

  • If < 3 tokens overlap → set {drift_flag} = "DRIFT", {drift_detected} = true
  • Otherwise → set {drift_flag} = "none", {drift_detected} = false

If drift detected, log to console:

⚠️ DRIFT DETECTED
Original input : {original_input (first 60 chars)}
TI trend found : {ti_trend}
Overlap tokens : {N}

The pipeline does NOT abort on drift — it continues but records it in the evo-log and the final report.


STEP 5 — HW: Run Hook Writer + Write Winners-log

Skip if pipeline_scope == "TI".

5a — Mark task in_progress

5b — Call HW (with retry)

Pass the full TI output as the message. Do not summarize or truncate.

Primary attempt:

as_chat_with_agent(
  agent_name:      "Hook Writer",
  message:         {ti_output},
  timeout_seconds: 120
)

On ABORT or timeout (retry — max 1): If {hw_retries} == 0:

  • Set {hw_retries} = 1
  • Wait 5 seconds
  • Retry with same message, timeout_seconds: 150
  • Log: "⚠️ HW retry 1/1 — original attempt failed."

If retry also fails → mark HW as FAILED. Log TI evo-log only. Stop pipeline. Report: "⛔ HW vrati nevalidan output. TI je logiran. Pipeline abortiran."

5c — Capture output

Store the full reply text as {hw_output}.

5d — Save HW output to temp note (FIX 2)

Call obsidian_create_note:

path:    "temp/soma-run-{run_id}-hw.md"
content: "# HW Output — soma-run {run_id}\n\n{hw_output}"

If this call fails → log warning and continue. Hook texts are still in {hw_output} in active context — proceed. Temp note is a safety net only.

5e — Extract scores from HW output

Scan {hw_output} for the score pattern LI:\d+ X:\d+ YT:\d+ IG:\d+ TT:\d+.

  • If pattern found → extract individual platform scores:
    {hw_scores_raw} = "LI:19 X:18 YT:17 IG:17 TT:18"   (example)
    {hw_scores} = { LI: 19, X: 18, YT: 17, IG: 17, TT: 18 }
    
  • If pattern NOT found → set {hw_scores_raw} = "UNSCORED", {hw_scores} = null.

Determine winner platform:

  • If {hw_scores} is not null → find platform with highest score. Ties: prefer LinkedIn > X > YouTube > Instagram > TikTok. Store as {hw_winner_platform} and {hw_winner_score}.
  • If {hw_scores} is null → {hw_winner_platform} = "n/a", {hw_winner_score} = "n/a".

Determine flags:

  • If {hw_scores} is null → flag = "UNSCORED"
  • If all platform scores identical → flag = "SINGLE_HOOK_BUG" (same hook on all platforms)
  • If any q

Content truncated.

When not to use it

  • When validating input only
  • When logging an existing run

Prerequisites

SOMA pipeline agents

Limitations

  • Retry limited to one attempt per agent
  • Requires specific Obsidian paths

How it compares

It automates the entire end-to-end pipeline in a single invocation instead of manual step-by-step execution.

Compared to similar skills

soma-run side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
soma-run (this skill)02moNo flagsAdvanced
opencode-cli147moReviewAdvanced
claude-automation-recommender472moReviewBeginner
mcp-integration219moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

opencode-cli

SpillwaveSolutions

This skill should be used when configuring or using the OpenCode CLI for headless LLM automation. Use when the user asks to "configure opencode", "use opencode cli", "set up opencode", "opencode run command", "opencode model selection", "opencode providers", "opencode vertex ai", "opencode mcp servers", "opencode ollama", "opencode local models", "opencode deepseek", "opencode kimi", "opencode mistral", "fallback cli tool", or "headless llm cli". Covers command syntax, provider configuration, Vertex AI setup, MCP servers, local models, cloud providers, and subprocess integration patterns.

14174

claude-automation-recommender

anthropics

Analyze a codebase and recommend Claude Code automations (hooks, subagents, skills, plugins, MCP servers). Use when user asks for automation recommendations, wants to optimize their Claude Code setup, mentions improving Claude Code workflows, asks how to first set up Claude Code for a project, or wants to know what Claude Code features they should use.

47140

mcp-integration

anthropics

This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context Protocol", "connect external service", mentions "${CLAUDE_PLUGIN_ROOT} with MCP", or discusses MCP server types (SSE, stdio, HTTP, WebSocket). Provides comprehensive guidance for integrating Model Context Protocol servers into Claude Code plugins for external tool and service integration.

21123

hook-development

anthropics

This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.

11122

agent-factory

alirezarezvani

Claude Code agent generation system that creates custom agents and sub-agents with enhanced YAML frontmatter, tool access patterns, and MCP integration support following proven production patterns

8109

swarm-advanced

ruvnet

Advanced swarm orchestration patterns for research, development, testing, and complex distributed workflows

7110

Search skills

Search the agent skills registry