olaafrossi/FoamPilot / .claude/skills/gstack
gstack
FlaggedFast headless browser for QA testing and site dogfooding. Navigate pages, interact with elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots.
design/src/session.ts
View on GitHub/**
* Session state management for multi-turn design iteration.
* Session files are JSON in /tmp, keyed by PID + timestamp.
*/
import fs from "fs";
import path from "path";
export interface DesignSession {
id: string;
lastResponseId: string;
originalBrief: string;
feedbackHistory: string[];
outputPaths: string[];
createdAt: string;
updatedAt: string;
}
/**
* Generate a unique session ID from PID + timestamp.
*/
export function createSessionId(): string {
return `${process.pid}-${Date.now()}`;
}
/**
* Get the file path for a session.
*/
export function sessionPath(sessionId: string): string {
return path.join("/tmp", `design-session-${sessionId}.json`);
}
/**
* Create a new session after initial generation.
*/
export function createSession(
responseId: string,
brief: string,
outputPath: string,
): DesignSession {
const id = createSessionId();
const session: DesignSession = {
id,
lastResponseId: responseId,
originalBrief: brief,
feedbackHistory: [],
outputPaths: [outputPath],
createdAt: new Date().toISOString(),
updatedAt: new Date().toISOString(),
};
fs.writeFileSync(sessionPath(id), JSON.stringify(session, null, 2));
return session;
}
/**
* Read an existing session from disk.
*/
export function readSession(sessionFilePath: string): DesignSession {
const content = fs.readFileSync(sessionFilePath, "utf-8");
return JSON.parse(content);
}
/**
* Update a session with new iteration data.
*/
export function updateSession(
session: DesignSession,
responseId: string,
feedback: string,
outputPath: string,
): void {
session.lastResponseId = responseId;
session.feedbackHistory.push(feedback);
session.outputPaths.push(outputPath);
session.updatedAt = new Date().toISOString();
fs.writeFileSync(sessionPath(session.id), JSON.stringify(session, null, 2));
}
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: 197k | Updated | Claude CodeCodex | Verified | Install |