Borrowing it
Nothing to install: this file belongs to rajbos/ai-engineering-fluency. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/rajbos/ai-engineering-fluency/main/.claude/skills/scan-hardcoded-strings/SKILL.mdgit clone --depth 1 https://github.com/rajbos/ai-engineering-fluencyWrote 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.
[](https://agentmods.dev/skills/rajbos/ai-engineering-fluency/scan-hardcoded-strings)<a href="https://agentmods.dev/skills/rajbos/ai-engineering-fluency/scan-hardcoded-strings"><img src="https://agentmods.dev/badge/skills/rajbos/ai-engineering-fluency/scan-hardcoded-strings/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.
<a href="https://agentmods.dev/skills/rajbos/ai-engineering-fluency/scan-hardcoded-strings"><img src="https://agentmods.dev/badge/skills/rajbos/ai-engineering-fluency/scan-hardcoded-strings.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00098 | $0.02206 |
| Opus 5.5 | $0.00039 | $0.00882 |
| Sonnet 5.5 | $0.00020 | $0.00441 |
| Haiku 4.5 | $0.00010 | $0.00221 |
Grade A, and why
scan-hardcoded-strings 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 yesterday.
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.
How it starts
The opening of the file, as written. The whole thing — 151 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Scan Hardcoded Strings Skill
Scans the VS Code extension's webview UI code for candidate hardcoded (non-localized) UI strings and writes a triage report. This is an informational inventory tool, not a CI gate — it never exits non-zero and never modifies source files.
When to Use This Skill
Use this skill when you need to:
- Audit UI text after adding or changing a webview panel or a section of
extension.ts'sget*Htmlmethods, to catch strings that were typed directly instead of routed through localization - Build or refresh a localization backlog before a release
- Periodically re-run as a maintenance/audit pass to see whether the backlog of non-localized strings is growing or shrinking
- Investigate a specific UI surface (e.g. a webview panel) that appears not to translate correctly under a non-English locale
It complements two existing scripts that only check consistency of strings
already wired through localization (scripts/validate-localization.js /
npm --prefix vscode-extension run lint:l10n, and
vscode-extension/scripts/validate-l10n.mjs /
npm --prefix vscode-extension run validate:l10n) — neither of those, nor anything else in the repo,
detects a plain string literal that never calls localize(/t(/
vscode.l10n.t( in the first place. A separate, stricter AST-based CI gate
for new instances of this may exist as an independent effort; this skill is
not that gate — it is a full-codebase inventory for manual triage.
Running the Check
node .github/skills/scan-hardcoded-strings/scan-hardcoded-strings.js
# Machine-readable JSON output
node .github/skills/scan-hardcoded-strings/scan-hardcoded-strings.js --json
The script will:
- Recursively scan every
*.tsfile (excluding*.test.ts) undervscode-extension/src/webview/, plus only theget*Html(...)method bodies invscode-extension/src/extension.ts(not the whole file — this keeps out unrelated string literals like GitHub issue Markdown templates or VS Code panel titles), after blanking out/* ... */block/JSDoc comments so example markup in a doc comment isn't mistaken for real UI text - Flag string/template literals in UI-rendering positions — assignments to
.textContent/.innerText/.innerHTML/.title/.placeholder(a direct literal or a conditional/ternary RHS whose branches are literals),aria-label="..."/title="..."/placeholder="..."HTML attributes (or the same three set via.setAttribute('title', '...')), a literaldocument.createTextNode('...')argument, text inside<div>,<button>,<vscode-button>,<label>,<h1>–<h6>,<p>,<span>,<td>,<th>,<option>,<summary>,<caption>,<li>,<title>, and SVG's<text>tags in template literals (tolerating simple nested inline tags like<a>/<strong>/<span>, which are also matched as a literal's own root tag so e.g.el.innerHTML = '<strong>Save changes</strong>'isn't missed, and void/structural tags like<input>/<br>that never need a closing tag), and the UI-text argument of a known shared DOM helper call (el(...),iconHeading(...),createButton(...)fromvscode-extension/src/webview/shared/domUtils.ts) — that argument may be several string/template literals joined by+, or a top-level ternary or??/||fallback of (recursively) literal/+-joined branches, not just a single direct literal - Skip anything already wrapped in
localize(,localizeFormat(,t(, orvscode.l10n.t(, and anything that doesn't look like prose (pure numbers/symbols, URLs, CSS values, HTML character references like·/•, a narrow denylist of single CSS-keyword tokens — not every single lowercase word; the letter check itself is Unicode-aware, so non-English text isn't exempted) — but recover string literals that are themselves a whole ternary branch, or the fallback side of a||default, inside an interpolation's expression, e.g.`${flag ? 'Enable Overrides' : 'Disable Overrides'}`or`${msg || '<em>No message</em>'}`(a plain quoted literal that is merely an argument to some other call in the same interpolation, e.g.`${buttonHtml('btn-refresh')}`, is left alone — but a template literal there, e.g.`${escapeHtml(`${a} · ${b} AIU`)}`, is still recovered, since a template literal builds display text while a plain quoted string is routinely a lookup key/id), checking each recovered literal on its own so one non-prose branch can't suppress another genuine one - Print a console report grouped by file, with line numbers and snippets
- Write the same findings to
hardcoded-strings-report.mdat the repo root (git-ignored, so running the scan never dirties the tree;--out <path>overrides) - Set
process.exitCode = 0rather than forcingprocess.exit()— this script informs, it does not gate, and letting the process exit naturally avoids truncating buffered output when piped (e.g. in CI or--json | ...). Any unexpected error during the scan is caught and logged to stderr rather than crashing with a non-zero exit code, preserving that contract.
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.
- yesterday First seen · 151 lines · 98 tokens per session scan A 1f32f3ad0757
scan-hardcoded-strings is a skill published in the GitHub repository rajbos/ai-engineering-fluency (119 stars, last pushed yesterday), licensed MIT. It adds 98 tokens to every session and 2,206 once invoked, about $0.0004 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-10-26.
Other skills, from other repositories
intl-expansion
International market expansion strategy. Market selection, entry modes, localization, regulatory compliance, and go-to-market by region. Use when expanding to new countries, evaluating international markets, planning localization, or building regional teams.
chinese-documentation
A Chinese technical-documentation style guide covering spacing, punctuation, numbers, terminology, and links when Chinese and English appear together.
edit-site
Plans, coordinates and customizes PAC CLI-downloaded Standard or Enhanced data model non-SPA Power Pages sites created from Microsoft templates or manually in Design Studio. Use for requests involving pages, localized content, navigation, assets, snippets, site markers, Liquid/web templates, page layouts, or styling.…
asc-subscription-localization
Bulk-localize subscription, subscription-group, and in-app purchase display names across App Store locales using asc, including API 4.4.1 version-scoped v2 resources. Use when filling or updating subscription/IAP names and descriptions without App Store Connect UI work.
seedance-vocab-ja
This skill should be used when the user asks for Japanese Seedance 2.0 prompt wording, Japanese cinematic vocabulary, or translation of camera, lighting, action, VFX, audio, and production terms into Japanese.
adaptation
This skill should be used when the user asks to "make an audiobook", "narration script", "narrator", "ACX", "Findaway", "pronunciation guide", "how long is the audiobook", "adapt to a screenplay", "Fountain", "screenplay", "picture book", "spreads", "illustration notes", "art notes", "comic script", "comics script"…