r/ClaudeWorkflows • • 16d ago

Claude Workflow Library

2 Upvotes

Browse this community’s workflow category indexes and discussion posts.


r/ClaudeWorkflows • • 7m ago

Selected Workflow [Workflow] A Claude Code workflow for shipping a browser extension: durable context, repo-owned tests, reproducible builds, and approval gates

1 Upvotes

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

  1. Write repository-level standing rules before implementation, including approval boundaries for pushes, deployments, new permissions, and behavior constraints.
  2. Maintain a dated decisions/notes file in the repository; update it whenever a roadmap version or consequential implementation choice is approved.
  3. Ask Claude Code to implement work incrementally against the approved roadmap rather than delegating uncontrolled end-to-end changes.
  4. Convert non-visual requirements into version-controlled automated tests, including unit tests and browser/integration tests where relevant.
  5. Test upgrade and compatibility paths using prior released versions from git history, rather than testing only clean installs.
  6. Run the production build in a pinned container or environment matching the target reviewer/production environment.
  7. Compare generated artifacts against expected output, preferably file by file, to detect unreproducible builds.
  8. Keep marketplace/release copy and permission justifications in versioned source files, and add a test that checks them against the application manifest.
  9. Keep every release-critical script, fixture, and check in the repository; never depend on temporary agent-created files.
  10. 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.


r/ClaudeWorkflows • • 9m ago

Selected Workflow [Workflow] Guardrails for Long-Running Claude Code Monorepos: Durable MCP Context, Worktree PRs, and Boundary Tests

1 Upvotes

Guardrails for Long-Running Claude Code Monorepos: Durable MCP Context, Worktree PRs, and Boundary Tests

Workflow value: 79/100
Level: advanced · Categories: Quality Control, Token Saving, Context & Memory, Debugging, Shipping, CLAUDE.md, MCP, Multi-Agent
Original source: r/ClaudeAI

What problem this solves

Preventing context drift, inconsistent domain calculations, over-broad refactors, misleading mocked-test success, and stale architectural patterns while using Claude Code over many sessions in a monorepo.

Summary

For a long-lived Claude Code monorepo, keep AGENTS.md concise and use an MCP-accessible system of record for changing plans and handoffs. Establish a domain glossary and enforce missing-data rules in tests. Put each deployment/domain variant in one YAML config. Make changes as narrow, isolated worktree PRs with explicit real-world checks, then run a separate read-only diff review against the original goal. Prefer behavior and system-boundary tests using real fixtures and browser screenshots over brittle implementation-focused TDD; explicitly gate destructive cleanup.

Why it is useful

It gives a transferable set of operational guardrails for using Claude Code on a long-running, multi-application codebase: keep local instructions short, retrieve durable planning context on demand, define domain terminology, drive variation through configuration, isolate narrowly scoped changes in worktrees, review diffs separately from implementation, and test observable system boundaries with real fixtures. It also clearly identifies failure modes that these practices address.

Workflow

  1. Create a short AGENTS.md containing only local commands, non-negotiable architectural boundaries, and links to canonical project records.
  2. Store evolving plans, architecture decisions, and session handoffs in a durable system accessible on demand through MCP rather than repeatedly injecting large repository documents.
  3. Write a GLOSSARY.md for domain terms, denominators, and missing-data behavior; convert critical definitions into automated invariants.
  4. Replace scattered environment- or customer-specific conditionals with one declarative YAML configuration file per variant.
  5. Split planned work into small, single-purpose changes and implement each in an isolated Git worktree.
  6. For each change, specify a concrete acceptance check, such as a real query against representative data or desktop and mobile rendering screenshots.
  7. Run a second, read-only Claude review of the diff against the original task and architectural constraints before merging.
  8. Favor boundary and integration checks with real fixtures over mocks that conceal performance, memory, layout, or data-quality failures.
  9. Make deletion and retirement of obsolete code an explicit scoped task, then verify no active path depends on it.

Tools / artifacts

  • Short AGENTS.md with commands, architectural boundaries, and links to canonical records
  • Notion MCP as on-demand source for plans, ADRs, and session handoffs
  • GLOSSARY.md defining domain metrics and missing-data semantics
  • Per-city YAML configuration files
  • Separate Git worktrees for single-purpose PRs
  • Independent read-only diff review pass
  • Real DuckDB/Parquet query checks
  • Desktop and mobile rendered screenshot checks
  • Boundary-focused Python and TypeScript test suites
  • Public MIT repository: github.com/yesid-dev/transit

Validation signals

  • Claims more than 1,590 PRs across a multi-month project.
  • Claims 500+ test files across Python and TypeScript.
  • Uses concrete acceptance checks: real local DuckDB queries over Parquet and rendered desktop/mobile screenshots.
  • Reports specific failures caught by the workflow, including cold-path layouts, ranking edge cases, memory limits on multi-million-row queries, and mobile MapLibre overlap.
  • Public live application and MIT-licensed source repository provide inspectable implementation evidence.

Cautions

  • Do not expose Notion credentials, Cloudflare/Oracle credentials, R2 keys, or production transit-feed tokens through MCP configuration, prompts, repository files, or screenshots.
  • Keep the read-only review pass genuinely non-mutating; require explicit approval for deletions and infrastructure changes.
  • Run real-data and browser checks against sanitized or access-controlled fixtures where production data or endpoints may be sensitive.

Limitations

  • The post is partly a project showcase, and several workflow claims are self-reported rather than independently demonstrated.
  • It does not provide reproducible Notion MCP configuration, example prompts, worktree commands, CI configuration, or concrete test commands.
  • The practices are a collection of strong patterns rather than a fully ordered end-to-end playbook.
  • Community validation is currently weak: score 1, one comment, and only about one hour of exposure.

Vote on this post to rate the workflow. Share what worked or failed in the comments.


r/ClaudeWorkflows • • 6h ago

Selected Workflow [Workflow] Use local raw-log search as lossless Claude Code memory instead of LLM summaries

3 Upvotes

Use local raw-log search as lossless Claude Code memory instead of LLM summaries

Workflow value: 78/100
Level: intermediate · Categories: Token Saving, Context & Memory, Debugging, CLAUDE.md, MCP, Multi-Agent
Original source: r/ClaudeAI

What problem this solves

LLM-summarized coding-session memory can omit the precise facts needed later, while loading full historical chats consumes excessive context. The workflow makes raw, searchable history available without repeatedly summarizing it or loading entire transcripts.

Summary

Maintain only stable human-authored rules in CLAUDE.md, sanitize and index verbatim local coding-session logs in SQLite, then search the index only when historical context is needed. This preserves exact past details while keeping routine context small and avoiding extra LLM summarization calls.

Why it is useful

It offers a practical alternative to lossy LLM-generated memory: retain concise human rules in CLAUDE.md while indexing sanitized raw session logs locally and retrieving only relevant excerpts on demand. This reduces context loading and preserves exact historical details such as errors, versions, and rejected fixes.

Workflow

  1. Keep CLAUDE.md short and manually maintained; include durable project rules rather than session-history summaries.
  2. Collect local Claude Code/Codex session logs and related memory files.
  3. Before indexing, remove secrets and high-volume noisy tool output from each log.
  4. Store the sanitized raw text verbatim in a local SQLite search index.
  5. When a question depends on prior work, query the index for relevant historical passages instead of loading entire prior chats or asking an LLM to summarize them.
  6. Provide retrieval through a local CLI, or expose it to Claude Code through an MCP server such as uvx brain-recall mcp.
  7. Validate the setup using representative questions from past work; compare answerability, retrieved-context size, and search latency against the existing memory-only approach.
  8. For queries that span languages or rely on semantic similarity, supplement plain text search with an additional retrieval method rather than assuming keyword search is sufficient.

Tools / artifacts

  • A short, human-maintained CLAUDE.md containing rules only
  • Raw Claude Code and Codex session logs
  • A secret/noise-stripping preprocessing step
  • A local SQLite full-text search index
  • CLI retrieval interface
  • MCP server invocation via uvx brain-recall mcp
  • Referenced MIT Python tool: 0xTaoZ/brain-recall

Validation signals

  • Tested against 669 MB of personal history: 305 chats and 130 memory files.
  • Used 29 real historical-work questions.
  • Reported retrieval success improved from 17/29 with CLAUDE.md plus built-in memory to 28/29 after raw-log search.
  • Reported approximately 2k tokens per answer rather than reloading a 56k-token chat, under-1ms search, and zero LLM calls.

Cautions

  • Secrets must be reliably removed before indexing or exposing logs through a local CLI/MCP server; vague or incomplete redaction can leak credentials, tokens, customer data, or proprietary source material.
  • Keep the SQLite index local and apply filesystem/access controls, particularly when logs contain sensitive project context.
  • Retrieved historical instructions should be treated as untrusted context and checked against current repository policies and state.

Limitations

  • The post describes the approach but does not provide the exact sanitization/redaction rules, SQLite schema, indexing command, or retrieval prompt integration.
  • Evaluation is self-reported on one user's 29-question corpus; it lacks an independently reproducible benchmark or community confirmation.
  • Plain-text retrieval is explicitly limited for cross-language or semantically phrased queries.
  • The linked tool/repository is referenced but its implementation is not included in the post itself.

Vote on this post to rate the workflow. Share what worked or failed in the comments.


r/ClaudeWorkflows • • 2h ago

Selected Workflow [Workflow] AI-Assisted Gaia Catalog Search: A Reproducible, Validated Workflow for Finding Candidate Multiple-Star Systems

1 Upvotes

AI-Assisted Gaia Catalog Search: A Reproducible, Validated Workflow for Finding Candidate Multiple-Star Systems

Workflow value: 78/100
Level: advanced · Categories: Quality Control, Context & Memory, Debugging, Shipping
Original source: r/ClaudeAI

What problem this solves

How to turn a large astronomical catalog search into a reproducible candidate-discovery workflow while testing for chance alignments, observational artifacts, incomplete recovery, and incorrect orbital inferences.

Summary

An advanced open-science workflow for searching Gaia catalog data for co-moving multiple-star candidates: build the search code with AI assistance, compile candidate systems, cross-match and fit orbital data, attempt to falsify candidates through shifted-position null tests and observational-artifact checks, measure detection recovery with planted fake companions, independently reimplement key computations, rerun the pipeline, and publish code, data, limitations, and unresolved uncertainty.

Why it is useful

It presents an unusually rigorous, reusable pattern for AI-assisted scientific discovery: construct a catalog-search pipeline, generate candidates, use null tests and injected synthetic signals to quantify false positives and recovery, independently reproduce key calculations, rerun the full pipeline, publish code/data, and state remaining uncertainty. The linked repository makes the method potentially inspectable and adaptable.

