r/ClaudeWorkflows • • 8h 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 • • 35m ago

Selected Workflow [Workflow] Risk-based Stop Hook That Requires Reviewer Subagent for Sensitive Diffs

1 Upvotes

Risk-based Stop Hook That Requires Reviewer Subagent for Sensitive Diffs

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

What problem this solves

Claude may approve its own changes without requesting review, including for sensitive or regression-prone code paths.

Summary

Use a Claude Code Stop hook as a deterministic review gate: inspect the current Git diff, allow low-risk edits to complete, and block completion with an instruction to run a reviewer subagent whenever the diff affects security- or regression-sensitive areas.

Why it is useful

It converts an unreliable self-assessment (“review is unnecessary”) into an enforceable, risk-based gate. The approach preserves speed for low-risk edits while requiring an independent review pass for changes in high-impact areas.

Workflow

  1. Create a Claude Code Stop hook that obtains and inspects the pending git diff.
  2. Define project-specific high-risk triggers, initially including authentication, payment code, database migrations, and tests edited alongside their corresponding implementation.
  3. When no trigger matches, allow completion without an additional review step.
  4. When a trigger matches, have the hook exit with code 2 and a clear instruction such as: “Run the reviewer subagent on this diff first.”
  5. Configure or instruct a reviewer subagent to review the diff for correctness, regressions, security concerns, and test adequacy before the task can be considered complete.
  6. Refine trigger rules over time based on false positives and missed risky changes.

Tools / artifacts

  • Claude Code Stop hook
  • git diff
  • Reviewer subagent
  • Path or diff-content rules for auth, payments, migrations, and adjacent test edits

Validation signals

  • The proposal uses a deterministic hook exit code to block completion until review occurs.
  • It uses git diff as the review scope, ensuring the gate is tied to actual changes rather than the agent's own judgement.

Cautions

  • The Stop hook should inspect only repository diffs and avoid logging source, credentials, or secrets outside the local environment.
  • Use narrowly defined path/content rules and provide a documented override or escalation process for false positives; do not silently bypass the review gate.
  • A reviewer subagent is a quality gate, not a replacement for required human review of security-, payment-, or migration-critical changes.

Limitations

  • The hook implementation, matching logic, and reviewer-subagent prompt/configuration are not provided.
  • No evidence that the trigger categories avoid false positives or that the process has been tested in practice.
  • The test-edit trigger may be overly broad: legitimate test updates could require review even when the corresponding production change is trivial.

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


r/ClaudeWorkflows • • 40m ago

Selected Workflow [Workflow] Route Claude Code Reviews by Sensitive File Paths, Then Cap Review Rounds

1 Upvotes

Route Claude Code Reviews by Sensitive File Paths, Then Cap Review Rounds

Workflow value: 78/100
Level: intermediate · Categories: Quality Control, Shipping, Hooks, Multi-Agent
Original source: r/ClaudeCode

What problem this solves

Avoids both under-reviewing sensitive changes and wasting review cycles on broad panels or low-value nitpicks.

Summary

Use deterministic file-path risk routing to select the review depth: sensitive changes receive pre-implementation security and domain review, while ordinary changes receive one independent diff review after implementation. Require reviewers to prioritize user-impacting defects, defer speculative hardening, and limit the process to one review round plus one confirmation round.

Why it is useful

It turns subjective agent-trigger decisions into a deterministic change-path gate, then pairs that gate with bounded, risk-prioritized review. This is readily adaptable to repositories with sensitive areas such as authentication, payments, migrations, or public publishing.

Workflow

  1. Define a short, maintained list of sensitive repository paths, for example authentication, credential handling, payments, database migrations, and code that publishes publicly.
  2. In a pre-commit hook, pull-request CI job, or orchestration harness, run git diff --name-only for the proposed change and mechanically match the changed paths against that list.
  3. If any risky path is changed, require a security reviewer and an appropriate domain specialist to review the intended approach before code is written.
  4. If no risky path is changed, build normally and require one fresh-eyes reviewer to inspect the resulting diff rather than convening a review panel.
  5. In reviewer instructions, rank findings by whether they would break real use; place purely theoretical hardening suggestions in a concise defer list rather than expanding the current patch.
  6. Allow at most one substantive review round and one confirmation round, then record deferred items separately for later prioritization.

Tools / artifacts

  • A repository-specific list of risky paths, such as auth, payments, credential handling, migrations, and public-posting code.
  • A hook or CI job that runs git diff --name-only and compares changed files against the risky-path list.
  • Two review tiers: security plus domain review before implementation for risky changes, or a fresh-eyes diff review after implementation for routine changes.
  • Reviewer guidance that ranks findings by real-user impact and records theoretical hardening in a defer list.

Validation signals

  • The author says this two-tier approach is used for a Mac app they build.
  • The proposed git diff --name-only check is mechanically verifiable in a hook or CI pipeline.
  • The review protocol has explicit limits: one review round and one confirmation round.
  • Risk routing is based on changed paths rather than an agent making an unverified judgment.

