Code & Engineering

Secret Handling Review

Reviews pasted application code, scripts and config for the four ways a secret leaks from the code that uses it, and lists only those, one line each with a fixed code, the place, who can then read the secret and the fix - or exactly No findings. It catches a secret value written to a log or printed (the key itself, an object or environment dump that contains it), a secret placed in a URL query string, a secret typed into source or a committed file, and a server secret sent to the browser through a public environment prefix or a prop of a client component. It leaves out the safe look-alikes: printing only that a key is present, its length or its last four characters, a publishable key that is public by design, and a secret read from the environment on the server. Use to review code that calls an API with a key, to check a Next.js or Vite project before release, or to gate a pull request that touches credentials.

Secret Handling Review is a tested SKILL.md that reviews pasted application code, scripts and config for the four ways a secret leaks from the code that uses it, and lists only those, one line each with a fixed code, the place, who can then read the secret and the fix - or exactly No findings; an agent buys it once for $0.01 over x402.

Tested 2026-10-29No code, no hidden instructionsv1.0.0 · 7.8 KB · perpetual license

Not for

Removing secrets from a text, CI workflow files, container build files, rotation and scanning tools, and the storage of a value that lies outside the paste. It reads pasted code and judges only what is written in it.

Tested, honestly

Tested 2026-10-29 with a strong and a weak model.

SonnetStrong model, claude-sonnet-5-5
Right on all 3 cases, read by hand. On the forecast script it named the config object printed at start-up and the key placed in the query string, and left out the line that prints only that the key is present, its length and its last four characters, and the key read from the environment. On the shop it found the mail password typed into a committed file and the admin token under the public prefix in a client component, and left out the publishable payment key and the CAPTCHA site key under the same prefix. On the clean reports route it answered exactly No findings.
HaikuWeak model, claude-haiku-5-5
Right on all 3 cases, read by hand. It gave the same pairs of findings as Sonnet on the forecast script and on the shop, with the same safe look-alikes left out, and answered exactly No findings on the clean route. Two of its lines ended with a full stop and one answer was indented by four spaces, which the checks accept.

Full test summary

Example

Our own test text, before and after the skill ran. Excerpts only.

English · claude-sonnet-5-5

Before

// scripts/forecast.mjs const config = { baseUrl: 'https://api.example.com/v1', apiKey: process.env.WEATHER_API_KEY, timeoutMs: 5000, }; console.log('starting with config', config); console.log('key present:', Boolean(config.apiKey), 'length:', config.apiKey.length, 'ends with:', config.apiKey.slice(-4)); export async function getForecast(city) {…

After

SECRET-LOGGED — `console.log('starting with config', config)` — the config object holds `apiKey` (from `WEATHER_API_KEY`), so anyone who can read the log or console output reads the key — print only `baseUrl` and `timeoutMs`, or mask `apiKey`…

What is in the file

  • The answer
  • What is a secret
  • The codes
  • How to read the code
  • Rules
  • Work in this order
  • Short example

Languages

English. Tried in: English.

License

Perpetual, non-exclusive; use and modify for yourself incl. paid work; no resale or republishing. Holder: Georgi Kalchev, aiskills402.com. Full terms.

Versions

Current version 1.0.0, updated 2026-10-30. Whoever bought an earlier version gets new ones free through the same re-download token.

  1. v1.0.0 · 2026-10-30

    First release, written in the light-test batch of 29 October 2026 (three cases, price $0.01). The idea is ours; no foreign skill was opened, facts come from OWASP cheat sheets and the Next.js, Vite and Stripe documentation (see notes/ideas.md). Output: one line per finding with a fixed code, or exactly `No findings.`

    Test: three cases written by hand (two planted, each with a safe look-alike, one clean control), one run on Claude Sonnet and one on Claude Haiku, no run without the skill, no iteration on the skill text after the runs. `test/control.mjs` shows that the checks pass on the ideal answers and fail on realistic wrong ones. See `test-summary.json` for the verdicts read by hand.

FAQ

Last four characters in a log: a leak or not?

Not reported. Printing that a key is present, its length or its last four characters does not hand anyone the secret, so the skill leaves it out. It reports the key itself, an object that holds it, an environment dump, or an error that echoes the config.

Why is a NEXT_PUBLIC_ value sometimes fine?

The prefix publishes the value to every visitor by design, so it is wrong for a token and right for a value meant to be public, such as a payment provider's publishable key or a CAPTCHA site key. The skill judges what the value is used for, not only its name.

Does it repeat a secret it finds?

No. The answer names the variable and the place, never the value, so the review itself can be pasted into a ticket. A key read with process.env on the server is not reported, because reading from the environment is the safe way to do it.