Workflow

  1. Define the target signal and construct a catalog-search pipeline, using AI coding help only as an implementation aid rather than as scientific authority.
  2. Build an initial candidate list from observational/catalog data and identify systems requiring follow-up cross-matching.
  3. Query the new catalog release for co-moving, distance-consistent companion candidates; here, the author searched 2,077 likely triples and retained systems with four or more stars.
  4. Cross-reference established catalogs and fit available raw observations/orbits to distinguish previously known components from new candidate associations.
  5. Apply a physically motivated pairing criterion from published literature to link groups and estimate relative motions and binding plausibility.
  6. Run null tests by shifting source positions and rerunning the full search to estimate chance-alignment behavior.
  7. Probe local false positives by testing many nearby positions and measuring whether equivalent matches occur.
  8. Inject synthetic companions into the pipeline and measure recovery performance, documenting both the number injected and detection rate.
  9. Refit key raw observational data and test known observational-systematics corrections, such as scan-angle effects.
  10. Run noise and random-trial simulations to quantify how often the observed signal occurs under alternatives.
  11. Check physical consistency using distance agreement, relative velocity versus escape velocity, and dynamical stability criteria.
  12. Independently reproduce crucial orbit and speed calculations with separate code, then fully rerun the pipeline and compare outputs file-by-file where possible.

Tools / artifacts

  • Claude Code, Claude, GPT, and Gemini for coding assistance
  • Public MIT-licensed GitHub repository: tyc7188-gaia-dr4-search
  • Gaia DR4 catalog and raw observational data
  • TESS data
  • Washington Double Star Catalog
  • Zenodo preprint and published table of 244 candidate systems
  • Shifted-position reruns, synthetic companion injection/recovery tests, noise simulations, and independent-code reruns

Validation signals

  • Sixteen shifted-star reruns found no comparable system.
  • Two thousand nearby test positions found no matches within 10,000 au.
  • Injected 41,540 fake companions and recovered 39,294 of the expected 39,? candidates, reported as 99.6% recovery within 10,000 au.
  • Refit of Gaia raw data recovered a 477.3-day period for the reported 477-day orbit.
  • Applied scan-angle correction and 16,000 noise simulations per star.
  • Used 20,000 random trials for a speed-signal comparison, with 28 matches (0.14%).
  • Checked distance, projected motion versus escape speed, and hierarchical-orbit stability.
  • Reimplemented orbit/speed calculations separately and performed a full rerun with all 55 non-figure files matching.
  • Published source code, calculations, candidate list, sources, and stated code limits.

Cautions

  • Treat the seven-star result as an unverified scientific candidate, not an established discovery.
  • Users adapting the method should preserve independent review, uncertainty reporting, null tests, and catalog/data-license requirements.
  • Do not rely on AI-generated scientific code or interpretation without domain-expert review and reproducibility checks.

Limitations

  • Most implementation details are delegated to the linked GitHub repository and preprint rather than explained in the Reddit post itself.
  • The Claude/Claude Code role is described only broadly ('helped write the code'); there are no reusable prompts, agent structure, CLAUDE.md instructions, or Claude Code commands.
  • The workflow is highly domain-specific and requires substantial astronomy, statistical, and Gaia-catalog expertise.
  • The astronomical conclusion remains explicitly a candidate and needs independent expert validation; the post’s checks validate the pipeline more than the physical interpretation.
  • Community engagement is modest and does not yet provide independent replication or success reports.

Vote on this post to rate the workflow. Share what worked or failed in the comments.


r/ClaudeWorkflows • • 2h ago

Selected Workflow [Workflow] Test Claude Code Skills with Role-Based Subagents, Explicit Consent Rules, and Regression Scenarios

1 Upvotes

Test Claude Code Skills with Role-Based Subagents, Explicit Consent Rules, and Regression Scenarios

Workflow value: 78/100
Level: intermediate · Categories: Quality Control, Debugging, Shipping, Skills, MCP, Subagents
Original source: r/ClaudeCode

What problem this solves

Prevents agent skills from appearing correct in static review while failing for realistic users, repeatedly asking for information already available in a repository, making unsafe external changes from vague approval, or presenting unverified research as authoritative.

Summary

A reusable workflow for building and hardening a Claude Code skill backed by maintained structured data: keep one checked YAML source, generate derived documentation/site artifacts, test the skill with subagents impersonating varied user types, turn each discovered ambiguity into literal SKILL.md rules, rerun prior scenarios after fixes, add new scenarios to detect overfitting, and automate ongoing link/data revalidation in CI.

Why it is useful

It gives a repeatable quality-control pattern for Claude Code skills: test the skill through role-based subagents, repair observed failures, rerun the same cases for regression checking, then introduce new cases to detect overfitting. It also provides transferable authoring controls for repository inspection, explicit action consent, source-confidence labeling, and structured-data maintenance.

Workflow

  1. Store canonical facts in a single versioned structured-data file, and generate dependent README or website artifacts from it rather than maintaining multiple sources manually.
  2. Fetch authoritative sources for data claims, compare the results against the structured data, and have a human review the resulting diffs.
  3. Write role-based acceptance scenarios for subagents representing distinct real users, including nontechnical users, users with an existing repository, regional/compliance-specific users, and users requesting broad autonomous action.
  4. Run the skill against each subagent scenario and record failures that static SKILL.md review would miss.
  5. Convert recurring ambiguities into literal skill rules, such as requiring full direct links instead of vague references to documentation.
  6. Require the skill to inspect local repository manifests and configuration files before asking users questions whose answers may already be present.
  7. Enumerate consequential actions requiring confirmation, including outbound messages, publishing, DNS changes, and live payment operations.
  8. Require a specific confirmation for each protected action rather than accepting broad consent.
  9. When the skill researches tools outside its maintained data, label conclusions as unverified rather than presenting them with the confidence of checked data.
  10. After each fix, rerun the original scenarios as regression tests.
  11. Add fresh scenarios after regression passes to test whether the fixes merely overfit prior cases.
  12. Package and distribute the skill through one installation route per user to avoid duplicate-skill conflicts, while supporting appropriate formats for distinct clients if needed separately.

Tools / artifacts

  • A versioned YAML file as the single source of truth
  • Python generators for README and static filter site
  • SKILL.md with literal behavioral and approval rules
  • Claude Code plugin with marketplace.json
  • Claude app ZIP package
  • Connected MCP servers for operations such as monitoring, error tracking, DNS, and test-mode payments
  • Lychee link-checking CI
  • Monthly GitHub Action that opens re-verification issues
  • Role-based subagent test scenarios

Validation signals

  • Claims that 44 free-tier entries were checked against official pricing pages, with Claude Code fetching/comparing data and the author reviewing diffs.
  • CI link checking runs on every change.
  • A scheduled monthly action identifies entries due for review.
  • The author reports iterative scenario testing: fix failures, rerun identical scenarios, then add three new cases to check against overfitting.
  • The repository is publicly linked and the implementation is inspectable, though not independently verified here.

Cautions

  • Retain the explicit confirmation gate for sending email, publishing, changing DNS, creating charges, and using live payment credentials.
  • Require a specific approval for each consequential action; do not treat a broad request such as 'do it all' as authorization.
  • Clearly label research on tools absent from the checked dataset as unverified, and preserve human review of fetched pricing/data diffs.
  • Avoid installing duplicate copies of a skill through both plugin and ZIP mechanisms.

Limitations

  • The subagent test personas and prompts are described but not provided as reusable fixtures or commands.
  • Reported improvements such as cutting questions in half are anecdotal and lack measured before/after test results.
  • Community validation is currently weak: the post has a score of 1 and no supplied comments confirm successful adoption.
  • Some details are tied to the author's launch-tool dataset and repository rather than a fully generic skill-testing template.

Vote on this post to rate the workflow. Share what worked or failed in the comments.


r/ClaudeWorkflows • • 4h ago

Selected Workflow [Workflow] Make Claude App Project Memory Discoverable: File Ordering and Description-Length Rules

1 Upvotes

Make Claude App Project Memory Discoverable: File Ordering and Description-Length Rules

Workflow value: 77/100
Level: intermediate · Categories: Quality Control, Context & Memory
Original source: r/ClaudeAI

What problem this solves

Important project-memory files or instructions may not be visible at chat startup, especially in voice mode, and long descriptions or voice instructions can be silently truncated.

Summary

A tested context-management workflow for Claude app project memory: organize essential files so they appear early in sorted startup lists, front-load file descriptions and voice instructions before observed truncation points, and periodically verify the behavior with fresh-chat marker tests.

Why it is useful

It converts undocumented context-window and file-list behavior into concrete, low-effort file-authoring rules: make critical files sort early, front-load descriptions, and place voice instructions at the top. It also demonstrates a replicable way to test what is actually injected into a fresh chat rather than assuming all project files are equally visible.

Workflow

  1. Inventory project files and identify the files/instructions Claude must reliably see without searching.
  2. Sort or rename paths so must-find files appear near the beginning of the app's startup ordering; prioritize the first roughly 150 files for regular chats and the first roughly 25 for voice mode, then verify on the current account.
  3. Write each file description with its key purpose in the opening 80 characters, keeping the complete description below roughly 150 characters where possible.
  4. Put voice-critical instructions at the beginning of voice.md, on complete early lines, rather than relying on content near the bottom.
  5. Test visibility in a fresh regular or voice chat by placing unique marker words at likely cutoff boundaries and asking Claude what it sees before it opens files.
  6. Use the list tool or equivalent inventory to confirm total file count and determine whether important files are outside the startup list.
  7. Use a local script on copied list output to count description characters rather than asking the model to estimate character positions.
  8. Repeat the checks after app, plan, or memory-feature changes; revise naming, ordering, and text length based on observed behavior.

Tools / artifacts

  • Claude app project file list
  • voice.md
  • Fresh regular and voice chats
  • Marker words placed at boundary positions
  • A script to count characters in verbatim list output
  • Claude Code MEMORY.md documentation link

Validation signals

  • Compared fresh-chat startup lists against the list tool's total count on two dates.
  • Used a blind marker-word test at voice-list positions 25 and 26.
  • Counted 23 startup truncations at exactly 160 characters and 20 mid-chat previews at 80 characters using a script.
  • Used boundary markers in voice.md and a displayed cutoff notice to bound the voice-mode content limit.
  • Clearly distinguishes measured observations from inferred approximate limits and asks others to reproduce them.

Cautions

  • Do not rely on the stated caps as contractual behavior; re-test after app or plan changes.
  • Avoid placing secrets in project-memory descriptions or files merely because they may be injected into chat context.
  • Use the observed limits to improve discoverability, not to assume inaccessible files are protected from access.

Limitations

  • The reported limits are account-, plan-, client-, and time-dependent, so the exact numbers should not be treated as stable platform guarantees.
  • It is primarily an observational report rather than a fully packaged setup guide; readers must translate the findings into their own file-management conventions.
  • Validation is from one account and has minimal community corroboration (score 1, one comment).
  • The workflow applies chiefly to Claude app project/memory files and voice mode, not broadly to all Claude Code workflows.

Vote on this post to rate the workflow. Share what worked or failed in the comments.


r/ClaudeWorkflows • • 6h ago

Selected Workflow [Workflow] Prevent Claude Code from Inventing Icon Names: Search a Catalog, Constrain Context, and Fail Strict Builds

1 Upvotes

Prevent Claude Code from Inventing Icon Names: Search a Catalog, Constrain Context, and Fail Strict Builds