Cautions

  • Keep the risky-path list repository-specific and review it as the codebase changes; an incomplete list can miss sensitive changes.
  • A path-based trigger is a review-routing control, not a replacement for secret scanning, tests, access controls, or human approval for high-risk releases.
  • Do not automatically grant deployment or credential access merely because a review gate passes.

Limitations

  • No example hook/CI configuration or concrete risky-path pattern list is provided.
  • The claimed use in a Mac app is anecdotal; there are no measured outcomes, examples, or community confirmations.
  • The escalation process for a reviewer disagreement or a false-positive path match is not specified.

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


r/ClaudeWorkflows • • 40m ago

Selected Workflow [Workflow] A Repeatable Art-Direction and Visual-QA Loop for AI-Built Games

1 Upvotes

A Repeatable Art-Direction and Visual-QA Loop for AI-Built Games

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

What problem this solves

Maintaining a coherent, performant visual identity across AI-generated, scripted, procedural, and marketplace game assets produced over many separate agent sessions.

Summary

A detailed practitioner workflow for preventing visual incoherence in AI-assisted games. First obtain outside critique, then ask an agent to propose several art directions and select one. Convert the chosen direction into explicit, project-specific rules and protected exceptions; audit all assets using comparable screenshots; prioritize high-screen-time mismatches; make one reversible change at a time; review comparisons in varied lighting, weather, levels, and effects; enforce performance budgets; and record every accepted or rejected visual ruling for later agent sessions.

Why it is useful

It turns a common AI-assisted game-development failure mode—individually plausible assets that collectively look like a kitbash—into a repeatable production loop: define explicit visual constraints, preserve approved elements, audit consistently captured evidence, prioritize visible failures, make isolated reversible changes, and validate across scenes and performance settings. The recommendations to convert subjective rules into measurable tests and to evaluate assets in the target renderer are especially transferable.

Workflow

  1. Ask external reviewers to identify coherence failures, then treat their feedback as an input to the process rather than patching isolated assets immediately.
  2. Have the agent draft three distinct art-direction options, each with materials, mood, references, and candid pros/cons; choose one through comparison rather than attempting an unconstrained prompt.
  3. Write a concise art-direction specification for the selected direction, grounded in the game’s story and world logic.
  4. Add concrete visual rules: era/genre exclusions and replacements, shared surface treatment, detail-density expectations, palette and grading rules, creature/environment consistency, sky-object consistency, environmental storytelling, settlement-layout logic, and effect behavior.
  5. Create a 'kept as they are' list for assets that already work, so future agent changes do not redesign approved UI, branding, or character work.
  6. Translate subjective constraints into measurable checks where possible, such as rendered saturation limits, dimensional requirements, and surface/detail requirements; measure after lighting in the target renderer.
  7. Audit all assets with screenshots captured under a consistent method, and rank mismatches by screen presence and player impact.
  8. Rebuild or restyle external-pack assets and assets made in separate agent sessions to conform to the selected visual language; judge them in the project renderer, not vendor or generator previews.
  9. Change one visual issue at a time behind a switch, produce full-size before/after captures, and have a human explicitly approve rollout; consider intermediate intensity rather than only all-or-nothing changes.
  10. Re-review approved changes at night, in adverse weather, in every level, and alongside effects, because each condition exposes different inconsistencies.
  11. Require every change to report frame-time or rendering cost; gate costly work behind quality settings and reject improvements that violate the performance budget.
  12. Record all visual decisions, including deliberate non-changes, and carry the document forward into later agent sessions.

Tools / artifacts

  • A short art-direction document with three candidate directions, selected rules, references, and rationale
  • A 'kept as they are' inventory of approved UI, icons, logo, characters, and other protected elements
  • A consistently captured visual audit with screenshots and ranked misfits
  • Feature switches for isolated art changes
  • Full-size before/after image comparisons
  • Renderer-level automated checks, such as post-lighting saturation limits and real-world size constraints
  • Performance-cost reporting and quality-setting tiers for expensive effects
  • A written record of visual rulings, including rejected changes

Validation signals

  • The author describes applying the approach across several games and genres over months of AI-agent-assisted work.
  • Rules are verified in the actual renderer rather than relying on asset previews; the post gives a concrete saturation-test failure that exposed clothes appearing much brighter on screen.
  • Visual changes are reviewed through full-size before/after captures and across night, bad weather, all levels, and effects.
  • Performance is treated as a release gate: each change reports its cost and expensive changes must honor quality settings.
  • The author reports a reference-alignment check that revealed their output was drifting from named inspirations, followed by a trial that was selected instead.

Cautions

  • Keep changes behind feature flags or switches and retain full-size before/after captures, as the post recommends, so visual regressions can be reverted.
  • Do not let agents broadly redesign approved assets; maintain an explicit 'kept as they are' list and require human approval before rollout.
  • Evaluate licenses and disclosure requirements separately when using CC0 assets, asset packs, or AI-generated materials.

