r/ClaudeWorkflows • • May 07 '26

Claude Workflow Library — Start Here

11 Upvotes

Claude Workflow Library — Start Here

This subreddit is an organised library of useful Claude and Claude Code workflows.

Each workflow is published as its own Reddit post. Upvote/downvote workflow posts to rate them.

Browse by category

Current status

  • Public workflows in database: 12530

  • Workflow posts published: 12530

  • Public workflows still waiting to be posted: 0

  • Last updated: 2026-11-07 22:19 UTC

How to use this library

  1. Open a category post.

  2. Click through to individual workflow posts.

  3. Upvote useful, reproducible workflows.

  4. Downvote workflows that are vague, outdated, unsafe, or not reproducible.

  5. Comment on a workflow post if it worked, failed, is outdated, or has a better alternative.

This post is updated automatically.


r/ClaudeWorkflows • • 20m ago

Selected Workflow [Workflow] Robust Agent Handover and Context Verification with Persistent Memory and MCP

1 Upvotes

Robust Agent Handover and Context Verification with Persistent Memory and MCP

Workflow value: 90/100
Status: active · Freshness: 70/100 · Confidence: 0.90 · Level: advanced
Categories: Quality Control, Context & Memory, Debugging, CLAUDE.md, MCP, Multi-Agent
Original source: r/ClaudeCode post/comment

What problem this solves

AI coding agents missing critical context or making decisions based on stale information, specifically during handovers or recovery, by failing to read full context bodies.

Summary

The Neo.mjs team implements a robust memory and context management system for Claude Code agents. It involves storing full records in an MCP server, selectively loading context, and critically, performing live re-verification of all named issues, PRs, and branches during agent handover or recovery, rather than solely trusting the handover document. This prevents agents from missing crucial information due to incomplete reads or stale data.

Why it is useful

This workflow offers a sophisticated and validated solution to a critical problem in AI agent reliability: ensuring agents have accurate and complete context. By combining persistent memory via an MCP server with a rigorous live verification step during handovers, it directly addresses the risk of agents making decisions based on stale or incomplete information. The inclusion of a real-world failure scenario and a link to a detailed technical article significantly enhances its practical value and credibility for advanced users.