Workflow value: 76/100
Level: intermediate · Categories: Quality Control, Token Saving, Context & Memory, Debugging, Shipping, CLAUDE.md
Original source: r/ClaudeAI

What problem this solves

Claude generates plausible but nonexistent identifiers such as icon: settings or icon: delete, causing wireframe YAML to look valid while failing against the actual Font Awesome Free catalog.

Summary

Use an authoritative icon catalog as a queryable local tool rather than placing the full catalog in the model prompt. Tell Claude Code, via its project guidance, to search the catalog before choosing an icon. Then validate every icon reference at lint/validate/build time, accept official aliases, emit useful replacement candidates for unknown values, and make strict project builds fail on unresolved identifiers.

Why it is useful

It demonstrates a practical anti-hallucination pattern for agent-generated structured content: keep a large authoritative catalog out of context, expose a deterministic search command, instruct the agent to query it before emitting values, and validate generated references during lint/build with actionable replacements. The same design transfers to component names, API properties, design tokens, database fields, and other constrained vocabularies.

Workflow

  1. Bundle or otherwise access the authoritative catalog for valid identifiers and aliases.
  2. Provide a deterministic CLI search interface that returns a small, bounded result set rather than injecting the entire catalog into agent context.
  3. Rank results predictably, using canonical names, aliases, exact terms, prefixes, and explicit phrase mappings where metadata is insufficient.
  4. Add concise CLAUDE.md/AGENTS.md guidance telling the agent to invoke the search command before writing constrained values.
  5. Validate every relevant generated field against canonical identifiers and recognized aliases.
  6. Produce distinct diagnostics for an unknown identifier versus a valid identifier unavailable in the selected style or context.
  7. Include a few actionable search hits in unknown-identifier diagnostics instead of silently substituting or rendering nothing.
  8. Run validation through lint and validate commands, and enforce nonzero build exits in strict project configurations.
  9. Review low-quality suggestions and improve the alias/ranking layer while preserving catalog-backed validation as the final authority.

Tools / artifacts

  • wf open-source CLI and linked GitHub repository
  • Bundled Font Awesome Free metadata catalog
  • wf icons search "<query>" command with style, result-limit, and JSON options
  • Agent guidance emitted by wf llm and referenced from CLAUDE.md / AGENTS.md
  • YAML icon validator for button, input, and icon-component references
  • UNKNOWN_ICON and ICON_STYLE_UNAVAILABLE diagnostics
  • wf validate, wf lint, wf build, and wf init strict-validation behavior

Validation signals

  • Validation checks canonical icon names and official Font Awesome aliases.
  • Unknown icons produce top search results as suggested replacements rather than silently rendering empty icons.
  • Unavailable styles receive a separate diagnostic.
  • New projects use strict validation so builds exit with code 1 for invalid icons.
  • The author states that an adversarial read-only Claude review influenced the implementation, but no test suite or CI evidence is shown in the post.

Cautions

  • Do not treat search suggestions as authoritative without retaining catalog-backed validation; ranking may return semantically inappropriate replacements.
  • Keep strict build failures for generated artifacts, but distinguish warnings from errors where this avoids blocking legitimate exploratory work.
  • If adapting the approach to private APIs or component registries, ensure the search index and diagnostic output do not expose secrets or proprietary metadata.

Limitations

  • The workflow is tied to the wf YAML/Font Awesome integration, so users must adapt the pattern for other icon libraries, component catalogs, or schemas.
  • There is no independent community validation yet: the post has a score of 0, only two comments, and is approximately one hour old.
  • The proposed replacement ranking is known to produce poor results for some common requests such as "delete."
  • The post describes behavior and commands but does not show automated test cases, CI output, or a complete configuration example for adding the workflow to another project.
  • It is partly a project announcement/self-promotion, though it includes enough implementation detail to extract a reusable practice.

Vote on this post to rate the workflow. Share what worked or failed in the comments.


r/ClaudeWorkflows • • 8h ago

Selected Workflow [Workflow] Install shark-skills to add independent review, test-gated commits, and release-status checks to Claude Code

1 Upvotes

Install shark-skills to add independent review, test-gated commits, and release-status checks to Claude Code

Workflow value: 77/100
Level: intermediate · Categories: Quality Control, Debugging, Shipping, Hooks, Skills, Subagents
Original source: r/ClaudeAI

What problem this solves

Claude Code changes can be committed without an independent review, successful test run, or visible release-readiness signal. The kit adds structured skills, a fresh reviewer agent, status reporting, and hooks that gate commits on review and test completion.

Summary

A reusable Claude Code plugin workflow that initializes project-quality checks, uses a fresh reviewer agent for independent review, prevents commits until review and tests pass, and reports ship readiness and code health. It is supported by a containerized multi-language benchmark and an evaluation suite, though installation and configuration specifics are primarily in the linked repository.

Why it is useful

It packages a concrete quality-control loop for Claude Code: initialize a project, have a separate reviewer agent inspect changes, require tests and review before commits, and expose release/quality state. It is backed by cross-language container benchmarks and a skill-text evaluation suite, making it more actionable than generic advice to “test and review your code.”

Workflow

  1. Confirm Claude Code is version 2.1.333 or newer.
  2. Add the shark-skills marketplace and install the shark plugin using the repository README instructions.
  3. Run /shark:init in the target project to initialize its project status, quality, review, and commit-gate workflow.
  4. Use the operator skill to break implementation work into tasks and keep project todos, backlog, and open questions visible.
  5. Before committing, run the project tests and invoke the reviewer skill/agent so a separate agent reviews code it did not author.
  6. Address reviewer findings and quality/security/architecture/test failures until the code-health grade and release status satisfy the configured threshold.
  7. Allow the commit gate to verify that review and test requirements have been met; if blocked, run the command it provides and resolve the missing check.
  8. Optionally install shark-overdrive@shark-skills, run /tui fullscreen, and invoke /shark-pane to view status alongside the chat.
  9. For adaptation or regression testing, run the provided containerized claude -p benchmark and skill-text evaluation suite against representative repositories.

Tools / artifacts

  • shark-skills Claude Code plugin kit
  • Reviewer agent and review skill
  • Commit-gate hook
  • /shark:init slash command
  • shark-overdrive side-pane plugin
  • Containerized claude -p test bench across Go, Rust, Python, and TypeScript repositories
  • 20-case benchmark suite
  • 19-case skill-text evaluation suite

Validation signals

  • The author reports 20/20 passing benchmark cases across four open-source repositories and four languages.
  • The benchmark reportedly found seven defects before release, which were fixed test-first.
  • The author reports 19/19 passing evaluation cases for skill text.
  • The kit was dogfooded while developing itself: operator skill, commit gate, and reviewer agent were used on the project.
  • Known limitations are explicitly disclosed: incomplete Go/Rust security rules and unverified Linux-terminal pane behavior.

Cautions

  • Commit blocking is a protective quality gate, not a permission-bypass mechanism.
  • Users should inspect the plugin's hooks, commands, and repository configuration before installation, particularly because it can control or refuse commit actions.
  • Do not treat its automated grades or passing bench cases as a substitute for human review on security-sensitive changes.

Limitations

  • Most implementation detail is delegated to the linked README/repository rather than included in the post.
  • Validation results are self-reported, with no independent community confirmation yet.
  • The post has little community signal (score 2, one comment, very recent).
  • Security-rule coverage is incomplete for Go and Rust, and the terminal pane is not yet verified on real Linux terminals.

Vote on this post to rate the workflow. Share what worked or failed in the comments.


r/ClaudeWorkflows • • 8h ago

Selected Workflow [Workflow] Build a Claude Code pre-upload quality gate: scripted checks plus a manual review gate

1 Upvotes

Build a Claude Code pre-upload quality gate: scripted checks plus a manual review gate

Workflow value: 77/100
Level: intermediate · Categories: Quality Control, Token Saving, Context & Memory, Debugging, Shipping, Skills
Original source: r/ClaudeAI

What problem this solves

Catches metadata, print-production, pricing, distribution-exclusivity, and disclosure issues before a self-published book is uploaded, reducing avoidable re-uploads and platform listing mistakes.

Summary

A reusable preflight-skill workflow for self-publishers: turn an accumulated launch checklist into a structured record; separate script-verifiable rules from human-only confirmations; run a local Python validator; then walk the remaining manual gate before upload. Harden the skill by asking a separate, context-free Claude Code session to adversarially test malformed and edge-case records, and convert every crash or false pass into explicit validation.

Why it is useful

It converts a learned, domain-specific checklist into a repeatable skill with a clear split between deterministic validation and required human attestations. The independent-context review pattern is especially transferable: have a fresh Claude Code session attack generated tooling with malformed and semantically tricky inputs, then harden failures into actionable validation messages.

Workflow

  1. Collect a checklist based on recurring real-world launch failures.
  2. Give the checklist to Claude Code and divide items into deterministic checks versus human confirmations.
  3. Create a SKILL.md that defines the sequence: build a structured record, run validation, then conduct a manual confirmation gate.
  4. Implement a local validator with explicit input normalization and type validation; avoid unnecessary network access.
  5. Run the skill against the book’s listing data and production facts, and prioritize reported failures before upload.
  6. Open a fresh Claude Code session with no first-session context and ask it to review and break the skill.
  7. Test malformed types, equivalent-but-differently-formatted identifiers, boundary values, units/rates, and realistic language edge cases.
  8. Fix crashes, normalization gaps, and false passes so invalid data yields actionable findings rather than tracebacks.
  9. Install the reviewed skill in Claude or Claude Code, enable code execution only after inspecting the code, and run it as a pre-upload gate.
  10. Maintain the rule set as retailer/distributor policies and publishing requirements change.

Tools / artifacts

  • GitHub repository: pubhatch/book-launch-check
  • SKILL.md
  • check_record.py standard-library Python validator
  • Downloadable skill ZIP
  • Structured book listing/check record

Validation signals

  • A separate Claude Code session with no prior context reviewed and attempted to break the implementation.
  • The review found concrete robustness and correctness faults, including type-triggered tracebacks, keyword false positives, ISBN normalization failures, and invalid royalty-rate handling.
  • The author reports that these faults were fixed so invalid input produces corrective feedback rather than crashes or false passes.
  • The script is intentionally offline/no-network and uses a manual confirmation gate for information automation cannot verify.

Cautions

  • Review and update platform-specific rules before relying on the results; KDP/IngramSpark requirements and commercial terms may change.
  • Treat the skill as a preflight aid, not a substitute for reviewing final files and platform terms.
  • Inspect third-party skill code before enabling code execution, and avoid placing unpublished manuscripts or sensitive account data into untrusted environments.

Limitations

  • The workflow is narrowly targeted to self-publishing on KDP/IngramSpark rather than broadly applicable Claude Code use.
  • Most validation is author-reported; the post has minimal community engagement and no independent success reports yet.
  • Publishing-platform requirements, royalty rules, and disclosure policies can change, so the checks require ongoing maintenance.
  • The post links to a project run by the author, though it provides enough implementation and installation detail to be more than self-promotion.

Vote on this post to rate the workflow. Share what worked or failed in the comments.


