test-as-self

test-as-self is a skill for Claude Code from JKHeadley/instar. It costs 65 tokens per session (1,544 once invoked), scanned C, original, MIT.

A temporary deployment test for the current Instar build. It starts the build in a disposable agent environment and checks that it stays healthy.

In plain words
What is it for?
Use it before or after changes to deployment, server, or lifeline code, or to reproduce a crash safely. It can also test a Telegram bot round trip when given a Secret Drop reference.
Why use it?
It gives you a clean pass or fail report for deployment and startup problems instead of requiring you to reconstruct what happened from logs.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it before or after changes to deployment, server, or lifeline code, or to reproduce a crash safely. It can also test a Telegram bot round trip when given a Secret Drop reference.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jkheadley/instar/test-as-self
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.

Any agent
npx skills add JKHeadley/instar --skill test-as-self
Clone the repo
git clone --depth 1 https://github.com/JKHeadley/instar

Made for: Claude Code.

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 test-as-self

README.md
[![agentmods](https://agentmods.dev/badge/skills/jkheadley/instar/test-as-self.svg)](https://agentmods.dev/skills/jkheadley/instar/test-as-self)
Your own site
<a href="https://agentmods.dev/skills/jkheadley/instar/test-as-self"><img src="https://agentmods.dev/badge/skills/jkheadley/instar/test-as-self.svg" alt="Measured on agentmods" height="20"></a>
Per session 65 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,544 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 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.00065 $0.01544
Opus 5 $0.00032 $0.00772
Sonnet 5 $0.00013 $0.00309
Haiku 4.5 $0.00006 $0.00154

Measured 8d ago against content hash f2757c7edd08, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade C, and why

test-as-self scanned grade C 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 8d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/verify.mjs), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf "$TEST_DIR"
.claude/skills/test-as-self/SKILL.md · 111 lines

How it starts

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

/test-as-self — Throwaway-Deploy Harness (Part 2.1)

Spec: docs/specs/SELF-PROPAGATION-HARNESS-SPEC.md + the Track F section of docs/specs/MULTI-MACHINE-BOOTSTRAP-ROBUSTNESS-SPEC.md. Part 1 (the structural poll-ownership lease) ships alongside. Part 2.1 folded the manual recipe below into a single command — use that first; the manual recipe is the fallback for fine-grained control.

The one-button path (Part 2.1 — use this first)

instar test-as-self --no-roundtrip                  # deploy + verify only (no bot)
instar test-as-self --bot-token <secret-drop-id>    # + a real Telegram round-trip
instar test-as-self --keep                          # leave it running for inspection

The command runs the seven gated steps automatically (bot-acquire via Secret Drop / target-prep with Bob+canonical-home guards / dist-deploy / process-start + wait for /health + lease / Telegram-Bot-HTTP-API round-trip / verify.mjs / signal-safe teardown) and emits a single JSON report; exit 0 = all PASS. Structural guards make it impossible to target your real agent home or Bob, and it refuses a raw bot token on the command line (Secret Drop only). The round-trip uses the Telegram Bot HTTP API directly (not Playwright) — no browser, no flake.

Fall back to the manual recipe below only when you need step-by-step control or to debug a single step.

When to use

  • Verifying Part 1 of the spec — does the server actually auto-demote to send-only when the lifeline owns the poll slot? (Run this skill against any deploy that bundles Part 1.)
  • Before shipping a change to the deploy / lifeline / server-startup path — clean evidence beats guessing.
  • Reproducing a crash observed in the wild — the verifier captures crashes deterministically (server.log + lifeline.log tail for FATAL / OOM / heap signatures), so you get the real signature instead of post-hoc forensic guessing.

Why a runbook, not a one-button command (v1 scope)

The deploy itself involves operator-specific choices (which throwaway dir? which bot token, if any? skip the bot? reuse a prior bot?) that resist a one-size-fits-all instar test-as-self --go for v1. The skill's verify.mjs script is the deterministic half (no operator judgment — just reads the artifacts and reports). The deploy steps are documented below as a tight, repeatable recipe. Follow-up Part 2.1 will fold the recipe + bot minting into a single CLI command.

Read the full file on GitHub · 111 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 8d ago First seen · 111 lines · 65 tokens per session scan C f2757c7edd08

Subscribe to this mod's changes

test-as-self is a skill published in the GitHub repository JKHeadley/instar (79 stars, last pushed today), licensed MIT. It adds 65 tokens to every session and 1,544 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.