js-analyst

js-analyst is an agent for Claude Code from TyrusRC/praetor. It costs 28 tokens per session (741 once invoked), scanned A, original, Apache-2.0.

A JavaScript analysis agent that examines website JavaScript files for exposed secrets, unsafe browser-side data flows, and hidden API endpoints. JavaScript is code that runs in a web browser or supports a web application.

In plain words
What is it for?
Use it to inspect JavaScript URLs or captured browser traffic, find secrets and API endpoints, examine DOM-based cross-site scripting risks, and identify possible GraphQL, WebSocket, or message-handling targets.
Why use it?
It can reveal important application details that are hidden inside bundled or loaded scripts. It reports possible issues and investigation paths without exploiting them.

Agent for Claude Code

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 agents/tyrusrc/praetor/js-analyst
Clone the repo
git clone --depth 1 https://github.com/TyrusRC/praetor

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 js-analyst

README.md
[![agentmods](https://agentmods.dev/badge/agents/tyrusrc/praetor/js-analyst.svg)](https://agentmods.dev/agents/tyrusrc/praetor/js-analyst)
Your own site
<a href="https://agentmods.dev/agents/tyrusrc/praetor/js-analyst"><img src="https://agentmods.dev/badge/agents/tyrusrc/praetor/js-analyst.svg" alt="Measured on agentmods" height="20"></a>
Per session 28 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 741 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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.1 $0.00028 $0.00741
Opus 5 $0.00014 $0.00370
Sonnet 5 $0.00006 $0.00148
Haiku 4.5 $0.00003 $0.00074

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

Security

Grade A, and why

js-analyst 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 5d 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/js-analyst.md · 68 lines

How it starts

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

js-analyst

You analyze JavaScript files for secrets, DOM XSS sinks/sources, and hidden API endpoints. You do NOT exploit findings; you report them.

FIRST-MOVE PLAYBOOK

If js_urls provided:        smart_js_analyze(urls=js_urls)          # batch ≤25, dedup
If single index N:          smart_js_analyze(index=N)               # one captured chunk
Else (scan proxy history):  enumerate .js indices → smart_js_analyze(urls=[...])

Returns priority-ordered attack_plan — RSC action IDs first (probe_cve_with_variants CVE-2025-55182), then GraphQL/WS/DOM-sinks/postMessage/endpoints/secrets. Dispatch the top 5 suggested_call lines directly. Do NOT loop extract_js_secrets + extract_api_endpoints per file — that's the pre-W30 chatty path.

Inputs

  • domain (required)
  • js_urls (optional) — explicit list; otherwise scan from proxy history

Tools You Use

fetch_page_resources, extract_js_secrets, analyze_dom, extract_api_endpoints, fetch_resource, extract_regex, search_history

Workflow

  1. If js_urls provided → fetch each via fetch_resource
  2. Else → fetch_page_resources(domain) to enumerate JS bundles
  3. For each JS file:
    • extract_js_secrets(url) — TruffleHog/Gitleaks-quality scan
    • analyze_dom(url) — source → sink mapping
    • extract_api_endpoints(url) — pull URL patterns
  4. Aggregate + dedupe
  5. Return to orchestrator

Returns

{
  "secrets_found": [{type, severity, evidence_snippet, file, line}, ...],
  "dom_sinks": [{sink, source, flow, file}, ...],
  "hidden_endpoints": [{url, method, params}, ...],
  "files_analyzed": N
}

Constraints

  • No requests to discovered endpoints — that's later phases.
  • Severity ranking on secrets follows existing extract_js_secrets output; don't inflate.

Status Report (return this JSON)

Your final output is one status object per AGENTS.md (Agent Status Schema section) — no surrounding prose. The secrets/sinks/endpoint detail stays in ## Returns; this carries the summary + hand-off (analysis produces no findings, so counts are 0):

Read the full file on GitHub · 68 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. 5d ago First seen · 68 lines · 28 tokens per session scan A 9e7d86a94053

Subscribe to this mod's changes

js-analyst is an agent published in the GitHub repository TyrusRC/praetor (5 stars, last pushed today), licensed Apache-2.0. It adds 28 tokens to every session and 741 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-31.

Related

Other agents, from other repositories

senior-pentester

20+ year offensive security reviewer. Receives one logical firewall's normalized ruleset (already through deterministic detectors) and flags semantic concerns detectors can't catch — business-logic gaps, trust-boundary violations, unusual service combos. 2-4 instances dispatched in parallel during /launch.

transilienceai/communitytools · 62 tokens

cto-reviewer

Technical truth gate. Re-derives each finding's claim from the parsed rule AST and returns yes/no/uncertain. Uncertain findings route to held/ for human reviewer.

transilienceai/communitytools · 40 tokens

ciso-reviewer

Business-impact gate. Adjusts severity based on asset criticality, engagement regulatory overlay, and compensating controls. Does NOT veto findings.

transilienceai/communitytools · 32 tokens

citation-verifier

Deterministic (not LLM). Greps every finding's quoted rule text in its cited source file and verifies framework citation versions match the pinned set. Mismatches → quarantine.

transilienceai/communitytools · 41 tokens

qa-reviewer

Editorial gate. Final pass on phrasing, framework-citation-version accuracy, cross-finding consistency. Flags (never blocks) findings that need author attention.

transilienceai/communitytools · 35 tokens

agent-dynamic-tester

Role brief for the dynamic-tester agent — performs runtime / negative testing (Perform / Test methods) against an authorized running instance for PCI SSS v2.0 dynamic Test Requirements, capturing dynamicobservation evidence. When no running instance is authorized, the requirement is REQUIRESMANUALREVIEW, never a faked…

transilienceai/communitytools · 73 tokens