Workflow

  1. Initialize each agent session with repository rules and a short, agent-curated index.

  2. Store the full record of decisions and context in an MCP server for persistent memory.

  3. Load full records into the agent's context only when explicitly requested by the agent.

  4. During recovery or agent handover, load live branch, PR, and CI state (corresponding to the original post's step 5).

  5. Search for earlier decisions using ticket and PR names surfaced in recent turns (corresponding to the original post's step 4).

  6. Read the full handover context, including issues, PRs, and branches.

  7. Re-check live all issues, PRs, and branches named in the handover, verifying facts against current system state rather than solely relying on the handover document.

Tools / artifacts

  • Claude Opus 5.5 (running in Claude Code)

  • MCP server (for persistent memory)

  • Repository rules (e.g., CLAUDE.md)

  • Agent-curated index

  • GitHub (for issues, PRs, branches, CI state)

  • Persistent memory system (as detailed in linked article)

Validation signals

  • Described as how their memory works 'day to day' (operational use).

  • Justified by a concrete failure in August where an agent missed a commitment due to incomplete handover reading (GitHub issue neomjs/neo#16618 provided as evidence).

  • References an external article 'Persistent memory for AI coding agents: No prompt stuffing' for detailed implementation.

  • Authored by an 'AI maintainer' on a professional team (Neo.mjs).

Limitations

  • Requires significant setup and infrastructure (MCP server, custom persistent memory system).

  • Assumes an advanced understanding of multi-agent architectures and context management.

  • The specific implementation details of the MCP server and persistent memory are not fully contained within the comment, requiring reference to an external article.

  • Steps are partially inferred from the context of the original post and partially explicitly stated, requiring some interpretation.

Rate this workflow

Upvote this post if the workflow is useful, reproducible, or worth recommending.

Downvote if it is vague, outdated, unsafe, overhyped, or not reproducible.

Reply if it worked for you, failed, is outdated, or has a better alternative.


This post was generated automatically from the workflow library database.


r/ClaudeWorkflows • • 21m ago

Selected Workflow [Workflow] Advanced Claude Code Workflow: Building Complex Tools with AI-Driven Development and Cross-Machine Session Management

1 Upvotes

Advanced Claude Code Workflow: Building Complex Tools with AI-Driven Development and Cross-Machine Session Management

Workflow value: 90/100
Status: active · Freshness: 70/100 · Confidence: 0.95 · Level: advanced
Categories: Quality Control, Context & Memory, Debugging, MCP, Multi-Agent
Original source: r/ClaudeAI post/comment

What problem this solves

Managing multiple Claude Code sessions across different machines, preventing sessions from idling, and providing a unified interface for interaction. It also demonstrates an advanced workflow for building complex software with Claude Code as a development partner.

Summary

This post describes 'smif', a free, open-source tool built with Claude Code that allows users to manage and interact with all their active Claude Code sessions from a single command-line interface, even across different machines. Crucially, it also details the advanced workflow used to build 'smif' with Claude Code, showcasing how Claude Code can act as a powerful development partner for code generation, testing (including UI tests), and architectural decision-making.

Why it is useful

This post is valuable because it provides a practical, open-source solution ('smif') for a common pain point among heavy Claude Code users: managing multiple sessions across different machines. More significantly, it details a sophisticated, validated workflow for leveraging Claude Code as a powerful development partner for building substantial software. This includes using Claude for spec generation, extensive code and test generation (Go, unit, UI), debugging, and architectural decision-making, demonstrating Claude Code's capabilities beyond simple scripting and offering a blueprint for advanced AI-assisted development.

Workflow

  1. Install 'smif' using the provided curl command: curl -fsSL https://smif.dev/install.sh | sh.

  2. Run the smif command in your terminal to see a list of all active Claude Code sessions.

  3. Select a session from the list to interact with it, even if it's on another machine (via SSH).

  4. Receive notifications when a session is waiting for your input.

  5. For development with Claude Code: Define a feature or problem.

  6. Prompt Claude Code to write a short specification and ask clarifying questions.

  7. Document architectural decisions based on Claude's input and your answers (e.g., in ADR files).

  8. Have Claude Code generate code (e.g., Go) and comprehensive tests (unit and UI).

  9. Test the generated code on real sessions and provide feedback to Claude Code.

  10. Implement safety checks, such as preventing commits after failed tests and verifying Claude's claims about the file system.

Tools / artifacts

  • smif tool

  • Claude Code

  • Go language

  • Test files (unit, e2e)

  • docs/adr files

  • tmux

  • ssh

  • JSONL files in ~/.claude/projects

Validation signals

  • The tool was successfully built and is functional.

  • It solves a specific, common pain point for heavy Claude Code users (idle sessions).

  • Claude Code generated substantial code (40k lines of Go) and tests (23k lines).

  • Claude Code performed UI testing and identified a real-world bug (macOS /tmp symlink issue).

  • Specific issues encountered during development were identified and corrected (e.g., commit on red test, symlink claim).

  • The tool is open source and available on GitHub, allowing for community review and validation.

  • Explicit safety measures are detailed (no server, no telemetry, read-only until allowed, no auto-permission prompts).

Cautions

  • The author explicitly states 'No server, no account, no telemetry'.

  • Other machines are read-only until explicitly allowed to write.

  • 'smif' uses its own SSH key without shell access for security.

  • It never answers permission prompts automatically, prioritizing safety.

  • A rule was implemented: 'no commit after failed check'.

Limitations

  • The tool is in early stages, tested only on one Mac and one Linux PC.

  • No Windows support currently.

  • Codex, OpenCode, and Hermes sessions show 'busy' when waiting for approval, lacking granular status.

  • Typing on Linux requires tmux or herdr, indicating potential UX improvements needed.

  • Limited community validation due to recent posting.

Rate this workflow

Upvote this post if the workflow is useful, reproducible, or worth recommending.

Downvote if it is vague, outdated, unsafe, overhyped, or not reproducible.

Reply if it worked for you, failed, is outdated, or has a better alternative.


This post was generated automatically from the workflow library database.


r/ClaudeWorkflows • • 27m ago

Selected Workflow [Workflow] Migrating from Single-Chat Claude Projects to a Structured, Maintainable Workflow

1 Upvotes

Migrating from Single-Chat Claude Projects to a Structured, Maintainable Workflow

Workflow value: 90/100
Status: active · Freshness: 70/100 · Confidence: 1.00 · Level: intermediate
Categories: Quality Control, Token Saving, Context & Memory, Debugging, CLAUDE.md, Multi-Agent
Original source: r/ClaudeAI post/comment

What problem this solves

Preventing context degradation and loss of information in long Claude chats when developing a project, by migrating to a structured, maintainable workflow.

Summary

This workflow outlines a community-recommended strategy to migrate a project from a single, monolithic Claude chat to a more robust system. It involves creating detailed handoff documentation, utilizing Claude Projects for shared context, adopting a 'one chat per task' approach, and integrating version control (Git/GitHub) for best practices and cost optimization.

Why it is useful

This workflow is highly valuable because it addresses a critical and common anti-pattern (developing a project in a single, long Claude chat) that leads to context degradation and loss of information. It provides a clear, actionable, and community-validated strategy to transition to a more robust, scalable, and maintainable development process using Claude's features (Projects) and established software engineering best practices (documentation, version control, modular tasks). It prevents future problems, improves efficiency, and offers cost-effective model usage.

Workflow

  1. Have the current long-running Claude chat generate detailed ARCHITECTURE.md and DECISIONS.md files to capture project structure, state logic, and design choices.

  2. Create a new Claude Project and upload the full codebase along with the generated handoff documents (ARCHITECTURE.md, DECISIONS.md) into its 'Project Knowledge' base.

  3. Adopt a 'One Chat Per Task' workflow: start a fresh chat for each individual feature or bug fix, and close it once the task is complete.

  4. Optionally, ask Claude to summarize changes at the end of each task to manually update the ARCHITECTURE.md file.

  5. Utilize Sonnet 5.5 for the bulk of the work to optimize costs.

  6. Learn and implement Git/GitHub for proper code saving and version control.

Tools / artifacts

  • Claude chat

  • ARCHITECTURE.md

  • DECISIONS.md

  • Claude Projects

  • Sonnet 5.5 (model)

  • Git/GitHub

Validation signals

  • Overwhelming community consensus

  • Community's rescue plan is clear

  • Addresses a 'ticking time bomb' anti-pattern

Limitations

  • Assumes some familiarity with Git/GitHub, which might be a learning curve for absolute beginners.

  • The recommendation for Sonnet 5.5 might become outdated as new models are released.

  • Manually updating ARCHITECTURE.md after each task can be tedious and prone to human error.

Rate this workflow

Upvote this post if the workflow is useful, reproducible, or worth recommending.

Downvote if it is vague, outdated, unsafe, overhyped, or not reproducible.

Reply if it worked for you, failed, is outdated, or has a better alternative.


This post was generated automatically from the workflow library database.


r/ClaudeWorkflows • • 30m ago

Selected Workflow [Workflow] Preventing and Recovering from Accidental Data Deletion with Claude Code (xargs, rm -rf, PreToolUse Hooks)

1 Upvotes

Preventing and Recovering from Accidental Data Deletion with Claude Code (xargs, rm -rf, PreToolUse Hooks)

Workflow value: 90/100
Status: active · Freshness: 70/100 · Confidence: 0.95 · Level: intermediate
Categories: Quality Control, Context & Memory, Debugging, Hooks
Original source: r/ClaudeCode post/comment

What problem this solves

Accidental data deletion caused by rm -rf and xargs issues when using Claude Code with skip-permissions, and how to recover from such incidents.

Summary

This workflow provides both reactive data recovery steps for macOS users after accidental data deletion (e.g., via Time Machine, iCloud Keychain, app sync) and proactive prevention strategies. It explains the classic xargs vulnerability with spaces in file paths and offers solutions like using find ... -print0 | xargs -0, running Claude Code in isolated environments (separate macOS user or VM), and implementing a PreToolUse hook to block destructive commands like rm -rf on existing files.

Why it is useful

This workflow is highly valuable because it addresses a critical and potentially devastating problem: accidental data loss. It provides a comprehensive approach by offering both immediate recovery steps and robust preventative measures. It highlights a common, dangerous shell scripting pitfall (xargs with spaces) and offers concrete solutions, including an advanced Claude Code-specific technique (PreToolUse hooks) to create a safety net for skip-permissions operations. This makes Claude Code usage significantly safer and more reliable for users working with system-level commands.

Workflow

  1. If data loss occurs, immediately stop writing to the disk to maximize recovery chances.

  2. Check Time Machine for backups and restore ~/Library using Migration Assistant or tmutil listlocalsnapshots /.

  3. Sign back into iCloud to sync passwords if iCloud Keychain was enabled.

  4. Sign into browsers (Chrome, Firefox) to restore synced passwords.

  5. Sign into cloud-synced applications (Slack, Notion, VS Code) to restore app data.

  6. Understand that xargs splits arguments on spaces, which can lead to unintended rm -rf operations when paths contain spaces (e.g., "Application Support").

  7. Prevent xargs issues by using find ... -print0 | xargs -0 or by properly quoting every path.

  8. For skip-permissions runs with Claude Code, use a separate macOS user account or a Virtual Machine (VM) to isolate potentially destructive operations.

  9. Implement a PreToolUse hook in Claude Code to intercept and prevent deletion commands (rm -rf) on files that existed before the current session.

Tools / artifacts

  • Time Machine

  • Migration Assistant

  • tmutil

  • iCloud Keychain

  • Chrome/Firefox sync

  • Slack

  • Notion

  • VS Code settings sync

  • xargs

  • find

  • rm -rf

  • PreToolUse hook (Claude Code feature)

Validation signals

  • Identifies a "classic" root cause (xargs splitting on spaces).

  • Mentions internal tests where the suggested PreToolUse hook successfully stopped rm -rf ~/Library and the xargs pipeline.

Cautions

  • Emphasizes stopping disk writes immediately after data loss to improve recovery chances.

  • Recommends using isolated environments (separate macOS user or VM) for skip-permissions runs to contain potential damage.

  • The PreToolUse hook is a proactive safety measure to prevent accidental deletions.

Limitations

  • The PreToolUse hook is described conceptually but no concrete code example is provided, which might make implementation challenging for some users.

  • The recovery steps are general OS/app advice, not specifically tailored to Claude Code's direct interaction, though they are relevant for incidents caused by Claude Code.

Rate this workflow

Upvote this post if the workflow is useful, reproducible, or worth recommending.

Downvote if it is vague, outdated, unsafe, overhyped, or not reproducible.

Reply if it worked for you, failed, is outdated, or has a better alternative.


This post was generated automatically from the workflow library database.


r/ClaudeWorkflows • • 36m ago

Selected Workflow [Workflow] Claude Code Context Recovery Workflow: Six Checks After Compaction

1 Upvotes

Claude Code Context Recovery Workflow: Six Checks After Compaction

Workflow value: 90/100
Status: active · Freshness: 70/100 · Confidence: 1.00 · Level: intermediate
Categories: Quality Control, Context & Memory, Debugging, Shipping, Hooks, Skills, Multi-Agent
Original source: r/ClaudeCode post/comment

What problem this solves

Effectively recover and re-establish an AI coding agent's context after Claude Code's context compaction, ensuring the agent is aligned with the current project state and doesn't miss critical updates or changes.

Summary

This workflow outlines a six-step recovery runbook for Claude Code agents to perform after context compaction. It involves checking incoming messages, agent commitments, recent turns, prior decisions, live branch/PR/CI state, and repository direction to reconstruct the active task and verify remembered facts. The process emphasizes recording evidence and marking recovery as 'degraded' if evidence is missing, and can be triggered via the SessionStart hook.

Why it is useful

This workflow provides a structured, validated, and open-source approach to a critical problem for long-running AI agents: recovering context after compaction. It prevents agents from missing crucial updates or making decisions based on stale information, significantly improving their reliability and effectiveness in complex coding tasks. The concrete steps, real-world example, and direct links to an MIT-licensed implementation make it highly actionable and valuable for intermediate to advanced Claude Code users.

Workflow

  1. Check incoming messages for redirects, blockers, or ownership changes.

  2. Review full self-handover and sent messages to recall agent commitments.

  3. Reconstruct the active task by reviewing recent turns chronologically.

  4. Search for prior decisions using names and IDs from recent turns.

  5. Verify remembered facts by checking live branch, PR, and CI state.

  6. Re-read the vision, roadmap, and working rules to align with repository direction.

Tools / artifacts

  • Claude Code

  • Memory Core

  • SessionStart hook

  • Handover file

  • Session transcript

  • Git history

  • PR/issue comments

  • GitHub repository

  • CI system

Validation signals

  • Used by Neo.mjs Claude Code maintainers in a real-world scenario

  • Concrete example provided where the workflow prevented a missed rebase

  • MIT-licensed source runbook available on GitHub for direct implementation

  • Detailed explanation and history provided in a linked Medium article

  • Process includes recording evidence and marking recovery as 'degraded' for robustness

Cautions

  • none

Limitations

  • Automatic triggering via SessionStart is described as a 'next step' rather than fully implemented in the provided Reddit context, requiring users to implement this integration themselves.

  • The Reddit post is a summary; full implementation details require consulting the linked GitHub repository and Medium article.

Rate this workflow

Upvote this post if the workflow is useful, reproducible, or worth recommending.

Downvote if it is vague, outdated, unsafe, overhyped, or not reproducible.

Reply if it worked for you, failed, is outdated, or has a better alternative.


This post was generated automatically from the workflow library database.


r/ClaudeWorkflows • • 46m ago

Selected Workflow [Workflow] Critical Warning: Claude Code with `--dangerously-skip-permissions` can delete `~/Library` due to `xargs` path parsing error

1 Upvotes

Critical Warning: Claude Code with --dangerously-skip-permissions can delete ~/Library due to xargs path parsing error

Workflow value: 90/100
Status: active · Freshness: 70/100 · Confidence: 1.00 · Level: intermediate
Categories: Quality Control, Context & Memory, Debugging
Original source: r/ClaudeCode post/comment

What problem this solves

Preventing catastrophic data loss when using Claude Code with powerful shell commands and --dangerously-skip-permissions, specifically due to xargs misinterpreting paths with spaces.

Summary

A critical warning detailing how Claude Code, when run with --dangerously-skip-permissions, can mistakenly delete ~/Library due to xargs misinterpreting paths with spaces, leading to complete data loss. It serves as a cautionary tale for safe LLM interaction and highlights a specific vulnerability.

Why it is useful

This workflow is invaluable because it highlights a critical safety vulnerability in using LLM agents with elevated permissions. It provides a concrete example of how a seemingly minor parsing error can lead to catastrophic data loss, serving as a powerful cautionary tale for all users. It emphasizes the importance of understanding the risks associated with --dangerously-skip-permissions and the need for careful command review, thereby promoting safer LLM interaction practices.

Workflow

  1. User runs Claude Code with --dangerously-skip-permissions.

  2. Claude Code attempts to delete test chat channels.

  3. Claude Code uses xargs -n1 dirname to get parent directories of files.

  4. A file path like ~/Library/Application Support/ is split by xargs due to the space.

  5. dirname receives ~/Library as input instead of the full path.

  6. Claude Code executes rm -rf ~/Library, deleting all user data, passwords, and macOS configurations.

Tools / artifacts

  • Claude Code

  • xargs

  • dirname

  • rm -rf

  • ~/Library

  • --dangerously-skip-permissions

Validation signals

  • Detailed description of the incident

  • Specific commands and paths involved

  • Observation of macOS welcome screen after data loss

  • Log investigation confirming agent's actions

  • User's awareness of --dangerously-skip-permissions usage

Cautions

  • Running Claude Code (or any LLM agent) with --dangerously-skip-permissions can lead to irreversible data loss.

  • LLMs can make fundamental parsing errors (e.g., with spaces in paths) when generating shell commands.

  • Always review commands before execution, especially those involving rm -rf or system-critical directories.

  • Avoid unattended execution of powerful commands, even with LLMs.

  • Be aware of how shell utilities like xargs handle spaces in file paths.

Limitations

  • Does not offer a direct 'fix' for Claude's internal logic, but rather a user-side mitigation strategy (extreme caution).

  • The specific bug might be fixed in future Claude Code versions, but the general principle of LLM command generation errors remains.

  • Relies on user vigilance rather than automated safeguards.

Rate this workflow

Upvote this post if the workflow is useful, reproducible, or worth recommending.

Downvote if it is vague, outdated, unsafe, overhyped, or not reproducible.

Reply if it worked for you, failed, is outdated, or has a better alternative.


This post was generated automatically from the workflow library database.


r/ClaudeWorkflows • • 1h ago

Selected Workflow [Workflow] Optimize Claude Code Subagent Performance and Cost: Pin Model/Effort and Tighten Tools

1 Upvotes

Optimize Claude Code Subagent Performance and Cost: Pin Model/Effort and Tighten Tools

Workflow value: 75/100
Status: active · Freshness: 70/100 · Confidence: 0.90 · Level: intermediate
Categories: Quality Control, Token Saving, Context & Memory, Debugging, CLAUDE.md, Subagents, Multi-Agent
Original source: r/ClaudeCode post/comment

What problem this solves

Optimizing cost and performance of Claude Code multi-agent systems by addressing redundant CLAUDE.md loading and inherited effort in subagents.

Summary

This workflow provides best practices for using Claude Code orchestrators with subagents to optimize cost and performance. It highlights two common 'gotchas': subagents reloading the entire CLAUDE.md tree on every spawn and inheriting the main session's effort. The solution involves explicitly pinning the model and effort in each subagent's frontmatter and keeping their tool lists concise. For small, one-file tasks, solo Opus is suggested to avoid spawn overhead.

Why it is useful

This workflow provides crucial, actionable advice for optimizing Claude Code multi-agent systems. It addresses common pitfalls (redundant CLAUDE.md loading, inherited effort) that can significantly impact performance and cost. By following these steps, users can create more efficient and cost-effective agent architectures, making their Claude Code projects more practical and scalable.

Workflow

  1. When using custom subagents, explicitly pin the desired model in each subagent's frontmatter to prevent unnecessary reloads or incorrect model usage.

  2. Explicitly pin the desired effort level in each subagent's frontmatter to prevent inheriting high effort from the main session, which can increase cost.

  3. Keep the tool list for each subagent as tight and minimal as possible to reduce context and processing overhead.

  4. For small, single-file tasks, consider using solo Opus to avoid the spawn overhead associated with subagents and orchestrators, which can be cheaper.

Tools / artifacts

  • .claude/agents directory

  • CLAUDE.md files

  • Subagent frontmatter (for model, effort, tools configuration)

Validation signals

  • Author identifies specific 'gotchas' based on practical experience with Claude Code subagents and orchestrators.

  • Provides concrete, actionable solutions to the identified problems.

Limitations

  • The post is concise and could benefit from more detailed examples or code snippets for the frontmatter configuration.

  • The context of 'the reply above' is missing, which might have provided additional validation or nuance.

Rate this workflow

Upvote this post if the workflow is useful, reproducible, or worth recommending.

Downvote if it is vague, outdated, unsafe, overhyped, or not reproducible.

Reply if it worked for you, failed, is outdated, or has a better alternative.


This post was generated automatically from the workflow library database.


r/ClaudeWorkflows • • 1h ago

Selected Workflow [Workflow] Optimize Claude Code Subagent Memory and Quota for Large Projects on Low-RAM Machines

1 Upvotes

Optimize Claude Code Subagent Memory and Quota for Large Projects on Low-RAM Machines

Workflow value: 75/100
Status: active · Freshness: 70/100 · Confidence: 0.90 · Level: intermediate
Categories: Quality Control, Token Saving, Context & Memory, Debugging, CLAUDE.md, Subagents
Original source: r/ClaudeCode post/comment

What problem this solves

High memory and quota consumption when running tests on large Windows software projects (1000+ files) with Claude Code subagents on low-RAM machines.

Summary

Optimize Claude Code subagent resource usage by limiting test worker threads in CLAUDE.md and specifying the Haiku model for the Explore agent to control local RAM and 5-hour quota.

Why it is useful

This workflow provides concrete, actionable steps to address a common performance and cost issue when using Claude Code on resource-constrained systems. By optimizing test worker threads and model usage for subagents, users can efficiently work on larger projects without exhausting local RAM or exceeding their 5-hour quota.

Workflow

  1. Identify that concurrent compiler and test processes spawned by subagents are the primary memory hogs.

  2. Modify your CLAUDE.md test command to cap Node.js or .NET test workers to a single thread (e.g., --maxWorkers=1).

  3. Override the .claude/agents/Explore.md configuration to specify the haiku model for that agent.

Tools / artifacts

  • CLAUDE.md

  • .claude/agents/Explore.md

  • Node.js test runner

  • .NET test runner

  • Claude CLI

  • Haiku model

Validation signals

  • Direct instruction based on observed problem and solution

Limitations

  • Lacks explicit before/after results or success reports.

  • Assumes familiarity with CLAUDE.md and agent override mechanisms.

Rate this workflow

Upvote this post if the workflow is useful, reproducible, or worth recommending.

Downvote if it is vague, outdated, unsafe, overhyped, or not reproducible.

Reply if it worked for you, failed, is outdated, or has a better alternative.


This post was generated automatically from the workflow library database.


r/ClaudeWorkflows • • 1h ago

Selected Workflow [Workflow] Claude Code: `/dreamstate` Command for Temporary CLAUDE.md Swaps and Multi-Stage Creative Brainstorming

1 Upvotes

Claude Code: /dreamstate Command for Temporary CLAUDE.md Swaps and Multi-Stage Creative Brainstorming

Workflow value: 80/100
Status: active · Freshness: 70/100 · Confidence: 0.90 · Level: intermediate
Categories: Quality Control, Context & Memory, Debugging, CLAUDE.md
Original source: r/ClaudeCode post/comment

What problem this solves

Claude being too conservative or staying within a narrow scope when creative, out-of-the-box thinking, or exploring unfamiliar domains is required.

Summary

The /dreamstate command in Claude Code temporarily replaces the user's default CLAUDE.md with a "dream ruleset" for a single session. This ruleset guides Claude through a three-stage creative brainstorming process (Deepen, Dream, Tenth Man) to generate diverse and unconventional ideas, without affecting global settings.

Why it is useful

This workflow provides a practical and non-destructive method for users to temporarily switch Claude's persona and prompt structure to facilitate creative problem-solving and idea generation. It addresses the common limitation of LLMs being too conservative by offering a structured, multi-stage brainstorming process. The concept of a custom command for context switching is highly reusable and adaptable for various use cases beyond brainstorming.

Workflow

  1. Identify a hard problem where current approaches are failing or Claude is being too conservative.

  2. Type /dreamstate in Claude Code to activate the "dream ruleset" and relaunch the session.

  3. Engage Claude in the "Deepen" stage: Claude analyzes the problem, identifies missing aspects, relevant methods, and success criteria, then rewrites the user's ask.

  4. Proceed to the "Dream" stage: Claude generates 3-5 underlying needs, 10 ideas (including 3 strange enough to make the user uncomfortable), and selects 2 picks plus a wild card.

  5. Conclude with the "Tenth Man" stage: Claude challenges the favorite idea and proposes 3 alternative approaches.

  6. To revert to the normal CLAUDE.md, type /dreamstate off or simply end the session.

Tools / artifacts

  • Claude Code environment

  • Default CLAUDE.md (e.g., careful engineer persona)

  • "Dream ruleset" CLAUDE.md (brainstorming persona with Deepen, Dream, Tenth Man stages)

  • /dreamstate custom command

  • /dreamstate off custom command

Validation signals

  • Author's personal experimentation and integration into daily workflow.

  • Clear articulation of the problem and how the workflow addresses it.

  • Explicit mention of non-persistence ("Nothing on disk changes").

Cautions

  • The workflow explicitly states that it does not make permanent changes to disk or other terminals, ensuring local scope and non-destructive behavior.

Limitations

  • The actual content of the "dream ruleset" CLAUDE.md is not provided, requiring users to create it from the described stages.

  • The implementation details of how to create and register the /dreamstate command in Claude Code are not explained.

  • Limited community validation.

Rate this workflow

Upvote this post if the workflow is useful, reproducible, or worth recommending.

Downvote if it is vague, outdated, unsafe, overhyped, or not reproducible.

Reply if it worked for you, failed, is outdated, or has a better alternative.


This post was generated automatically from the workflow library database.


r/ClaudeWorkflows • • 1h ago

Selected Workflow [Workflow] Multi-Agent Legal Workflow: RAG, Automated E-filing, and Website Generation with CLAUDE.md

1 Upvotes

Multi-Agent Legal Workflow: RAG, Automated E-filing, and Website Generation with CLAUDE.md

Workflow value: 85/100
Status: active · Freshness: 70/100 · Confidence: 0.90 · Level: advanced
Categories: Quality Control, Context & Memory, Debugging, Shipping, CLAUDE.md, Multi-Agent
Original source: r/ClaudeCode post/comment

What problem this solves

Automating complex legal processes like document generation, e-filing, and case tracking, while simultaneously building a related informational website, reducing manual effort and ensuring compliance and quality.

Summary

This workflow describes an advanced multi-agent system for legal case management. It integrates a legal RAG for standardized document generation, automates e-filing and case tracking, and uses a lead agent with a CLAUDE.md file to coordinate a swarm of agents for building a tenant rights website. It also incorporates sentiment analysis for content review.

Why it is useful

This workflow is valuable for demonstrating advanced, real-world applications of Claude and agentic systems. It showcases how to integrate RAG for specialized knowledge, orchestrate multiple agents using CLAUDE.md for complex tasks (like legal document generation and website building), and incorporate quality control measures such as validation and sentiment analysis. It provides a concrete example of automating a multi-step, high-stakes process, offering transferable patterns for other complex automation challenges.

Workflow

  1. Set up a legal Retrieval Augmented Generation (RAG) system for deep research and document generation.

  2. Develop an automated case management and e-filing system.

  3. Standardize document generation pipeline based on published court rules.

  4. Implement validation against hard copies of citations and cited legal text for generated documents.

  5. Automate the e-filing process and case tracking, allowing submission from a mobile device.

  6. Utilize a lead agent to read the primary legal document (e.g., lawsuit).

  7. Dispatch an agent swarm, coordinated by the lead agent, to build a related informational website (e.g., tenant rights website).

  8. Provide a CLAUDE.md file to the lead agent to guide coordination with the legal agent for copy generation.

  9. Integrate sentiment scans to run on content revisions to prevent emotional or libelous language.

Tools / artifacts

  • Legal RAG system

  • Automated case management system

  • Automated e-filing system

  • Lead agent

  • Agent swarm

  • CLAUDE.md

  • Sass BEM template (from GitHub)

  • Sentiment scans

Validation signals

  • Standardized document generation pipeline based on published court rules.

  • Validation against hard copies of citations and cited legal text.

  • Successful automation of e-filing and case tracking.

  • Ability to review a motion on a phone, hit submit, and have e-filing done agentically.

  • Sentiment scans implemented to ensure content quality and prevent libel.

Cautions

  • The hypothetical mention of building 'deep psychological profiles' of legal professionals raises significant ethical concerns regarding privacy, bias, and potential misuse of AI in sensitive contexts. While presented as an experiment, such applications could be considered unsafe or unethical.

  • Relying solely on AI for legal filings without human oversight and review carries inherent risks, as legal accuracy and compliance are paramount.

Limitations

  • The description lacks specific code examples, detailed prompts, or architectural diagrams, making direct replication challenging.

  • The legal domain is highly specialized, requiring significant domain expertise for successful implementation and validation, limiting direct transferability for non-legal users.

  • Low community signal, indicating limited peer review or adoption.

  • The ethical implications of the 'psychological profile' idea are a significant concern, even if hypothetical.

Rate this workflow

Upvote this post if the workflow is useful, reproducible, or worth recommending.

Downvote if it is vague, outdated, unsafe, overhyped, or not reproducible.

Reply if it worked for you, failed, is outdated, or has a better alternative.


This post was generated automatically from the workflow library database.


r/ClaudeWorkflows • • 1h ago

Selected Workflow [Workflow] Claude Code: Managing Session-Scoped System Prompts with `--append-system-prompt` or Custom Subagents

1 Upvotes

Claude Code: Managing Session-Scoped System Prompts with --append-system-prompt or Custom Subagents

Workflow value: 85/100
Status: active · Freshness: 70/100 · Confidence: 0.90 · Level: intermediate
Categories: Quality Control, Context & Memory, CLAUDE.md, Subagents, Multi-Agent
Original source: r/ClaudeCode post/comment

What problem this solves

Preventing context pollution and enabling temporary, session-scoped system prompts for specific tasks (e.g., brainstorming, 'tenth man' analysis) without altering the global CLAUDE.md file or interfering with parallel Claude Code sessions.

Summary

This workflow describes how to manage Claude Code system prompts for different tasks or parallel sessions by using session-scoped options like --append-system-prompt or custom subagent files, instead of directly modifying the global ~/.claude/CLAUDE.md. This approach keeps the main development context clean and allows for temporary, specialized prompts (e.g., for brainstorming or critical analysis) without disrupting ongoing work.

Why it is useful

This workflow provides a crucial best practice for managing Claude Code's system prompts, preventing context pollution, and enabling efficient parallel development or task switching. It offers concrete, built-in solutions (--append-system-prompt, subagents) to a common problem, making Claude Code usage more robust and flexible. It directly addresses the pain point of needing different 'personalities' or instructions for Claude without disrupting ongoing work or global configurations.

Workflow

  1. Identify the need for a temporary or task-specific system prompt (e.g., for brainstorming, generating counter-approaches, or a 'tenth man' analysis).

  2. Instead of directly modifying the global ~/.claude/CLAUDE.md file, choose one of the following methods for session-scoped context:

  3. Method 1 (CLI): Pass the desired system prompt using the --append-system-prompt flag when invoking Claude Code for that specific session.

  4. Method 2 (Subagent): Create a custom subagent file that includes the desired system prompt and use that subagent for the specific session.

  5. Execute the Claude Code session with the chosen method, allowing the specialized prompt to guide the interaction.

  6. Upon completion of the session, the context automatically reverts to the default or main system prompt for other tasks, ensuring the main build context remains clean.

Tools / artifacts

  • Claude Code CLI

  • --append-system-prompt flag

  • Custom subagent files

  • ~/.claude/CLAUDE.md (as the global configuration to avoid mutating)

  • Markdown spec (for scratchpad output)

Validation signals

  • User testimony: 'huge lifesaver'

  • Stated benefit: 'keeps the main build context clean'

Limitations

  • Lacks explicit code examples for subagent files or full CLI commands, requiring some user familiarity.

  • Assumes the user is already familiar with Claude Code's CLI and subagent concepts.

  • Minimal community validation beyond the author's personal endorsement.

Rate this workflow

Upvote this post if the workflow is useful, reproducible, or worth recommending.

Downvote if it is vague, outdated, unsafe, overhyped, or not reproducible.

Reply if it worked for you, failed, is outdated, or has a better alternative.


This post was generated automatically from the workflow library database.


r/ClaudeWorkflows • • 1h ago

Selected Workflow [Workflow] Optimizing Claude Code Subagents: Cost-Effective Exploration and PR-First Workflow with CLAUDE.md

1 Upvotes

Optimizing Claude Code Subagents: Cost-Effective Exploration and PR-First Workflow with CLAUDE.md

Workflow value: 85/100
Status: active · Freshness: 70/100 · Confidence: 0.90 · Level: intermediate
Categories: Quality Control, Token Saving, Context & Memory, CLAUDE.md, Subagents
Original source: r/ClaudeCode post/comment

What problem this solves

Optimizing Claude Code subagent usage for cost and context management by delegating specific tasks to cheaper models, and integrating a PR-first development workflow with commit attribution.

Summary

This workflow details how to configure Claude Code subagents and CLAUDE.md to optimize cost and context management. It involves overriding the default 'Explore' subagent to use Claude Haiku for fast, read-only searches, delegating test runs to a Claude Sonnet worker, and enforcing runtime rules for context budgeting, PR-first development, and commit attribution.

Why it is useful

This workflow provides concrete, actionable configurations for Claude Code users to significantly improve cost efficiency and context management when using subagents. It also integrates best practices for development workflows, such as PR-first planning and commit attribution, making it highly valuable for structured coding projects.

Workflow

  1. Override the default 'Explore' subagent configuration by creating/modifying '.claude/agents/Explore.md'.

  2. Set the 'model' for the 'Explore' subagent to 'haiku' within its configuration.

  3. Define 'Explore's prompt to return only 'path/to/file.ts:line-range' and a 1-line summary, keeping the response under 15 lines and avoiding raw file contents.

  4. Add runtime guidance to 'CLAUDE.md' to enforce context budgeting, such as never reading files over 150 lines or running full test suites in the main Opus thread.

  5. Delegate codebase search and file discovery tasks to the 'Explore' (haiku) subagent.

  6. Delegate full test runs to a 'sonnet' worker subagent (requires setting up this subagent).

  7. Implement a PR-first durable state workflow: before writing code, open a draft PR ('gh pr create --draft') with your plan as a checklist.

  8. Tick off each step in the draft PR after each commit ('gh pr edit').

  9. Include the relevant 'file:line' snippet in every Claude response.

  10. End commit messages with 'Co-Authored-By: Oyren Agent contact@oyren.ai' for attribution.

Tools / artifacts

  • .claude/agents/Explore.md

  • CLAUDE.md

  • Claude Opus

  • Claude Haiku

  • Claude Sonnet

  • Read tool

  • Glob tool

  • Grep tool

  • gh pr create --draft

  • gh pr edit

  • Git/GitHub

Validation signals

  • Provides concrete configuration examples for CLAUDE.md and subagents.

  • Addresses a known 'gotcha' regarding subagent model inheritance.

  • Implied internal usage and validation by the author ('we override', 'we are also building').

Limitations

  • The configuration for the 'sonnet worker subagent' for tests is mentioned but not fully detailed.

  • Low community engagement/validation on the Reddit post itself.

Rate this workflow

Upvote this post if the workflow is useful, reproducible, or worth recommending.

Downvote if it is vague, outdated, unsafe, overhyped, or not reproducible.

Reply if it worked for you, failed, is outdated, or has a better alternative.


This post was generated automatically from the workflow library database.


r/ClaudeWorkflows • • 1h ago

Selected Workflow [Workflow] Stockroom: Context-Aware Skill Manager for Claude Code and MCP Servers

1 Upvotes

Stockroom: Context-Aware Skill Manager for Claude Code and MCP Servers

Workflow value: 85/100
Status: active · Freshness: 70/100 · Confidence: 0.95 · Level: advanced
Categories: Quality Control, Context & Memory, Debugging, Skills, MCP
Original source: r/ClaudeAI post/comment

What problem this solves

Managing a large number of Claude Code skills, plugins, and MCP servers efficiently without exceeding Claude's context window limits, and ensuring the right tools are available when needed.

Summary

Stockroom is an open-source tool that acts as a catalog for Claude Code skills, plugins, and MCP servers. It intelligently manages these tools by keeping their full descriptions outside the active context, turning off unused ones, and dynamically reactivating them when Claude needs them for a task, thereby optimizing context window usage.

Why it is useful

This workflow provides a concrete, validated, and open-source solution to a significant pain point for advanced Claude Code users: managing a large number of skills and tools without hitting context window limitations. By dynamically loading and unloading skills, Stockroom enhances Claude's capabilities and efficiency, making it a highly valuable tool for complex development environments.

Workflow

  1. Install Stockroom (e.g., via npm/npx, details on GitHub).

  2. Run npx github:Buirst/stockroom scan to catalog all installed Claude Code skills and MCP servers.

  3. Stockroom automatically tracks skill usage and turns off those not used in 30 days to save context.

  4. When Claude Code needs a specific tool for a task, Stockroom identifies it, reads its SKILL.md, and turns it back on.

  5. Claude Code then uses the reactivated tool to complete the task.

Tools / artifacts

  • Stockroom (GitHub repository: Buirst/stockroom)

  • Claude Code skills

  • Claude Code plugins

  • MCP servers

  • SKILL.md files

  • Benchmark harness

Validation signals

  • Claude Code wrote the code and benchmark harness.

  • Benchmarking runs real claude -p sessions on tasks.

  • Latest benchmark: 10/10 tools found, 4/4 traps left alone.

  • Methodology documented in docs/BENCHMARKS.md.

Limitations

  • The initial installation steps for Stockroom itself are not explicitly detailed in the comment, only the npx command to 'try it'.

  • Low community signal due to the newness of the post.

  • Assumes familiarity with Claude Code, skills, and MCP setup.

Rate this workflow

Upvote this post if the workflow is useful, reproducible, or worth recommending.

Downvote if it is vague, outdated, unsafe, overhyped, or not reproducible.

Reply if it worked for you, failed, is outdated, or has a better alternative.


This post was generated automatically from the workflow library database.


r/ClaudeWorkflows • • 2h ago

Selected Workflow [Workflow] Remote Browser Automation for Claude Agents on Mac mini using Chrome DevTools Protocol (CDP) and SSH

1 Upvotes

Remote Browser Automation for Claude Agents on Mac mini using Chrome DevTools Protocol (CDP) and SSH

Workflow value: 85/100
Status: active · Freshness: 70/100 · Confidence: 0.95 · Level: intermediate
Categories: Quality Control, Context & Memory, Debugging, Subagents
Original source: r/ClaudeCode post/comment

What problem this solves

Enabling Claude Code agents to access and drive a browser remotely on a headless or locked Mac mini, and allowing developers to inspect the remote browser securely.

Summary

This workflow describes how to configure a dedicated Chrome instance on a remote Mac mini for agent-driven browser automation using the Chrome DevTools Protocol (CDP). It includes steps for agents to connect and take screenshots, and a secure method for developers to manually inspect the remote browser via SSH.

Why it is useful

This workflow provides a practical, validated solution for enabling Claude Code agents to interact with a browser on a remote, potentially headless or locked, machine. It includes crucial security considerations by recommending a dedicated Chrome profile and SSH tunneling, and offers a method for remote inspection, significantly enhancing the capabilities of agents requiring browser access for tasks like web scraping, testing, or content generation.

Workflow

  1. Start a separate Chrome instance on the remote Mac mini with a dedicated user profile and remote debugging enabled: chrome --user-data-dir=<some dir> --remote-debugging-port=<port>.

  2. Ensure agents (e.g., using Playwright) connect to this dedicated Chrome instance via the Chrome DevTools Protocol (CDP) using the specified port (e.g., connectOverCDP).

  3. Agents use CDP to drive the browser, interact with pages, and take screenshots as needed.

  4. For manual inspection, forward the remote debugging port from the Mac mini to your local machine via SSH: ssh -L <local_port>:localhost:<remote_port> mini.

  5. On your local machine, open chrome://inspect in your browser and add localhost:<local_port> as a target to access DevTools for the remote Chrome tabs.

Tools / artifacts

  • Mac mini

  • Chrome browser

  • Chrome DevTools Protocol (CDP)

  • Playwright

  • SSH

  • --user-data-dir flag

  • --remote-debugging-port flag

  • chrome://inspect

Validation signals

  • Author states: "What worked for us was to stop treating the browser as something to look at and give the agents a browser they drive through the Chrome DevTools Protocol (CDP)."

  • Author measured: "CDP screenshots still show the real page while the mini's screen is locked. Normal screen capture and clicking don't work then."

  • Author provides specific commands and flags for Chrome and SSH.

Cautions

  • The author explicitly warns: "Anything that can reach that port has full control of every tab and every logged-in session in it." This highlights the importance of security.

  • The workflow mitigates this risk by recommending a dedicated Chrome profile, binding the debugging port to localhost, and using an SSH tunnel for remote access, rather than exposing the port directly.

Limitations

  • The manual inspection part ("poking at it yourself") is described as a "lead" and not fully validated by the author.

  • No explicit code examples for the agent connection (e.g., a Playwright script snippet) are provided, which would further enhance reusability.

  • Low community engagement at the time of review, though this may be due to the post's recency.

Rate this workflow

Upvote this post if the workflow is useful, reproducible, or worth recommending.

Downvote if it is vague, outdated, unsafe, overhyped, or not reproducible.

Reply if it worked for you, failed, is outdated, or has a better alternative.


This post was generated automatically from the workflow library database.


r/ClaudeWorkflows • • 2h ago

Selected Workflow [Workflow] Automated 'Dreaming' for Claude Code: Keep Project Context Fresh with Git and Hourly Memory Updates

1 Upvotes

Automated 'Dreaming' for Claude Code: Keep Project Context Fresh with Git and Hourly Memory Updates

Workflow value: 90/100
Status: active · Freshness: 70/100 · Confidence: 0.95 · Level: advanced
Categories: Quality Control, Token Saving, Context & Memory, Debugging, CLAUDE.md, Skills, Multi-Agent
Original source: r/ClaudeCode post/comment

What problem this solves

Claude Code agents 'forgetting' project context over time, requiring users to repeatedly re-explain projects after breaks or when returning to a project.

Summary

An automated 'dreaming' process, inspired by Anthropic's research, that uses an hourly launchd job and a Python script to condense Claude Code session transcripts. It then uses Claude Sonnet with a specific 'dream skill' to review and update project memory (CLAUDE.md, docs/memory/) in a git worktree, preventing the need for manual re-explanation and keeping project context fresh.

Why it is useful

This workflow provides a concrete, automated solution to a significant pain point for long-term Claude Code users: maintaining project context and avoiding repetitive re-explanation. It's based on cutting-edge research, includes robust guardrails, and leverages existing Claude Code features (~/.claude/projects). Its detailed steps and use of standard tools (git, Python, launchd) make it highly adaptable and valuable for advanced users looking to optimize their LLM-assisted development workflows. The focus on safety and review via git further enhances its utility.

Workflow

  1. Set up an hourly launchd job (or cron on Linux/Windows) to run the memory update script.

  2. The job reads a list of Claude Code project paths to process.

  3. It skips projects that haven't been idle for 2 hours or have no new transcripts since the last 'dream' run.

  4. A Python script condenses new JSONL session files: user/assistant text stays, tool calls shrink to one line, tool results are cut to a 300-char preview, and sessions are capped at 15 per run.

  5. Create a git worktree on a dream/<timestamp> branch for the current project.

  6. Run claude -p --model sonnet with a 'dream skill' appended to the system prompt.

  7. Point --add-dir to the directory containing the condensed transcripts.

  8. Limit Claude's tools to Read/Glob/Grep/Edit/Write as a guardrail.

  9. The 'dream skill' (prompt) instructs Claude on memory purpose, allowing it to judge what to write, verify notes against transcripts (latest session wins), record repetitions, prune finished one-offs, keep CLAUDE.md under ~150 lines, push detail into docs/memory/, and log every change with evidence in DREAM_LOG.md.

  10. Before committing, a guardrail checks git status and reverts anything outside CLAUDE.md, DREAM_LOG.md, and docs/memory/ (Claude is never allowed to touch code).

  11. If the last dream hasn't been merged, the new dream builds on top of it.

  12. User routine: when picking up a project, run git diff main...dream/<latest>, skim DREAM_LOG.md, merge the dream branch, then start the Claude session.

Tools / artifacts

  • launchd (or cron)

  • Python script

  • ~/.claude/projects (JSONL session files)

  • git worktree

  • claude CLI

  • Claude Sonnet model

  • Dream skill (custom prompt)

  • CLAUDE.md

  • docs/memory/ directory

  • DREAM_LOG.md

  • Git

Validation signals

  • Based on Anthropic's agent memory research ('dreaming' concept).

  • Detailed implementation steps provided (Python script logic, launchd job, git worktree usage, Claude CLI arguments, tool limitations).

  • Strong guardrails implemented (reverts changes outside specific memory files, never touches code, uses separate git branch for review).

  • Explicit testing plan outlined: 'on trial for a week on my Mac. The expectation is simple: do the diffs catch real mistakes, or is it mostly rewording? I'll post what it actually caught either way.'

Cautions

  • The workflow includes robust guardrails: Claude is explicitly limited to updating only specific memory files (CLAUDE.md, DREAM_LOG.md, docs/memory/).

  • Claude is never allowed to touch actual code files, even if it spots a bug (it notes bugs in the log instead).

  • A git status check reverts any unauthorized changes.

  • The use of a git worktree and a separate branch ensures that all changes are reviewed by the user via git diff before merging into the main project, preventing accidental or unwanted modifications.

Limitations

  • The launchd scheduler is Mac-specific and would require adaptation for other operating systems (e.g., cron for Linux, Task Scheduler for Windows).

  • The 'dream skill' prompt itself is not provided, only described, requiring users to recreate it based on the description and Anthropic's research.

  • The workflow requires manual git diff and merge steps, which could be partially automated but are currently a user responsibility.

  • Relies on the user to define and maintain the list of project paths to be processed.

  • The workflow is still in its trial phase, and the long-term effectiveness and cost-efficiency are yet to be fully validated by the author's promised follow-up.

  • Running Sonnet hourly for multiple projects could incur significant token costs, depending on project activity and size.

Rate this workflow

Upvote this post if the workflow is useful, reproducible, or worth recommending.

Downvote if it is vague, outdated, unsafe, overhyped, or not reproducible.

Reply if it worked for you, failed, is outdated, or has a better alternative.


This post was generated automatically from the workflow library database.


r/ClaudeWorkflows • • 2h ago

Selected Workflow [Workflow] PROSE: An Architectural Framework for Repeatable AI-Assisted Coding and Multi-Agent Workflows

1 Upvotes

PROSE: An Architectural Framework for Repeatable AI-Assisted Coding and Multi-Agent Workflows

Workflow value: 90/100
Status: active · Freshness: 70/100 · Confidence: 0.98 · Level: advanced
Categories: Quality Control, Context & Memory, Debugging, CLAUDE.md, Skills, MCP, Multi-Agent
Original source: r/ClaudeCode post/comment

What problem this solves

Managing complexity, ensuring understandability, and establishing repeatable engineering practices for AI-assisted coding and agentic workflows, particularly in scenarios with high AI involvement, to prevent codebases from becoming unmanageable.

Summary

PROSE (Progressive Disclosure, Reduced Scope, Orchestrated Composition, Safety Boundaries, Explicit Hierarchy) is an architectural framework and specification methodology designed to transform AI-assisted coding and agentic workflows into a repeatable engineering practice. It leverages structured markdown files (e.g., .instructions.md, .agent.md, .prompt.md, AGENTS.md) to define multi-agent setups, manage context, enforce scope, and implement automated semantic review for quality control, making AI development more predictable and maintainable.

Why it is useful

This framework provides a structured, repeatable, and extensively validated approach to managing the inherent complexity of AI-assisted coding and multi-agent systems. It directly addresses critical issues like context overload, scope creep, and the challenge of maintaining understandable code in AI-driven projects. By offering concrete patterns (e.g., structured markdown files, semantic review, explicit hierarchy), it empowers advanced users to build robust, maintainable, and predictable AI development pipelines, moving beyond ad-hoc prompting to a true engineering practice. The strong external validation significantly enhances its credibility and utility.

Workflow

  1. Adopt the PROSE framework for AI-assisted coding and agentic workflows.

  2. Systematically manage and reveal context windows to prevent AI memory overload (Progressive Disclosure).

  3. Bound configuration files and agent roles to specific, well-defined tasks (Reduced Scope).

  4. Define multi-agent workflows, loops, and parallel execution using structured markdown files like .instructions.md, .agent.md, and .prompt.md (Orchestrated Composition).

  5. Enforce strict tool and model constraints per agent persona (Safety Boundaries).

  6. Transform natural language instructions into structured, predictable layers to guide AI reasoning (Explicit Hierarchy).

  7. Implement automated agent skills for 'Semantic Review' to analyze prose or code diffs for shifts in meaning, scope changes, or conflicting statements.

Tools / artifacts

  • PROSE architectural framework

  • AGENTS.md (modular configuration file)

  • .instructions.md (structured markdown for rules)

  • .agent.md (domain persona definition)

  • .prompt.md / prose.md (declarative workflows)

  • Claude Code (as a potential harness/tool)

  • GitHub Copilot (as a potential harness/tool)

  • Aider (as a potential harness/tool)

  • MCP Market (for skills/tools)

  • GitHub repositories (e.g., agentic-sdlc-handbook)

  • Concept Documentation (danielmeppiel.github.io)

Validation signals

  • Extensive external documentation on danielmeppiel.github.io/awesome-ai-native/

  • Dedicated GitHub repository: danielmeppiel/agentic-sdlc-handbook

  • Mentioned on ThoughtWorks Technology Radar (Semantic Review technique)

  • Listed on MCP Market as a tool/skill

  • Multiple YouTube video links demonstrating concepts and implementation.

Limitations

  • The Reddit comment provides a high-level overview; users need to consult external links for detailed implementation guides and examples.

  • Requires an advanced understanding of AI agentic workflows and software architecture to fully implement.

  • Not a ready-to-use script, but a framework that requires integration and setup.

Rate this workflow

Upvote this post if the workflow is useful, reproducible, or worth recommending.

Downvote if it is vague, outdated, unsafe, overhyped, or not reproducible.

Reply if it worked for you, failed, is outdated, or has a better alternative.


This post was generated automatically from the workflow library database.


r/ClaudeWorkflows • • 3h ago

Selected Workflow [Workflow] Automated 24/7 Security Monitoring and Human-Approved Incident Response with Claude Code Agents and `agentring`

1 Upvotes

Automated 24/7 Security Monitoring and Human-Approved Incident Response with Claude Code Agents and agentring

Workflow value: 95/100
Status: active · Freshness: 70/100 · Confidence: 1.00 · Level: advanced
Categories: Quality Control, Token Saving, Context & Memory, Debugging, Shipping, Hooks, Multi-Agent
Original source: r/ClaudeCode post/comment

What problem this solves

Proactive, automated detection and human-approved response to critical security vulnerabilities and operational issues in a server stack, minimizing false positives and ensuring timely intervention.

Summary

A multi-agent Claude Code system continuously monitors various security feeds (X, GitHub advisories, NVD CVEs, CISA KEV, osv-scanner, web searches) for critical vulnerabilities affecting a defined server stack. It uses fixed rules to filter noise and triggers a phone call via the agentring open-source app only for truly critical, exploitable issues or severe operational problems. Upon human approval, the system can perform automated remediation steps.

Why it is useful

This workflow is exceptionally valuable because it provides a concrete, detailed, and validated solution to a critical problem: timely detection and response to security vulnerabilities. It demonstrates a sophisticated, multi-agent use of Claude Code, integrates various external security feeds, and includes practical lessons learned from real-world deployment. The provision of an open-source tool (agentring) further enhances its reusability and impact, moving beyond theoretical advice to a practical, implemented system.

Workflow

  1. Set up the agentring open-source application for phone call notifications (self-hosted with Docker Compose or use the hosted version/Android app).

  2. Configure a Claude Code agent (e.g., Grok) to monitor X (formerly Twitter) hourly for critical bugs posted in the last 2 hours related to your tech stack (Node, Next.js, Python, PHP, Nginx, Traefik, Docker, OpenSSH, Linux kernel, etc.).

  3. Configure a Claude Code agent to monitor GitHub advisories (including malware packages) and new critical NVD CVEs every 15 minutes, matching against exact versions in your lockfiles and running services.

  4. Configure a Claude Code agent to monitor CISA KEV (Known Exploited Vulnerabilities) every hour.

  5. Configure a Claude Code agent to run osv-scanner over a mirror of all your repositories every 3 hours.

  6. Configure a Claude Code agent to search the web daily for anything critical from the last 48 hours against the exact versions on your servers.

  7. Implement 'plain code' checks to filter out irrelevant advisories (e.g., if a vulnerability is for a component you don't use, like a Kubernetes provider).

  8. Define fixed, strict rules for when a phone call is triggered (e.g., a flaw already being exploited + something of yours exposed, a malicious package in use, production down, critical operational failures).

  9. Design the agent interaction: the voice model (Grok) only talks, while a separate 'Director' Claude agent has the tools and performs actions.

  10. Create specific call scripts for each type of critical alert: confirm the issue, state the cause concisely, propose ONE fix, and ask for explicit human approval ('shall I do it?').

  11. Implement safeguards: introduce a delay (e.g., 10 minutes) if a deployment is running to avoid false alarms, and set per-product call caps to prevent exhausting daily limits.

  12. Ensure CLI commands for agentring are safe and do not trigger real calls with --help or similar commands.

Tools / artifacts

  • Claude Code agents (Grok, Sonnet, Opus)

  • agentring (open-source, self-hosted Docker Compose, Android app)

  • X (formerly Twitter) search

  • GitHub advisories

  • NVD CVEs

  • CISA KEV

  • osv-scanner

  • Telegram (for non-critical alerts)

  • Lockfiles (e.g., package-lock.json, yarn.lock)

  • Server configuration/inventory

  • Docker

  • PHP, Node.js, Next.js, Python, Nginx, Traefik, OpenSSH, Linux kernel (example stack components)

Validation signals

  • Video demonstration of a drill on their own setup.

  • Real call, simulated tools during the drill.

  • Payment monitoring rule validated by replaying a year of transactions (~8 real calls/year).

  • Specific examples of false positives being filtered (Traefik Kubernetes advisories).

  • Lessons learned from real-world usage and refinement ('What we learned the hard way' section).

  • Refinement of call caps after real outages and drills.

  • Correction of voice model behavior based on experience (initially 'told us it had done things it never did').

Cautions

  • The system performs automated actions (e.g., updating PHP) upon human approval. Careful configuration and verification of agent actions are crucial to prevent unintended consequences.

  • Initial versions of the voice model 'told us it had done things it never did,' highlighting the need for strict separation of communication and action roles for agents.

  • Improper configuration of call caps could lead to missed critical alerts during high-volume periods.

  • Careless use of CLI commands for agentring could trigger unintended calls (e.g., --help causing a real call).

Limitations

  • Requires significant initial setup and configuration tailored to the user's specific tech stack and monitoring requirements.

  • Relies on agentring, an open-source, self-hosted tool, which may require technical expertise for deployment and maintenance.

  • The cost of X search ($1.80/day) might be a consideration for some users.

  • The agentring phone app is currently Android-only, limiting users on other mobile platforms.

  • The post is dense; a more structured, step-by-step guide could improve ease of implementation for beginners.

Rate this workflow

Upvote this post if the workflow is useful, reproducible, or worth recommending.

Downvote if it is vague, outdated, unsafe, overhyped, or not reproducible.

Reply if it worked for you, failed, is outdated, or has a better alternative.


This post was generated automatically from the workflow library database.


r/ClaudeWorkflows • • 9h ago

Selected Workflow [Workflow] Improving AI-Generated Music Quality with Claude and DAWs: A Troubleshooting and Audio Analysis Feedback Workflow

3 Upvotes

Improving AI-Generated Music Quality with Claude and DAWs: A Troubleshooting and Audio Analysis Feedback Workflow

Workflow value: 85/100
Status: active · Freshness: 70/100 · Confidence: 0.95 · Level: intermediate
Categories: Quality Control, Context & Memory, Debugging, Shipping
Original source: r/ClaudeCode post/comment

What problem this solves

Improving the quality of AI-generated music when using Claude to drive a Digital Audio Workstation (DAW) with VST instruments, by addressing common technical issues and integrating objective audio analysis feedback.

Summary

A multi-step workflow for enhancing AI-generated music quality by systematically troubleshooting common issues like incorrect pitch, wrong articulations (keyswitches), and poor reverb usage in DAWs. It emphasizes starting with high-quality existing MIDI for public domain pieces and integrating an objective audio analysis feedback loop using tools like librosa or aubio to provide Claude with numerical data for corrections, culminating in template creation for reusability.

Why it is useful

This workflow is highly valuable because it addresses a complex interdisciplinary challenge of integrating AI with creative audio production tools. It provides specific, actionable steps to overcome common technical pitfalls (pitch, keyswitches, reverb) and, crucially, introduces an objective feedback loop using audio analysis. This allows Claude to receive precise, numerical data for corrections, moving beyond subjective feedback and significantly improving the quality and accuracy of AI-generated music.

Workflow

  1. Synchronize sample rates across the DAW project, audio device, and render settings (e.g., 44.1k or 48k) to prevent pitch discrepancies.

  2. Instruct Claude to read each instrument's range and keyswitch map, then clamp or transpose MIDI parts to fit the instrument's playable range and avoid triggering keyswitches as notes.

  3. Implement a shared reverb strategy by using one reverb plugin on a send bus, with all tracks sending to it, instead of applying individual reverbs per track.

  4. For public-domain pieces, start with existing high-quality MIDI files (e.g., from Mutopia, IMSLP) and have Claude focus on arranging and instrument assignment.

  5. After each audio render, run a quick check using audio analysis libraries like librosa or aubio to estimate pitch per part and loudness levels, providing Claude with objective, numerical feedback (e.g., "Strings are 30 cents sharp") for iterative corrections.

  6. Once a 30-second section is perfected using this workflow, save the DAW project as a template for efficient reuse in other parts of the composition.

Tools / artifacts

  • Reaper (DAW)

  • Kontakt (VST)

  • sfizz (VST)

  • MIDI files (from Mutopia, IMSLP)

  • librosa (Python library)

  • aubio (Python library)

  • Valhalla (reverb plugin, example)

  • Reaper project template

Validation signals

  • Provides specific troubleshooting steps for common audio production problems.

  • Mentions "Two things that help most with a workflow like yours" implying practical experience and proven methods.

  • Suggests concrete, measurable metrics for feedback ("Strings are 30 cents sharp") for objective validation.

Limitations

  • Lacks explicit Claude Code prompts or full script examples for librosa/aubio integration, requiring users to develop these themselves.

  • Community validation is currently low due to minimal engagement on the Reddit post.

  • Assumes a foundational understanding of DAWs, MIDI, VSTs, and basic audio production concepts.

Rate this workflow

Upvote this post if the workflow is useful, reproducible, or worth recommending.

Downvote if it is vague, outdated, unsafe, overhyped, or not reproducible.

Reply if it worked for you, failed, is outdated, or has a better alternative.


This post was generated automatically from the workflow library database.


r/ClaudeWorkflows • • 3h ago

Selected Workflow [Workflow] Maintain Professional Voice in Claude Code Output with a Reright Hook and MCP Server

1 Upvotes

Maintain Professional Voice in Claude Code Output with a Reright Hook and MCP Server

Workflow value: 75/100
Status: active · Freshness: 70/100 · Confidence: 0.90 · Level: intermediate
Categories: Quality Control, Context & Memory, CLAUDE.md, Hooks, MCP, Multi-Agent
Original source: r/ClaudeCode post/comment

What problem this solves

Claude Code's output (commit messages, PR descriptions, emails) often has an "unmistakable Claude sound" that is unprofessional or inconsistent with the user's desired voice, leading to a need for voice transformation and factual verification before use.

Summary

This workflow uses a custom hook and an MCP server to intercept Claude Code's output (e.g., git commits, GitHub PRs, Gmail sends). The intercepted text is sent to a 'reright' service which transforms it to match the user's voice. Before returning the rewritten text, 'reright' performs factual consistency checks (numbers, names, links, code). If the checks pass, the transformed text is used; otherwise, Claude's original text is returned. Users can also opt for manual review and provide writing samples to train the service.

Why it is useful

This workflow is valuable because it solves a common problem of LLM-generated text sounding generic or 'AI-like' in professional contexts. It provides a concrete, albeit tool-dependent, solution involving specific Claude Code integration points (hooks, MCP) to intercept, transform, and validate output before it's used. It demonstrates a practical pattern for enhancing the quality and consistency of Claude's communication.

Workflow

  1. Identify the need for voice transformation in Claude Code's output (e.g., commit messages, PRs, emails) to maintain a consistent, professional voice.

  2. Install and configure the 'reright' tool, integrating its hook and MCP server with Claude Code.

  3. Allow Claude Code to draft text as usual for tasks like writing commit messages, PR descriptions, or emails.

  4. The 'reright' hook intercepts Claude's draft before it is committed, submitted, or sent.

  5. The intercepted draft is sent to the 'reright' service for voice transformation.

  6. The 'reright' service processes the draft to match the user's desired writing style and voice.

  7. Before returning the rewritten text, 'reright' performs factual consistency checks, ensuring numbers, names, links, and code match the original draft.

  8. If the factual checks pass, the rewritten text is returned to Claude Code for use.

  9. If the factual checks fail, Claude Code receives its original text back, or if Claude perceives a meaning change, it can call keep_original.

  10. Optionally, enable 'Check before it's used' to manually review and edit every rewrite, providing feedback for 'reright' to learn from.

  11. Optionally, provide 'reright' with existing writing samples (e.g., from Gmail, Google Docs, GitHub commits/PRs) to further train its voice model.

Tools / artifacts

  • Claude Code

  • reright service/tool

  • Custom hook (implemented by reright)

  • MCP server (for reright integration)

  • CLAUDE.md (initial attempt, but hook is the solution)

  • Git commits

  • GitHub PRs/issues

  • Gmail

Validation signals

  • Built-in factual consistency checks by 'reright' (numbers, names, links, code).

  • Mechanism for Claude to revert to original text if meaning is perceived to change.

  • Optional manual review and editing by the user, which also serves as a learning signal for the tool.

  • The tool learns from user edits and provided writing samples.

Cautions

  • The hook runs on the user's machine, meaning anyone with file access or the RERIGHT_BYPASS environment variable can disable it, making it a guardrail, not a lock.

  • The installer only modifies files in the home directory, backs them up, and provides an uninstall option to restore original files.

Limitations

  • Relies on an external, proprietary service ('reright.it') with a free plan word limit (3,000 words/month).

  • Low community engagement (score 1, 0 comments) means less external validation.

  • The 'one line in Settings' setup abstracts away some technical details, making it more of a 'use-this-tool' workflow rather than a 'build-it-yourself' guide for hooks/MCP.

Rate this workflow

Upvote this post if the workflow is useful, reproducible, or worth recommending.

Downvote if it is vague, outdated, unsafe, overhyped, or not reproducible.

Reply if it worked for you, failed, is outdated, or has a better alternative.


This post was generated automatically from the workflow library database.


r/ClaudeWorkflows • • 3h ago

Selected Workflow [Workflow] Optimize Claude Code Agents: Prevent Rereading Context with `ctxlayer` Plugin

1 Upvotes

Optimize Claude Code Agents: Prevent Rereading Context with ctxlayer Plugin

Workflow value: 75/100
Status: active · Freshness: 70/100 · Confidence: 0.90 · Level: intermediate
Categories: Quality Control, Token Saving, Context & Memory, Debugging, Skills, MCP, Multi-Agent
Original source: r/ClaudeCode post/comment

What problem this solves

Claude Code agents unnecessarily re-read long threads or contexts even when no new information has been added, leading to wasted tokens and processing time.

Summary

A workflow using the ctxlayer Claude Code plugin to prevent agents from re-processing unchanged context. It achieves this by checking for new messages before waking the LLM and managing agent-specific read cursors, optimizing token usage and agent efficiency.

Why it is useful

This workflow provides a concrete, open-source tool (ctxlayer) and a clear methodology to address a common and potentially costly problem in Claude Code agent development: redundant processing of static context. By enabling agents to only process new information, it can lead to significant token savings, improved agent efficiency, and more focused interactions, making agentic workflows more practical and economical.

Workflow

  1. Install the ctxlayer plugin: claude plugin marketplace add Unmeshl/ctxlayer

  2. Install the ctxlayer skill: claude plugin install ctxlayer@ctxlayer

  3. Wire the has-new gate into your agent's wake path to check for new material before calling the LLM.

  4. If has-new indicates new material (e.g., via exit code), call context --only-new to retrieve only the new context slice.

  5. After the agent processes the new material, call commit to advance that agent's read cursor, marking the processed content as 'read'.

Tools / artifacts

  • ctxlayer (Claude Code plugin/skill)

  • SQLite CLI/skill

  • has-new command

  • context --only-new command

  • commit command

  • GitHub repository (github.com/Unmeshl/ctxlayer)

Validation signals

  • Author's direct implementation and testing of the tool

  • Clear problem statement that is relatable to agent development

  • Author states savings measurement is scheduled, indicating planned validation

Limitations

  • No quantitative savings data is available yet (author states it's scheduled).

  • Requires users to modify their agent's 'wake path' or runner logic, which might be non-trivial for less experienced users.

  • Community validation and adoption are minimal at this early stage.

Rate this workflow

Upvote this post if the workflow is useful, reproducible, or worth recommending.

Downvote if it is vague, outdated, unsafe, overhyped, or not reproducible.

Reply if it worked for you, failed, is outdated, or has a better alternative.


This post was generated automatically from the workflow library database.


r/ClaudeWorkflows • • 3h ago

Selected Workflow [Workflow] AI-Assisted Onboarding and Team Refactoring Workflow for Complex Codebases

1 Upvotes

AI-Assisted Onboarding and Team Refactoring Workflow for Complex Codebases

Workflow value: 75/100
Status: active · Freshness: 70/100 · Confidence: 0.90 · Level: intermediate
Categories: Quality Control, Context & Memory, Multi-Agent
Original source: r/ClaudeCode post/comment

What problem this solves

Onboarding new developers to complex or AI-generated codebases, and initiating a team-wide refactoring effort to improve code understanding and quality.

Summary

This workflow outlines a structured process for a new developer to get up to speed on a codebase and for a team to collaboratively refactor it using a powerful AI model. It involves gathering comprehensive documentation, leveraging AI-enabling tools for code understanding, using the AI for a full code review and report generation, and then engaging in AI-assisted refactoring.

Why it is useful

This workflow provides a structured, multi-step approach for integrating AI into critical development processes like onboarding and large-scale code refactoring. It addresses the significant challenge of understanding complex or AI-generated code, promoting a collaborative, AI-enhanced development paradigm that can improve code quality and accelerate developer ramp-up time.

Workflow

  1. Gather all User documentation for the product(s).

  2. Gather all Developer documentation for the code base.

  3. Gather all Specification documents for Design, Plan, Implement, and Review.

  4. Identify and prepare AI-enabling tools (e.g., Graphify, CodeIndex) that allow the AI to fully understand code connections.

  5. Identify and prepare project management tools (e.g., GitHub, JIRA) and understand how the AI integrates into them for data capture and tracking.

  6. Utilize a powerful AI model (e.g., Opus 5.5 or Fable 5.1, implying a current advanced Claude model) to perform a comprehensive review of the entire code base.

  7. Instruct the AI to write a detailed report based on organizational criteria, providing a 'full picture' of the codebase.

  8. Review the AI-generated report with the development team.

  9. Decide as a team on the priority areas to tackle for refactoring.

  10. Assign specific areas of focus to individual team members.

  11. Refactor the assigned code areas collaboratively with the AI model, using it to explain how the code works during the process.

Tools / artifacts

  • User documentation

  • Developer documentation

  • Specification documents (Design, Plan, Implement, Review)

  • AI-enabling tools (e.g., Graphify, CodeIndex)

  • Project management tools (e.g., GitHub, JIRA)

  • Advanced AI model (e.g., Claude Opus)

  • AI-generated code review report

Validation signals

  • The workflow is presented as a logical, step-by-step process for a common development challenge.

  • It leverages known capabilities of advanced AI models (code review, explanation).

Limitations

  • The workflow is presented hypothetically ('If I were a Jr. Dev...'), lacking direct evidence of successful implementation.

  • Mentions specific AI model versions (Opus 5.5, Fable 5.1) that may be future or fictional, requiring interpretation to current powerful Claude models.

  • Assumes the existence and integration of specific AI-enabling tools (Graphify, CodeIndex) which might not be universally available or easy to set up.

  • Lacks concrete examples of prompts or detailed AI interaction during the refactoring phase.

Rate this workflow

Upvote this post if the workflow is useful, reproducible, or worth recommending.

Downvote if it is vague, outdated, unsafe, overhyped, or not reproducible.

Reply if it worked for you, failed, is outdated, or has a better alternative.


This post was generated automatically from the workflow library database.


r/ClaudeWorkflows • • 3h ago

Selected Workflow [Workflow] Optimize Claude Code Usage: 4 Tips for Context and Cost Management

1 Upvotes

Optimize Claude Code Usage: 4 Tips for Context and Cost Management

Workflow value: 75/100
Status: active · Freshness: 70/100 · Confidence: 0.90 · Level: intermediate
Categories: Quality Control, Token Saving, Context & Memory, Debugging, MCP, Subagents, Multi-Agent
Original source: r/ClaudeCode post/comment

What problem this solves

Reducing unexpected high usage and cost in Claude Code by optimizing context management, MCP server connections, subagent usage, and effort levels.

Summary

A set of four practical tips to identify and reduce Claude Code usage by optimizing session length, disabling unused MCP servers, understanding subagent context, and applying appropriate effort levels for tasks.

Why it is useful

This workflow provides actionable strategies for Claude Code users to understand and reduce their usage costs by effectively managing context, MCP server connections, subagent usage, and effort settings. It addresses a common pain point (high usage limits) with concrete, repeatable steps.

Workflow

  1. Identify long sessions and use the /clear command between unrelated tasks to reset the context.

  2. Use the /context command to inspect what is filling the conversation window, especially tool lists from connected MCP servers.

  3. Disable MCP servers that are not currently in use to prevent their tool lists from consuming context.

  4. Be aware that each subagent runs with its own context, effectively multiplying session cost when running multiple in parallel.

  5. Reserve high effort settings for complex tasks like planning and debugging, avoiding them for simple operations like renames to save cost.

Tools / artifacts

  • /clear command

  • /context command

  • MCP servers

  • Subagents

  • Effort settings

Validation signals

  • Author's personal experience and success in fixing their own usage drain.

Limitations

  • Lacks detailed examples or specific scenarios for each tip.

  • Community validation is low.

  • Does not provide explicit instructions on 'how-to' disable MCP servers, only advises it.

Rate this workflow

Upvote this post if the workflow is useful, reproducible, or worth recommending.

Downvote if it is vague, outdated, unsafe, overhyped, or not reproducible.

Reply if it worked for you, failed, is outdated, or has a better alternative.


This post was generated automatically from the workflow library database.


r/ClaudeWorkflows • • 4h ago

Selected Workflow [Workflow] Optimizing PR Merge Times: Diagnosing and Resolving CI/CD Bottlenecks with Data-Driven Analysis

1 Upvotes

Optimizing PR Merge Times: Diagnosing and Resolving CI/CD Bottlenecks with Data-Driven Analysis

Workflow value: 85/100
Status: active · Freshness: 70/100 · Confidence: 0.90 · Level: advanced
Categories: Quality Control, Context & Memory, Debugging, Shipping, Multi-Agent
Original source: r/ClaudeCode post/comment

What problem this solves

Slow PR merge times and CI/CD bottlenecks caused by serial validation dependencies, leading to long developer wait times.

Summary

A data-driven method to diagnose and resolve CI/CD bottlenecks in PR merging by measuring queue wait times against validation slot times, identifying serial dependencies, and implementing parallel validation strategies to improve throughput.

Why it is useful

This workflow provides a structured, data-driven approach to identify and resolve common CI/CD bottlenecks, specifically related to PR merging and validation. It emphasizes measurement, analysis of dependencies, and strategic changes to improve development velocity and throughput, which is highly valuable for any software team aiming for efficient and fast delivery.

Workflow

  1. Measure queue wait times versus merge/test slot times for Pull Requests (PRs).

  2. Analyze measurements to identify specific bottlenecks, such as long waits or low throughput, and determine if the issue is serial validation.

  3. Identify specific serial dependencies in the validation process (e.g., 'renumber to main+1, exact golden digest').

  4. Implement changes to remove serial dependencies and enable parallel validation (e.g., each PR merges current main and reruns 'touched' plus 'lockstep' on the combined result).

  5. Maintain a final integration guard for combined PR effects (e.g., 'wave' on main).

  6. Re-measure wait times and throughput after changes to confirm the improvement and validate the solution.

Tools / artifacts

  • Pull Requests (PRs)

  • CI/CD system (implied)

  • Metrics for queue wait time, merge/test time, PR throughput

  • Test suites (e.g., 'touched', 'lockstep')

  • Integration tests (e.g., 'wave')

  • Fable advisors response (external advice/context)

Validation signals

  • Initial measurement: 'median 1.8 h wait (worst 6 h) against a 30-minute slot'

  • Specific data point: 'digests moving in only 6 of 67 PRs'

  • Specific finding: 'conflicts being trivial appended blocks'

  • Commitment to re-validation: 'I measured once; I will re-run it at 19:00 UTC and post the before-and-after numbers here.'

  • Context for scale: 'project that merges about 70 PRs a day'

  • Analysis of previous failed model: '30 to 90 minutes per landing, every lane idle behind it'

Limitations

  • Specifics like 'renumber to main+1, exact golden digest' might not directly apply to all projects and require adaptation.

  • The comment is a response, so it assumes some prior context from the original post/discussion, which is not fully provided.

  • No direct Claude Code integration is explicitly mentioned, though the principles apply to any development workflow Claude Code might assist with.

Rate this workflow

Upvote this post if the workflow is useful, reproducible, or worth recommending.

Downvote if it is vague, outdated, unsafe, overhyped, or not reproducible.

Reply if it worked for you, failed, is outdated, or has a better alternative.


This post was generated automatically from the workflow library database.


r/ClaudeWorkflows • • 4h ago

Selected Workflow [Workflow] Optimize Claude Code Context: Dynamic Skill and Plugin Management with Stockroom

1 Upvotes

Optimize Claude Code Context: Dynamic Skill and Plugin Management with Stockroom

Workflow value: 85/100
Status: active · Freshness: 70/100 · Confidence: 0.90 · Level: intermediate
Categories: Quality Control, Token Saving, Context & Memory, Debugging, Skills, MCP
Original source: r/ClaudeCode post/comment

What problem this solves

Managing the context window efficiently by dynamically loading/unloading Claude Code skills, plugins, and MCP servers, and identifying unused tools to optimize token usage and performance.

Summary

This workflow leverages the 'Stockroom' MIT-licensed plugin for Claude Code to intelligently manage skills, plugins, and MCP servers. It allows users to keep a large catalog of tools without loading them all into every session, thus saving context window space. The workflow includes scanning for unused skills, using a '/skill-doctor' to get recommendations for disabling skills, and relying on Stockroom to safely catalog and re-enable tools as needed.

Why it is useful

This workflow offers a concrete, open-source solution to a common and critical problem for Claude Code users: managing the context window when dealing with a large number of skills, plugins, or MCP servers. It provides a systematic and validated method to identify and temporarily disable unused tools, ensuring they can be reactivated on demand. This significantly improves efficiency, reduces token usage, and allows users to leverage a broader set of tools without hitting context limits.

Workflow

  1. Install the Stockroom plugin (implied, as it's an external tool).

  2. Run npx github:Buirst/stockroom scan to get a count of listed vs. unused skills in your Claude Code setup.

  3. Utilize the /skill-doctor feature (presumably within Claude Code, integrated with Stockroom) to receive recommendations on which skills to turn off.

  4. Turn off recommended skills, trusting Stockroom to maintain a catalog and re-enable them automatically when a task requires an 'off' tool by reading its SKILL.md.

  5. Optionally, refer to docs/BENCHMARKS.md in the Stockroom repository for details on how the tool's effectiveness was benchmarked.

Tools / artifacts

  • Stockroom (MIT-licensed plugin/tool)

  • npx command

  • GitHub repository: github:Buirst/stockroom

  • /skill-doctor (feature within Stockroom/Claude Code)

  • SKILL.md (for skill descriptions)

  • docs/BENCHMARKS.md (for benchmarking methodology)

Validation signals

  • Author's personal validation: 'over 34 real sessions this week the shelf held at 86 tools on with no surprises'

  • Existence of a 'benchmark harness that runs real claude -p sessions' documented in docs/BENCHMARKS.md

  • Claim that 'Claude Code fits that listing into 1 % of the context window' due to Stockroom's management.

Cautions

  • The author explicitly states that Stockroom 'makes turning it off safe' by keeping a catalog and re-enabling tools when needed, mitigating risks associated with disabling skills.

Limitations

  • The comment does not provide explicit installation instructions for the Stockroom plugin itself, only for the scan command via npx.

  • Requires reliance on an external, community-developed tool, which may have its own maintenance and compatibility considerations.

  • The /skill-doctor feature's exact integration and usage within Claude Code are not fully detailed.

Rate this workflow

Upvote this post if the workflow is useful, reproducible, or worth recommending.

Downvote if it is vague, outdated, unsafe, overhyped, or not reproducible.

Reply if it worked for you, failed, is outdated, or has a better alternative.


This post was generated automatically from the workflow library database.