agentleFS
catesandrewcatesandrew/skills/skills/chrome-dump-storage/SKILL.md

chrome-dump-storage

Skill1 starsChanged 5 days agoMITView on GitHub

Use when you need to inspect browser storage state (localStorage, sessionStorage, cookies) after running a flow via Chrome DevTools MCP — useful for debugging authentication, feature flags, and persisted state.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read and summarize browser storage (localStorage, sessionStorage, optionally cookies) for the current page.

    line 9
  2. Very specific:

    If filePath is omitted and a screenshot is requested, auto-name: ./tmp/storage-<YYYYMMDD-HHMMSS>.png

    line 21
  3. Very specific:

    If ${input:includeCookies} is y:

    line 58
  4. Very specific:

    Add more patterns to the REDACT_KEYS regex as needed for your app's conventions.

    line 96

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

chrome-dump-storage

Read and summarize browser storage (localStorage, sessionStorage, optionally cookies) for the current page. Automatically redacts sensitive values. Best for debugging persistence issues, stale tokens, or unexpected state after a flow.

Requires: Chrome DevTools MCP server running and connected.

Inputs

VariableDescriptionExample
${input:keysFilter}Regex filter for storage keys (optional, default: all)auth.*, user_, feature_.*
${input:includeCookies}Include cookie names? y or n (default: n)y
${input:filePath}Screenshot save path (optional)/tmp/storage-after-login.png

If filePath is omitted and a screenshot is requested, auto-name: ./tmp/storage-<YYYYMMDD-HHMMSS>.png

Procedure

1. Read localStorage

(() => {
  const filter = new RegExp('${input:keysFilter}' || '.*');
  const REDACT_KEYS = /token|secret|password|passwd|auth|credential|api[_-]?key/i;
  const result = {};
  for (let i = 0; i < localStorage.length; i++) {
    const key = localStorage.key(i);
    if (!filter.test(key)) continue;
    const raw = localStorage.getItem(key);
    result[key] = REDACT_KEYS.test(key) ? '[REDACTED]' : (raw?.length > 200 ? raw.slice(0, 200) + '…' : raw);
  }
  return { count: Object.keys(result).length, items: result };
})()

2. Read sessionStorage

(() => {
  const filter = new RegExp('${input:keysFilter}' || '.*');
  const REDACT_KEYS = /token|secret|password|passwd|auth|credential|api[_-]?key/i;
  const result = {};
  for (let i = 0; i < sessionStorage.length; i++) {
    const key = sessionStorage.key(i);
    if (!filter.test(key)) continue;
    const raw = sessionStorage.getItem(key);
    result[key] = REDACT_KEYS.test(key) ? '[REDACTED]' : (raw?.length > 200 ? raw.slice(0, 200) + '…' : raw);
  }
  return { count: Object.keys(result).length, items: result };
})()

3. Read cookies (if requested)

If ${input:includeCookies} is y:

(() => {
  // Return cookie names only — never values
  return document.cookie.split(';')
    .map(c => c.trim().split('=')[0])
    .filter(Boolean);
})()

4. Screenshot (optional)

Resolve filePath to absolute path, create parent dirs, call mcp__chrome__take_screenshot.

Output Format

🗃 localStorage (<N> keys matched)

keyvalue (truncated, sensitive redacted)

🗃 sessionStorage (<N> keys matched)

keyvalue (truncated, sensitive redacted)

🍪 Cookie names (values always hidden)

name1, name2, name3, ...

📊 Notable observations

  • Stale timestamps or expired tokens
  • Unusually large values (potential performance issue)
  • Duplicate keys across localStorage/sessionStorage
  • Unexpected keys that shouldn't be present

🖼 Screenshot

Saved: <absolute path> (if captured)

Security Notes

  • Values are never printed for keys matching: token, secret, password, passwd, auth, credential, api-key.
  • Cookie values are never shown — names only.
  • Add more patterns to the REDACT_KEYS regex as needed for your app's conventions.

Common Mistakes

  • Storage is origin-scoped — if the app loads in an iframe on a different origin, you can't read its storage from the parent.
  • sessionStorage is tab-scoped — opening in a new tab gives an empty sessionStorage even for the same URL.
  • JSON-stringified values — many apps store objects as JSON strings; parse them to inspect nested structure.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.