olaafrossi/FoamPilot / .claude/skills/browse
browse
FlaggedFast headless browser for QA testing and site dogfooding. Navigate any URL, interact with elements, verify page state, diff before/after actions, take annotated screenshots, check responsive layouts, test forms and uploads, handle dialogs, and assert element states. ~100ms per command. Use when you need to test a feature, verify a deployment, dogfood a user flow, or file a bug with evidence. Use when asked to "open in browser", "test the site", "take a screenshot", or "dogfood this".
test/state-ttl.test.ts
View on GitHub/**
* State file TTL security tests
*
* Verifies that state save includes savedAt timestamp and state load
* warns on old state files.
*/
import { describe, test, expect } from 'bun:test';
import * as fs from 'fs';
import * as path from 'path';
const META_SRC = fs.readFileSync(path.join(import.meta.dir, '../src/meta-commands.ts'), 'utf-8');
describe('State file TTL', () => {
test('state save includes savedAt timestamp in output', () => {
// Verify the save code writes savedAt to the state file
const saveBlock = META_SRC.slice(
META_SRC.indexOf("if (action === 'save')"),
META_SRC.indexOf("if (action === 'load')"),
);
expect(saveBlock).toContain('savedAt: new Date().toISOString()');
});
test('state load warns when savedAt is older than 7 days', () => {
// Verify the load code checks savedAt age and warns
const loadStart = META_SRC.indexOf("if (action === 'load')");
// Find the second occurrence of "Usage: state save|load" (appears after the load block)
const loadEnd = META_SRC.indexOf("Usage: state save|load", loadStart);
const loadBlock = META_SRC.slice(loadStart, loadEnd);
expect(loadBlock).toContain('data.savedAt');
expect(loadBlock).toContain('SEVEN_DAYS');
expect(loadBlock).toContain('console.warn');
expect(loadBlock).toContain('days old');
});
});
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |