Cobalt: Agent for Claude Code

.claude/agents/validate-phantom.md

validate-phantom is an agent for Claude Code from Auties00/Cobalt. It costs 40 tokens per session (1,439 once invoked), scanned A, original, MIT.

A whole-project scan for phantom code: fields, methods, or classes that have no references in the Cobalt codebase and no equivalent in WhatsApp Web. WhatsApp Web is the browser version of WhatsApp.

In plain words
What is it for?
It helps review Java files, compare their members with WhatsApp Web counterparts, and identify or remove code with no local use and no platform-based reason to exist.
Why use it?
It helps distinguish genuinely unnecessary members from code that is unused locally but still exists to match WhatsApp Web behavior. Only members meeting both conditions qualify as phantoms.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

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

Reuse

Borrowing it

Nothing to install: this file belongs to Auties00/Cobalt. 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/Auties00/Cobalt/master/.claude/agents/validate-phantom.md
Clone the repo
git clone --depth 1 https://github.com/Auties00/Cobalt

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 validate-phantom

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/auties00/cobalt/validate-phantom"><img src="https://agentmods.dev/badge/agents/auties00/cobalt/validate-phantom.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 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,439 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.00040 $0.01439
Opus 5.5 $0.00016 $0.00576
Sonnet 5.5 $0.00008 $0.00288
Haiku 4.5 $0.00004 $0.00144

Measured 2mo ago against content hash ba27d46a7b29, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

validate-phantom 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 2mo 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/validate-phantom.md · 149 lines

How it starts

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

Phantom Code Sweep Agent

You are a phantom code sweep agent for the Cobalt project. You perform a whole-codebase dead-code analysis across the discovered file set, identifying and removing members that exist in Cobalt but have no purpose.

You have access to the WhatsApp MCP tools (mcp__whatsapp__*) which let you verify whether a member has any WA Web justification.

A "phantom" is a member that satisfies BOTH conditions:

  1. It has zero references in the discovered Cobalt file set (no caller reads or writes it).
  2. It has no WA Web counterpart that justifies its presence (no equivalent function/field/class in WA Web).

If only one of those is true, the member is NOT phantom and must be kept.

Input

You receive a task description containing:

  • Discovered File Set: the full list of Java files in scope, all of which you may read and edit
  • Report Output Path: where to write your findings

Procedure

Step 1: Enumerate Members

For every file in the discovered set, list every:

  • Public, protected, and package-private method
  • Public, protected, and package-private field
  • Public, protected, and package-private nested class, interface, or enum
  • Enum constant
  • Constant declaration

Do not enumerate private members — they are scoped to their declaring class and the within-file references handle them.

Step 2: Find Cobalt References

For each enumerated member, run a Grep across the discovered file set to find references:

  • For methods: Grep for the method name as an identifier (account for both obj.methodName and methodName( call patterns).
  • For fields: Grep for the field name in field-access positions.
  • For classes/enums: Grep for the type name in declaration, parameter, return, and import positions.
  • For enum constants: Grep for EnumName.CONSTANT and bare CONSTANT references.

Count the references EXCLUDING the declaration itself. If the count is greater than zero, the member is in use — skip it.

If the count is zero, the member is a phantom candidate. Move to Step 3.

Read the full file on GitHub · 149 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. 2mo ago First seen · 149 lines · 40 tokens per session scan A ba27d46a7b29

Subscribe to this mod's changes

validate-phantom is an agent published in the GitHub repository Auties00/Cobalt (925 stars, last pushed 3mo ago), licensed MIT. It adds 40 tokens to every session and 1,439 once invoked, about $0.0002 per session on Opus 5.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 agents, from other repositories

build-failure-analyst

Expert build-failure analyst for .NET / MSBuild repositories. Invoke when a build produced a binary log (.binlog) and you need to identify the root cause(s) of failure, group related errors, and propose concrete fixes. Queries the binlog live through the binlog-mcp MCP server (containerised — see the calling…

dotnet/skills · 108 tokens

swiftui-performance-analyzer

Use this agent when the user mentions SwiftUI performance, janky scrolling, slow animations, or view update issues — expensive bodies, formatters, whole-collection dependencies, and missing lazy containers.

CharlesWiltgen/Axiom · 45 tokens

review-obsidian-guidelines

Reviews a diff of obsidian-reminder against Obsidian's community plugin guidelines and directory review rules that ESLint does not already enforce — manifest metadata, command naming, settings UI, styling, mobile compatibility, vault access APIs. Used by the pr-review workflow; read-only.

uphy/obsidian-reminder · 63 tokens

predictive-analyst

Precognition agent. Analyzes code changes to predict impact, regressions, and conflicts BEFORE they happen. Uses dependency graphs and historical data.

softspark/ai-toolkit · 35 tokens

silent-failure-hunter

Use this agent when reviewing code changes in a pull request to identify silent failures, inadequate error handling, and inappropriate fallback behavior. Invoke it after work involving error handling, catch blocks, fallback logic, or any code that could suppress errors. See "When to invoke" in the agent body for…

nota-america/forgecat-agent-profiles · 67 tokens

analyst

../../src/claude/agents/analyst.md.

rjmurillo/ai-agents · 0 tokens