r/ClaudeWorkflows • • 10h ago

Selected Workflow [Workflow] Review PRs with both test-integrity diff checks and mutation testing

1 Upvotes

Review PRs with both test-integrity diff checks and mutation testing

Workflow value: 77/100
Level: advanced · Categories: Quality Control, Debugging
Original source: r/ClaudeCode

What problem this solves

A green CI run can be misleading when a PR weakens, deletes, or fails to exercise tests. The workflow independently checks both test-diff integrity and the test suite's ability to detect small code regressions.

Summary

Use two independent checks for each meaningful PR: first run honest-ci to identify tests that were deleted or weakened in the diff; then run killdiff to introduce small code mutations and execute the existing suite. Investigate every surviving mutant—classify equivalent changes separately, and reproduce plausible behavior changes with a targeted replay or integration test. Add missing coverage before merge, and preserve the reports as review evidence.

Why it is useful

It provides a complementary PR-review quality gate: detect tests weakened or removed by the change, then mutation-test the changed behavior to determine whether the remaining suite would catch plausible regressions. The deliberate deleted-test control and surviving mutant investigation make the recommendation more concrete than generic advice to “write better tests.”

Workflow

  1. Check out the target PR in an isolated branch or scratch working copy.
  2. Run honest-ci (or an equivalent test-diff integrity checker) against the PR and inspect any deleted, bypassed, or weakened tests.
  3. If practical, validate the checker once using a disposable control change such as removing an existing test; revert the control afterward.
  4. Run killdiff (or an equivalent mutation tool) against the changed code and execute the normal test suite for each mutation.
  5. For each surviving mutation, determine whether it is equivalent or represents an observable behavior change.
  6. For non-equivalent survivors, reproduce the suspected gap with a targeted replay or integration test, such as replaying the exact API request affected.
  7. Add or strengthen coverage for confirmed gaps, rerun integrity and mutation checks, and attach the reports to PR review or CI evidence.

Tools / artifacts

  • honest-ci, for detecting tests removed or weakened within a PR
  • killdiff, for applying small mutations and measuring whether the existing suite detects them
  • A scratch-copy control that deletes an existing test to verify the integrity checker fires
  • Loopback replay of an exact /v1 request to validate a surviving mutant
  • Linked GitHub experiment with inputs, outputs, and reproduction steps: docs/experiments/2026-11-28-killdiff-and-honest-ci.md

Validation signals

  • honest-ci reported no integrity issues on the original kvdiff PR #6.
  • A deliberate test deletion in a scratch copy was flagged by honest-ci.
  • killdiff performed 12 mutations: 10 caused existing tests to fail, while 2 survived.
  • One surviving mutation was assessed as equivalent; the other was validated through loopback replay as a behavior-changing request-forwarding gap.
  • The author published the inputs, outputs, and reproduction steps.

Cautions

  • Run mutations in an isolated working tree, scratch copy, or disposable branch, since mutation tools intentionally alter source code.
  • Treat surviving mutants as review leads, not automatic defects: equivalent mutants may be semantically unkillable.
  • Review any test deletions or weakenings explicitly before merging; do not automatically accept tool-generated test changes.

Limitations

  • The comment itself gives only a high-level procedure; exact commands, installation, and CI integration details are delegated to the linked GitHub experiment.
  • Evidence comes from a single PR and a scratch-copy control rather than repeated projects or production adoption.
  • There is no community validation beyond the author's reported reproduction; the Reddit score is low and there are no replies.
  • The two tools' false-positive rate, runtime cost, and behavior on larger or different-language repositories are not described.

Vote on this post to rate the workflow. Share what worked or failed in the comments.


r/ClaudeWorkflows • • 10h ago

Selected Workflow [Workflow] Docs-First Claude Code Development: Contract-Driven Milestones and Real Integration Gates

1 Upvotes

Docs-First Claude Code Development: Contract-Driven Milestones and Real Integration Gates

Workflow value: 76/100
Level: intermediate · Categories: Quality Control, Token Saving, Context & Memory, Debugging, Shipping, CLAUDE.md
Original source: r/ClaudeCode

What problem this solves

Prevents Claude Code from drifting across sessions or inconsistently interpreting core concepts such as metrics, while catching production-like races that unit tests miss.

Summary

Create a plan, milestone roadmap, and DESIGN.md before coding; make DESIGN.md the source of truth for system contracts and formulas; keep CLAUDE.md short and instruct Claude Code to read those files, follow milestone order, and avoid inventing new definitions. Require a concrete exit check for every milestone, then perform at least one real external integration call before release to catch failures missed by unit tests.

Why it is useful

It provides a practical anti-drift workflow for Claude Code: establish durable contracts before implementation, constrain the agent to milestone order, require objective completion gates, and validate with a real external integration rather than relying solely on unit tests.

Workflow

  1. Before implementation, write a project plan, a milestone roadmap, and a DESIGN.md.
  2. Record UI, API, event, database, and metric definitions in DESIGN.md so key terms and formulas have one authoritative source.
  3. Create a concise CLAUDE.md telling Claude Code which documents to read first, to work in milestone order, and to use the documented contracts rather than creating new ones.
  4. Define a concrete, observable exit check for each milestone.
  5. Do not begin the subsequent milestone until the current milestone's check passes.
  6. Before publishing or releasing an integration/SDK, run a real end-to-end call against the actual external system and investigate any issue it exposes.

Tools / artifacts

  • A project plan
  • Roadmap organized into milestones M0–M8
  • DESIGN.md containing UI, API, event, database, and metric contracts
  • A short CLAUDE.md directing Claude to read the governing documents and follow milestone order
  • Per-milestone exit checks
  • A real Pipecat-bot call as an integration validation
  • Linked GitHub repository: vAna

Validation signals

  • Each milestone has a concrete exit check before the next milestone may begin.
  • A real SDK call from an actual Pipecat bot was run before publishing.
  • The real call found an STT-detection race that unit tests did not reveal.

Cautions

  • Do not let milestone gates become a substitute for human review of security-sensitive API, database, or metric-contract changes.
  • Use sanitized credentials and non-production accounts when performing real third-party integration calls.

Limitations

  • The actual plan, roadmap, DESIGN.md structure, milestone exit checks, and CLAUDE.md contents are described but not reproduced in the comment.
  • Validation evidence is limited to one reported real-call test and an identified race condition; there is no broader test or deployment record.
  • The post is partly a project showcase and has little community validation so far (score 1, no replies).

Vote on this post to rate the workflow. Share what worked or failed in the comments.


r/ClaudeWorkflows • • 14h ago

Selected Workflow [Workflow] Human-Guided Claude Code Workflow for Building and Cross-Platform Testing a Rust Desktop App

1 Upvotes

Human-Guided Claude Code Workflow for Building and Cross-Platform Testing a Rust Desktop App

Workflow value: 76/100
Level: intermediate · Categories: Quality Control, Debugging, Shipping, Multi-Agent
Original source: r/ClaudeAI

What problem this solves

How a non-programmer can use Claude Code to build and release a cross-platform application while retaining product decisions, staged reviews, and hands-on platform validation.

Summary

A practical, reported Claude Code workflow for building a cross-platform Rust application: the human defines features and constraints; Claude elicits requirements and presents trade-offs; Claude writes a design and step-by-step plan; each step is implemented and independently reviewed; a final whole-project review follows; and behavior is tested across Linux desktop environments in VMs plus a separate Windows environment before human-approved releases.

Why it is useful

It presents a credible human-in-the-loop Claude Code development loop: decide feature constraints, have Claude produce a design and stepwise implementation plan, implement one step at a time, independently review each step, run a final whole-project review, and validate across operating systems and desktop environments. The cross-platform VM testing and explicit release approval are especially transferable quality-control practices.

Workflow

  1. Define the feature goal, limits, and acceptance behavior; keep product and release decisions with the human owner.
  2. Ask Claude Code to clarify requirements and present implementation options with trade-offs.
  3. Choose an option, then require a written design and step-by-step implementation plan before code changes begin.
  4. Implement one planned step at a time in Claude Code.
  5. After each step, use a separate Claude review pass to inspect the change and address issues before beginning the next step.
  6. Run a final review across the complete implementation to find integration defects missed by step-level reviews.
  7. Test on representative target platforms: use Fedora and Ubuntu VMs for desktop environments not available on the main machine, and exercise critical input behavior such as mouse movement ending the screensaver.
  8. For Windows, prepare test instructions from one environment, execute them in a separate Windows session, and return the results for follow-up.
  9. Personally test the release candidate on owned machines, report failures, and explicitly approve each release.

Tools / artifacts

  • Claude Code
  • Public GitHub repository: https://github.com/Nibdi/asciiglow
  • Rust
  • Fedora and Ubuntu virtual machines
  • Windows/Linux dual-boot test environments
  • Virtual mouse input for idle-exit testing

Validation signals

  • Each implementation step was reportedly reviewed before proceeding.
  • A final review reportedly caught defects missed by per-step reviews.
  • The author tested multiple Linux desktop environments, including GNOME, KDE, Hyprland, and niri, in Fedora/Ubuntu VMs.
  • A virtual mouse was used to verify the key behavior that user movement closes the screensaver.
  • Windows test instructions were produced on Linux and executed in a separate Windows Claude session, with results returned.
  • The author tested on personal machines and explicitly approved each release.
  • A public open-source repository permits inspection of the resulting implementation.

Cautions

  • Do not treat automated Claude reviews as a replacement for human approval, security review, or testing on representative systems.
  • The project is unsigned on Windows; users should not bypass Windows security controls merely to install untrusted builds.
  • When using VMs and cross-machine Claude sessions, avoid exposing credentials, personal media, signing keys, or other secrets in shared prompts, logs, and test fixtures.

Limitations

  • The post describes the process but does not provide reusable prompts, CLAUDE.md rules, review checklists, commands, VM provisioning steps, or CI configuration.
  • The “separate Claude review” mechanism is not specified well enough to reproduce exactly (for example, independent context, subagent configuration, or review criteria).
  • Validation is reported by the author but has no community confirmation yet; the submission is new and has low engagement.
  • It is partly a project showcase, so its transferable process details are relatively high-level.

Vote on this post to rate the workflow. Share what worked or failed in the comments.


r/ClaudeWorkflows • • 14h ago

Selected Workflow [Workflow] Turn successful Claude Code sessions into tested reusable skills

1 Upvotes

Turn successful Claude Code sessions into tested reusable skills

Workflow value: 78/100
Level: intermediate · Categories: Quality Control, Token Saving, Context & Memory, Debugging, Shipping, CLAUDE.md, Skills
Original source: r/ClaudeAI

What problem this solves

Avoids maintaining brittle prompt libraries and repeatedly re-explaining task-specific preferences in new Claude Code sessions.

Summary

Use an interactive first run to discover requirements, then convert the corrected process into a reusable Claude Code skill. Make the skill discoverable through repository guidance, validate it in a clean context on a related task, and iteratively repair the skill rather than relying on the original conversation or a prompt library.

Why it is useful

