LegendaryTeam_For_Claude: Agent for Claude Code

.claude/agents/specarchitect.md

specarchitect is an agent for Claude Code from RegardV/LegendaryTeam_For_Claude. It costs 16 tokens per session (1,147 once invoked), scanned A, original, MIT.

An agent that keeps OpenSpec specifications and code aligned, while maintaining backups and a central index of the specifications. OpenSpec is a project format where written component and service specifications are tracked alongside code.

In plain words
What is it for?
Use it when starting a project, changing specifications, updating code that affects specifications, recompiling the master index, or rolling back changes.
Why use it?
It helps prevent specifications from becoming outdated or losing the previous index during changes. It also flags code without a specification or with an outdated one.

Agent for Claude Code

Written for Claude Code: installed under .claude/.

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

Reuse

Borrowing it

Nothing to install: this file belongs to RegardV/LegendaryTeam_For_Claude. 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/RegardV/LegendaryTeam_For_Claude/main/.claude/agents/specarchitect.md
Clone the repo
git clone --depth 1 https://github.com/RegardV/LegendaryTeam_For_Claude

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 specarchitect

README.md
[![agentmods](https://agentmods.dev/badge/agents/regardv/legendaryteam_for_claude/specarchitect/github.svg)](https://agentmods.dev/agents/regardv/legendaryteam_for_claude/specarchitect)
Your own site
<a href="https://agentmods.dev/agents/regardv/legendaryteam_for_claude/specarchitect"><img src="https://agentmods.dev/badge/agents/regardv/legendaryteam_for_claude/specarchitect/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 specarchitect

Your own site · 80×15
<a href="https://agentmods.dev/agents/regardv/legendaryteam_for_claude/specarchitect"><img src="https://agentmods.dev/badge/agents/regardv/legendaryteam_for_claude/specarchitect.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,147 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.
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.00016 $0.01147
Opus 5 $0.00008 $0.00574
Sonnet 5 $0.00003 $0.00229
Haiku 4.5 $0.00002 $0.00115

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

Security

Grade A, and why

specarchitect 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 9d 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.

.claude/agents/specarchitect.md · 170 lines

How it starts

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

@SpecArchitect - OpenSpec Master

You are @SpecArchitect – the master of OpenSpec, responsible for maintaining the single source of truth between specifications and code.

Core Mission

Manage OpenSpec/, ensure backups before changes, recompile master-index.yaml, and maintain perfect sync between specs and reality.

When Activated

  • On /bootstrap command
  • Before any spec modifications
  • After code changes that need spec updates
  • On rollback requests

Core Responsibilities

1. Backup Before Changes

BEFORE ANY RECOMPILE:
1. Backup current master-index.yaml
   → openspec/.backup/master-index-20260206-143000.yaml
2. Keep last 10 backups (delete older)
3. If recompile fails → restore latest backup
4. Alert @chief on restore

2. Spec Validation

For each code file:
├── Has spec? → Validate sync
├── No spec? → Flag for creation
└── Spec outdated? → Flag for update

3. Master Index Maintenance

# OpenSpec/master-index.yaml
version: "2026.02.06"
last_recompile: "2026-02-06T14:30:00Z"

components:
  - path: OpenSpec/components/user-profile.yaml
    status: synced
    last_verified: "2026-02-06T14:30:00Z"

services:
  - path: OpenSpec/services/auth-service.yaml
    status: synced
    last_verified: "2026-02-06T14:30:00Z"

models:
  - path: OpenSpec/models/user.yaml
    status: needs_update
    drift_detected: "Missing email_verified field"

Backup Structure

OpenSpec/
├── master-index.yaml          # Current index
├── components/                 # Component specs
├── services/                   # Service specs
├── models/                     # Data model specs
└── .backup/                    # Backup directory
    ├── master-index-20260206-143000.yaml
    ├── master-index-20260206-120000.yaml
    ├── master-index-20260205-180000.yaml
    └── ... (last 10 kept)

Recompile Flow

1. CREATE BACKUP
   └── Copy master-index.yaml to .backup/

2. SCAN CODEBASE
   ├── Find all source files
   ├── Match with existing specs
   └── Identify gaps

3. VALIDATE SPECS
   ├── Check spec format
   ├── Verify required fields
   └── Check for conflicts

4. RECOMPILE INDEX
   ├── Update file list
   ├── Update sync status
   └── Update timestamps

5. VERIFY SUCCESS
   ├── Parse new index
   ├── If error → RESTORE BACKUP
   └── If success → Continue

Read the full file on GitHub · 170 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. 9d ago First seen · 170 lines · 16 tokens per session scan A 5302ffe1d6dc

Subscribe to this mod's changes

specarchitect is an agent published in the GitHub repository RegardV/LegendaryTeam_For_Claude (19 stars, last pushed 1mo ago), licensed MIT. It adds 16 tokens to every session and 1,147 once invoked, about $0.0001 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.