swing-trace

swing-trace is a skill for Claude Code, Codex from TheStack-ai/swing-skills. It costs 100 tokens per session (3,896 once invoked), scanned A, original, MIT.

A tool that records the assumptions, alternatives, confidence factors, and weakest points behind an answer. It is designed to make an agent's decision process easier to inspect.

In plain words
What is it for?
Use it when you need an auditable explanation of reasoning, including decision branches, confidence breakdowns, assumptions, and conditions that could disprove the conclusion.
Why use it?
It helps readers see what the answer depends on, which options were rejected, and what should be checked before trusting the result.

Skill for Claude CodeCodex

Part of the swing-skills plugin — 6 skills shipped together

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.

agentmods
npx agentmods add skills/thestack-ai/swing-skills/swing-trace
Any agent
npx skills add TheStack-ai/swing-skills --skill swing-trace
Clone the repo
git clone --depth 1 https://github.com/TheStack-ai/swing-skills

Made for: Claude Code, Codex.

Or install swing-skills, the plugin that ships this one along with the rest of its 6 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 swing-trace

README.md
[![agentmods](https://agentmods.dev/badge/skills/thestack-ai/swing-skills/swing-trace.svg)](https://agentmods.dev/skills/thestack-ai/swing-skills/swing-trace)
Your own site
<a href="https://agentmods.dev/skills/thestack-ai/swing-skills/swing-trace"><img src="https://agentmods.dev/badge/skills/thestack-ai/swing-skills/swing-trace.svg" alt="Measured on agentmods" height="20"></a>
Per session 100 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,896 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00100 $0.03896
Opus 5 $0.00050 $0.01948
Sonnet 5 $0.00020 $0.00779
Haiku 4.5 $0.00010 $0.00390

Measured 4d ago against content hash 19a2cce85182, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

swing-trace 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 4d 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.

skills/swing-trace/SKILL.md · 358 lines

How it starts

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

Reasoning Tracer

Anti-black-box engine that makes reasoning chains visible, auditable, and decomposable.

Addresses the cognitive failure mode of black-box reasoning -- Claude gives an answer but the user cannot see what assumptions were relied on, what alternatives were rejected, or which part of the reasoning is weakest.

Rules (Absolute)

  1. Never present a single-path narrative. Every trace must show at least one rejected alternative at a meaningful decision fork. "I considered X but chose Y because Z" is the minimum; two rejected alternatives is preferred.
  2. Confidence decomposition requires 3+ sub-components. Overall confidence is always broken into at least three independent dimensions, each with its own percentage and justification.
  3. Every assumption gets rated. Each assumption must have an explicit criticality rating (High/Medium/Low) and verifiability rating (Directly Verifiable / Indirectly Verifiable / Unverifiable). No unrated assumptions.
  4. Weakest Link is MANDATORY. Never skip it. This is the highest-value section -- it tells the user exactly where to focus their own verification effort.
  5. No confidence theater. Do not assign high confidence (>80%) without specific justification. Vague appeals to "experience" or "common knowledge" are banned. Every confidence level must cite a concrete basis.
  6. Distinguish evidence types. Separate empirical evidence (benchmarks, data, test results) from theoretical reasoning (design principles, heuristics) from authority (docs, expert consensus). Label which type supports each claim.
  7. Trace must be falsifiable. Every conclusion must include conditions under which it would be wrong. If you cannot state what would disprove your conclusion, the reasoning is insufficiently rigorous.

Mode Selection

Quick Mode (Default)

When invoked without --full, execute only:

  1. Stage 1: Claim Isolation — break into atomic claims
  2. Stage 2: Assumption Inventory — enumerate assumptions with criticality/verifiability
  3. Stage 5: Weakest Link & Alternative Conclusion — identify the single most fragile assumption

Read the full file on GitHub · 358 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. 4d ago First seen · 358 lines · 100 tokens per session scan A 19a2cce85182

Subscribe to this mod's changes

swing-trace is a skill published in the GitHub repository TheStack-ai/swing-skills (40 stars, last pushed 4mo ago), licensed MIT. It adds 100 tokens to every session and 3,896 once invoked, about $0.0005 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-30.

Related

Other skills, from other repositories

prompting-buddy

Generate, review, and optimize project-level prompt files for Claude Code -- including CLAUDE.md, .claude/rules/.md, and .claude/agents/.md. Use this skill whenever someone mentions CLAUDE.md, AGENTS.md, project prompts, coding instructions, agent definitions, rules files, or asks for help setting up Claude Code for a…

walkjoi/prompting-buddy · 148 tokens

prompt-engineering

Master advanced prompt engineering techniques to maximize LLM performance, reliability, and controllability in production. Use when optimizing prompts, improving LLM outputs, designing production prompt templates, or building AI-powered features.

wpank/ai · 44 tokens

metrics-instrumentation

Specification for instrumenting an opik-backend workflow with operational OpenTelemetry metrics — per-stage throughput/latency/error counters and native histograms, dimensioned per-customer (workspace). Use when a pipeline (scoring, ingestion, experiments, jobs) needs per-stage visibility. Covers metric emission only…

comet-ml/opik · 93 tokens

amazon-reviews-api-skill

This skill helps users automatically extract Amazon product reviews via the Amazon Reviews API. Agent should proactively apply this skill when users express needs like getting reviews for Amazon product with ASIN B07TS6R1SF, analyzing customer feedback for a specific Amazon item, getting ratings and comments for a…

browser-act/skills · 124 tokens

amazon-competitor-analyzer

Scrapes Amazon product data from ASINs using browseract.com automation API and performs surgical competitive analysis. Compares specifications, pricing, review quality, and visual strategies to identify competitor moats and vulnerabilities.

browser-act/skills · 48 tokens

happiness-skill

当用户问「怎么才能更幸福/为什么得到了还不满足/怎么减少焦虑」时调用。 核心理念: 幸福是缺憾感清空的默认状态, 是可训练的技能; 欲望是与自己的契约(得到前不快乐), 同时只留一个重大欲望; 活在当下。 不适用于: 临床抑郁等需要专业治疗的场景(本书方法不能替代医疗)。 Triggers: 幸福/不快乐/欲望/焦虑/知足/活在当下/happiness/desire/anxiety.

kangarooking/cangjie-skill · 136 tokens