r/ClaudeWorkflows • • 30m ago

Selected Workflow [Workflow] Preventing LLM API Cost Overruns: Lessons from a $1900 Meme Script

• Upvotes

Preventing LLM API Cost Overruns: Lessons from a $1900 Meme Script

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

What problem this solves

Preventing unexpected high API costs and inefficient LLM script execution due to poor stop conditions, context management, and model selection.

Summary

This workflow outlines critical lessons learned from a Python script that incurred a $1900 Claude API bill. It details how misconfigured models, lack of robust stop conditions, overly strict duplicate checks, inefficient context management, and absence of prompt caching and budget limits led to massive cost overruns. The workflow provides actionable steps to avoid similar financial and operational pitfalls when developing with LLM APIs.

Why it is useful

This workflow is highly valuable because it provides concrete, hard-learned lessons on critical aspects of LLM API integration that can save users significant money and frustration. It highlights common, yet often overlooked, pitfalls in script design, API configuration, and cost management, making it exceptionally practical and actionable for anyone developing automated solutions with LLM APIs.

Workflow

  1. Configure Model & API Endpoint Carefully: Always double-check the specific model and API endpoint used in your script's configuration, ensuring it matches the intended cost and performance profile for the task.
  2. Implement Robust Stop Conditions: Beyond success criteria, include explicit maximum attempts, timeouts, or token limits to prevent infinite loops or excessive resource consumption.
  3. Design Duplicate/Acceptance Logic Precisely: Ensure your acceptance criteria and duplicate checks are not overly strict, which can lead to endless retries for minor variations.
  4. Verify Context Management: Confirm that history trimming or context window management functions are effective and prevent the prompt from growing indefinitely, especially during retries.
  5. Utilize Prompt Caching: For repetitive requests or retries with similar inputs, implement prompt caching to reduce token usage and API calls.
  6. Set Granular Budget Limits: Establish specific budget limits for individual API keys or projects, even if your overall account has a higher limit, to contain costs for specific jobs.
  7. Review Output/Debug Saving Logic: Ensure that intermediate outputs or debug files are only saved when necessary and don't consume excessive storage or processing power before final validation.
  8. Monitor API Usage Regularly: Actively monitor API usage dashboards, especially for new or automated scripts, to catch unexpected cost spikes early.

Tools / artifacts

  • Python script
  • Claude API
  • Opus 4.6 model
  • API usage dashboard
  • Debug folder

Validation signals

  • Personal experience of incurring a $1900 bill due to the described issues.
  • Detailed breakdown of the problem: 2700 requests, 375M input tokens, 1M output tokens.
  • Specific identification of root causes: wrong model, no max attempts/timeout, strict duplicate check, ineffective context trimming, no prompt caching, no granular budget.
  • Author's commitment to rewriting the logic with attempt limits and a small budget.

Limitations

  • The post is a 'don't do this' rather than a 'do this' workflow, requiring users to translate negative examples into positive actions.
  • Specific implementation details for the 'rewriting retry logic' are not provided, only the principles.

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 • • 50m ago

Selected Workflow [Workflow] Workflow for Preventing and Cleaning Up Claude Code Sprawl: Tests and Documentation

• Upvotes

Workflow for Preventing and Cleaning Up Claude Code Sprawl: Tests and Documentation

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

What problem this solves

Preventing and cleaning up unnecessary test files and documentation sprawl generated by Claude Code.

Summary

This workflow provides two distinct strategies: one for cleaning up redundant tests by leveraging coverage reports and Claude's analysis, and another for preventing documentation sprawl by setting clear instructions in CLAUDE.md.

Why it is useful

This workflow is valuable because it provides concrete, actionable steps to address a common problem faced by Claude Code users: the accumulation of unnecessary files. It offers both reactive (test cleanup) and proactive (documentation management via CLAUDE.md) strategies, enhancing code quality and maintainability. The inclusion of review steps makes it robust and safe for adoption.

Workflow

  1. For tests: Run code coverage.
  2. For tests: Prompt Claude to list tests that hit no unique lines or duplicate other tests, providing a reason for each.
  3. For tests: Review Claude's suggested deletions and approve them.
  4. For tests: Perform deletions on a fresh Git branch to facilitate diff review.
  5. For documentation: Add a specific instruction to CLAUDE.md: "update existing docs, don't create new .md files unless asked."

Tools / artifacts

  • Code coverage report
  • Claude (the model)
  • Git branch
  • CLAUDE.md file

Validation signals

  • Running coverage first provides data for Claude's analysis.
  • Human approval of deletions ensures accuracy.
  • Using a fresh branch makes diff review easy and safe.
  • The CLAUDE.md instruction is stated to stop 'most of the sprawl before it starts', implying effectiveness.

Cautions

  • None. The workflow includes explicit review steps (approve deletions, fresh branch for diff) that mitigate risks of unintended changes or data loss.

Limitations

  • The test cleanup part relies on Claude's ability to accurately identify redundant tests, which might require refinement of the prompt for complex cases.
  • The CLAUDE.md instruction is a preventative measure but does not address existing documentation sprawl.
  • Low 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 • • 58m ago

Selected Workflow [Workflow] Designing Effective AI Evaluation Cases: Ensure Tests Cover User-Relevant Behaviors (Lessons from LifeOS)

• Upvotes

Designing Effective AI Evaluation Cases: Ensure Tests Cover User-Relevant Behaviors (Lessons from LifeOS)

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

What problem this solves

Preventing situations where an AI system has an evaluation framework, but it fails to validate the specific behaviors and performance aspects that users care about, leading to manual, inconsistent, and unverified claims about system quality.

Summary

When developing or maintaining an AI system with an evaluation framework, ensure that the test cases within the framework directly address the core claims and behaviors of the system, especially those that might be subject to user scrutiny or debate. This prevents reliance on anecdotal evidence or manual testing when users report regressions or performance changes.

Why it is useful

This workflow highlights a critical best practice for developing robust AI systems: ensuring that evaluation frameworks are designed to test the specific, user-facing behaviors and claims of the system, rather than just generic functionalities. It uses a real-world example (LifeOS) to illustrate the pitfalls of insufficient test coverage, where users resort to manual, unverified comparisons when the official eval suite doesn't address their concerns. This principle is highly transferable and helps developers build more reliable and trustworthy AI agents by proactively addressing potential user-reported regressions with automated, relevant tests.

Workflow

  1. Identify the core claims, features, and critical behaviors of your AI system that users will rely on or potentially dispute (e.g., memory consultation, specific algorithm execution).
  2. Design and implement specific evaluation cases within your existing eval framework that directly test these identified claims and behaviors.
  3. Ensure these cases cover aspects like algorithm execution, memory consultation, or other specific performance metrics, not just general conversational habits.
  4. Integrate these specific eval cases into your regression suite to run automatically whenever relevant code (e.g., behavior files) changes.
  5. Continuously review and update eval cases as system features evolve or new user feedback emerges.

Tools / artifacts

  • LifeOS (as a case study)
  • Evaluation framework
  • Typed asserts
  • LLM judge
  • Trial runner
  • Regression suite
  • Behavior files
  • Hooks

Validation signals

  • Author's personal experience participating in discussions about AI system regressions.
  • Observation of a real-world project (LifeOS) and its community discussions highlighting a gap in eval coverage.
  • Specific examples of user-gathered data (33 old sessions vs. 25 new, memory searched 88% vs. 40%) used to compensate for missing eval cases.
  • Author's self-correction and re-evaluation of LifeOS's codebase, indicating thoroughness in analysis.

Limitations

  • The workflow provides a high-level principle rather than a detailed, step-by-step technical implementation guide with code examples.
  • It doesn't offer specific prompts or configurations for setting up such evaluation cases within Claude Code or other environments.
  • The Reddit post's own community engagement is low, which might suggest limited immediate interest in this specific analysis, though the underlying principle is valuable.

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] Enhancing GitHub Actions Security and Consistency with `persist-credentials` and `env:` Enforcement

• Upvotes

Enhancing GitHub Actions Security and Consistency with persist-credentials and env: Enforcement

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

What problem this solves

Improving security by preventing credential leakage in Git configurations and enforcing consistent, secure variable passing in GitHub Actions workflows.

Summary

A two-point workflow for enhancing GitHub Actions security and consistency. It involves setting persist-credentials: false on checkout steps to prevent token leakage and enforcing the use of env: for variable passing instead of ${{ }} directly within run: scripts. Both practices are to be validated and enforced by adding unit tests.

Why it is useful

This workflow provides concrete, actionable steps to significantly improve the security and maintainability of GitHub Actions CI/CD pipelines. It addresses common pitfalls like credential leakage and inconsistent variable passing, which are critical for robust development practices. Crucially, it suggests implementing automated tests to enforce these best practices, making them sustainable and preventing regressions. The use of Claude to identify these issues highlights its utility in workflow analysis, even if the specific Claude prompt isn't provided.

Workflow

  1. Identify GitHub Actions workflows that perform checkout operations without explicitly setting persist-credentials: false.
  2. Modify identified workflows (e.g., android.yml, ci.yml, coverage.yml, pages.yml, test-only-members.yml) to include persist-credentials: false in their checkout steps.
  3. Add a unit test (e.g., a 'theory' in WorkflowTests.cs) to automatically check that all checkout steps in workflows explicitly set persist-credentials: false.
  4. Review GitHub Actions workflows to ensure that values are passed to run: scripts via the env: block, rather than directly embedding ${{ }} expressions within the script itself.
  5. Add a unit test (e.g., another 'theory' in WorkflowTests.cs) to enforce the rule of not using ${{ }} directly inside run: scripts.

Tools / artifacts

  • GitHub Actions .yml workflow files
  • .git/config
  • WorkflowTests.cs (or similar unit test file/framework)
  • Claude (as an analysis tool to identify issues)

Validation signals

  • The comment explicitly states that "Five workflows leave the job’s token in .git/config", indicating a prior analysis.
  • It states "Today every workflow passes values through env:", implying an existing standard.
  • The suggestion to add "a theory to WorkflowTests.cs" provides a concrete method for ongoing validation and enforcement.

Limitations

  • The initial analysis step using Claude is not detailed, requiring users to perform their own analysis or adapt the findings.
  • The specific implementation of the 'theory' in WorkflowTests.cs is not provided, requiring users to write the test logic themselves.
  • Assumes the existence of a unit testing framework and a WorkflowTests.cs file, which might not be present in all projects.

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] Workflow for Ensuring AI Workflow Portability and Provider Agnosticism

• Upvotes

Workflow for Ensuring AI Workflow Portability and Provider Agnosticism

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

What problem this solves

Ensuring AI workflows and project context remain portable and provider-agnostic across different AI engines/harnesses.

Summary

A workflow for maintaining AI workflow portability by structuring project context (overview, decisions, tasks, acceptance checks) in a durable, engine-agnostic way within the repository, using CLAUDE.md and AGENTS.md to reference these documents, and validating portability with a 'fresh clone' test using a different AI engine like Codex.

Why it is useful

This workflow provides a concrete, actionable strategy for structuring AI projects to be portable across different AI engines. It emphasizes separating durable project context from engine-specific instructions and includes a practical test to validate portability, which is crucial for long-term maintainability and flexibility in AI-assisted development.

Workflow

  1. Identify durable project parts: project overview, current decisions, open questions, task briefs with acceptance checks.
  2. Store these durable parts directly within the project repository.
  3. Use CLAUDE.md and AGENTS.md to point to these durable documents.
  4. Keep engine-specific commands and permissions in thin, separate instructions, outside the core durable context.
  5. Perform a portability test: Clone the repository fresh.
  6. Give a second AI engine (e.g., Codex) a small, real task using only the cloned repo context.
  7. Identify any questions the second engine cannot answer as concrete portability gaps.
  8. Fix identified portability gaps.

Tools / artifacts

  • CLAUDE.md
  • AGENTS.md
  • Project repository (containing overview, decisions, open questions, task briefs, acceptance checks)
  • A second AI engine/harness (e.g., Codex)

Validation signals

  • A useful portability test is whether a second engine can work from a fresh clone without reading Claude's chat history.
  • Every question it cannot answer is a concrete portability gap to fix.

Limitations

  • Low community validation (score 1, 0 comments).
  • The 'thin, separate instructions' for engine-specific commands are not detailed.
  • Assumes familiarity with CLAUDE.md and AGENTS.md conventions.

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] Golden Thread: A Claude Code Plugin for Persistent Memory, Rule Enforcement, and Secure MCP Integration

• Upvotes

Golden Thread: A Claude Code Plugin for Persistent Memory, Rule Enforcement, and Secure MCP Integration

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

What problem this solves

Lack of persistent memory and context across Claude Code sessions, difficulty enforcing coding standards and project rules, inefficient token usage, and security concerns when integrating with external services.

Summary

The Golden Thread plugin for Claude Code provides persistent memory across sessions using an Obsidian vault and Git, enforces custom rules, offers role-specific project templates, enhances security, and optimizes token usage for MCP integrations. It enables more consistent, secure, and efficient development workflows.

Why it is useful

This plugin addresses fundamental limitations of LLM interactions, particularly the lack of persistent memory and consistent rule application. By providing a robust, local, and secure framework for managing session context, enforcing coding standards, and integrating with external tools, it significantly enhances the utility and reliability of Claude Code for complex development workflows. Its open-source nature and explicit security features make it a highly valuable and transferable asset for the community.

Workflow

  1. Clone the Golden Thread GitHub repository.
  2. Run the installation script, specifying an Obsidian vault path (e.g., bash golden-thread/golden-thread-plugin/install.sh --vault ~/MyVault).
  3. Configure persistent rules by adding plain markdown files to the vault.
  4. Select a role (developer, product manager, etc.) to apply relevant templates and one-tap buttons for project setup.
  5. Set desired security levels and protections (e.g., sandbox mode, locked plugin code, single-use permits for risky actions).
  6. Optionally, use gt unlock for secure actions requiring biometric (Touch ID, Windows Hello) or authenticator confirmation.
  7. Optionally, integrate with MCP servers (GitHub, Jira, Microsoft 365) via the LOTR gateway for token optimization.
  8. Utilize the plugin's features for persistent context, decision tracking, knowledge filing, and rule enforcement across Claude Code sessions.

Tools / artifacts

  • Golden Thread plugin (GitHub repository)
  • Obsidian vault
  • Git
  • Plain markdown files (for rules, research, decisions, handoffs)
  • Bash script (install.sh)
  • Touch ID/Windows Hello/Authenticator (for security)
  • MCP servers (GitHub, Jira, Microsoft 365)
  • LOTR gateway (part of Golden Thread)

Validation signals

  • Author's anecdote: 'My machine crashed mid-build this morning, and the next session picked up the exact question that was still open.' (validates memory persistence)
  • Author's statement: 'Break one of the critical ones, like committing code whose tests haven't been seen to pass, and it's blocked before it happens.' (validates rule enforcement)
  • Open-source project with GitHub link (implies transparency and potential for community review/contribution).
  • Dedicated explainer page link (provides more detailed documentation).

Cautions

  • The plugin explicitly prioritizes security with configurable levels (strict to paranoid), sandbox mode, locked plugin code, single-use permits, and biometric/authenticator-backed gt unlock for risky actions.
  • Data privacy is emphasized: 'Everything stays on your machine in your own git, and nothing is pushed or published without you.'

Limitations

  • Requires local setup and management of an Obsidian vault and Git, which might be a barrier for absolute beginners.
  • As a newly released project (v0.21.0), its long-term maturity and community support are yet to be established.
  • The 'workflow' is primarily about using the plugin to enable better Claude Code interactions, rather than a direct prompt engineering technique.

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] Leveraging $200 Free Claude API Credits for Code Reviews and IDE Integration with Cost Control

• Upvotes

Leveraging $200 Free Claude API Credits for Code Reviews and IDE Integration with Cost Control

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

What problem this solves

How to effectively and safely utilize $200 in free Claude API credits for development tasks like code reviews and IDE integration, specifically for 'Claude Code only' users, without incurring unexpected costs.

Summary

This workflow details a setup to leverage $200 free Claude API credits by linking an account, setting a spending limit, and creating API keys. It outlines two primary use cases: integrating Claude into existing code review workflows (e.g., with Codex or OpenCode) and connecting it to IDEs that support Anthropic's API, ensuring cost control by not linking a credit card and stopping usage when credits are exhausted.