It gives a compact, transferable loop for converting one-off successful agent collaborations into durable, testable skills: learn through correction, codify the successful process, test outside the original context, and improve the artifact rather than repeatedly repairing prompts.

Workflow

  1. Work through a new recurring task with Claude as an iterative collaboration: state the desired outcome, inspect output, and provide corrections until the result is acceptable.
  2. Capture the requirements, edge cases, prohibited behaviors, preferences, and successful procedure from that collaboration in a reusable skill, optionally using a skill-creation helper.
  3. Add a concise reference in CLAUDE.md or AGENTS.md so future sessions know the skill exists and when to use it.
  4. Start a fresh session and run the skill on a slightly different but representative task; do not rely on the original chat context as proof that it works.
  5. If the fresh-session result fails, revise the skill specification and retest rather than adding more ad hoc instructions to the chat.
  6. For capabilities you cannot author confidently, locate existing skills, inspect their contents and permission implications, then adapt or install only those you trust.
  7. Reuse the skill across several runs and retain it when the upfront authoring cost is amortized by repeated time savings.

Tools / artifacts

  • Claude Code skills
  • Anthropic skill-creator skill
  • CLAUDE.md or AGENTS.md
  • Fresh-session test task
  • Third-party skill discovery tools such as Vercel find-skills

Validation signals

  • The author reports a first video-editing task took most of a day, while a subsequent task took roughly an hour after capturing corrections in a skill.
  • The author explicitly recommends a fresh-session test on a slightly different task, which is a meaningful guard against context-dependent success.
  • The post acknowledges upfront cost and claims the workflow pays off by approximately the third reuse.

Cautions

  • Review third-party skills before installing or running them, since they may act with the user's permissions.
  • Do not encode secrets, private media, credentials, or sensitive project details into broadly shared skill files.
  • Use fresh-session tests on non-destructive or representative inputs before trusting an automated skill on production work.

Limitations

  • No concrete skill template, directory layout, or installation commands are provided.
  • Validation is anecdotal and based on one video-editing example; there are no reproducible benchmarks or artifacts.
  • The advice to add a CLAUDE.md/AGENTS.md reference does not explain the exact invocation or discovery mechanism for a given environment.
  • The iterative discovery phase can be expensive and requires the user to recognize correct output before encoding it.

Vote on this post to rate the workflow. Share what worked or failed in the comments.


r/ClaudeWorkflows • • 18h ago

Selected Workflow [Workflow] Global CLAUDE.md guardrails for research-only work, costly actions, and process cleanup

1 Upvotes

Global CLAUDE.md guardrails for research-only work, costly actions, and process cleanup

Workflow value: 76/100
Level: intermediate · Categories: Quality Control, Token Saving, Context & Memory, Debugging, CLAUDE.md, Multi-Agent
Original source: r/ClaudeAI

What problem this solves

Preventing Claude Code from taking costly, destructive, or premature action during research, debugging, and long-running local tasks.

Summary

Use Claude Code plan mode for research-only tasks, then add global CLAUDE.md guardrails: announce or request approval for costly work, interpret review-oriented wording as investigation-only, diagnose bugs before implementing suggested fixes, and clean up only the processes Claude itself started.

Why it is useful

It supplies directly reusable global CLAUDE.md rules that establish explicit approval gates for expensive operations, read-only investigation requests, evidence-first debugging, and cleanup of processes Claude started. These reduce unintended edits, quota consumption, and lingering local processes.

Workflow

  1. Use plan mode when the task should be research and reporting rather than implementation.
  2. Add a global CLAUDE.md rule requiring a one-line explanation before long or quota-intensive work, and require approval when it was not clearly requested.
  3. Add a rule that phrases such as “don't do anything yet,” “check first,” and “let me review” mean investigate and report only, with no edits until explicit approval.
  4. Add an evidence-first debugging rule: treat an unverified user-proposed fix as a hypothesis, find the cause first, and report when evidence disagrees.
  5. Before completing work, stop servers, watchers, editors, or other processes Claude started, while leaving pre-existing processes alone unless explicitly instructed otherwise.

Tools / artifacts

  • Global CLAUDE.md
  • Claude Code plan mode

Validation signals

  • The author reports using plan mode for pure research.
  • The author states these rules are installed in their global CLAUDE.md.
  • The rules include operational verification-oriented constraints: diagnose before applying a proposed bug fix, avoid edits pending review, and stop processes started by Claude.

Cautions

  • Use explicit confirmation—not merely an announcement—before costly or irreversible actions when the request is not unambiguous.
  • The process-cleanup rule appropriately limits termination to processes Claude started; users should still review process identity before killing anything.
  • Global rules should be adapted to the user's environment, especially for servers or watchers intentionally meant to persist.

Limitations

  • The workflow is a small set of operating guardrails rather than a complete research procedure.
  • It provides no concrete example of the resulting Claude behavior or measured quota/time savings.
  • The advice to announce and then continue with expensive work may still permit unwanted costly operations when user intent is ambiguous.
  • Community validation is minimal: score 1, no replies, and very recent posting.

Vote on this post to rate the workflow. Share what worked or failed in the comments.


r/ClaudeWorkflows • • 18h ago

Selected Workflow [Workflow] A Test-Enforced Claude Code Production Pipeline: Decision Logs, Specialist Reviewers, Blind-Solve Gates, and Commit-Locked Deploy Checks

1 Upvotes

A Test-Enforced Claude Code Production Pipeline: Decision Logs, Specialist Reviewers, Blind-Solve Gates, and Commit-Locked Deploy Checks

Workflow value: 82/100
Level: advanced · Categories: Quality Control, Token Saving, Context & Memory, Debugging, Shipping, CLAUDE.md, Skills, Subagents, Multi-Agent
Original source: r/ClaudeCode

What problem this solves

Maintaining quality, consistency, and human control while using Claude Code and multiple agents to produce a large volume of code and educational content across many sessions and deployments.

Summary

A sophisticated Claude Code operating model for reliably producing and shipping a large project: keep durable decisions outside chat context, place minimal navigation in CLAUDE.md, turn non-negotiable rules into tests, define repeatable skills for every recurring process, assign narrowly scoped model-pinned subagents, impose bounded evidence-based review rounds, and make human approval plus commit-locked deployment checks mandatory.

Why it is useful

It presents a concrete, reusable pattern for turning Claude Code from an ad-hoc coding assistant into a controlled production workflow: persist decisions, encode rules as tests, use narrowly scoped read-only reviewers, limit review rounds, replace subjective checks with measurable gates, record findings, and block deployment without evidence that checks ran on the exact commit.

Workflow

  1. Create a numbered decision log that records the owner’s intent, the decision, and alternatives considered; have each new Claude session read only the relevant entries.
  2. Keep CLAUDE.md concise and use it to point to durable style or process guides rather than embedding large rule sets in prompt context.
  3. Convert important style, terminology, policy, and product constraints into deterministic tests so violations fail CI rather than relying on agents to remember prose guidance.
  4. Write a skill for each repeated workflow. Each skill should define inputs, ordered steps, responsible reviewer or agent, required artifacts, and an explicit definition of done.
  5. Create specialist subagents with narrow responsibilities and read-only access where possible. Pin each role to an intended model tier and maintain a permissions allowlist for safe commands and constrained edit paths.
  6. For new work, begin with owner-defined goals and source-backed briefs. Run a set/plan review, then require human approval before implementation begins.
  7. Generate a complete work package, including the user-facing content or feature, executable rules/configuration, reference implementation, hints, explanation, and package-level tests.
  8. Run deterministic checks before subjective reviews. Then perform one architecture review, blind-solve or behavioral checks, difficulty/quality scoring, and copy review.
  9. Prevent endless reviewer loops by using a fixed round budget. Require evidence for a must-fix finding: a failing test, quoted user-facing cue, sourced factual error, or demonstrably valid alternate answer.
  10. Replace subjective quality judgments with measurable gates where feasible. For example, use blind solvers with different context levels to test whether success depends on the intended concept rather than guessing or wording tricks.
  11. Treat reviewer suggestions as facts to restate, not text to paste. Require the drafting agent to write final prose itself, read it aloud, and revert a review round when the result is less readable.
  12. Place all completed work in a human review queue. The owner should exercise/play/test it and explicitly approve, send it back with notes, or discard it before publication or deployment.

Tools / artifacts

  • A numbered decision-log file containing decisions, quoted owner intent, and considered options.
  • A deliberately small CLAUDE.md that links to style guides, with enforceable style requirements encoded in tests.
  • Nine repeatable slash skills, including drafting, pre-deploy checks, persona runs, reviewer checks, scouting, incidents, site features, release notes, and note refreshes.
  • Seven model-pinned, read-only specialist subagents for architecture, set planning, difficulty, copy, site review, curriculum scouting, and blind solving.
  • A deterministic package checker and package tests for each problem.
  • A local human review queue for playtesting, approval, return-with-notes, or discard decisions.
  • A pre-deploy script that builds production output, captures page text for guest and signed-in states, creates an inventory, assigns review lanes, and stamps the checked commit.
  • A findings ledger whose rows resolve as fixed-with-test, accepted, kept-out-with-reason, did-not-reproduce, or planned.

Validation signals

  • The project reportedly contains 105 problems, six tutorials, about 98,000 lines of TypeScript/Svelte, 320 test files, and roughly 590 commits, suggesting sustained use rather than a one-off experiment.
  • The draft pipeline includes deterministic checks, architecture review, blind solving, difficulty scoring, copy review, and a final human play/approval gate.
  • The author reports replacing unstable review judgments with three repeatable blind-solver measurements, at lower cost than an Opus review.
  • The deploy process refuses to run unless the pre-deploy check is stamped on the exact clean commit.
  • The findings ledger is itself tested: purportedly fixed findings must link to an existing test, and planned findings cannot remain open after the associated work is completed.
  • The author reports observed reviewer failure modes—quota behavior, review-loop drift, and degraded prose after repeated rewriting—and describes specific mitigations.

Cautions

  • The permissions allowlist and read-only reviewer agents are positive boundary controls; preserve these restrictions rather than broadly granting shell or write access.
  • The post describes use of an OpenRouter key in the browser. Implementers should ensure keys are never committed, logged, exposed through server responses, or granted unnecessary scopes.
  • Automated reviewer findings remain advisory: retain the human approval queue and do not allow agents to deploy or publish unreviewed work.

Limitations

  • The post describes the system but does not provide the actual skill definitions, agent prompts, scripts, test patterns, or repository configuration needed to reproduce it directly.
  • Most validation is self-reported and anecdotal; the Reddit item has minimal community validation so far (score 1, one comment).
  • The approach is tailored to content/problem production for one large project and may be operationally heavy for smaller repositories or solo users without a large test suite.
  • The supplied text is truncated at the end, so any model-versioning practices and final conclusions are incomplete.

Vote on this post to rate the workflow. Share what worked or failed in the comments.


r/ClaudeWorkflows • • 20h ago

Selected Workflow [Workflow] Generate Apple-Style Release Bentos with a Claude Code Skill, Native Swift Renderers, and Visual Linting

1 Upvotes

Generate Apple-Style Release Bentos with a Claude Code Skill, Native Swift Renderers, and Visual Linting

