r/ClaudeWorkflows • u/workflowextractor • 7m ago
Selected Workflow [Workflow] A Claude Code workflow for shipping a browser extension: durable context, repo-owned tests, reproducible builds, and approval gates
A Claude Code workflow for shipping a browser extension: durable context, repo-owned tests, reproducible builds, and approval gates
Workflow value: 79/100
Level: advanced · Categories: Quality Control, Token Saving, Context & Memory, Debugging, Shipping, CLAUDE.md
Original source: r/ClaudeAI
What problem this solves
How to use Claude Code on a long-running, release-bound software project without losing decisions across context limits, accidentally expanding permissions or publishing, or relying on fragile manual and temporary validation steps.
Summary
A concrete, release-oriented Claude Code workflow for browser extensions: set standing safety constraints before coding; record dated decisions in a repository file to survive context summaries; place all essential tests and scripts under version control; validate behavior through unit, browser, and upgrade tests; rebuild in a reviewer-like container and compare artifacts; version store paperwork alongside the manifest and test consistency; and require explicit human approval before publishing.
Why it is useful
It presents a transferable Claude Code delivery pattern: establish non-negotiable safety rules, preserve decisions in a durable repo file across context compaction, encode critical behaviors as tests, make builds reproducible in the reviewer environment, keep release metadata versioned, and require explicit approval for consequential actions. It also identifies a concrete failure mode—ephemeral test scripts silently disappearing—and converts it into a durable repository rule.
Workflow
- Write repository-level standing rules before implementation, including approval boundaries for pushes, deployments, new permissions, and behavior constraints.
- Maintain a dated decisions/notes file in the repository; update it whenever a roadmap version or consequential implementation choice is approved.
- Ask Claude Code to implement work incrementally against the approved roadmap rather than delegating uncontrolled end-to-end changes.
- Convert non-visual requirements into version-controlled automated tests, including unit tests and browser/integration tests where relevant.
- Test upgrade and compatibility paths using prior released versions from git history, rather than testing only clean installs.
- Run the production build in a pinned container or environment matching the target reviewer/production environment.
- Compare generated artifacts against expected output, preferably file by file, to detect unreproducible builds.
- Keep marketplace/release copy and permission justifications in versioned source files, and add a test that checks them against the application manifest.
- Keep every release-critical script, fixture, and check in the repository; never depend on temporary agent-created files.
- Require explicit human confirmation immediately before external side effects such as deployment or publishing.
Tools / artifacts
- Repository standing-rules file / CLAUDE.md-style instructions
- Dated decision-notes file committed to the repository
- Unit-test suite (reported as 137 tests)
- Puppeteer browser tests
- Historical-extension upgrade test script using git history and real Chrome/Firefox
- Containerized reproducible build matching Mozilla review environment
- File-by-file build-output comparison
- Versioned store listing and permission-justification files
- Manifest-to-paperwork consistency test
- Cloudflare deployment with explicit approval gate
Validation signals
- Reported 137 unit tests plus Puppeteer browser tests
- Tests upgrade historical store versions in real Chrome and Firefox
- Build runs in a container intended to match Mozilla's rebuild environment
- Output is compared file by file
- A test fails when store listing/permission documentation diverges from the manifest
- The author reports a real silent-success failure caused by cleaned temporary scripts, then moved checks into the repo
- The linked extension is reportedly published in Chrome and Firefox stores
Cautions
- The author’s guardrails—never push without approval, announce any new browser permission, and require explicit approval before publishing—are good examples of preserving human control over consequential actions.
- Do not rely on Claude-managed temporary folders for required tests or release checks; version all required scripts and fixtures in the repository.
- For browser extensions, independently review manifest permissions and store-submission claims rather than trusting generated paperwork.
Limitations
- The process is described retrospectively rather than supplied as a directly reusable template, command set, or repository structure.
- Most validation claims are self-reported; the post has no community confirmation yet (score 0, one comment, very recent).
- It is partially promotional, with product and store links, although it includes meaningful implementation detail.
- The browser-extension-specific build and store-review portions require adaptation outside extension development.
Vote on this post to rate the workflow. Share what worked or failed in the comments.