decode-minified-js-gates

decode-minified-js-gates is a skill for Claude Code from pjt222/agent-almanac. It costs 138 tokens per session (3,620 once invoked), scanned A, original, MIT.

A method for examining a feature flag inside compressed JavaScript code and identifying how the flag controls behavior. It records the reader variant, default value, combined conditions, and role of the gate.

In plain words
What is it for?
Use it to inspect JavaScript bundles, classify flag-reading patterns, determine defaults, identify kill switches, and list combined gates.
Why use it?
A flag's name alone may not show whether it enables, disables, delays, or depends on other conditions; this process extracts that behavior from the code around it.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the agent-almanac plugin — 122 skills, 76 agents shipped together

Good fit Use it to inspect JavaScript bundles, classify flag-reading patterns, determine defaults, identify kill switches, and list combined gates.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pjt222/agent-almanac/decode-minified-js-gates
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 pjt222/agent-almanac --skill decode-minified-js-gates
Clone the repo
git clone --depth 1 https://github.com/pjt222/agent-almanac

Made for: Claude Code.

Or install agent-almanac, the plugin that ships this one along with the rest of its 122 skills, 76 agents.

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 decode-minified-js-gates

README.md
[![agentmods](https://agentmods.dev/badge/skills/pjt222/agent-almanac/decode-minified-js-gates/github.svg)](https://agentmods.dev/skills/pjt222/agent-almanac/decode-minified-js-gates)
Your own site
<a href="https://agentmods.dev/skills/pjt222/agent-almanac/decode-minified-js-gates"><img src="https://agentmods.dev/badge/skills/pjt222/agent-almanac/decode-minified-js-gates/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 decode-minified-js-gates

Your own site · 80×15
<a href="https://agentmods.dev/skills/pjt222/agent-almanac/decode-minified-js-gates"><img src="https://agentmods.dev/badge/skills/pjt222/agent-almanac/decode-minified-js-gates.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 138 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,620 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 Data Exfiltration · line 53
    Code or instructions that leak agent conversation context to external services, potentially exposing sensitive user interactions.
    Fix: Remove any code that sends prompts, responses, or session data externally. Preserve user privacy; never exfiltrate conversation content.
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.00138 $0.03620
Opus 5 $0.00069 $0.01810
Sonnet 5 $0.00028 $0.00724
Haiku 4.5 $0.00014 $0.00362

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

Security

Grade A, and why

decode-minified-js-gates 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 7d 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.

i18n/caveman-lite/skills/decode-minified-js-gates/SKILL.md · 221 lines

How it starts

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

Decode Minified JS Gates

Read the call-site context around a flag string in a minified JavaScript bundle and produce a gate-mechanics record: which reader variant, what default, what conjunction, what role. Where probe-feature-flag-state answers "is this gate on or off?", this skill answers the prerequisite question — "what does this gate actually do?"

When to Use

  • A flag surfaced by sweep-flag-namespace cannot be classified from its name alone.
  • The binary uses more than one gate-reader function and you need to know which one a flag invokes.
  • A gate's "default" appears non-boolean ({}, null, a numeric literal) and you need to decode the actual reader variant.
  • You suspect a kill-switch (inverted gate) but cannot confirm from the flag name.
  • A predicate combines multiple gates with && and you need to enumerate the co-gates before probing any of them.

Inputs

  • Required: a minified JavaScript bundle file (.js, .mjs, .bun).
  • Required: a target flag string to decode, in literal form.
  • Optional: a list of known reader function names from a prior decode pass — speeds Step 2.
  • Optional: a context-window size override; default is 300 chars before, 200 chars after the flag occurrence.

Procedure

Step 1: Extract the Context Window

Locate the flag string and capture an asymmetric window around each occurrence. The pre-context (before the flag) is where the reader function name lives; the post-context (after) is where the default value and conjunction live.

BUNDLE=/path/to/cli/bundle.js
FLAG=acme_widget_v3                   # synthetic placeholder
PRE=300
POST=200

# All byte offsets where the flag string occurs
grep -boE "\"${FLAG}\"" "$BUNDLE" | cut -d: -f1 > /tmp/decode-offsets.txt
wc -l /tmp/decode-offsets.txt

# Capture an asymmetric window per occurrence
while read -r offset; do
  start=$((offset - PRE))
  [ "$start" -lt 0 ] && start=0
  length=$((PRE + POST))
  echo "=== offset $offset ==="
  dd if="$BUNDLE" bs=1 skip="$start" count="$length" 2>/dev/null
  echo
done < /tmp/decode-offsets.txt > /tmp/decode-windows.txt

less /tmp/decode-windows.txt

Read the full file on GitHub · 221 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. 7d ago First seen · 221 lines · 138 tokens per session scan A 304b4b62e1be

Subscribe to this mod's changes

decode-minified-js-gates is a skill published in the GitHub repository pjt222/agent-almanac (32 stars, last pushed today), licensed MIT. It adds 138 tokens to every session and 3,620 once invoked, about $0.0007 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-09-03.

Related

Other skills, from other repositories

triage-issue

Verify an issue, persisted audit finding, or unresolved review finding against current code, classify it, and write only the contracted forge/ledger outcome. Supports independent batches and an immediate-fix review-finding route. Triggers: "triage-issue", "triage issue N", "triage this finding", "is this trigger met".

gtrabanco/agentic-workflow · 74 tokens

loop-react-doctor

Iterative React-health loop: inventory every React app in the repo, baseline with the latest react-doctor (pinned for the rest of the run), fix one root cause per iteration, and re-verify until every app scores 100/100 or every remaining finding has a user-approved written justification. Never silences findings with…

tomimor/skills · 119 tokens

dev-performance-diagnosis

Use for diagnosing slow code, APIs, queries, memory growth, frontend load, build regressions, resource bottlenecks, and scalability limits.

BlueSkyXN/Codex-is-all-you-need · 35 tokens

cocoreview

CocoReview — structured code review with six-severity findings vocabulary, progressive disclosure architecture, and universal anti-pattern baseline. Invoked via $review [file] [--complexity] [--security] [--architecture] [--language ].

Snowflake-Labs/cocoplus · 57 tokens

airflow-plugins

Builds Airflow 3.1+ plugins that embed FastAPI apps, custom UI pages, React components, middleware, macros, and operator links directly into the Airflow UI. Use when building anything custom inside Airflow 3.1+ that involves Python and a browser-facing interface - creating an Airflow plugin, adding a custom UI page or…

astronomer/agents · 147 tokens

qwen-coder

Provides Qwen Coder CLI delegation workflows for coding tasks using Qwen2.5-Coder and QwQ models, including English prompt formulation, execution flags, and safe result handling. Use when the user explicitly asks to use Qwen for tasks such as code generation, refactoring, debugging, or architectural analysis. Triggers…

giuseppe-trisciuoglio/developer-kit · 117 tokens