Workflow value: 77/100
Level: advanced · Categories: Quality Control, Token Saving, Debugging, Shipping, Skills, Multi-Agent
Original source: r/ClaudeAI

What problem this solves

Generating consistent, brand-aware Apple/WWDC-style release Bento grids and multi-panel social carousels without manual layout work or unreliable generic LLM-generated visuals.

Summary

Install the BentoKit Claude Code skill, let it discover a repository's existing brand assets and release changes into brand.json, render Bento or social-carousel layouts using native macOS Swift/CoreGraphics tooling and real UI/icon assets, then run visual linting and iterate from review crops until the lint gate passes.

Why it is useful

It packages a concrete, repeatable Claude Code workflow for producing release-marketing assets: discover project branding, render through native Apple graphics tooling rather than approximate HTML/image generation, then apply machine-checkable visual rules and iterate to a clean lint result. The MIT repository makes the workflow potentially adoptable rather than merely conceptual.

Workflow

  1. Copy skill/bentokit/ into ~/.claude/skills/bentokit/.
  2. Ask Claude Code to create a release Bento or four-panel carousel for the current repository.
  3. Run apple-bento/tools/discover_brand.py to inspect approved brand documents, tokens, fonts, icon bundles, wallpapers, and recent changelog changes; save the resulting brand.json.
  4. Use the included native Swift/CoreGraphics renderers and Xcode icon tooling to generate the layout, hardware bezels, icons, and captured UI composites.
  5. Run apple-bento/tools/lint.py on the output, inspect generated review crops, and have Claude iterate on the assets until the lint result reports zero errors and zero warnings.
  6. Perform a final human brand/publishing review before distribution.

Tools / artifacts

  • MIT-licensed BentoKit repository
  • Claude Code skill at skill/bentokit/
  • apple-bento/tools/discover_brand.py
  • brand.json
  • Native Swift/CoreGraphics CLI renderers: glassword, glyph, keycaps, tilt3d, compose
  • Xcode ictool and Apple Icon Composer assets
  • apple-bento/tools/lint.py
  • Review crops and rendered Bento/carousel outputs
  • Python dependencies: pillow and numpy

Validation signals

  • The author reports refining the workflow over dozens of internal release cycles.
  • The process includes explicit automated checks for image sharpness/upscaling, tile balance, text legibility, sentence case, carousel seam safety, and a Liquid Glass rim-refraction proof.
  • The stated completion gate is lint output of '0 errors, 0 warnings.'
  • The post includes claimed generated examples and provides a runnable open-source repository.
  • Early Reddit engagement is positive, but no supplied comment-level adoption evidence is available.

Cautions

  • Review the linked third-party skill and native Swift/Python tooling before installation or execution, especially because brand discovery scans local repository assets and documentation.
  • Run it on a non-sensitive project or inspect/configure which paths discovery scans; generated marketing assets may incorporate local UI captures, icons, or brand materials.
  • Do not treat a reported clean visual-lint result as approval to publish without human review for brand, legal, accessibility, and disclosure requirements.

Limitations

  • The submission is substantially a project announcement; its implementation and claimed output quality require checking the linked repository.
  • It is narrowly applicable: requires macOS 26+, Xcode 26+, Swift/CoreGraphics tooling, and targets Apple-style marketing graphics.
  • Validation is described as an automated linter but no independent run logs, test results, or commenter success reports are provided in the item.
  • The exact invocation, expected input assets, and how to resolve lint failures are deferred to the repository.

Vote on this post to rate the workflow. Share what worked or failed in the comments.


r/ClaudeWorkflows • • 20h ago

Selected Workflow [Workflow] Secure Claude Code on Windows: cover PowerShell and cmd in hooks, permission rules, and regression tests

1 Upvotes

Secure Claude Code on Windows: cover PowerShell and cmd in hooks, permission rules, and regression tests

Workflow value: 80/100
Level: intermediate · Categories: Quality Control, Context & Memory, Debugging, Shipping, CLAUDE.md, Hooks, Multi-Agent
Original source: r/ClaudeCode

What problem this solves

Claude Code installations on Windows can leave destructive PowerShell commands, secret reads, deploy mistakes, and risky database operations outside Bash-only deny rules and Bash-only hook checks.

Summary

A Windows-focused Claude Code security workflow that uses multi-shell permission rules and enforcement hooks, then validates them against production-like command history and targeted test cases. It also documents critical implementation details: read tool_input.command, return exit code 2 to block, configure file-write policy using Edit(...), avoid exposing detected secrets in output, and do not rely solely on deny-pattern matching.

Why it is useful

It identifies a concrete Windows safety gap—Bash-only policy and hook coverage does not apply to PowerShell—and supplies a reusable defense-in-depth approach: cover Bash, PowerShell, and cmd; use permission rules plus hooks; inspect the correct hook payload; enforce the correct blocking exit code; and regression-test against realistic command logs. The reported replay of 15,363 commands plus 115 hook-level cases is unusually useful operational validation.

Workflow

  1. Audit existing permission rules and hooks for Bash-only assumptions, especially Bash(...) deny rules and checks that only run when the invoked tool is Bash.
  2. Add parallel coverage for Claude Code's PowerShell tool on Windows, and consider cmd where applicable; maintain explicit deny, ask, and allow policies appropriate to the environment.
  3. Implement enforcement hooks for high-impact operations such as recursive deletion of a drive or home directory, disk formatting, backup/shadow-copy deletion, unsafe deploy invocations, and destructive database commands.
  4. Parse the invoked command from tool_input.command rather than assuming it is at the root of the hook input.
  5. Return exit code 2 when a hook must block execution; do not rely on exit code 1 as an enforcement mechanism.
  6. Use Edit(...) policy rules to govern file writes, including operations represented through Write and NotebookEdit, rather than relying on Write(...) deny patterns.
  7. For commit and push protection, inspect the actual Git diff, resolve repository context through cd and git -C, and report a finding without printing secret material.
  8. Account for shell syntax variants, including PowerShell abbreviated parameters such as -r, instead of assuming one canonical spelling will be sufficient.
  9. Replay a representative historical corpus of Claude Code commands through hooks and add focused test cases that invoke hooks the same way Claude Code does.
  10. Review false positives and misses, retain confirmation gates for consequential production actions, and periodically update rules as new tool behaviors and incidents are discovered.

Tools / artifacts

  • Open-source MIT repository: claude-code-security-kit
  • Claude Code permission rules for Bash and PowerShell
  • Hooks covering Bash, PowerShell, and cmd
  • Secret scanner for git commit and git push diffs
  • Deploy guard
  • Database-operation guard
  • 115 hook test cases
  • Replay corpus of 15,363 historical shell commands

Validation signals

  • The author replayed 15,363 commands from actual Claude Code sessions through the hooks and reports zero false blocks.
  • The replay found two hits that the author judged correct, including a command affecting four production services.
  • The kit includes 115 tests executed in the same manner that Claude Code invokes hooks.
  • The guard requirements are motivated by three reported real deploy incidents and a discovered Bash-versus-PowerShell policy gap.

Cautions

  • Do not regard deny patterns or hooks as a complete sandbox: command variants, abbreviated PowerShell parameters, prompt injection, and tool/environment differences can bypass simplistic checks.
  • Ensure block messages never include detected secret values, since hook output may enter the Claude transcript or logs.
  • Test in a disposable repository or non-production environment before enforcing destructive-command guards, and retain human confirmation for production-impacting operations.
  • Review third-party hook code and configuration before installation; hooks execute locally and can affect command execution and developer workflows.

Limitations

  • The post links to the implementation rather than showing the exact hook configuration, permission-rule syntax, installation commands, or test commands inline.
  • Validation is based on the author's own command history and incidents; the repository and claims are not independently verified in the post.
  • The community signal is currently weak: score 2, one comment, and only about 1.6 hours of exposure.
  • Pattern-based command blocking is inherently bypassable, as the author acknowledges, so users must not treat it as a complete security boundary.

Vote on this post to rate the workflow. Share what worked or failed in the comments.


r/ClaudeWorkflows • • 22h ago

Selected Workflow [Workflow] Manage Parallel Claude Code Sessions with Hook-Based Queueing and Safe Reply Routing

1 Upvotes

Manage Parallel Claude Code Sessions with Hook-Based Queueing and Safe Reply Routing

Workflow value: 77/100
Level: advanced · Categories: Quality Control, Token Saving, Context & Memory, Debugging, Shipping, Hooks, MCP, Multi-Agent
Original source: r/ClaudeAI

What problem this solves

Operators running several Claude Code sessions lose time finding which terminal is blocked and reconstructing the context needed to answer it.

Summary

A macOS workflow/tool for managing parallel Claude Code sessions. Claude Code lifecycle hooks write per-session JSON state; a menu-bar app detects sessions awaiting attention, reads the transcript tail, and invokes a restricted Haiku call to produce a short context summary, recommendation, and candidate replies. The operator reviews a candidate response, then the app either focuses the appropriate Terminal tab or types the approved answer into it. Risky generated responses are filtered or require extra confirmation.

Why it is useful

It presents a concrete, reusable pattern for supervising multiple concurrent Claude Code sessions: emit structured session state from lifecycle hooks, summarize transcript tails with a constrained secondary model, rank sessions needing attention, and route reviewed replies back to the correct terminal. It also includes meaningful safeguards for model-generated terminal input.

Workflow

  1. Configure lifecycle hooks for Stop, Notification, UserPromptSubmit, and SessionEnd to write structured state for each Claude Code session.
  2. Collect the session’s waiting prompt plus a bounded tail of its transcript when it needs operator input.
  3. Send that limited context to a low-cost summarization model with tools and MCP disabled to generate a concise status, recommendation, and candidate replies.
  4. Display waiting sessions in a centralized queue instead of requiring the operator to inspect each terminal tab.
  5. Treat suggested replies as untrusted: show their exact text, reject shell-like or link-containing content, and require an additional approval action for deploy/merge/delete-like actions.
  6. After explicit operator selection, focus the matching terminal or inject the reply only after verifying that the intended Claude Code tab is foregrounded.

Tools / artifacts

  • Vassy open-source repository: https://github.com/sukramb/vassy
  • Claude Code lifecycle hooks: Stop, Notification, UserPromptSubmit, and SessionEnd
  • One JSON state file per session
  • Transcript-tail summarization via claude -p --model haiku with tools and MCP disabled
  • macOS menu-bar application and AppleScript-based Terminal.app input routing

Validation signals

  • A working MIT-licensed implementation and demo video are linked.
  • The author identifies the real operational constraint—many sessions waiting for user input—and describes the resulting workflow in implementation-level detail.
  • Safety controls are built into the reply-routing path.
  • No independent adoption, testing, or user-success evidence is present yet.

Cautions

  • Generated replies are explicitly treated as untrusted.
  • The exact proposed reply is displayed before use.
  • Shell-like and link-containing replies are rejected.
  • Deploy, merge, and delete-related replies require a second confirmation click.
  • Replies are typed only when Claude Code is the foreground program in the target tab.
  • Implementers should inspect hook payloads and transcript handling to avoid exposing sensitive session content to the summarization model.