Limitations

  • The post is experience-based rather than independently benchmarked; it does not provide quantitative before/after outcomes beyond anecdotes.
  • Much of the workflow is expressed as art-direction guidance, so users still need to adapt the concrete thresholds, checks, and visual rules to their engine and project.
  • The supplied item is truncated, so later implementation details and any supporting artifacts cannot be assessed.
  • Community support is currently weak: score is 1 and the post is only about an hour old.

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


r/ClaudeWorkflows • • 40m ago

Selected Workflow [Workflow] Auto-load worktree-aware, project-specific Claude Code system prompts with a shell wrapper

1 Upvotes

Auto-load worktree-aware, project-specific Claude Code system prompts with a shell wrapper

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

What problem this solves

Users working across multiple repositories want project-specific standing instructions loaded automatically into Claude Code without manually remembering --append-system-prompt-file arguments, while improving repeated-session prompt-cache reuse.

Summary

Wrap the claude shell command so it resolves the current Git repository—using the common Git directory to make worktrees resolve to their main repository—looks up that repository's generated prompt file, and invokes the real binary with --append-system-prompt-file. Generate each project prompt from shared and project-specific instruction sources, enforce no-manual-edit drift checking in CI, and verify system-prompt injection from session-transcript metadata rather than asking Claude to expose its own prompt.

Why it is useful

It provides a reusable way to automatically select project-specific Claude Code system-prompt addenda based on the current Git repository, including worktree-aware lookup, generated prompt artifacts, CI drift protection, launch-path caveats, and an external verification method.

Workflow

  1. Store a shared base instruction source and separate project-specific rule sources.
  2. Generate one prompt file per project by composing the base and that project's rules; avoid hand-editing generated outputs.
  3. Maintain or generate a mapping from Git repository identity/common directory to its corresponding prompt file.
  4. Implement a my_prompt_file_for "$PWD" resolver that identifies the current repository with git rev-parse --git-common-dir so worktrees map to the same main-repository configuration.
  5. Define a shell function named claude that calls the real executable via command claude, appending --append-system-prompt-file "$f" only when the resolver returns a prompt file.
  6. Pass all original arguments through unchanged so normal Claude Code commands and subcommands retain their behavior.
  7. Fall back to plain command claude "$@" outside configured repositories.
  8. Add a CI check that regenerates prompt files and fails if checked-in generated artifacts differ, preventing silent manual drift.
  9. Test an ordinary interactive invocation in a configured repository, an unconfigured directory, and a Git worktree.
  10. Test shell-bypassing invocation forms such as timeout claude ... and env X=1 claude ...; configure alternatives if those paths need prompt injection.
  11. Configure separate IDE, desktop, and CI launch paths because they generally do not load interactive shell functions.
  12. After changing a generated prompt, expect the first session to populate the cache; compare subsequent fresh sessions for cache improvement instead of judging only the first run after a change.

Tools / artifacts

  • A shell claude() wrapper function
  • --append-system-prompt-file
  • A Git worktree-aware repository resolver using git rev-parse --git-common-dir
  • A generated repository-to-project/prompt mapping table
  • Generated per-project prompt files assembled from a shared base and project rules
  • CI drift check for generated prompt files
  • Claude Code session transcripts
  • Reporails ails xray for inspecting system-block shape/token size

Validation signals

  • Reported median fresh-session first-request cache share increased from 31% to 59%.
  • Reported force-read rules at session start decreased from 10 to 1.
  • External transcript/x-ray measurement showed approximately 3,059 system-prompt tokens without the wrapper and 27,362 with it.
  • The author identified and tested failure modes: worktrees, shell-bypassing timeout/env invocations, IDE/desktop launches, and first-session cache writes after prompt changes.
  • Generated artifacts are protected by a CI drift check.

Cautions

  • Do not put secrets, credentials, or private production data in generated system-prompt files or repository mappings.
  • Keep generated prompt inputs reviewed and version-controlled; a CI drift check should prevent unreviewed manual edits.
  • Do not assume a shell function applies to IDE, GUI, CI, env, timeout, or other launch mechanisms; configure and test those paths separately.
  • Validate prompt injection externally through transcripts or tooling rather than asking the model to reveal its system prompt.

Limitations

  • The repo-to-prompt resolver (my_prompt_file_for) and generated mapping-table format are not provided, so users must implement the most important project-specific portion themselves.
  • Results are self-reported from one user's transcripts; there is no independent community validation yet.
  • The shell-function approach does not cover IDE, desktop, env, timeout, CI, or other non-interactive launch paths without additional wrappers/configuration.
  • A 27k-token appended prompt may have context, latency, maintenance, and instruction-conflict tradeoffs that are not explored.

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


r/ClaudeWorkflows • • 2h 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 • • 2h 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 • • 4h 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 • • 4h 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 • • 6h 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 • • 8h 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 • • 10h 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 • • 10h 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 • • 12h 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 • • 12h 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 • • 16h 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 • • 16h 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 • • 20h 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 • • 20h 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 • • 22h 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 • • 22h 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.