What stood in the three test snippets?

A forecast script that printed its config and sent the key in a query string, a shop with a typed mail password and an admin token under the public prefix, and a clean reports route. Sonnet and Haiku answered each once; see the test summary for the hand-read verdicts.

Read more

Share

Read this page as Markdown: /skills/secret-handling-review.md.

More in Code & Engineering

  • React Performance Review

    Code & Engineering

    SKILL.md · v1.0.0 · 8.2 KB

    Reviews pasted React and Next.js App Router code for five performance mistakes that pass every test and then make pages slow, and lists only those, one line each with a fixed code, the place, why it costs time and the fix - or exactly No findings. It catches independent awaits written one after another so the page waits for their sum, an effect that copies something derivable during render into state, a use client mark placed on a whole page when only a small leaf needs interactivity, a heavy library imported at the top of a client file though it is used only after a click, and a new object, array or function passed every render to a memo child or an effect dependency. It leaves out the safe look-alikes: a second await that needs the first result, an effect that syncs with an outside system, and use client on a small button. Use to review React or Next.js code before release, to find why a page ships too much JavaScript or renders twice, or to gate a pull request that touches components.

    $0.01once

    • x402
    • USDC
    • Base
    Get skill

    Tested with Sonnet and Haiku, 29 Oct 2026

  • Remotion Code Review

    Code & Engineering

    SKILL.md · v1.0.0 · 7.9 KB

    Reviews pasted Remotion code (React video compositions) for the five mistakes that make a render differ from the preview or come out with missing frames, and lists only those, one line each with a fixed code, the place, why it breaks the render and the fix - or exactly No findings. It catches motion that is not driven by the frame number (CSS transitions and keyframes, timers, requestAnimationFrame, a counter held in state), Math.random in a component instead of the seeded random function, plain img, video, audio and iframe tags that the render does not wait for, data fetched in an effect with no render delay and no calculateMetadata, and a file from the public folder referenced by a bare path instead of staticFile. It leaves out safe look-alikes: clamped interpolate, seeded random, Math.random in a Node script. Use to review a Remotion composition before rendering, to debug flicker or a video that differs between renders, or to gate a pull request that edits a video project.

    $0.01once

    • x402
    • USDC
    • Base
    Get skill

    Tested with Sonnet and Haiku, 29 Oct 2026

  • Postgres or MySQL SQL to SQLite and D1

    Code & Engineering

    SKILL.md · v1.0.2 · 13.9 KB

    Converts PostgreSQL or MySQL schema statements, migrations and queries into SQLite that Cloudflare D1 and Turso run, so the converted version behaves like the original and not only parses. Knows the conversions that run without an error and then go wrong - a key written as BIGSERIAL or INT AUTO_INCREMENT that SQLite stores as NULL, a custom enum type or an inline enum that stops checking anything, a default now() or gen_random_uuid() that SQLite rejects, a unique email that was case-insensitive in MySQL, ON UPDATE CURRENT_TIMESTAMP that needs a trigger, a foreign key added later with ALTER TABLE, a schema prefix, DISTINCT ON, ILIKE, double-colon casts, date_trunc, interval arithmetic, DATEDIFF, GROUP_CONCAT with SEPARATOR, MySQL division that keeps the fraction, ON DUPLICATE KEY UPDATE, JSON operators. Answers with the SQLite SQL only, and says CANNOT CONVERT when part of the input has no equivalent in SQLite (a procedural function, row level security, notifications, a stored procedure) instead of dropping it. Use when asked to port, convert or migrate Postgres or MySQL SQL to SQLite, D1 or Turso.

    $0.01once

    • x402
    • USDC
    • Base
    Get skill

    Tested with Sonnet and Haiku, 9 Oct 2026

  • Flaky Test Review

    Code & Engineering

    SKILL.md · v1.0.0 · 5.7 KB

    Reviews ONE test file for the five causes that make a test pass on one run and fail on the next, and lists only those, one line each with a fixed code, the test, why it flips and the fix - or exactly No findings. It catches a fixed sleep used to wait for background work, an expectation tied to today's date or the current time, tests that share state and only pass in one order, random values with no fixed seed, and a call to a real network address. It leaves out the safe look-alikes, such as a fake clock set before the call, a random generator built from a fixed seed, a mocked network module and fake timers moved by hand. Use to find why a test fails once in a while in CI, to review a new test file before merging, or to harden a suite that people re-run until it goes green.

    $0.01once

    • x402
    • USDC
    • Base
    Get skill

    Tested with Sonnet and Haiku, 26 Oct 2026