Limitations

  • Primarily a project announcement; it does not include installation commands, hook configuration, or example JSON/schema in the comment itself.
  • No community validation yet: low score, no replies, and very recent post.
  • Platform-specific to macOS 15+ and Terminal.app, with Codex support described as beta.
  • The automatic reply generation may be unsuitable for users who require fully manual review of every terminal interaction.

Vote on this post to rate the workflow. Share what worked or failed in the comments.


r/ClaudeWorkflows • • 22h ago

Selected Workflow [Workflow] Scale Claude Code Safely with Short AGENTS.md Rules, Worktrees, and Stop-Hook CI Gates

1 Upvotes

Scale Claude Code Safely with Short AGENTS.md Rules, Worktrees, and Stop-Hook CI Gates

Workflow value: 77/100
Level: advanced · Categories: Quality Control, Token Saving, Context & Memory, Shipping, CLAUDE.md, Hooks, Multi-Agent
Original source: r/ClaudeAI

What problem this solves

Prevents coding-agent sessions from drifting as repository instructions grow, avoids parallel agents colliding in a main checkout, and reduces false “done” claims that omit clean Git state, merged changes, passing CI, or issue closure.

Summary

An advanced Claude Code workflow that replaces an oversized instruction file with a short, CI-enforced AGENTS.md, runs each agent in an isolated Git worktree, and uses Stop/post-edit hooks to enforce repository hygiene, PR/CI completion, and regression-focused diff checks.

Why it is useful

It presents a coherent, transferable reliability pattern for scaling Claude Code work: keep repository instructions short and enforce their scope, isolate concurrent agents in worktrees, and require objective Git/PR/CI/issue checks before an agent can declare a task complete. It also adds an independent diff review against common quality regressions.

Workflow

  1. Reduce AGENTS.md to a concise set of hard constraints and links to deeper documentation; keep it under a defined line limit (the author uses 150 lines).
  2. Add CI checks that fail when AGENTS.md exceeds the limit and when a repository CLAUDE.md is committed, preventing an unintended instruction-file precedence change.
  3. Launch each Claude Code session on its own branch and Git worktree so concurrent agents cannot alter the main working checkout.
  4. Configure a Stop hook in .claude/settings.json that calls a completion-gate script rather than accepting the agent’s completion message at face value.
  5. In the gate, verify clean worktree state, pushed commits, a merged PR, green CI on main, an updated local main checkout, and closure of the linked issue; poll CI with controlled waiting while it remains in progress.
  6. Add a post-edit hook for documentation changes that detects accidental local filesystem paths or secrets.
  7. Before reporting delegated work as complete, run an independent diff check for deleted/skipped tests, unscoped lint ignores, and weakened CI rules, then check CI status for the relevant commit.
  8. Require explicit human authorization and repository permissions for any push, merge, or issue-close action; do not use bypass-permissions as the default for production repositories.

Tools / artifacts

  • AGENTS.md kept below 150 lines
  • CI rule enforcing the AGENTS.md size limit
  • CI check rejecting committed CLAUDE.md files
  • .claude/settings.json Stop hook
  • Python completion/done-gate script
  • Post-edit documentation scanner for local paths and secrets
  • Git worktrees with one branch/worktree per Claude session
  • GitHub PR, CI, and linked-issue status checks
  • Independent final diff checker

Validation signals

  • The completion gate checks clean worktree state, pushed commits, merged PR, green CI on main, updated local main, and closure of a linked issue.
  • The independent diff check flags deleted or skipped tests, bare lint suppressions, and weakened CI rules.
  • The author reports using this approach across more than 1,600 merged PRs.
  • CI itself enforces instruction-file size and prevents CLAUDE.md from silently overriding AGENTS.md.
  • The workflow uses isolated worktrees to prevent concurrent agents from modifying the active main checkout.

Cautions

  • Do not default real repositories to bypass-permissions mode, particularly when hooks can push branches, merge PRs, or close issues.
  • A stop hook should verify explicit authorization before performing remote side effects such as pushing, merging, or closing issues; prefer requiring a human-approved PR/merge policy.
  • Avoid storing OAuth tokens, local paths, or secrets in hook output, logs, prompts, or generated documentation.
  • Polling CI should have bounded retries/timeouts and clear failure reporting so a session cannot hang indefinitely.
  • Preserve a human review gate for high-risk changes even if automated diff checks and CI pass.

Limitations

  • The post describes the setup but does not include the actual .claude/settings.json, Python gate script, CI configuration, or worktree-launch commands.
  • Most validation evidence is self-reported; the linked repository could substantiate it, but the Reddit discussion itself has minimal community confirmation.
  • The all-or-nothing Stop-hook gate may be too rigid or slow for small tasks, offline work, fork-based contribution flows, or repositories without merge rights.
  • It mixes a reusable Claude Code workflow with promotion for a larger product, so users must extract the workflow from product-specific claims.

Vote on this post to rate the workflow. Share what worked or failed in the comments.


r/ClaudeWorkflows • • 22h ago

Selected Workflow [Workflow] Scale Claude Code safely with short AGENTS.md files, worktree isolation, and Stop-hook CI merge gates

1 Upvotes

Scale Claude Code safely with short AGENTS.md files, worktree isolation, and Stop-hook CI merge gates

Workflow value: 78/100
Level: advanced · Categories: Quality Control, Token Saving, Context & Memory, Shipping, CLAUDE.md, Hooks, Subagents, Multi-Agent
Original source: r/ClaudeCode

What problem this solves

Preventing Claude Code from ignoring oversized instruction files and from declaring coding tasks complete before changes are isolated, reviewed, merged, validated by CI, and synchronized locally.

Summary

An advanced Claude Code workflow for reliable parallel development: reduce AGENTS.md to hard constraints and documentation links, enforce that policy in CI, run every agent in an isolated worktree, and install a Stop hook whose done-gate verifies the full GitHub delivery lifecycle before allowing an agent to finish. Add post-edit secret/path scanning and an independent diff review to detect attempts to weaken tests, linting, or CI.

Why it is useful

It presents a concrete scalable-agent pattern: keep durable instructions short and enforce their scope in CI; isolate each agent in a worktree; and use a Stop hook as a completion gate that checks repository, PR, CI, and issue state rather than trusting an agent's completion claim. The independent post-run diff audit adds a useful defense against agents weakening tests, lint, or CI to obtain a passing result.

Workflow

  1. Keep AGENTS.md below a strict size limit and restrict it to non-negotiable traps plus links to detailed documentation.
  2. Add CI checks that fail when AGENTS.md exceeds the limit and when conflicting repository instruction files such as CLAUDE.md are committed.
  3. Create a separate Git worktree and branch for every Claude Code session or delegated agent run.
  4. Configure a Claude Code Stop hook in .claude/settings.json to call a completion-gate script.
  5. Have the gate verify a clean worktree, pushed commits, merged PR, green CI on main, an updated local main checkout, and closure of any linked issue; poll CI rather than allowing premature completion.
  6. Run a post-edit scan on documentation changes for local paths and secrets.
  7. Before reporting completion, run an independent diff audit for deleted or skipped tests, broad lint suppressions, and weakened CI configuration; retain human approval and protected-branch controls for merges.

Tools / artifacts

  • AGENTS.md kept under 150 lines
  • CI rule enforcing instruction-file size
  • CI rule preventing committed CLAUDE.md files from overriding AGENTS.md
  • .claude/settings.json Stop hook
  • Python done-gate script
  • Post-edit documentation path/secret scanner
  • Per-session Git worktrees and branches
  • Independent post-run diff checker
  • GitHub PR, CI, and linked-issue state checks
  • Dodaios open-source repository

Validation signals

  • Claims the workflow was developed while directing Claude Code across more than 1,600 merged PRs.
  • The completion gate checks a clean worktree, pushed commits, merged PR, green main CI, updated local main, and closed linked issue.
  • An independent checker detects deleted/skipped tests, bare lint ignores, and weakened CI rules.
  • CI mechanically enforces the instruction-file constraints rather than relying on agent compliance alone.

Cautions

  • Do not default delegated coding sessions to bypass-permissions mode, especially when hooks can push branches, merge PRs, or close issues. Require explicit user approval or narrowly scoped credentials for destructive or externally visible actions.
  • A Stop hook that polls CI and performs merge-related actions can block sessions indefinitely or create unwanted changes; use timeouts, clear status output, least-privilege tokens, and an escape hatch.
  • Keep secret/path scanning and diff checks advisory or reviewable where false positives could block legitimate work; do not expose secrets in hook logs.
  • Do not treat green CI alone as authorization to merge. Preserve protected branches, required human review where appropriate, and repository policy controls.

Limitations

  • The post describes the setup but does not include the actual hook configuration, CI rules, or done-gate script needed to reproduce it directly.
  • Most validation claims are self-reported; the submission has minimal community feedback so far.
  • The workflow is tightly coupled to a GitHub PR/CI/issue lifecycle and will require adaptation for other forges or solo repositories.
  • The repository promotion and product description occupy substantial space relative to the reusable implementation details.

Vote on this post to rate the workflow. Share what worked or failed in the comments.


r/ClaudeWorkflows • • 1d ago

Selected Workflow [Workflow] Protect Claude Code Context with Pre/Post-Tool Secret Guards and Transcript Scanning

1 Upvotes

Protect Claude Code Context with Pre/Post-Tool Secret Guards and Transcript Scanning

Workflow value: 79/100
Level: intermediate · Categories: Quality Control, Context & Memory, Debugging, Hooks, Skills, MCP
Original source: r/ClaudeCode

What problem this solves

Prevents credentials and other secrets from being exposed to Claude Code through shell commands, file reads, process/container inspection, MCP responses, and existing local transcripts.

Summary

Use the no-leaky hook workflow to prevent secret exposure in Claude Code: block high-risk tool commands before execution, redact sensitive values that still reach tool output, and scan historical Claude Code transcripts for prior leaks. The linked project supplies the implementation and reports a fake-key benchmark showing a reduction from 18/30 leaking sessions to 0/30.

Why it is useful

It implements defense in depth for a common Claude Code risk: secrets entering agent context through commands or tool output. The approach combines proactive command blocking, reactive output redaction, and retrospective transcript auditing, with safe alternatives communicated to the agent rather than merely failing commands.

Workflow

  1. Install or inspect the linked no-leaky project and configure its Claude Code hooks for the target repository or user environment.
  2. Enable the PreToolUse policy to deny high-risk commands and return a safe alternative to the agent instead of exposing sensitive files or system metadata.
  3. Enable the PostToolUse redaction policy for Bash, Read, Grep, and MCP output so secrets that evade proactive blocking are masked before entering agent context.
  4. Run the transcript scan against existing Claude Code histories, investigate any findings, and rotate genuine credentials that may have been exposed.
  5. Test the configured rules with synthetic keys and representative commands; tune the rule set to avoid bypasses and unacceptable false positives.

Tools / artifacts

  • no-leaky GitHub repository: https://github.com/fajarhide/no-leaky
  • PreToolUse hook
  • PostToolUse hook
  • Transcript leak scanner
  • Safe-command guidance returned by denied hooks
  • Fake-key benchmark: 30 sessions with hooks versus 30 without

