AgentDeck: Skill for Claude Code

.agents/skills/sdc-diagnose/SKILL.md

sdc-diagnose is a skill for Claude Code, Codex from puritysb/AgentDeck. It costs 50 tokens per session (1,488 once invoked), scanned B, original, MIT.

A diagnostic workflow for AgentDeck synchronization problems between Stream Deck displays and agent terminals. It examines cursor positions, options, hooks, logs, and the bridge state machine, which is the code that controls state changes.

In plain words
What is it for?
Use it to inspect bridge journals and logs, diagnose cursor or option synchronization, trace hook ingestion, add focused regression tests, and run the project’s test suite.
Why use it?
It helps find causes of stale displays, false idle states, missed events, and action races by collecting diagnostics and checking known failure patterns.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: reads .claude/ paths; reads ~/.codex paths; installed under .agents/ (shared by several agents).

This is puritysb/AgentDeck's own configuration. It tells Claude Code and Codex how to work on AgentDeck itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything AgentDeck configures →

Reuse

Borrowing it

Nothing to install: this file belongs to puritysb/AgentDeck. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/puritysb/AgentDeck/master/.agents/skills/sdc-diagnose/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/puritysb/AgentDeck

Made for: Claude Code, Codex.

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 sdc-diagnose

README.md
[![agentmods](https://agentmods.dev/badge/skills/puritysb/agentdeck/sdc-diagnose/github.svg)](https://agentmods.dev/skills/puritysb/agentdeck/sdc-diagnose)
Your own site
<a href="https://agentmods.dev/skills/puritysb/agentdeck/sdc-diagnose"><img src="https://agentmods.dev/badge/skills/puritysb/agentdeck/sdc-diagnose/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 sdc-diagnose

Your own site · 80×15
<a href="https://agentmods.dev/skills/puritysb/agentdeck/sdc-diagnose"><img src="https://agentmods.dev/badge/skills/puritysb/agentdeck/sdc-diagnose.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,488 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00050 $0.01488
Opus 5.5 $0.00020 $0.00595
Sonnet 5.5 $0.00010 $0.00298
Haiku 4.5 $0.00005 $0.00149

Measured 29d ago against content hash 5dd203d41015, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

sdc-diagnose scanned grade B with 1 finding 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 29d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

Root cause: ~/.codex/config.toml hooks not installed/migrated, or fence corrupted
.agents/skills/sdc-diagnose/SKILL.md · 154 lines

How it starts

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

AgentDeck Diagnostic Skill

Canonical diagnostic procedure for AgentDeck bridge synchronization issues between device displays and agent terminals (cursor desync, false idle, stale options, action dispatch races, hook ingestion gaps, state-machine regressions). This file is the single source of truth — .claude/skills/sdc-diagnose is a tracked directory symlink to this skill.

Step 1: Collect Diagnostic Data

From the repo root, try the live bridge first. Start narrow: ~100 journal entries, filtered to the event types the Step 2 patterns use. Widen (--tail 300, then drop the filter) only when the window does not contain the failure.

cd "$(git rev-parse --show-toplevel)"
EVENTS='state_change|hook|error|option_prompt|navigate_option|cursor_update|select_option|idle|codex_'
agentdeck diag --tail 100 2>/dev/null | grep -E "$EVENTS" | tail -100 \
  || echo "Bridge not running (or no matching events) — using journal files directly"

If the bridge isn't running, read journal/log files directly, with the same filter:

ls -t ~/.agentdeck/journal/*.jsonl 2>/dev/null | head -3
ls -t ~/.agentdeck/journal/*.jsonl 2>/dev/null | head -1 | xargs tail -n 400 | grep -E "$EVENTS" | tail -100
grep -E "$EVENTS" /tmp/sdc-debug.log 2>/dev/null | tail -100 || echo "No debug log found"

If access fails, follow AGENTS.md Agent working agreements for execution-policy failures. Treat unreadable diagnostics as unknown, not proof that the bridge is stopped.

Step 2: Analyze for Known Failure Patterns

2a. Cursor Desync

navigate_option followed by a stale cursor_update with conflicting indices.

Pattern: navigate_option cursor=X->Y ... cursor_update cursorIndex=X (reverted)
Root cause: PTY confirmation overwrites optimistic update
Fix: cursor authority system (A3) — optimistic suppresses PTY within 200ms

2b. False Idle

option_prompt followed by idle within 500ms.

Pattern: option_prompt (N options) ... idle_detected (< 500ms gap)
Root cause: Small chunk with "❯ No" misclassified as idle prompt
Fix: Semantic idle check (A2) — only "❯" or ">" as sole non-ws content

Read the full file on GitHub · 154 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. 29d ago Changed · +2 lines 5dd203d41015
  2. 1mo ago Changed 46fae137f324
  3. 1mo ago First seen · 152 lines · 50 tokens per session scan B 2781a32ce703

Subscribe to this mod's changes

sdc-diagnose is a skill published in the GitHub repository puritysb/AgentDeck (274 stars, last pushed today), licensed MIT. It adds 50 tokens to every session and 1,488 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). 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

argent-metro-debugger

Debug a JS runtime via CDP using argent debugger tools. Primary path is React Native via Metro (iOS / Android / Vega); a subset of the tools (debugger-connect, debugger-status, debugger-evaluate, debugger-log-registry) also drive a Chromium (CDP) app's renderer (an Electron app, or any Chromium browser exposing CDP)…

software-mansion/argent · 104 tokens

argent-react-native-optimization

Optimizes a React Native app by profiling first to find real bottlenecks, then sweeping for mechanical issues. Entry-point for all performance work. Use when the app feels slow, user asks to optimize, fix re-renders, reduce jank, or improve startup. Delegates to argent-react-native-profiler for measurement.

software-mansion/argent · 71 tokens

nightly-audit-engineer-getting-started

A first-conversation guide for setting up a code-audit assistant. A code audit is a focused review of source code for defects or risky behavior, with the needed repository, scope, concerns, permissions, and schedule clarified first.

makecindy/cindy · 46 tokens

nightly-audit-engineer-ops

A workflow for reviewing code for reproducible quality problems and recording the evidence behind each finding. It follows data through inputs, permissions, storage, asynchronous work, and recovery, then suggests the smallest authorized fix.

makecindy/cindy · 43 tokens

nightly-audit-engineer-evidence

A small local checker that creates stable identifiers for code-audit findings and marks duplicates within the current batch or among previously seen findings. It processes supplied JSON with Python and does not infer whether a problem was fixed.

makecindy/cindy · 37 tokens

argent-native-profiler

Native profiling for CPU hotspots, UI hangs, memory issues. iOS via xctrace; Android via Perfetto. Use when diagnosing native-level performance issues.

software-mansion/argent · 37 tokens