.cursor/skills/dev/SKILL.md
Develop and maintain the PWAFire PWA utilities library. Use when working on pwafire package, adding PWA APIs, fixing modules, writing tests, or contributing to the PWAFire codebase.
npx skillsauth add pwafire/pwafire devInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill when working on:
packages/pwafire/ source code{ ok: boolean, message: string, ...data? }Use sync when the underlying browser API is synchronous:
navigator.onLine, document.visibilityState, matchMedia().matchesnew BroadcastChannel(), postMessage(), close()connectivity, visibility, displayMode, broadcastUse async when the API returns a Promise or requires user interaction:
navigator.clipboard.*, navigator.share(), requestFullscreen(), file pickers, etc.Every PWA module function must use this structure (async when API is async):
export const apiName = async (...args) => {
try {
if (!featureAvailable) return { ok: false, message: "API not supported" };
const result = await someAPI(...args);
return { ok: true, message: "Success", ...data };
} catch (error) {
return {
ok: false,
message: error instanceof Error ? error.message : "Failed"
};
}
};
For sync APIs, omit async and await. Feature detection → { ok: false, message: "API not supported" }
{ ok: true, message: "...", ...optionalData }"Failed to {action}" or "{API} API not supported"| Kind | Style | Examples |
|------|-------|----------|
| Functions/variables | camelCase | webShare, copyText |
| Files/directories | kebab-case | lazy-load, idle-detection |
| Constants | SCREAMING_SNAKE_CASE | MAX_RETRY_ATTEMPTS |
| Types | PascalCase | ResponseType, ConfigOptions |
check.webShare() for webShare()screenShare not screenSharingControlsThe 7 ESLint any warnings are expected. Do not fix by defining custom interfaces.
Affected modules: barcode, contacts, content-indexing, files, idle-detection, screen.
Use unknown and as any for experimental APIs without TypeScript definitions.
Do NOT:
Do:
cd packages/pwafire
npm run lint # 0 errors (7 warnings OK)
npm run build # CJS, ESM, DTS generated
npm test # All tests pass
<type>(<scope>) - <description>
PR titles use the same format as commit messages.
Examples: feat(notifications) - add support for notification actions, fix(lazy-load) - prevent CSS injection
packages/pwafire/src/
├── pwa/ # One module per feature (e.g. badging/, clipboard/)
├── check/ # Feature detection utilities
├── index.ts # Main entry
└── types.d.ts # Minimal type definitions
lib/ (build output)For full guidelines, see project docs:
Agents (style guides): docs/agents/
code-style.md - Formatting, type safetynaming-conventions.md - Naming rulesfile-organization.md - Module structurecommit-style.md - Commit and PR formattesting-style.md - Test patternsconsole.md - Console appAPIs: docs/apis/ - Unique API docs (passkey, broadcast, system)
system.md - Sync APIs (connectivity, visibility, displayMode)development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.
development
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.
development
Run, watch, debug, and extend OpenClaw QA testing with qa-lab and qa-channel. Use when Codex needs to execute the repo-backed QA suite, inspect live QA artifacts, debug failing scenarios, add new QA scenarios, or explain the OpenClaw QA workflow. Prefer the live OpenAI lane with regular openai/gpt-5.4 in fast mode; do not use gpt-5.4-pro or gpt-5.4-mini unless the user explicitly overrides that policy.
development
End-to-end Parallels smoke, upgrade, and rerun workflow for OpenClaw across macOS, Windows, and Linux guests. Use when Codex needs to run, rerun, debug, or interpret VM-based install, onboarding, gateway smoke tests, latest-release-to-main upgrade checks, fresh snapshot retests, or optional Discord roundtrip verification under Parallels.