spectre: Skill for Claude Code

.agents/skills/spectre-rewrite-subagent/SKILL.md

spectre-rewrite-subagent is a skill for Claude Code, Codex from joenandez/spectre. It costs 109 tokens per session (1,646 once invoked), scanned A, original, MIT.

A tool for rewriting Spectre subagent definitions, which are instructions that assign focused tasks to smaller worker agents.

In plain words
What is it for?
Use it to review or propose rewrites for Spectre agents such as finder, analyst, reviewer, tester, developer, or web-research. It applies changes only when explicitly requested.
Why use it?
It replaces broad persona prompts with clearer responsibilities, tool limits, routing rules, and structured outputs that are easier to review and audit.

Skill for Claude CodeCodex

Written for Claude Code and Codex: $ARGUMENTS substitution, but also agents/openai.yaml present. Also seen: mentions subagents; installed under .agents/ (shared by several agents); mentions Codex.

This is joenandez/spectre's own configuration. It tells Claude Code and Codex how to work on spectre 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 spectre configures →

Reuse

Borrowing it

Nothing to install: this file belongs to joenandez/spectre. 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/joenandez/spectre/main/.agents/skills/spectre-rewrite-subagent/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/joenandez/spectre

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 spectre-rewrite-subagent

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/joenandez/spectre/spectre-rewrite-subagent"><img src="https://agentmods.dev/badge/skills/joenandez/spectre/spectre-rewrite-subagent.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 109 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,646 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high System Prompt Leakage · line 114
    Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
    Fix: Remove any instructions that reveal, print, or output system prompts or internal rules. System instructions should never be exposed to end users.
How audits are shown
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.00109 $0.01646
Opus 5 $0.00055 $0.00823
Sonnet 5 $0.00022 $0.00329
Haiku 4.5 $0.00011 $0.00165

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

Security

Grade A, and why

spectre-rewrite-subagent 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 11d 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.

.agents/skills/spectre-rewrite-subagent/SKILL.md · 175 lines

How it starts

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

Spectre Subagent Rewrite

Rewrite one or more Spectre subagent definitions from broad persona prompts into focused worker contracts. Produce a reviewable proposal by default; apply changes to the live plugin only when the user explicitly asks.

Inputs

  • Target agent names from $ARGUMENTS (finder, analyst, patterns, reviewer, tester, dev, web-research) or explicit file paths.
  • Source path: plugins/spectre/agents/<agent>.md.
  • Generated Codex path: plugins/spectre-codex/agents/<agent>.toml.
  • Mode:
    • proposal by default: write review artifacts only.
    • apply only if the user explicitly asks to update live definitions.

Assume cwd is the Spectre repo root. If no target is provided, ask which subagent to rewrite.

Grounding

Read these before drafting:

  1. docs/tasks/main/research/subagent_definition_best_practices_053126.md - subagent best practices and practitioner findings.
  2. The source agent file(s) in full.
  3. scripts/translators/agents.cjs only when applying or checking Codex TOML generation.
  4. docs/spectre-design-research.md only if deciding whether a block is load-bearing or generic bloat.

Source of truth is plugins/spectre/agents/*.md; generated TOML is derived output.

Procedure

1. Inventory The Agent

Record:

  • name, description, tools, codex_sandbox_mode, model, and body line/token size.
  • Whether the role is read-only, write-capable, or ambiguous.
  • Current generated Codex name, description, sandbox_mode, and developer_instructions if present.
  • Known risks from the research doc: chatty description, write access on read-only role, generic capability catalog, mandatory artifact writes, missing return contract, or context-sharing assumptions.

2. Classify The Role

Choose one primary role and make the rewrite fit it:

  • locator: finds files/areas; returns grouped paths only.
  • analyst: explains how code works; returns cited implementation facts.
  • pattern-miner: finds reusable examples; returns 2-5 examples and recommendation.
  • reviewer: identifies risks/findings; returns severity-ranked findings first.
  • tester: writes or verifies tests; decide whether it is write-capable or read-only.
  • implementer: writes code; may edit files and run commands.
  • web-briefer: verifies current/third-party facts; returns sourced findings.

Read the full file on GitHub · 175 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. 11d ago First seen · 175 lines · 109 tokens per session scan A de91a0859590

Subscribe to this mod's changes

spectre-rewrite-subagent is a skill published in the GitHub repository joenandez/spectre (161 stars, last pushed 2d ago), licensed MIT. It adds 109 tokens to every session and 1,646 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

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

insight-error-page

Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…

vercel/next.js · 83 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens