tc-doctor

A diagnostic and repair guide for the tinycode environment, the setup that runs its models, agents, skills, and tools.

In plain words
What is it for?
Use it to check and repair installations, model health, tool calling, directories, agents, skills, network access, and container health.
Why use it?
It helps identify whether a broken setup, missing component, failed model connection, or unavailable tool is causing the problem.

Skill for Claude CodeCodex

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/bobbyjohnstx/tinycode/tc-doctor
Any agent
npx skills add bobbyjohnstx/tinycode --skill tc-doctor
Clone the repo
git clone --depth 1 https://github.com/bobbyjohnstx/tinycode

Made for: Claude Code, Codex.

Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,957 The whole file, excluding the scripts and references it only reads on demand.
Security scan E 3 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.00035 $0.06957
Opus 5 $0.00017 $0.03478
Sonnet 5 $0.00007 $0.01391
Haiku 4.5 $0.00003 $0.00696

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

Security

Grade E, and why

tc-doctor scanned grade E with 3 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 2d 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.

Reaches for credential fileshighPrivilege escalation

SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.

if [ "${TINYCODE_CLUSTER_ADMIN}" = "true" ] || [ -f ~/.kube/config ]; then

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

echo " Linux: curl -fsSL https://ollama.com/install.sh | sh"

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

Self-diagnostic skill that checks the tinycode environment is correctly configured and fixes problems it finds. No dependencies beyond basic shell tools (curl, grep, awk, sed).
packages/tinycode/src/skill/defaults/tc-doctor/SKILL.md · 646 lines

How it starts

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

tc-doctor

Self-diagnostic skill that checks the tinycode environment is correctly configured and fixes problems it finds. No dependencies beyond basic shell tools (curl, grep, awk, sed).

When to use

  • The user says "doctor", "tc-doctor", "health check", "fix my setup"
  • After a fresh install, deployment, or container restart
  • When agents, skills, or tools aren't appearing
  • When the model connection is failing or responses are slow
  • When tool calling isn't working (model responds with text only)
  • When asking why a tinycode feature isn't working (not their own application code)

When NOT to use

  • The user is asking about their own application code (not tinycode itself)
  • The user wants to configure a new provider (use /mcp-setup or /customize-tinycode instead)
  • Debugging a specific session failure or code bug (use /debug or /trace)
  • Choosing which model to use or comparing model capabilities (advise directly)
  • Troubleshooting MCP server connections (use /mcp-setup)

Preamble: Detect Platform

Before running any checks, detect the platform. Gate container-specific checks behind IS_CONTAINER.

# Platform detection
IS_CONTAINER=false
if [ -f /run/.containerenv ] || [ -f /.dockerenv ]; then
  IS_CONTAINER=true
fi

IS_MAC=false
if [ "$(uname)" = "Darwin" ]; then
  IS_MAC=true
fi

OLLAMA_HOST="${TINYCODE_OLLAMA_HOST:-http://localhost:11434}"
TINYCODE_API="http://localhost:4096"

echo "## tinycode Doctor Report"
echo ""
echo "### Environment"
echo "- Platform: $(uname -s) $(uname -m)"
echo "- Container: $IS_CONTAINER"
echo "- Working directory: $(pwd)"
echo "- User: $(id -un) ($(id -u))"
echo "- Ollama endpoint: $OLLAMA_HOST"
if [ -n "$TINYCODE_OLLAMA_HOST" ]; then
  echo "  Source: TINYCODE_OLLAMA_HOST env var"
else
  echo "  Source: default"
fi
echo ""
echo "### Checks"

Checks to run (in order)

1. Directory structure

Verify these directories exist and are writable. Create any that are missing:

mkdir -p .tinycode 2>/dev/null && echo "✓ .tinycode/" || echo "✗ .tinycode/ — not writable"

for dir in .tinycode/plans .tinycode/state; do
  mkdir -p "$dir" 2>/dev/null && echo "✓ $dir" || echo "✗ $dir — not writable"
done

ls ~/.config/tinycode/ >/dev/null 2>&1 && echo "✓ ~/.config/tinycode/" || echo "✗ ~/.config/tinycode/ — missing"
ls ~/.local/share/tinycode/ >/dev/null 2>&1 && echo "✓ ~/.local/share/tinycode/" || echo "✗ ~/.local/share/tinycode/ — missing"

Read the full file on GitHub · 646 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. 2d ago First seen · 646 lines · 35 tokens per session scan E 36da839cf66f

Subscribe to this mod's changes

tc-doctor is a skill published in the GitHub repository bobbyjohnstx/tinycode (11 stars, last pushed 4d ago), licensed MIT. It adds 35 tokens to every session and 6,957 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it E with 3 findings (reaches for credential files, downloads and executes remote code, makes network calls). 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

system-prompts

Write system prompts, tool docs, and agent definitions. Project tag conventions + RFC 2119 keywords + dense compression. Use when authoring or editing any prompt the model reads.

can1357/oh-my-pi · 40 tokens

tool-prompt-optimization

Optimize the description prompts an AI agent reads to learn its built-in tools (the .md files under prompts/tools/). Two halves: (1) measure how much of a prompt is already inferable from the tool's JSON parameter schema + name, to prune redundancy with evidence; (2) house authoring rules for what belongs in a tool…

can1357/oh-my-pi · 0 tokens

archon-cli

Drive Archon through its CLI: run AI workflows on a repo, manage those runs (inspect, approve, reject, cancel, resume), set up Archon or change its config, author new workflows, and improve workflow prompts. Use when the user says "use archon", "run archon", "archon workflow", "fix issue #N with archon", "have archon…

coleam00/Archon · 165 tokens

semantic-compression

Re-encode verbose prose into a dense telegraphic register — punctuation as connectives, label frames, verbless assertions — without losing normativity or precision. Use when compressing system prompts, tool/function descriptions, skill bodies, or agent instructions; reducing token count or context bloat; making…

can1357/oh-my-pi · 77 tokens

greet

A greeting skill for testing.

can1357/oh-my-pi · 8 tokens

this-is-a-very-long-skill-name-that-exceeds-the-sixty-four-character-limit-set-by-the-standard

A skill with a name that exceeds 64 characters.

can1357/oh-my-pi · 34 tokens