Validation signals

  • Author reports daily real-development testing because the guard triggered during its own implementation.
  • On a fake-secret benchmark, 18 of 30 sessions leaked without the tooling, compared with 0 of 30 sessions using it.
  • The project is MIT licensed and publicly inspectable, though no external adoption evidence is present yet.

Cautions

  • Review the repository's hook patterns and redaction rules before relying on them in production; pattern matching cannot guarantee detection of all secret formats or encodings.
  • Keep hook configuration, scan reports, and any quarantined transcripts access-controlled because they may themselves contain sensitive material.
  • Do not treat redaction as a substitute for secret rotation if a real credential has already been exposed to an external service or untrusted context.

Limitations

  • The comment describes capabilities rather than providing installation, configuration, or example hook rules inline.
  • The reported benchmark uses a small synthetic sample and has no independent replication or community feedback yet.
  • The deny-list examples may require ongoing maintenance to cover alternative secret-exfiltration commands and tool outputs.

Vote on this post to rate the workflow. Share what worked or failed in the comments.


r/ClaudeWorkflows • • 1d ago

Selected Workflow [Workflow] Evidence-Backed Claude Code SEO Workflow: SERP Triage, Search Console Prioritization, and Proof-Gated Audits

1 Upvotes

Evidence-Backed Claude Code SEO Workflow: SERP Triage, Search Console Prioritization, and Proof-Gated Audits

Workflow value: 77/100
Level: intermediate · Categories: Quality Control, Context & Memory, Shipping, Skills
Original source: r/ClaudeCode

What problem this solves

Prevents wasted SEO content work and unreliable Claude-generated technical-audit findings by grounding recommendations in live search results, exported performance data, scripts, and explicit evidence.

Summary

A solo-developer SEO workflow in Claude Code: first assess live page-one SERP viability; generate a source-dated gap brief from top results; prioritize existing pages using Search Console impressions, positions 5–15, and low CTR; run a crawler-based technical audit; and fact-check volatile details before release. Enforce a proof gate: every finding must cite its URL plus the exact visible string or response header supporting it.

Why it is useful

It provides a repeatable SEO loop—SERP qualification, source-backed briefs, Search Console prioritization, crawler-assisted technical checks, and pre-release fact checking. Its strongest transferable practice is requiring every claimed issue to include the precise supporting URL and page/header string, which directly reduces hallucinated audit findings.

Workflow

  1. Fetch the current first search-results page for a target query and classify the opportunity as write, write with a different angle, or skip; justify the decision from ranking-page type, freshness, brand competition, and search intent.
  2. Read the top three to five ranking results and prepare a content brief identifying uncovered angles; attach a source URL and checked-on date to every factual assertion.
  3. After publishing, export Search Console Query and Page data as CSV into a local repository workspace; identify pages with impressions, average positions roughly 5–15, and low CTR, then prioritize title and introduction rewrites.
  4. Run a crawler script and have Claude interpret its output for canonicals, noindex directives, redirects, sitemap coverage, internal links, and schema rather than relying on manual HTML inspection.
  5. Before publishing any change, verify prices, version numbers, menu names, and similarly volatile claims against primary sources.
  6. Apply the evidence gate to every reported issue: include the supporting URL and the exact page text or HTTP header; omit claims without proof.
  7. Use scripts stored with the relevant Claude Code skill for deterministic counting and parsing tasks, then let Claude reason over their outputs.
  8. Retain human review for high-impact SEO and production changes.

Tools / artifacts

  • Claude Code skills
  • Search Console Queries and Pages CSV exports
  • Small crawler script
  • SERP/page fetches
  • Primary-source URLs with checked-on dates
  • SEO audit report containing exact proof strings or headers

Validation signals

  • Author reports 7.57k Google clicks, 237k impressions, 3.2% CTR, and average position 6.1 over roughly three months.
  • The workflow includes concrete verification gates: source URLs and dates for brief facts, exact evidence for audit findings, script-based parsing, and a primary-source fact check before publishing.
  • The author describes a practical before/after effect of the evidence rule: fewer false findings and less manual spot-checking.

Cautions

  • Treat fetched pages cautiously: bot-protection, cached content, and blocked resources can produce misleading audit inputs; preserve the stated evidence requirement.
  • Do not place Search Console exports, API credentials, or other site data in a public repository. Use local ignored files or secure secrets management.
  • Keep human review for changes to canonicals, redirects, noindex directives, schema, and production publishing.

Limitations

  • Several steps remain high-level: the crawler, Search Console analysis logic, and Claude skill prompts are not provided.
  • The reported SEO outcome is observational and does not establish that this workflow alone caused the traffic results.
  • The post includes promotion for a paid product; the named free repositories are not linked or described in enough detail to reproduce the setup exactly.
  • There is little community validation yet (low score, one comment, very recent post).

Vote on this post to rate the workflow. Share what worked or failed in the comments.


r/ClaudeWorkflows • • 1d ago

Selected Workflow [Workflow] Protect Existing Tests with CLAUDE.md Rules, Edit Hooks, and Old-Code Test Validation

1 Upvotes

Protect Existing Tests with CLAUDE.md Rules, Edit Hooks, and Old-Code Test Validation

Workflow value: 78/100
Level: intermediate · Categories: Quality Control, Context & Memory, Debugging, CLAUDE.md, Hooks
Original source: r/ClaudeCode

What problem this solves

Prevents Claude Code from silently editing existing tests to accommodate an implementation during bug fixes or refactors, while preserving a controlled path for intentional behavior changes.

Summary

Use different test-editing policies based on task type: prohibit edits to existing tests for bug fixes and refactors, but explicitly identify expected test changes for intentional behavior changes. Enforce the prohibition with a PreToolUse Edit/Write hook scoped to test paths. Finally, verify that each new or changed test fails against the pre-change code before accepting a passing post-change run.

Why it is useful

It provides a practical guardrail against a common agentic coding failure mode: making a task appear successful by weakening pre-existing tests. It combines written policy, technical enforcement, explicit exception handling for intentional behavior changes, and a meaningful test-validity check.

Workflow

  1. Classify the task as either a bug fix/refactor or an intentional behavior change.
  2. For bug fixes and refactors, add a CLAUDE.md instruction that existing tests must not be modified; require the agent to stop and explain if it believes a test is wrong.
  3. For intentional behavior changes, state in the task which tests are expected to change.
  4. Configure a PreToolUse hook for Edit and Write actions that detects test-path edits and blocks them or requires explicit confirmation.
  5. After adding or changing a test, execute it against the pre-change code revision and confirm that it fails.
  6. Only trust the green test run after the test has demonstrated failure on old code and success on the intended change.

Tools / artifacts

  • CLAUDE.md rule distinguishing bug-fix/refactor work from deliberate behavior changes
  • PreToolUse hook on Edit/Write operations scoped to test paths
  • Test validity check: run new or modified tests against the old code revision

Validation signals

  • The workflow requires that a new or modified test fail on the pre-change code, demonstrating that it detects the intended behavioral difference.
  • The hook provides enforcement rather than relying only on prompt compliance.
  • The rationale is technically sound: a test passing both before and after a supposed behavior change does not validate that change.

Cautions

  • Blocking or requiring confirmation for edits under test paths is a safe, review-preserving control.
  • Require human review when the agent claims an existing test is incorrect rather than allowing autonomous test modification.
  • Avoid an overly broad test-path rule that blocks legitimate fixture, snapshot, or intentionally changed behavior updates without a documented exception process.

Limitations

  • The PreToolUse hook is described conceptually but provides no example configuration or path-matching implementation.
  • It does not specify how to reliably run the changed tests against the pre-change revision (for example, using a git worktree or temporary checkout).
  • The policy needs exceptions for test fixtures, snapshots, and generated test artifacts, which may legitimately change during some refactors.

Vote on this post to rate the workflow. Share what worked or failed in the comments.


r/ClaudeWorkflows • • 1d ago

Selected Workflow [Workflow] Agent-reviewed test-first PR gate: verify tests fail before implementation

1 Upvotes

Agent-reviewed test-first PR gate: verify tests fail before implementation

Workflow value: 78/100
Level: advanced · Categories: Quality Control, Debugging, Subagents, Multi-Agent
Original source: r/ClaudeCode

What problem this solves

Prevents or detects agent-generated changes that obtain a green CI result by altering tests rather than implementing the required behavior.

Summary

Use a test-first commit discipline for agent-authored PRs: commit each new test separately before the code that makes it pass, record the initial failure, and have a reviewing agent verify ordering, execute at least one test-only commit to confirm failure, and reject unexplained test weakening or deletion. Preserve a baseline for each test so later changes such as broadened matchers can be detected as semantic diffs.

Why it is useful

It describes a concrete agentic PR-review gate that verifies tests existed and failed before the implementation, rather than merely checking that the final CI state is green. This directly addresses a common failure mode: coding agents making CI pass by weakening, deleting, or incorrectly mocking tests.

Workflow

  1. Require new behavior to be introduced in a test-only commit before the implementation commit.
  2. Record the failing command or failure output for each new test in the PR description or CI artifact.
  3. Have a review agent inspect commit history and confirm each relevant test commit precedes the code that makes it pass.
  4. Check out at least one test-only commit in a clean environment and run the targeted test to confirm it fails.
  5. Reject or return PRs that delete or weaken tests unless the PR gives a specific, reviewable justification.
  6. Store the original failing test as a baseline and compare later test changes against it to flag broadened matchers or other semantic weakening.
  7. Escalate test deletions, major assertion changes, and high-risk changes to a human reviewer.

Tools / artifacts

  • Separate test-only commits preceding implementation commits
  • Pull-request failure report identifying the observed failing test
  • Agent reviewer
  • Checkout/worktree for executing a test-only commit
  • Per-test baseline representing the first failing version
  • Later diff or matcher to detect broadened assertions or changed test semantics

Validation signals

  • The workflow executes at least one test-only commit to verify that it fails before the implementation is present.
  • The reviewer rejects PRs containing weakened or deleted tests without an explicit reason.
  • The author reports use across roughly 300 PRs, with one detected unstated test weakening.
  • A baseline/diff mechanism is intended to expose later broadening of test matchers.

Cautions

  • Do not let an agent reviewer be the sole approval mechanism for security-sensitive, destructive, or production-critical changes.
  • Run test commits in isolated worktrees or clean CI environments so checks do not contaminate branch state.
  • Require explicit human review or a stronger approval gate when tests are deleted, broadly relaxed, or materially rewritten.

Limitations

  • No concrete implementation is provided for identifying test-only commits, enforcing ordering, or recording baselines.
  • The reviewer spot-checks only one test commit per PR, so weakened or non-failing tests can escape detection.
  • The claimed results are anecdotal and not independently verifiable; no repository, configuration, or CI logs are linked.
  • Reliance on an agent reviewer while the author rarely reads diffs needs explicit escalation criteria and human oversight for sensitive changes.

Vote on this post to rate the workflow. Share what worked or failed in the comments.