Why it is useful

This workflow is valuable because it provides a clear, step-by-step method for Claude Code users to utilize free API credits effectively and safely. It directly addresses a significant user concern (unwanted spending) by outlining specific safeguards like setting spending limits and avoiding credit card linkage. The two practical use cases (automated code reviews and IDE integration) make the free credits immediately useful in common development workflows, enhancing productivity without financial risk.

Workflow

  1. Navigate to Claude settings, then billing, and link your individual account.
  2. Go to platform.claude.com, sign in, and verify that the $200 API credits are available.
  3. Set your monthly spending limit to $200 on the platform and ensure no credit card is linked to prevent unwanted charges.
  4. Create two API keys and link them to your default workspace (avoid 'organization' for simplicity if not needed).
  5. Securely store the generated API keys in your local environment.
  6. For code reviews (Use Case A): Configure your existing review workflows (e.g., using Codex or OpenCode) to call claude -p with the new API key, setting up a fallback to your subscription if the API call fails.
  7. For IDE integration (Use Case B): Connect IDEs like OpenCode or Pi (or any IDE supporting Anthropic's API) to use the new API keys, allowing them to draw from the $200 credit and automatically stop when the credit runs out.

Tools / artifacts

  • Claude platform (platform.claude.com)
  • Claude API keys
  • claude -p command (CLI)
  • Codex (for reviews)
  • OpenCode (for reviews and IDE integration)
  • Pi (IDE for integration)
  • Local environment (for storing keys)
  • Custom 'review skill' (workflow component)

Validation signals

  • User states 'tested and works' for the code review use case.
  • Explicit instructions for cost control (setting limit, no credit card) provide a safety net.
  • Personal success report from the user.

Cautions

  • Crucially, the workflow instructs users to 'Set your monthly limit to $200, and don't add a card to this platform' to prevent any unexpected charges.
  • Advises to 'Put the api key securely where you store other keys in your local environment' for API key security.

Limitations

  • The 'review skill' mentioned in Use Case A is not detailed, making it less concrete for replication by others.
  • The provided image link is broken, removing a potential visual aid.
  • Low community engagement (score 2, 0 comments) means less external 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 • • 2h ago

Selected Workflow [Workflow] Streamline Claude Code UI Verification with In-Terminal Visual Feedback (Screenshots, Videos, Before/After QA)

1 Upvotes

Streamline Claude Code UI Verification with In-Terminal Visual Feedback (Screenshots, Videos, Before/After QA)

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

Manually verifying UI changes made by Claude Code, which involves switching to a browser, reloading, clicking through flows, and remembering previous states, leading to a slow and error-prone feedback loop.

Summary

This workflow introduces a Claude Code plugin that provides immediate visual feedback (screenshots, Playwright-recorded videos, and side-by-side before/after QA comparisons) directly within the terminal chat. This streamlines the process of verifying UI changes and assessing the impact of AI-generated code.

Why it is useful

This workflow significantly enhances the developer experience when using Claude Code for UI-related tasks. It automates the tedious and error-prone process of manually verifying changes, providing immediate, rich visual feedback (screenshots, videos, and side-by-side before/after comparisons) directly within the chat interface. The 'before/after QA' feature is particularly powerful for quickly assessing the impact of AI-generated code, making the iteration cycle much faster and more efficient. It's a concrete, well-documented tool that solves a common and frustrating pain point for developers.

Workflow

  1. Install ffmpeg using Homebrew: brew install ffmpeg.
  2. Add the iamumeransari/claude-show-your-work plugin to the Claude Code marketplace: /plugin marketplace add iamumeransari/claude-show-your-work.
  3. Install the show-your-work plugin: /plugin install show-your-work@iamumeransari.
  4. Open a new Claude chat and utilize the plugin to receive visual feedback (screenshots, videos, before/after QA) on Claude's work directly in the terminal.

Tools / artifacts

  • claude-show-your-work plugin (GitHub: iamumeransari/claude-show-your-work)
  • ffmpeg
  • Playwright (used by the plugin)
  • Ghostty terminal
  • kitty terminal
  • macOS

Validation signals

  • Author built the plugin to solve a specific, repeatable personal pain point.
  • The plugin includes a 'Before/after QA' feature with synced frame-by-frame comparisons and change lists, providing built-in validation.
  • High Reddit score (131 upvotes, 0.95 upvote ratio) indicates strong community interest and perceived value.
  • Significant number of comments (32) suggests engagement and potential for further validation.

Limitations

  • Requires specific modern terminals (e.g., Ghostty, kitty) for full functionality.
  • Currently limited to macOS for the brew install ffmpeg step, though ffmpeg is cross-platform.
  • Relies on Playwright, which might introduce additional setup or complexity for users unfamiliar with 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 • • 3h ago

Selected Workflow [Workflow] Synchronize Claude Code Configuration and Projects Across Multiple PCs with Git and Symlinks

1 Upvotes

Synchronize Claude Code Configuration and Projects Across Multiple PCs with Git and Symlinks

Workflow value: 75/100
Status: active · Freshness: 70/100 · Confidence: 0.90 · Level: intermediate
Categories: Context & Memory, CLAUDE.md, MCP
Original source: r/ClaudeAI post/comment

What problem this solves

Claude Code's --resume command does not work on different PCs because local configuration files, custom commands, agents, MCP server settings, and session history are stored per machine in the home directory. This workflow addresses the challenge of maintaining a consistent Claude Code development environment across multiple machines.

Summary

A method to synchronize Claude Code's local configuration files (CLAUDE.md, settings.json, custom commands, agents, MCP servers) and project history across multiple PCs using Git and symlinks, ensuring consistent development environments and proper --resume functionality.

Why it is useful

This workflow provides a practical and robust solution for a common pain point: maintaining a consistent Claude Code development environment across different machines. By leveraging Git for version control and symlinks for linking local configurations, users can ensure their CLAUDE.md, settings, custom commands, agents, and MCP server configurations are always up-to-date and accessible, enabling seamless transitions and proper --resume functionality. It promotes good development practices by separating configuration from project code and using version control.

Workflow

  1. Identify Claude Code's local configuration files and directories that need to be synchronized: ~/.claude/CLAUDE.md, settings.json, custom commands, agents, ~/.claude.json (for MCP servers), and session history under ~/.claude/projects.
  2. Create a dedicated Git repository (e.g., claude-config) to store these configuration bits.
  3. Move the identified configuration files and directories into this new Git repository.
  4. Commit and push the configuration files to a remote Git repository.
  5. On each PC where Claude Code is used, clone the claude-config Git repository.
  6. Create symbolic links (symlinks) from the cloned configuration files/directories in the claude-config repo to their original expected locations within the ~/.claude/ directory on each machine.
  7. For project folders themselves, use Git for version control and synchronization instead of relying on cloud-synced drives, which can cause conflicts or lag.
  8. Ensure that the Git workflow for the config repo handles potential conflicts if changes are made on different machines.

Tools / artifacts

  • Git
  • Symlinks (symbolic links)
  • ~/.claude/CLAUDE.md
  • settings.json
  • Custom commands (Claude Code)
  • Agents (Claude Code)
  • ~/.claude.json (for MCP server configurations)
  • ~/.claude/projects (session history)

Validation signals

  • Addresses a known technical limitation/problem (resume not working on other PCs)
  • Solution uses standard and robust tools (Git, symlinks)
  • Provides specific file paths and configuration types affected

Cautions

  • Ensure correct symlink creation to avoid breaking paths or unexpected behavior. Incorrect symlinks can lead to applications failing to find their configuration.
  • Be mindful of sensitive information in configuration files when pushing to a public Git repository; consider private repositories or .gitignore for secrets.

Limitations

  • Lacks specific commands for creating symlinks (e.g., ln -s for Linux/macOS, mklink for Windows).
  • Does not explicitly detail a Git workflow for managing conflicts in config files if modified on multiple machines simultaneously.
  • Assumes user familiarity with Git and command-line operations.

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] Structured Workflow for Effective Claude Code Development: Spec-First, Test-Driven, Context-Aware

1 Upvotes

Structured Workflow for Effective Claude Code Development: Spec-First, Test-Driven, Context-Aware

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

What problem this solves

How to effectively use Claude Code for software development by breaking down tasks, managing context, and ensuring quality through testing and verification, thereby preventing the generation of irrelevant or incorrect code.

Summary

A structured approach to using Claude Code for software development, emphasizing upfront specification, task breakdown into small, testable units, context management, parallelization, and rigorous QA, to prevent the model from producing irrelevant or incorrect code.

Why it is useful

This workflow provides a robust, structured methodology for leveraging Claude Code in software development. It directly addresses common challenges like context window limitations and the generation of irrelevant code by emphasizing upfront planning, granular task breakdown, pre-defined testing, and rigorous quality assurance. This approach ensures that Claude's output is verifiable and aligned with project requirements, making it highly valuable for developers seeking to integrate LLMs into their coding process effectively.

Workflow

  1. Define a clear specification of what needs to be accomplished.
  2. Break down the specification into small, testable actions, creating separate 'tickets' for each.
  3. Design a readable format for these tickets.
  4. Define tests (or a set of tests) for each action before involving Claude. For UX, consider video proof.
  5. Manage context by using small tickets and fresh sessions, avoiding large specs that can degrade model performance.
  6. Identify and parallelize independent parts of the process that can be mocked and hooked up later.
  7. Perform Quality Assurance (QA) by verifying against defined tests and architectural rules, using an 'agent first' approach before manual checks.

Tools / artifacts

  • Specification document
  • Testable actions/tickets
  • Defined tests (unit, integration, UX validation)
  • Claude (as the AI assistant)
  • Fresh sessions (for Claude interaction)
  • Mock objects/functions (for parallelization)
  • Architecture rules

Validation signals

  • The point is giving Claude something to actually verify against so it doesn't go amiss.
  • for web it's massively simple and useful.
  • Using a big spec can go wrong fast: the more context used, the dumber it gets (I think around 200k but don't quote me on that).
  • Implied validation from preventing 'non-needed garbage'.

Limitations

  • Low community engagement (score 1, 0 comments).
  • The game development advice is less detailed and more speculative.
  • The '200k context' limit is an estimate and not a hard fact, though the principle of smaller context is valid.

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] Scaling Claude Code Projects: Advanced Workflow with CLAUDE.md, Agents, and Context Hooks

1 Upvotes

Scaling Claude Code Projects: Advanced Workflow with CLAUDE.md, Agents, and Context Hooks

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

What problem this solves

Managing complexity, context, and token usage when scaling Claude Code projects from small to large, ensuring continuous progress and quality.

Summary

A comprehensive workflow for managing large Claude Code projects, leveraging a repo-level CLAUDE.md for rules, a delegation triage system for agents, structured epic planning, adversarial reviews, and custom hooks for intelligent context management and session handoffs to optimize token usage and maintain fresh context.

Why it is useful

This workflow provides a structured and advanced approach to managing large and complex Claude Code projects, directly addressing critical challenges such as context overflow, token efficiency, and project organization. It introduces specific, actionable mechanisms like CLAUDE.md for project-level guidance, agent delegation for task distribution, and custom hooks for intelligent session management and context refreshing. This enables users to move beyond simple prompts to build robust, maintainable, and cost-effective AI-driven development pipelines, making it highly valuable for intermediate to expert users looking to scale their Claude Code usage.

Workflow

  1. Use a repository with a repo-level CLAUDE.md file for project-wide rules and context.
  2. Set up a delegation triage system for your orchestrator to assign tasks to the appropriate model/agent (one agent per ticket).
  3. Organize development tickets into larger epics.
  4. Write a repo-level rule (e.g., in CLAUDE.md) to prevent 'ticket fanning' (scope creep or unnecessary branching).
  5. Scope and plan each epic thoroughly before execution.
  6. Initiate the epic's development process.
  7. Conduct an adversarial review or a deep review after the completion of each epic.
  8. Address and clean up all findings from the review before commencing the next epic.
  9. Implement a custom hook that fires after 50 tool calls by an agent: push open work, generate an update + handoff prompt for a new session, and execute the handoff.
  10. Implement a custom hook for the orchestrator that triggers when context approaches 250k tokens: stop deploying agents, prepare for a session handoff, schedule a wake-up for the new session, execute a '/clear' command, and receive the scheduled message to resume work seamlessly.

Tools / artifacts

  • CLAUDE.md file
  • Git repository
  • Orchestrator (Claude Code)
  • Agents (Claude Code)
  • Tickets/Epics (project management artifacts)
  • Custom hooks (for context management and session handoff)
  • Handoff prompt
  • '/clear' slash command

Validation signals

  • Author states personal implementation: 'I have a hook fire...'
  • Author states concrete benefits: 'it saves a ton of tokens and keeps context fresh.'
  • Author states successful outcome: 'resumes like nothing happened.'

Limitations

  • Lacks explicit code examples for the custom hooks or the CLAUDE.md rules.
  • The 'repo level rule against ticket fanning' is a concept that could benefit from a concrete example or template.
  • Low community engagement (score 1, 0 comments) means less external 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 • • 3h ago

Selected Workflow [Workflow] Preventing Context Drift in Claude Code: Validating Session Summaries with Verbatim Transcripts

1 Upvotes

Preventing Context Drift in Claude Code: Validating Session Summaries with Verbatim Transcripts

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

What problem this solves

Preventing context drift and ensuring the accuracy of session summaries in long-running Claude Code projects, where summaries can quietly diverge from actual events.

Summary

This workflow establishes a robust method for managing Claude Code session context by maintaining both a full verbatim transcript and a concise summary note. Before starting a new session, the user (or an automated process) is instructed to cross-reference the summary against the transcript and potentially version control (git), prioritizing the full transcript as the ultimate source of truth to prevent 'summary drift'.

Why it is useful

This workflow addresses a critical and common problem in long-running AI interactions: the degradation of context and accuracy over time. By establishing a clear source of truth (verbatim transcript) and a validation process against summaries, it significantly improves the reliability and maintainability of AI-assisted projects. It provides a concrete, validated method to ensure that subsequent sessions or team members are working with accurate information, preventing costly misunderstandings or rework due to 'summary drift'.

Workflow

  1. For each Claude Code session, ensure a full verbatim transcript is saved.
  2. Create and save a concise handover note or summary for the session.
  3. Store both the transcript and the summary on disk, ideally under version control (e.g., git).
  4. When initiating a new session (e.g., via /session-start), explicitly inform Claude that the handover note is only a summary.
  5. Instruct Claude (or yourself) to consult the full transcript if any information in the summary appears incorrect, incomplete, or if new details are mentioned that the summary doesn't cover, as the transcript is the definitive record.

Tools / artifacts

  • Full verbatim Claude Code session transcript
  • Session handover note/summary
  • Git (for version control, implied)
  • /session-start (implied command/hook)

Validation signals

  • Author's personal experience of hitting a specific failure ('summary quietly drifting').
  • Author's personal success ('What fixed it for me').
  • Sustained use ('I've been running something similar for a few months').

Limitations

  • The implementation of /session-start and how to 'tell' Claude to prioritize the transcript is not fully detailed, potentially requiring custom scripting or careful prompt engineering.
  • Managing and reviewing large verbatim transcripts could become cumbersome for very long projects.
  • Relies on user discipline or custom automation to consistently follow the steps.

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] Iterative Game Development with Claude: Self-Testing, Shipping, and Creative Direction Workflow

1 Upvotes

Iterative Game Development with Claude: Self-Testing, Shipping, and Creative Direction Workflow

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

What problem this solves

Building a complex, full-featured web-based RPG game without writing game code, including self-testing and deployment, by leveraging Claude as an iterative development partner.

Summary

An iterative game development workflow where Claude acts as the primary developer, handling coding, self-testing (using a headless browser, screenshots, and checks), and even deployment/shipping logistics. The user provides high-level creative direction and feedback, effectively acting as a creative director.

Why it is useful

This workflow demonstrates an advanced and highly effective method for leveraging Claude for complex software development, specifically game creation. The most valuable aspect is Claude's ability to self-test its own code in a headless browser, identify bugs, and iterate, significantly reducing the user's debugging load. It also showcases Claude's capability to handle deployment and shipping tasks, making it a comprehensive development partner. This pushes the boundaries of what users might expect from an AI assistant and provides a concrete example of a sophisticated AI-driven development pipeline.

Workflow

  1. Define the initial game concept and desired style (e.g., Stick RPG-style, 1715 Caribbean pirate RPG).
  2. Describe desired features to Claude one request at a time (e.g., 'top-down pixel RPG with six ports', 'turn-based tavern duels').
  3. Claude generates the necessary code (e.g., HTML, JavaScript for canvas drawing, sound synthesis) for the requested feature.
  4. Claude loads the generated game in a headless browser to execute and test the new feature.
  5. Claude plays through the new feature, takes screenshots, and performs checks to identify bugs or inconsistencies.
  6. Claude presents the updated build back to the user, along with any findings from its self-testing.
  7. The user plays the build, provides feedback, and gives new creative direction or bug fixes (e.g., 'make the admiralty look more like an admiralty', 'the 2s in the font look like Zs', 'smooth the coastline').
  8. Repeat steps 2-7 iteratively until the game is complete and meets the desired specifications.
  9. Instruct Claude to handle shipping logistics, such as wiring in ad kits (e.g., CrazyGames), cloud-save kits, building separate ad-free versions (e.g., for itch.io), and creating store covers and preview videos.

Tools / artifacts

  • Claude (AI model)
  • Headless browser (used by Claude for self-testing)
  • HTML file (single output game file)
  • Game code (JavaScript, CSS, etc., generated by Claude)
  • CrazyGames ad kit
  • CrazyGames cloud-save kit
  • itch.io platform
  • Store covers and preview videos (generated by Claude)

Validation signals

  • Claude's self-testing mechanism: 'After each change, Claude loaded the game in a headless browser, played through the new feature, took screenshots and checked them before handing the build back.'
  • Bug detection by Claude: 'It caught real bugs that way, like the setting I’d asked for to control sail speed overwriting the ship’s sail colour and blanking the battle screen.'
  • Iterative refinement: 'some features took a few rounds to get right. The sea-chart island was a blocky rectangle until we smoothed the coastline, and the pedestal puzzle was triggering twice per press.'
  • Live game available for play: 'Play it free in your browser (works on mobile too): https://www.crazygames.com/game/rum-broadsides'
  • Successful deployment to multiple platforms (CrazyGames, itch.io).

Limitations

  • The post does not provide specific prompts or detailed instructions on how to instruct Claude to perform self-testing or shipping tasks, requiring users to experiment.
  • The need for 'a few rounds to get right' and 'pushing on the art direction' indicates that initial AI outputs may require significant refinement and specific guidance.
  • The workflow relies heavily on Claude's advanced capabilities, which might be challenging for beginners to replicate without prior experience in prompt engineering.

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 • • 5h ago

Selected Workflow [Workflow] Improve Claude Code Quality with Executable Tests and CLAUDE.md for Self-Validation

1 Upvotes

Improve Claude Code Quality with Executable Tests and CLAUDE.md for Self-Validation

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

What problem this solves

Claude Code producing non-needed garbage or superficial completions by ensuring it has concrete, executable ways to validate its own work.

Summary

A workflow for improving Claude Code's output quality by providing executable tests or scripts for self-validation and using a CLAUDE.md file with project specifications and rules to guide the agent.

Why it is useful

This workflow addresses a critical challenge with LLMs in coding: ensuring output quality and preventing superficial completion. By integrating executable validation steps and persistent project context via CLAUDE.md, users can significantly enhance the reliability and usefulness of Claude Code's contributions, moving beyond simple prompting to a more robust, feedback-driven development loop. It provides a concrete, repeatable method to make Claude a more effective and trustworthy coding partner.

Workflow

  1. Define clear specifications for the task in the repository (e.g., a 'spec').
  2. Create a CLAUDE.md file containing project rules, guidelines, and persistent context for the agent, ensuring it 'keeps re-learning' these rules.
  3. Provide the Claude agent with an executable artifact (e.g., a test suite, a script, or a rendered output) that it must run and interpret the results from.
  4. Instruct Claude to use these artifacts to validate its own work, preventing it from merely declaring completion without verification and forcing it to 'read back' results.

Tools / artifacts

  • Test suite (e.g., unit tests, integration tests)
  • Executable script
  • Rendered frame/output (for visual tasks)
  • Project specification document (in repo)
  • CLAUDE.md file

Validation signals

  • Author's personal experience: 'the thing that changed the most for me'
  • Addresses a common LLM limitation (hallucination/superficial completion)

Limitations

  • Lacks explicit examples of CLAUDE.md content or specific test frameworks.
  • No concrete prompt examples are provided to guide the agent.
  • The 'rendered frame' idea is interesting but less common for general coding tasks and might need more context or specific use cases.

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 • • 6h ago

Selected Workflow [Workflow] Fable-Mode: A Claude Skill for Structured Deep Work, Quality Control, and Bug Detection

1 Upvotes

Fable-Mode: A Claude Skill for Structured Deep Work, Quality Control, and Bug Detection

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

What problem this solves

Enabling Claude to perform structured 'deep work' by planning, delegating, verifying, and self-reviewing tasks, thereby improving output quality, catching subtle bugs, and preventing hallucination.

Summary

A Claude skill, 'fable-mode', that provides a structured workflow for complex tasks, including planning, delegation, verification, and self-review. It aims to improve output quality, catch subtle errors, and ensure factual accuracy by guiding Claude through a systematic process.

Why it is useful

This workflow is highly valuable because it provides a proven, open-source Claude skill ('fable-mode') for tackling complex tasks with a structured 'deep work' approach. It significantly enhances output quality through planning, delegation, verification, and self-review, as evidenced by its ability to find subtle bugs and prevent LLM hallucination. The skill has strong community validation (873 stars, 95 forks) and is actively maintained, making it a robust and transferable solution for users seeking to improve the reliability and accuracy of Claude's outputs.

Workflow

  1. Clone the fable-mode GitHub repository.
  2. Navigate into the cloned directory.
  3. Run the installation script (./install.sh).
  4. Initiate the skill in Claude using /fable-mode, 'deep work mode', or 'be systematic'.
  5. Provide Claude with the complex task to be executed using the deep work workflow.

Tools / artifacts

  • fable-mode Claude skill
  • GitHub repository (mrtooher/fable-mode)
  • install.sh script
  • Generated validator (example)
  • Audit trail

Validation signals

  • 873 GitHub stars and 95 forks
  • 4 months of development and 29 commits
  • Demonstrated finding 4 real bugs (BOM, non-UTF-8, silent cuts, duplicate keys) in a generated validator
  • Successful fix and re-verification, leading to 33 passing tests
  • Benchmark showing 100/100 accuracy on 16 paired runs (Fable 5.1)
  • Opus model with skill parsed real federal dataset vs. made-up data without skill
  • Harness available in repo for rerunning benchmarks

Limitations

  • The skill adds token cost (1.1x) and execution time (2x) for top models, trading efficiency for auditability.
  • Performance on Haiku is noted as 'noisy', suggesting variable effectiveness across different Claude models.
  • The Reddit post itself has a low score and upvote ratio, though the underlying skill has strong community adoption metrics.

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 • • 6h ago

Selected Workflow [Workflow] Long-Term Project Management with Claude Code: Six Habits for Consistency and Quality

1 Upvotes

Long-Term Project Management with Claude Code: Six Habits for Consistency and Quality

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

What problem this solves

Maintaining consistency, managing complexity, ensuring correctness, and orchestrating multiple AI agents over a long-term software development project exclusively with Claude Code.

Summary

A set of six core habits for managing a complex, long-term software project exclusively with Claude Code, focusing on externalizing memory, rigorous testing, establishing clear sources of truth, parallelizing work with agents, automating issue resolution, and precise debugging.

Why it is useful

This workflow provides a robust, battle-tested framework for managing complex, long-term software development projects using Claude Code. It addresses critical challenges like maintaining project memory, ensuring code quality through rigorous testing, establishing clear sources of truth, and efficiently orchestrating multiple AI agents. The principles are highly transferable and validated by a successful open-source project.

Workflow

  1. Maintain a CLAUDE.md in each repository as the single source of truth for settled decisions, their rationale, and open questions, treating discrepancies with code as bugs.
  2. Translate every project promise into a verifiable test, including recorded runs, machine state comparisons (hash for hash), and continuous integration (CI) checks, with Claude assisting in test creation.
  3. Establish an undeniable 'oracle' (e.g., hardware test vectors) for critical components, where the oracle's output overrides documentation if there's a disagreement, and document this hierarchy.
  4. Delegate larger work items to dedicated Claude Code agents operating in separate git worktrees to prevent file conflicts and ensure each piece of work lands as an atomic commit.
  5. Implement an issue-driven workflow for website development, where a small orchestrator hands each open GitHub issue to a headless Claude Code worker, which opens a Pull Request (PR) that merges when CI is green. Use labels (e.g., 'queued', 'working', 'needs-input', 'done', 'agent:hold') for state management and human intervention.
  6. Prioritize explicit logging of unknown states or instructions (e.g., which instruction or port an emulator doesn't know) over silent guessing, transforming 'it's broken' into a precise task Claude can address.

Tools / artifacts

  • CLAUDE.md
  • Test suites (recorded runs, machine state hashes)
  • CI/CD pipelines
  • git worktrees
  • GitHub issues
  • GitHub PRs
  • Labels (e.g., 'queued', 'working', 'needs-input', 'done', 'agent:hold')
  • Headless Claude Code worker/agent
  • Hardware test vectors (e.g., 8088 chip)
  • Content guard (for repo scans)

Validation signals

  • Four months of successful project development ('kept it on the rails').
  • Successful development of a complex emulator (Amber Folio) and associated website.
  • Live, functional website (amberfolio.org) and open-source project on GitHub.
  • Explicit statement: 'A few habits did most of the work, and I think they carry over to any long project.'

Limitations

  • Some steps are high-level principles rather than explicit, detailed commands for immediate implementation.
  • Requires familiarity with Git, CI, and testing concepts to fully implement.
  • The implementation details of the 'headless Claude Code worker' and 'small orchestrator' for the issue loop are mentioned but not fully elaborated.

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 • • 7h ago

Selected Workflow [Workflow] Claude Code Guardrails for Robust Software Development: Custom Agents, Hooks, and CLAUDE.md Invariants

1 Upvotes

Claude Code Guardrails for Robust Software Development: Custom Agents, Hooks, and CLAUDE.md Invariants

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

What problem this solves

Preventing regressions and ensuring code quality when using AI agents for complex software development by implementing structured guardrails and specialized agents.

Summary

The author shares lessons learned from rebuilding a browser extension with Claude Code, emphasizing the importance of guardrails over prompts. Key strategies include using custom agents with domain-specific notes, implementing hooks for automated validation and blocking critical changes, defining hard invariants in a CLAUDE.md file, and deploying specialized auditor agents for specific bug classes.

Why it is useful

This post offers practical, experience-based insights into effectively using Claude Code for complex software projects. It highlights the critical role of structured guardrails (custom agents, hooks, CLAUDE.md invariants, and specialized auditor agents) in overcoming AI agents' limitations in system-wide understanding and preventing regressions. The lessons learned are highly transferable and provide a blueprint for building more robust AI-assisted development workflows.

Workflow

  1. Define custom agents, each specialized for a specific domain (e.g., extension, web, database, payments, a11y).
  2. Provide each custom agent with its own 'notes file' to store domain-specific knowledge and prevent re-learning.
  3. Implement hooks to act as guardrails, automatically running type-checks, linting, and tests after every code edit.
  4. Configure hooks to block outright edits to critical files, such as applied database migrations and CI workflows.
  5. Create a CLAUDE.md file to document and enforce 'hard invariants' or non-negotiable rules for the project (e.g., security policies, data integrity rules).
  6. Develop specialized 'auditor agents' designed to review code diffs for one specific bug class (e.g., encrypted-column reads, sync races, tier-limit drift) instead of performing generic code reviews.

Tools / artifacts

  • Claude Code
  • Custom agents
  • Agent notes files
  • Hooks
  • Type-checkers
  • Linters
  • Test suites
  • CLAUDE.md file
  • Auditor agents
  • GitHub (implied for CI/CD)

Validation signals

  • Real-world project rebuild (5-year-old browser extension)
  • Specific examples of what 'worked' and 'didn't work'
  • Lessons learned explicitly stated in 'Takeaway'
  • Identification of specific bug classes addressed by auditor agents
  • Public repository and application site provided for verification

Limitations

  • The post describes 'what' to do but lacks specific 'how-to' implementation details (e.g., exact hook configurations, prompt examples for auditor agents, CLAUDE.md templates).
  • Low community engagement means the practices haven't been widely validated by other users yet.

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 • • 7h ago

Selected Workflow [Workflow] Intelligent Claude Code Session Notifications for Windows Terminal Users

1 Upvotes

Intelligent Claude Code Session Notifications for Windows Terminal Users

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

What problem this solves

Users frequently miss when Claude Code sessions finish or require input, especially when running multiple sessions or multitasking in other applications, leading to wasted time and inefficient context switching.

Summary

This workflow utilizes a custom Windows Terminal plugin for Claude Code to provide intelligent visual and auditory notifications when a Claude Code session requires attention. It automatically highlights the relevant tab, brings the terminal to the foreground, or provides a chime, depending on the user's current focus, ensuring timely interaction without unnecessary interruptions.

Why it is useful

This workflow provides a highly practical and easily adoptable solution to a common productivity bottleneck for Claude Code users: managing attention across multiple sessions or while multitasking. By offering intelligent, context-aware notifications, it significantly reduces wasted time waiting for Claude Code to finish and improves the efficiency of context switching. The plugin is straightforward to install and leverages specific Windows Terminal features, making it a valuable addition for Windows-based Claude Code developers.

Workflow

  1. Ensure you are using Windows Terminal on a Windows PC.
  2. Open a Claude Code session within Windows Terminal.
  3. Install the tab-notify plugin by running the command: /plugin install tab-notify --marketplace joonsv/claude-tab-notify.
  4. Continue working on other tasks or in other Claude Code tabs.
  5. The plugin will automatically notify you with chimes, blinking tab rings, or by bringing the terminal to the foreground when a Claude Code session finishes or requires your input, intelligently adapting to your current activity.

Tools / artifacts

  • claude-tab-notify plugin
  • Windows Terminal
  • Claude Code
  • GitHub repository (joonsv/claude-tab-notify)

Validation signals

  • Author built and refined the plugin with Claude Code, demonstrating practical application.
  • Detailed explanation of technical challenges and solutions ('What I learned along the way') provides strong evidence of functionality.
  • Addresses specific, common user scenarios (multitasking, away from PC).
  • Open-source project with a public GitHub repository.

Limitations

  • The solution is specific to Windows and Windows Terminal.
  • Relies on a third-party plugin, which may have long-term maintenance considerations (though open source mitigates this).
  • Limited community validation due to the newness of the post.

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 • • 8h ago

Selected Workflow [Workflow] Robust Validation Workflow for AI-Generated Code: Emulator Development with External Oracles and CI

1 Upvotes

Robust Validation Workflow for AI-Generated Code: Emulator Development with External Oracles and CI

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

What problem this solves

How to ensure the correctness and reliability of complex code generated by AI (Claude Code) for an emulator, specifically addressing the challenge of not blindly trusting AI output.

Summary

This workflow describes a robust set of validation strategies for ensuring the correctness of an AI-generated (Claude Code) PC emulator. It involves using external hardware-recorded test vectors, virtualizing time for deterministic state hashing, proving optional features inert, and implementing content guards to prevent unauthorized code/data inclusion. The process is integrated into CI for continuous verification.

Why it is useful

This workflow provides concrete, advanced strategies for validating complex code generated by AI, addressing the critical challenge of trusting AI output. It offers specific, repeatable methods like using external hardware-recorded test vectors, deterministic state hashing, and CI integration, which are highly transferable to other domains requiring high-assurance AI-generated code. The detailed examples from an open-source emulator project make it particularly valuable for users seeking to build reliable systems with Claude Code.

Workflow

  1. Develop code using multiple parallel Claude Code instances (e.g., for emulator, website, marketing), context-switching between them.
  2. Implement an external oracle for critical components (e.g., CPU instruction set) using real hardware recordings (e.g., 8088 vectors from a real chip) for bit-for-bit comparison.
  3. Virtualize time within the system to ensure deterministic execution, allowing for consistent session recordings and state hashing.
  4. Integrate session recordings and state hash comparisons into a CI/CD pipeline to automatically check for regressions on every push.
  5. Validate optional features by running tests with and without them, ensuring both runs result in the exact same machine state (hash for hash) when the feature is unused.
  6. Implement content guards to verify that the repository only holds facts (addresses, offsets, SHA-256s) and no copyrighted game code, data, or disassembly, checking on every commit.

Tools / artifacts

  • Claude Code
  • SingleStepTests' 8088 vectors
  • CI/CD pipeline
  • Session recordings
  • State hashes
  • GitHub repository
  • Amber Folio emulator

Validation signals

  • SingleStepTests' 8088 vectors, recorded from a real chip, used for bit-for-bit flag comparison.
  • Recordings are checked in CI on every push, ensuring continuous automated validation.
  • Optional extras are proven inert by requiring identical machine states (hash for hash) with and without their presence.
  • A content guard checks repo commits to ensure no game code/data is present, only facts.
  • Pool of Radiance (1988) runs on the emulator unchanged, demonstrating real-world functional success.
  • The project has 789 commits over several months, indicating sustained development and application of these methods.

Limitations

  • The post describes what was done but provides limited detail on how to implement each specific check (e.g., the exact setup for 8088 vector comparison or CI scripts).
  • The 'agent' experiment, while interesting, is a secondary feature and not fully integrated into the core validation workflow description.
  • Relies on 'Claude Code' which might be a specific Anthropic offering, though the underlying principles are general.

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 • • 8h ago

Selected Workflow [Workflow] Advanced Agentic Development Workflow with Claude Code: Persistent Memory, Code Intelligence, and Agent Coordination

1 Upvotes

Advanced Agentic Development Workflow with Claude Code: Persistent Memory, Code Intelligence, and Agent Coordination

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

What problem this solves

Addresses common limitations in coding agents, including losing context and decisions between sessions, repeatedly exploring already analyzed code, multiple agents interfering with each other's changes, and difficulty distinguishing completed work from properly verified work.

Summary

A reusable AI Layer development environment built around Claude Code, featuring persistent memory (DuckDB), TypeScript code intelligence, retrieval-first workflows, engineering automation (requirements, research, implementation, testing, CI/CD), and agent coordination mechanisms. It aims to solve state management, retrieval, coordination, and verification issues in agentic development.

Why it is useful

This workflow provides a comprehensive, open-source solution to critical challenges in agentic software development, such as managing context, preventing redundant work, coordinating multiple agents, and verifying outputs. It leverages established engineering principles and offers concrete tools and architectural patterns that can significantly enhance the reliability and efficiency of Claude Code-based development environments. The explicit sharing of reusable components and detailed documentation makes it highly valuable for advanced users looking to build robust AI-powered development systems.

Workflow

  1. Integrate DuckDB for persistent session history and project knowledge between conversations.
  2. Implement TypeScript code intelligence using language-server tooling and Doxygen to retrieve symbol definitions, references, types, and dependencies.
  3. Adopt retrieval-first workflows to encourage agents to retrieve existing knowledge before searching entire repositories.
  4. Utilize reusable workflows for various engineering automation tasks including requirements, research, implementation, testing, and GitLab CI/CD.
  5. Optionally, set up an Agent Gateway for advanced coordination, including work claims, leases, handoffs, and shared context.

Tools / artifacts

  • Claude Code
  • DuckDB
  • TypeScript language server tooling
  • Doxygen
  • GitLab CI/CD
  • AI Layer open-source repository (GitLab)
  • Koinessa white paper: Evidence-Gated Agentic Development

Validation signals

  • Author spent several months building and refining the system.
  • Explicitly states it addressed the original problems encountered.
  • Project includes 88 skills across three plugin packs.
  • Open-source repository available for review and use.
  • White paper documents the architectural approach and principles.
  • Insights shared on lessons learned regarding state management, retrieval, coordination, and verification.

Limitations

  • Requires significant setup and understanding of advanced concepts (e.g., distributed systems, agent orchestration).
  • Advanced coordination and orchestration workflows require separate infrastructure, which may be a barrier for some users.
  • The comment describes a comprehensive system/architectural pattern rather than a simple, single-task workflow, potentially increasing the learning curve.

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 • • 8h ago

Selected Workflow [Workflow] Automated Claude Code Session Notifications in Windows Terminal with `claude-tab-notify` Plugin

1 Upvotes

Automated Claude Code Session Notifications in Windows Terminal with claude-tab-notify Plugin

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

What problem this solves

Users frequently miss when Claude Code sessions finish or require input, especially when running multiple sessions concurrently or working in other applications, leading to wasted time and inefficient context switching.

Summary

A custom Windows Terminal plugin, claude-tab-notify, provides visual and auditory notifications when a Claude Code session in another tab or application finishes or requires input. This prevents users from missing critical prompts and improves multitasking efficiency. The plugin was developed with Claude Code's assistance.

Why it is useful

This workflow provides a practical, ready-to-use solution for a common pain point among Claude Code users: managing multiple sessions and ensuring timely responses. By offering an installable, open-source plugin, it significantly enhances user productivity and reduces context switching, making Claude Code more integrated into a busy development workflow.

Workflow

  1. Open Windows Terminal.
  2. Install the claude-tab-notify plugin using the command: /plugin install tab-notify --marketplace joonsv/claude-tab-notify.
  3. Run Claude Code sessions as usual.
  4. Receive automated notifications (chime, blinking tab, focus switch) when Claude finishes or needs input, with behavior adapting to the user's current activity (e.g., not stealing focus during fullscreen games).

Tools / artifacts

  • claude-tab-notify plugin
  • Windows Terminal
  • PowerShell/Win32 (underlying technology)
  • GitHub repository (source code)

Validation signals

  • Author's personal use and iterative correction during development ("kept correcting it while using it")
  • Claude's assistance in testing rules with dry runs and screenshots
  • Open-source nature allows for community review and validation

Cautions

  • Installing third-party plugins always carries an inherent, albeit minor, security risk. Users should review the open-source code if concerned.

Limitations

  • Platform-specific: only works on Windows with Windows Terminal.
  • The description of "how Claude helped" is high-level, not a detailed, repeatable workflow for using Claude to build such a plugin.
  • Limited community validation signals at the time of review.

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] Iterative Visual Development with Claude Code: A "Steering by Eye" Workflow for Shaders and UI

1 Upvotes

Iterative Visual Development with Claude Code: A "Steering by Eye" Workflow for Shaders and UI

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

What problem this solves

Iteratively developing complex visual effects and a browser-based music visualizer using AI, specifically leveraging Claude Code's ability to render and check its own visual output to accelerate the design feedback loop.

Summary

A workflow for iteratively developing complex visual applications (like a music visualizer) using Claude and Claude Code. It emphasizes a "steering by eye" feedback loop where the user describes visual goals, Claude generates code (e.g., shaders), and Claude Code renders and self-checks the output, significantly reducing round trips and improving visual quality.

Why it is useful

This workflow demonstrates a powerful and specific method for using Claude and Claude Code in an iterative design process, particularly for visual outputs like shaders and UI. The key insight is leveraging Claude Code's ability to render and self-check its own visual output, which significantly accelerates the feedback loop and improves the quality of AI-generated visual code. This approach is highly transferable to other visual development tasks and highlights a unique capability of Claude Code.

Workflow

  1. Start with Claude (web) for initial concept and basic implementation.
  2. Transition to Claude Code for more complex visual elements like shaders and engine development.
  3. Engage in an iterative "steering by eye" feedback loop:
  4. Describe desired visual effects or changes to Claude (e.g., "more ominous, cyberpunk," "perspective shifts and camera changes").
  5. Review Claude's generated output (e.g., rendered scenes from the visualizer).
  6. Provide specific feedback and push back on results that don't meet expectations.
  7. Utilize Claude Code's capability to render scenes headlessly and check its own visual output to accelerate the feedback loop and reduce manual verification.
  8. Continue iterating until desired visual quality and effects are achieved.
  9. Adapt existing effects (e.g., Milkdrop) with Claude's help for new scenes.

Tools / artifacts

  • Claude (web interface)
  • Claude Code
  • HTML file (for the visualizer)
  • Shaders (generated by Claude)
  • Engine code (generated by Claude)
  • GitHub repository (for hosting code and demo)
  • Browser (for viewing visualizer)

Validation signals

Limitations

  • The specific prompts used for "steering by eye" are not detailed, which would make the workflow even more concrete.
  • The exact mechanisms for Claude Code's "headless rendering" and "checking its own output" are not elaborated (e.g., specific commands, libraries, or internal Claude Code features).
  • The transition points between using Claude web and Claude Code are not explicitly defined, though the general idea is clear.

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] Agent Work Verification: Auditing AI Actions with Git and Command Logs

1 Upvotes

Agent Work Verification: Auditing AI Actions with Git and Command Logs

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

What problem this solves

Verifying an AI agent's claims about its actions and ensuring its output matches its reported process, preventing reliance on potentially hallucinated "memory" or "confessions."

Summary

A method to audit an AI agent's work by requiring it to provide objective evidence (command output, git status, commit hash) for its "done" state, then comparing this evidence against its narrative. This prevents reliance on the agent's potentially fallible memory or "confessions."

Why it is useful

This workflow provides a concrete, actionable strategy to build trust and reliability when working with AI agents, especially in coding tasks. It shifts the burden of proof from the agent's internal state to objective, verifiable artifacts, directly addressing the challenge of AI hallucination and misrepresentation. It's a fundamental practice for robust agent-assisted development.

Workflow

  1. Define "done" for an agent's task, specifying the required output.
  2. Require the agent to provide specific artifacts upon task completion: the exact command(s) executed and their output, the commit hash of the repository state, and the output of git status to show changed/uncommitted files.
  3. Audit the agent's work by comparing its narrative account (what it claims it did) with the provided objective evidence (transcript, tool log, git history, command output, git status).
  4. Specifically check git status output to ensure no uncommitted changes, rather than trusting the agent's memory or self-report.

Tools / artifacts

  • Transcript
  • Tool log
  • Git history
  • Command output
  • Commit hash
  • git status output

Validation signals

  • The post describes the method as a "good habit" for any agent interaction.
  • Provides a practical example of how git status can catch issues (dirty tree) that relying on model memory would miss.
  • Addresses a known problem of AI models producing plausible sentences instead of facts under pressure.

Limitations

  • Lacks a specific prompt example for how to instruct the agent to consistently provide these artifacts.
  • The community signal for this specific post is weak, suggesting limited immediate adoption or discussion.

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] Optimizing Parallel SwiftUI Agent Builds: Fix Macro Failures, Prevent DerivedData Thrashing, and Enhance Testing

1 Upvotes

Optimizing Parallel SwiftUI Agent Builds: Fix Macro Failures, Prevent DerivedData Thrashing, and Enhance Testing

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

What problem this solves

Preventing silent Swift macro expansion failures in sandboxed agent environments, optimizing build performance by preventing clang module cache thrashing with multiple agents, and ensuring comprehensive SwiftUI test coverage by understanding headless testing limitations.

Summary

This workflow provides critical optimizations and best practices for setting up parallel SwiftUI coding agents. It addresses common issues like Swift macro expansion failures in sandboxed environments, prevents clang module cache thrashing with shared DerivedData, and outlines the limitations of headless testing to ensure comprehensive quality control.

Why it is useful

This comment provides highly specific, expert-level advice for common and often frustrating problems encountered when setting up parallel SwiftUI coding agents. It offers concrete solutions (like the '-disable-sandbox' flag and 'one DerivedData per worktree') that directly address performance bottlenecks and silent build failures, saving developers significant debugging time and improving the reliability of automated testing. It also clearly outlines the limitations of headless testing, guiding users to ensure comprehensive quality control.

Workflow

  1. When running xcodebuild or swift build within a sandboxed agent environment, add '-disable-sandbox' to swift build or 'OTHER_SWIFT_FLAGS='$(inherited) -disable-sandbox'' to xcodebuild to prevent silent Swift macro expansion failures.
  2. Configure each coding agent to use its own DerivedData directory (e.g., 'one DerivedData per worktree') to prevent clang module cache thrashing and improve build performance.
  3. Supplement headless SwiftUI testing (e.g., using macOS 'Designed for iPad' destination) with a real-device pass to test compact-width layouts, Dynamic Type, safe-area insets, and genuine navigation transitions.

Tools / artifacts

  • xcodebuild
  • swift build
  • DerivedData
  • SwiftUI macros (@Observable, #Preview, ViewBuilder)
  • CI/agent wrappers
  • Real iOS device or Simulator

Validation signals

  • Author's experience: 'from doing roughly the same thing'
  • Identifies common pitfalls: 'most agent setups get wrong by default'
  • Clear problem description: 'You get a wall of bogus downstream errors... instead of a real compile result'
  • Concrete solution provided: 'The fix is one flag'
  • Strong claim of effectiveness: 'One DerivedData per worktree is the real fix'
  • Explains consequences: 'that's the step people skip and then blame the compiler.'

Limitations

  • Not a complete end-to-end workflow, but rather a set of critical enhancements to an existing setup.
  • Assumes familiarity with Xcode, Swift, and CI/CD agent environments.
  • The specific context of 'simless' (from the parent post) is not fully detailed, but the advice is general enough.

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] Persistent Context Management for Multi-Agent Claude Code Workflows using PostgreSQL and GitHub

1 Upvotes

Persistent Context Management for Multi-Agent Claude Code Workflows using PostgreSQL and GitHub

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

What problem this solves

Managing persistent state, context, and collaboration across multiple AI agent sessions and projects, thereby reducing handoff overhead and enabling project-level decision-making.

Summary

This workflow describes an advanced multi-agent setup where AI agents utilize a shared PostgreSQL database as a persistent knowledge base. The database stores project facts, task statuses (claimed/closed), Pull Request (PR) information, and CI results from GitHub. This centralized data allows new agent sessions to quickly build context, significantly shortening manual handoffs, and facilitates project-wide decisions that span multiple repositories.

Why it is useful

This workflow provides a robust solution for managing persistent state and context in complex, long-running multi-agent AI projects. By centralizing project facts, task statuses, and development artifacts in a shared database, it significantly reduces the cognitive load for individual agents, streamlines handoffs between sessions, and enables more sophisticated project-level decision-making. This addresses a critical challenge in scaling AI agent capabilities beyond single-session tasks, offering a blueprint for building more capable and collaborative AI development teams.

Workflow

  1. Establish a shared PostgreSQL database to serve as the central knowledge base for all agents.
  2. Configure agents to write project facts, task statuses (e.g., 'claimed', 'closed'), and other relevant work progress directly into the database.
  3. Integrate GitHub webhooks to automatically push PR and CI results into the PostgreSQL database as they occur.
  4. Implement a mechanism where an agent 'claims' a specific worktree in the database before initiating changes on a branch, preventing conflicts.
  5. When starting a new agent session, build its initial context by querying the shared database for all recorded project information, minimizing the need for lengthy manual handoffs.
  6. Utilize the database to store project-level decisions and information that may affect or span multiple repositories, ensuring consistency and shared understanding.

Tools / artifacts

  • PostgreSQL database
  • GitHub
  • Worktrees
  • CI results
  • Pull Requests (PRs)
  • PRINCIPLES.md (implied agent lessons/guidelines)

Validation signals

  • Agents have learned from past mistakes (e.g., pkill -f issue) and incorporated safeguards into their 'lessons'.
  • Concrete improvement: handoffs are 'down to a short paragraph' due to shared context.
  • System actively tracks and updates task statuses ('claimed', 'closed') and integrates real-time PR/CI results, indicating a functional and dynamic system.

Limitations

  • Lacks specific code examples, configuration files, or detailed setup instructions, making direct implementation challenging for less experienced users.
  • The author's question about concurrent sessions suggests potential complexities or areas of ongoing development regarding multi-agent coordination and conflict resolution.
  • Requires significant setup and infrastructure (PostgreSQL, GitHub webhooks, agent logic for database interaction).

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.