<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Jeffrey Hicks</title>
    <description>The latest articles on DEV Community by Jeffrey Hicks (@jrhicks).</description>
    <link>https://dev.to/jrhicks</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F971476%2Fc813f436-4d30-4070-9a4c-1d79d00efff1.jpeg</url>
      <title>DEV Community: Jeffrey Hicks</title>
      <link>https://dev.to/jrhicks</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jrhicks"/>
    <language>en</language>
    <item>
      <title>Claude Power User Training Document</title>
      <dc:creator>Jeffrey Hicks</dc:creator>
      <pubDate>Fri, 04 Jul 2025 13:42:41 +0000</pubDate>
      <link>https://dev.to/jrhicks/claude-power-user-training-document-1a54</link>
      <guid>https://dev.to/jrhicks/claude-power-user-training-document-1a54</guid>
      <description>&lt;p&gt;Based on Ray Fernando's extensive experience as a former Apple engineer and current AI-powered app developer, this comprehensive training document compiles his most valuable tips, tricks, and strategies for mastering Claude across all platforms and use cases - excluding hooks, which are covered separately.&lt;/p&gt;

&lt;h2&gt;
  
  
  Overview
&lt;/h2&gt;

&lt;p&gt;Ray Fernando, a 12-year Apple veteran turned AI entrepreneur, has developed sophisticated workflows for leveraging Claude's capabilities to build production applications, streamline development processes, and achieve what he calls "AI-generated freedom." His approach combines technical precision with entrepreneurial vision, making him one of the most innovative Claude power users in the ecosystem.&lt;/p&gt;

&lt;h2&gt;
  
  
  Core Prompting Mastery
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The Ultra Think Technique
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Ultra Think&lt;/strong&gt; is Ray's secret weapon for complex tasks and represents one of the most powerful undocumented features of Claude[1][2][3][4].&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What it does&lt;/strong&gt;: Activates Claude's extended thinking mode, providing up to 32,000 tokens of reasoning space - dramatically more than standard prompts[4].&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When to use it&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Complex analysis tasks requiring deep documentation review[1]&lt;/li&gt;
&lt;li&gt;Starting new chats where you want comprehensive context building[1]&lt;/li&gt;
&lt;li&gt;Tasks requiring adherence to complex rules or frameworks[1]&lt;/li&gt;
&lt;li&gt;Multi-step problem solving where accuracy is critical[4]&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;How to implement&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Use Ultra Think mode to analyze this documentation and help me understand how to implement X feature while following Y principles.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Ray's Ultra Think Strategy&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Use it strategically at conversation beginnings to establish comprehensive context[1]&lt;/li&gt;
&lt;li&gt;Combine with file uploads and documentation references[1]&lt;/li&gt;
&lt;li&gt;Allow for longer response times but expect significantly higher quality outputs[4]&lt;/li&gt;
&lt;li&gt;The thinking compounds across conversations, making subsequent interactions more effective[1]&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Advanced Prompting Patterns
&lt;/h3&gt;

&lt;h4&gt;
  
  
  The Planning Mode Workflow
&lt;/h4&gt;

&lt;p&gt;Ray frequently uses &lt;strong&gt;Shift + Tab&lt;/strong&gt; twice to enter Claude Code's planning mode, which allows for structured thinking before execution[2][3].&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Process&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Press Shift + Tab twice to activate planning mode&lt;/li&gt;
&lt;li&gt;Lay out your goals and requirements systematically&lt;/li&gt;
&lt;li&gt;Reference files and documentation&lt;/li&gt;
&lt;li&gt;Use Ultra Think for complex analysis&lt;/li&gt;
&lt;li&gt;Finalize the plan before executing&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Example Structure&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Planning Phase:
1. Goal: [Specific outcome you want to achieve]
2. Context: [Relevant files, documentation, constraints]
3. Process: [Step-by-step approach]
4. Success Criteria: [How you'll know it worked]

Ultra think through this plan and identify any potential issues before we proceed.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  The Iterative Refinement Method
&lt;/h4&gt;

&lt;p&gt;Ray demonstrates sophisticated feedback loops with Claude, treating it as a collaborative partner rather than a simple tool[1].&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Principles&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Provide specific, actionable feedback when Claude misunderstands&lt;/li&gt;
&lt;li&gt;Use questions to guide Claude toward better understanding&lt;/li&gt;
&lt;li&gt;Reference context and constraints clearly&lt;/li&gt;
&lt;li&gt;Maintain conversational flow while correcting course&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Example Correction Pattern&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;I just want to get a little more clarity because I actually don't have shell scripts. The optimization principles.md is actually a markdown file for an LLM to use to run an analysis on.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Context Management Strategies
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Documentation-Driven Development
&lt;/h4&gt;

&lt;p&gt;Ray maintains a &lt;strong&gt;documentation folder&lt;/strong&gt; in every repository that Claude can read, update, and organize[1].&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Structure&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/documentation
  ├── optimization-principles.md
  ├── design-guidelines.md
  ├── quick-reference-guide.md
  └── architecture-decisions.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Implementation Strategy&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Have Claude create initial documentation based on your requirements&lt;/li&gt;
&lt;li&gt;Use it as a reference for consistent code generation&lt;/li&gt;
&lt;li&gt;Update it iteratively as patterns emerge&lt;/li&gt;
&lt;li&gt;Reference it in prompts for maintaining consistency&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  The Lever Framework
&lt;/h4&gt;

&lt;p&gt;Ray's &lt;strong&gt;Lever Framework&lt;/strong&gt; is a decision tree for code optimization that he embeds into Claude's context[1].&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Framework&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;L&lt;/strong&gt;everage - Can existing code handle this requirement?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;E&lt;/strong&gt;xtend - Can we modify existing patterns?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;V&lt;/strong&gt;erify - Can we adapt current code?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;E&lt;/strong&gt;valuate - Can we create abstraction for it?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;R&lt;/strong&gt;efactor - Only create new code as last resort&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Platform-Specific Mastery
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Claude Code Optimization
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Essential Commands and Shortcuts
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Command Line Mastery&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude                    &lt;span class="c"&gt;# Start new session&lt;/span&gt;
claude &lt;span class="nt"&gt;--resume&lt;/span&gt;          &lt;span class="c"&gt;# Resume previous chat&lt;/span&gt;
claude &lt;span class="nt"&gt;-r&lt;/span&gt;               &lt;span class="c"&gt;# Resume (shortcut)&lt;/span&gt;
claude &lt;span class="nt"&gt;--ide&lt;/span&gt;            &lt;span class="c"&gt;# Connect to IDE&lt;/span&gt;
bunXCC usage            &lt;span class="c"&gt;# Check token usage and costs&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Productivity Shortcuts&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Ctrl + W&lt;/code&gt;: Delete words one by one (massive productivity boost)[1]&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Shift + Tab + Tab&lt;/code&gt;: Enter planning mode[3]&lt;/li&gt;
&lt;li&gt;Right-click → New Window: Pop out Claude Code for multi-monitor workflows[1]&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  IDE Integration Mastery
&lt;/h4&gt;

&lt;p&gt;Ray demonstrates sophisticated integration with Cursor that extends to all supported IDEs[1][5].&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Features Ray Leverages&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Selection Context&lt;/strong&gt;: Highlighted code automatically shared with Claude[6]&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Error Sharing&lt;/strong&gt;: Lint errors and syntax errors automatically passed to Claude[6]&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;File Reference Shortcuts&lt;/strong&gt;: Quick insertion of file references[5]&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Real-time Diagnostics&lt;/strong&gt;: IDE problems automatically shared with Claude[5]&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Power User Setup&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Configure Claude Code in your IDE settings&lt;/li&gt;
&lt;li&gt;Set up keyboard shortcuts for common operations&lt;/li&gt;
&lt;li&gt;Use the selection context feature for targeted questions&lt;/li&gt;
&lt;li&gt;Leverage automatic error sharing for debugging&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Claude Max Subscription Strategy
&lt;/h3&gt;

&lt;p&gt;Ray advocates for the &lt;strong&gt;$200/month Claude Max plan&lt;/strong&gt; as a game-changer for serious users[3][8].&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Ray Chose Max 20x&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Unlimited usage without hitting daily limits[1]&lt;/li&gt;
&lt;li&gt;Consistent access to Opus models[3]&lt;/li&gt;
&lt;li&gt;Cost-effective when doing heavy development work[3]&lt;/li&gt;
&lt;li&gt;Pays for itself within days for serious users[3]&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Usage Optimization&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Monitor costs with &lt;code&gt;bunXCC usage&lt;/code&gt; command[1]&lt;/li&gt;
&lt;li&gt;Strategic use of Opus vs Sonnet based on task complexity[3]&lt;/li&gt;
&lt;li&gt;Ultra Think mode becomes viable for frequent use[3]&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Workflow Integrations
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Voice-to-Text Mastery with Wispr Flow
&lt;/h3&gt;

&lt;p&gt;Ray extensively uses &lt;strong&gt;Wispr Flow&lt;/strong&gt; for voice dictation, considering it superior to built-in options[1][9][10].&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Wispr Flow&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Zero-edit rate accuracy[10]&lt;/li&gt;
&lt;li&gt;Context-aware transcription that understands what app you're using[10]&lt;/li&gt;
&lt;li&gt;Privacy-focused with no training on user data[1][9]&lt;/li&gt;
&lt;li&gt;Works across all applications seamlessly[11]&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Ray's Wispr Flow Setup&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Uses it for detailed prompts and complex instructions[11]&lt;/li&gt;
&lt;li&gt;Integrates with coding workflows for voice-driven development[11]&lt;/li&gt;
&lt;li&gt;Leverages command mode for text editing and refinement[10]&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Pro Tips&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Get Ray's referral link for $15 credit[9]&lt;/li&gt;
&lt;li&gt;Use whisper mode for quiet environments[10]&lt;/li&gt;
&lt;li&gt;Leverage multi-language support[10]&lt;/li&gt;
&lt;li&gt;Integrate with Claude workflows for voice-to-AI pipelines[11]&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Development Environment Optimization
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Cursor Rules and Configuration
&lt;/h4&gt;

&lt;p&gt;Ray maintains sophisticated Cursor rules that work alongside Claude[2].&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Configuration Strategy&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Project-specific .cursorrules files&lt;/li&gt;
&lt;li&gt;Design specification enforcement&lt;/li&gt;
&lt;li&gt;TypeScript and Next.js optimization rules&lt;/li&gt;
&lt;li&gt;Integration with Tailwind UI templates[14]&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Example Workflow with Templates&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Start with high-quality templates (Tailwind UI)[14]&lt;/li&gt;
&lt;li&gt;Use Claude to customize based on requirements[14]&lt;/li&gt;
&lt;li&gt;Apply consistent design systems[14]&lt;/li&gt;
&lt;li&gt;Maintain responsive design principles[14]&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Repository Organization
&lt;/h4&gt;

&lt;p&gt;Ray's approach to repository structure that maximizes Claude's effectiveness:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;project-root/
├── .claude/
│   ├── settings.json
│   └── optimization-principles.md
├── documentation/
│   ├── design-guidelines.md
│   ├── architecture.md
│   └── workflows.md
├── src/
└── README.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Advanced Optimization Principles
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The Optimization Gatekeeper System
&lt;/h3&gt;

&lt;p&gt;Ray's most sophisticated workflow involves creating systematic checks for code quality and consistency[1].&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Core Principles&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Leverage Existing Code&lt;/strong&gt;: Always check if existing code can handle new requirements&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pattern Recognition&lt;/strong&gt;: Identify and reuse established patterns&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Minimal Complexity&lt;/strong&gt;: Avoid creating new abstractions unless absolutely necessary&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Documentation-Driven&lt;/strong&gt;: Maintain living documentation that guides decisions&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Implementation Strategy&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create comprehensive optimization principles documentation&lt;/li&gt;
&lt;li&gt;Reference it in every significant Claude interaction&lt;/li&gt;
&lt;li&gt;Use it as a checklist for code review&lt;/li&gt;
&lt;li&gt;Update it based on lessons learned&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Productivity Multipliers
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The Compounding Effect
&lt;/h3&gt;

&lt;p&gt;Ray emphasizes how Claude usage compounds over time when done correctly[1].&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Strategies for Compounding&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Context Preservation&lt;/strong&gt;: Maintain conversation continuity&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Documentation Updates&lt;/strong&gt;: Keep living documentation current&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pattern Library&lt;/strong&gt;: Build reusable patterns and templates&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Workflow Refinement&lt;/strong&gt;: Continuously improve prompt patterns&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Cost Management and ROI
&lt;/h3&gt;

&lt;p&gt;Ray's approach to managing AI costs while maximizing output[3].&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cost Optimization Strategies&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Strategic model selection (Sonnet vs Opus)[3]&lt;/li&gt;
&lt;li&gt;Batch similar tasks together[3]&lt;/li&gt;
&lt;li&gt;Use Ultra Think strategically[3]&lt;/li&gt;
&lt;li&gt;Monitor usage with tracking tools[3]&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;ROI Maximization&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Automate repetitive tasks[3]&lt;/li&gt;
&lt;li&gt;Reduce development time significantly[3]&lt;/li&gt;
&lt;li&gt;Maintain high code quality[3]&lt;/li&gt;
&lt;li&gt;Enable rapid iteration and prototyping[3]&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Advanced Features and Capabilities
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Cross-Platform Synchronization
&lt;/h3&gt;

&lt;p&gt;Ray seamlessly works across different Claude platforms[1].&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Platform Strategy&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Claude.ai for planning and analysis&lt;/li&gt;
&lt;li&gt;Claude Code for implementation&lt;/li&gt;
&lt;li&gt;Mobile apps for quick questions&lt;/li&gt;
&lt;li&gt;API integration for custom workflows&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Community and Learning
&lt;/h3&gt;

&lt;p&gt;Ray actively builds community around AI-powered development[1].&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Community Building&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Daily livestreams for real-time learning[1]&lt;/li&gt;
&lt;li&gt;Member benefits and early access[1]&lt;/li&gt;
&lt;li&gt;Discord community for deeper engagement[2]&lt;/li&gt;
&lt;li&gt;Open-source sharing of tools and patterns[1]&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Troubleshooting and Best Practices
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Common Pitfalls to Avoid
&lt;/h3&gt;

&lt;p&gt;Based on Ray's extensive experience:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Over-reliance on Memory&lt;/strong&gt;: Always provide context in prompts&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Inconsistent Patterns&lt;/strong&gt;: Maintain style guides and documentation&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Poor Cost Management&lt;/strong&gt;: Monitor usage and optimize model selection&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lack of Iteration&lt;/strong&gt;: Treat Claude as a collaborative partner&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Performance Optimization
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Response Quality&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use Ultra Think for complex tasks[4]&lt;/li&gt;
&lt;li&gt;Provide comprehensive context[1]&lt;/li&gt;
&lt;li&gt;Break down complex requests[15]&lt;/li&gt;
&lt;li&gt;Iterate based on feedback[1]&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Speed Optimization&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Batch similar requests[1]&lt;/li&gt;
&lt;li&gt;Use appropriate model for task complexity[3]&lt;/li&gt;
&lt;li&gt;Maintain conversation context[1]&lt;/li&gt;
&lt;li&gt;Leverage planning mode for efficiency[3]&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Future-Proofing Your Claude Usage
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Staying Current
&lt;/h3&gt;

&lt;p&gt;Ray's approach to keeping up with rapid AI evolution[1].&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Continuous Learning Strategy&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Follow official Anthropic updates&lt;/li&gt;
&lt;li&gt;Experiment with new features immediately[1]&lt;/li&gt;
&lt;li&gt;Share knowledge with community[1]&lt;/li&gt;
&lt;li&gt;Document lessons learned[1]&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Building Sustainable Workflows
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Long-term Success Factors&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Documentation-First Approach&lt;/strong&gt;: Everything should be documented&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Community Engagement&lt;/strong&gt;: Learn from and teach others&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Experimentation&lt;/strong&gt;: Try new features and workflows&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cost Consciousness&lt;/strong&gt;: Sustainable usage patterns&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Ray Fernando's approach to Claude mastery goes far beyond simple prompt engineering. His methodology combines technical excellence with entrepreneurial vision, treating Claude as a true collaborative partner in building the future. By following these principles, documenting your processes, and continuously iterating on your workflows, you can achieve similar levels of productivity and innovation.&lt;/p&gt;

&lt;p&gt;The key insight from Ray's approach is that Claude becomes exponentially more powerful when you invest in proper setup, documentation, and systematic usage patterns. Whether you're building the next unicorn startup or simply trying to be more productive in your daily work, these battle-tested strategies will help you unlock Claude's full potential.&lt;/p&gt;

&lt;p&gt;Remember: the goal isn't just to use AI tools, but to use them strategically to create real value and achieve genuine freedom in your work and life.&lt;/p&gt;

&lt;p&gt;[1] &lt;a href="https://www.youtube.com/watch?v=fkQrySWqUa0" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=fkQrySWqUa0&lt;/a&gt;&lt;br&gt;
[2] &lt;a href="https://www.youtube.com/watch?v=W8Nls0UxEkQ" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=W8Nls0UxEkQ&lt;/a&gt;&lt;br&gt;
[3] &lt;a href="https://www.youtube.com/watch?v=t5Y60sfaANI" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=t5Y60sfaANI&lt;/a&gt;&lt;br&gt;
[4] &lt;a href="https://www.youtube.com/watch?v=Nk-TLquz9yE" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=Nk-TLquz9yE&lt;/a&gt;&lt;br&gt;
[5] &lt;a href="https://docs.anthropic.com/en/docs/claude-code/ide-integrations" rel="noopener noreferrer"&gt;https://docs.anthropic.com/en/docs/claude-code/ide-integrations&lt;/a&gt;&lt;br&gt;
[6] &lt;a href="https://www.youtube.com/watch?v=u-GGktUnSgg&amp;amp;vl=it" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=u-GGktUnSgg&amp;amp;vl=it&lt;/a&gt;&lt;br&gt;
[7] &lt;a href="https://www.youtube.com/watch?v=EvwFECYE5OY" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=EvwFECYE5OY&lt;/a&gt;&lt;br&gt;
[8] &lt;a href="https://support.anthropic.com/en/articles/11049744-how-much-does-the-max-plan-cost" rel="noopener noreferrer"&gt;https://support.anthropic.com/en/articles/11049744-how-much-does-the-max-plan-cost&lt;/a&gt;&lt;br&gt;
[9] &lt;a href="https://www.youtube.com/watch?v=SSE3yYjb_nk" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=SSE3yYjb_nk&lt;/a&gt;&lt;br&gt;
[10] &lt;a href="https://www.maketecheasier.com/wispr-flow-ai-voice-dictation-tool/" rel="noopener noreferrer"&gt;https://www.maketecheasier.com/wispr-flow-ai-voice-dictation-tool/&lt;/a&gt;&lt;br&gt;
[11] &lt;a href="https://zapier.com/blog/wispr-flow/" rel="noopener noreferrer"&gt;https://zapier.com/blog/wispr-flow/&lt;/a&gt;&lt;br&gt;
[12] &lt;a href="https://www.youtube.com/watch?v=vmlnmIHdHBk" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=vmlnmIHdHBk&lt;/a&gt;&lt;br&gt;
[13] &lt;a href="https://www.youtube.com/watch?v=o8abNnQ3Bv8" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=o8abNnQ3Bv8&lt;/a&gt;&lt;br&gt;
[14] &lt;a href="https://www.youtube.com/watch?v=l5ckpiyNJaA" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=l5ckpiyNJaA&lt;/a&gt;&lt;br&gt;
[15] &lt;a href="https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/chain-prompts" rel="noopener noreferrer"&gt;https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/chain-prompts&lt;/a&gt;&lt;br&gt;
[16] &lt;a href="https://www.youtube.com/watch?v=NLATKChLOv8" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=NLATKChLOv8&lt;/a&gt;&lt;br&gt;
[17] &lt;a href="https://www.youtube.com/watch?v=3geTTnWD0jc" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=3geTTnWD0jc&lt;/a&gt;&lt;br&gt;
[18] &lt;a href="https://twitter.com/RayFernando1337/status/1940437264607457379" rel="noopener noreferrer"&gt;https://twitter.com/RayFernando1337/status/1940437264607457379&lt;/a&gt;&lt;br&gt;
[19] &lt;a href="https://www.reddit.com/r/ClaudeAI/comments/1lqs8rh/found_this_wild_livestream_about_claude_codes/" rel="noopener noreferrer"&gt;https://www.reddit.com/r/ClaudeAI/comments/1lqs8rh/found_this_wild_livestream_about_claude_codes/&lt;/a&gt;&lt;br&gt;
[20] &lt;a href="https://www.youtube.com/watch?v=w4adKcC9yTk" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=w4adKcC9yTk&lt;/a&gt;&lt;br&gt;
[21] &lt;a href="https://x.com/RayFernando1337/with_replies?lang=tr" rel="noopener noreferrer"&gt;https://x.com/RayFernando1337/with_replies?lang=tr&lt;/a&gt;&lt;br&gt;
[22] &lt;a href="https://www.youtube.com/@RayFernando1337" rel="noopener noreferrer"&gt;https://www.youtube.com/@RayFernando1337&lt;/a&gt;&lt;br&gt;
[23] &lt;a href="https://www.linkedin.com/posts/ryancarson_claude-4-just-changed-the-coding-game-and-activity-7340772428710637571-FNWb" rel="noopener noreferrer"&gt;https://www.linkedin.com/posts/ryancarson_claude-4-just-changed-the-coding-game-and-activity-7340772428710637571-FNWb&lt;/a&gt;&lt;br&gt;
[24] &lt;a href="https://www.geeky-gadgets.com/claude-code-hooks-automation-tutorial/" rel="noopener noreferrer"&gt;https://www.geeky-gadgets.com/claude-code-hooks-automation-tutorial/&lt;/a&gt;&lt;br&gt;
[25] &lt;a href="https://www.rayfernando.ai/if-youre-coding-with-ai-in-2025-you-need-this-technique" rel="noopener noreferrer"&gt;https://www.rayfernando.ai/if-youre-coding-with-ai-in-2025-you-need-this-technique&lt;/a&gt;&lt;br&gt;
[26] &lt;a href="https://x.com/rayfernando1337" rel="noopener noreferrer"&gt;https://x.com/rayfernando1337&lt;/a&gt;&lt;br&gt;
[27] &lt;a href="https://twitter.com/rayfernando1337" rel="noopener noreferrer"&gt;https://twitter.com/rayfernando1337&lt;/a&gt;&lt;br&gt;
[28] &lt;a href="https://x.com/rayfernando1337?lang=en" rel="noopener noreferrer"&gt;https://x.com/rayfernando1337?lang=en&lt;/a&gt;&lt;br&gt;
[29] &lt;a href="https://www.thefuturai.net/p/writing-better-prompts-for-claude-ai" rel="noopener noreferrer"&gt;https://www.thefuturai.net/p/writing-better-prompts-for-claude-ai&lt;/a&gt;&lt;br&gt;
[30] &lt;a href="https://www.youtube.com/watch?v=13B4siGyY9Y" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=13B4siGyY9Y&lt;/a&gt;&lt;br&gt;
[31] &lt;a href="https://www.anthropic.com/ai-fluency/deep-dive-2-effective-prompting-techniques?field_format_value=3&amp;amp;programme_code=mfin" rel="noopener noreferrer"&gt;https://www.anthropic.com/ai-fluency/deep-dive-2-effective-prompting-techniques?field_format_value=3&amp;amp;programme_code=mfin&lt;/a&gt;&lt;br&gt;
[32] &lt;a href="https://static1.squarespace.com/static/5f1c94f0da02446a43383527/t/67d547c23654c55902ea8c87/1742030828144/The+Complete+Guide+To+Claude+AI.pdf" rel="noopener noreferrer"&gt;https://static1.squarespace.com/static/5f1c94f0da02446a43383527/t/67d547c23654c55902ea8c87/1742030828144/The+Complete+Guide+To+Claude+AI.pdf&lt;/a&gt;&lt;br&gt;
[33] &lt;a href="https://www.soup.io/chatgpt-and-claude-planned-my-week-i-got-more-done-slept-better-and-didnt-burn-out" rel="noopener noreferrer"&gt;https://www.soup.io/chatgpt-and-claude-planned-my-week-i-got-more-done-slept-better-and-didnt-burn-out&lt;/a&gt;&lt;br&gt;
[34] &lt;a href="https://cdn.prod.website-files.com/623952e7f678f73f3096fd25/67054dc0dd444df2a5ee710d_Best%20Practices%20for%20Prompt%20Engineering%20Oct-2024.pdf" rel="noopener noreferrer"&gt;https://cdn.prod.website-files.com/623952e7f678f73f3096fd25/67054dc0dd444df2a5ee710d_Best%20Practices%20for%20Prompt%20Engineering%20Oct-2024.pdf&lt;/a&gt;&lt;br&gt;
[35] &lt;a href="https://learn.filtered.com/hubfs/Definitive%20100%20Most%20Useful%20Productivity%20Hacks.pdf" rel="noopener noreferrer"&gt;https://learn.filtered.com/hubfs/Definitive%20100%20Most%20Useful%20Productivity%20Hacks.pdf&lt;/a&gt;&lt;br&gt;
[36] &lt;a href="https://www.youtube.com/@RayFernando1337/streams" rel="noopener noreferrer"&gt;https://www.youtube.com/@RayFernando1337/streams&lt;/a&gt;&lt;br&gt;
[37] &lt;a href="https://www.linkedin.com/posts/claudeerepmoc_productivityhacks-personalgrowth-worklifebalance-activity-7280893074484936705-5Iom" rel="noopener noreferrer"&gt;https://www.linkedin.com/posts/claudeerepmoc_productivityhacks-personalgrowth-worklifebalance-activity-7280893074484936705-5Iom&lt;/a&gt;&lt;br&gt;
[38] &lt;a href="https://ray.so/presets/preset/anthropic-claude-prompt" rel="noopener noreferrer"&gt;https://ray.so/presets/preset/anthropic-claude-prompt&lt;/a&gt;&lt;br&gt;
[39] &lt;a href="https://x.com/RayFernando1337/status/1899008614830158334" rel="noopener noreferrer"&gt;https://x.com/RayFernando1337/status/1899008614830158334&lt;/a&gt;&lt;br&gt;
[40] &lt;a href="https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/multishot-prompting" rel="noopener noreferrer"&gt;https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/multishot-prompting&lt;/a&gt;&lt;br&gt;
[41] &lt;a href="https://www.youtube.com/watch?v=z-O5rX7Fpeo" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=z-O5rX7Fpeo&lt;/a&gt;&lt;br&gt;
[42] &lt;a href="https://www.youtube.com/watch?v=vPpb_0Ie-QU" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=vPpb_0Ie-QU&lt;/a&gt;&lt;br&gt;
[43] &lt;a href="https://www.anthropic.com/claude-explains/optimize-code-efficiency-quickly-with-claude" rel="noopener noreferrer"&gt;https://www.anthropic.com/claude-explains/optimize-code-efficiency-quickly-with-claude&lt;/a&gt;&lt;br&gt;
[44] &lt;a href="https://www.youtube.com/watch?v=tb2HGuJ6Wnk" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=tb2HGuJ6Wnk&lt;/a&gt;&lt;br&gt;
[45] &lt;a href="https://github.com/officialerictm/claude-efficient-coding" rel="noopener noreferrer"&gt;https://github.com/officialerictm/claude-efficient-coding&lt;/a&gt;&lt;br&gt;
[46] &lt;a href="https://www.youtube.com/watch?v=lCbhobY6pKI" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=lCbhobY6pKI&lt;/a&gt;&lt;br&gt;
[47] &lt;a href="https://github.com/Garry-TI/claude-dev-rag" rel="noopener noreferrer"&gt;https://github.com/Garry-TI/claude-dev-rag&lt;/a&gt;&lt;br&gt;
[48] &lt;a href="https://dev.to/3a5abi/how-to-optimize-your-code-for-better-performance-and-scalability-1b1n"&gt;https://dev.to/3a5abi/how-to-optimize-your-code-for-better-performance-and-scalability-1b1n&lt;/a&gt;&lt;br&gt;
[49] &lt;a href="https://www.youtube.com/watch?v=ubWQx8ev4Rw" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=ubWQx8ev4Rw&lt;/a&gt;&lt;br&gt;
[50] &lt;a href="https://www.youtube.com/watch?v=CG-USxkH_Ho" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=CG-USxkH_Ho&lt;/a&gt;&lt;br&gt;
[51] &lt;a href="https://www.linkedin.com/posts/provencher_ai-coding-app-crushes-60m-tool-cursor-killer-activity-7253194477492752384-3rbu" rel="noopener noreferrer"&gt;https://www.linkedin.com/posts/provencher_ai-coding-app-crushes-60m-tool-cursor-killer-activity-7253194477492752384-3rbu&lt;/a&gt;&lt;br&gt;
[52] &lt;a href="https://www.youtube.com/watch?v=Qvy-liodZtA" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=Qvy-liodZtA&lt;/a&gt;&lt;br&gt;
[53] &lt;a href="https://support.anthropic.com/en/articles/11049752-how-do-i-sign-up-for-the-max-plan" rel="noopener noreferrer"&gt;https://support.anthropic.com/en/articles/11049752-how-do-i-sign-up-for-the-max-plan&lt;/a&gt;&lt;br&gt;
[54] &lt;a href="https://web.stanford.edu/group/sisl/k12/optimization/MO-unit5-pdfs/5.8Pareto.pdf" rel="noopener noreferrer"&gt;https://web.stanford.edu/group/sisl/k12/optimization/MO-unit5-pdfs/5.8Pareto.pdf&lt;/a&gt;&lt;br&gt;
[55] &lt;a href="https://pubs.acs.org/doi/10.1021/acs.iecr.6b03453" rel="noopener noreferrer"&gt;https://pubs.acs.org/doi/10.1021/acs.iecr.6b03453&lt;/a&gt;&lt;br&gt;
[56] &lt;a href="https://www.youtube.com/playlist?list=PLFg9suyZ1OnIKYyoCbAGBaFB-QOAk1nSq" rel="noopener noreferrer"&gt;https://www.youtube.com/playlist?list=PLFg9suyZ1OnIKYyoCbAGBaFB-QOAk1nSq&lt;/a&gt;&lt;br&gt;
[57] &lt;a href="https://optimization-online.org/wp-content/uploads/2018/08/6773.pdf" rel="noopener noreferrer"&gt;https://optimization-online.org/wp-content/uploads/2018/08/6773.pdf&lt;/a&gt;&lt;br&gt;
[58] &lt;a href="https://ggsel.net/en/catalog/product/5245994" rel="noopener noreferrer"&gt;https://ggsel.net/en/catalog/product/5245994&lt;/a&gt;&lt;br&gt;
[59] &lt;a href="https://www.youtube.com/watch?v=DnIuu3SfP8k" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=DnIuu3SfP8k&lt;/a&gt;&lt;br&gt;
[60] &lt;a href="https://github.com/RayFernando1337" rel="noopener noreferrer"&gt;https://github.com/RayFernando1337&lt;/a&gt;&lt;br&gt;
[61] &lt;a href="https://www.youtube.com/watch?v=DnIuu3SfP8k&amp;amp;vl=ar" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=DnIuu3SfP8k&amp;amp;vl=ar&lt;/a&gt;&lt;br&gt;
[62] &lt;a href="https://content-calpoly-edu.s3.amazonaws.com/chemistry/1/documents/RAY_FERNANDO_CV_FULL_2017.pdf" rel="noopener noreferrer"&gt;https://content-calpoly-edu.s3.amazonaws.com/chemistry/1/documents/RAY_FERNANDO_CV_FULL_2017.pdf&lt;/a&gt;&lt;br&gt;
[63] &lt;a href="https://www.anthropic.com/max" rel="noopener noreferrer"&gt;https://www.anthropic.com/max&lt;/a&gt;&lt;br&gt;
[64] &lt;a href="https://mindpal.space/blog/claude-system-prompt-leaked-build-smarter-ai-agents-khG7fL" rel="noopener noreferrer"&gt;https://mindpal.space/blog/claude-system-prompt-leaked-build-smarter-ai-agents-khG7fL&lt;/a&gt;&lt;br&gt;
[65] &lt;a href="https://escholarship.org/content/qt3r5069pj/qt3r5069pj_noSplash_e9af79b51aa5bfb303f19234f1e4c665.pdf" rel="noopener noreferrer"&gt;https://escholarship.org/content/qt3r5069pj/qt3r5069pj_noSplash_e9af79b51aa5bfb303f19234f1e4c665.pdf&lt;/a&gt;&lt;br&gt;
[66] &lt;a href="https://www.youtube.com/watch?v=UiP-Y6zBlDI" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=UiP-Y6zBlDI&lt;/a&gt;&lt;br&gt;
[67] &lt;a href="https://www.descript.com/tools/youtube-transcript-generator" rel="noopener noreferrer"&gt;https://www.descript.com/tools/youtube-transcript-generator&lt;/a&gt;&lt;br&gt;
[68] &lt;a href="https://riverside.fm/tools/youtube-transcript-generator" rel="noopener noreferrer"&gt;https://riverside.fm/tools/youtube-transcript-generator&lt;/a&gt;&lt;br&gt;
[69] &lt;a href="https://www.youtube.com/watch?v=zLHkzY5NsdU" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=zLHkzY5NsdU&lt;/a&gt;&lt;br&gt;
[70] &lt;a href="https://podcasts.apple.com/ca/podcast/10-ai-tools-that-actually-deliver-results-ft-ray-fernando/id1773693853?i=1000677500932" rel="noopener noreferrer"&gt;https://podcasts.apple.com/ca/podcast/10-ai-tools-that-actually-deliver-results-ft-ray-fernando/id1773693853?i=1000677500932&lt;/a&gt;&lt;br&gt;
[71] &lt;a href="https://9to5mac.com/2025/06/30/wispr-flow-is-an-ai-that-transcribes-what-you-say-right-from-the-iphone-keyboard/" rel="noopener noreferrer"&gt;https://9to5mac.com/2025/06/30/wispr-flow-is-an-ai-that-transcribes-what-you-say-right-from-the-iphone-keyboard/&lt;/a&gt;&lt;br&gt;
[72] &lt;a href="https://www.youtube.com/watch?v=1v7cXKf47hM" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=1v7cXKf47hM&lt;/a&gt;&lt;br&gt;
[73] &lt;a href="https://twitter.com/RayFernando1337/status/1936420322619584953" rel="noopener noreferrer"&gt;https://twitter.com/RayFernando1337/status/1936420322619584953&lt;/a&gt;&lt;br&gt;
[74] &lt;a href="https://www.youtube.com/watch?v=c33eOU1HYo8" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=c33eOU1HYo8&lt;/a&gt;&lt;br&gt;
[75] &lt;a href="https://www.youtube.com/watch?v=B4TIHRhf4Y4" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=B4TIHRhf4Y4&lt;/a&gt;&lt;br&gt;
[76] &lt;a href="https://www.futuretools.io/tools/wispr-flow" rel="noopener noreferrer"&gt;https://www.futuretools.io/tools/wispr-flow&lt;/a&gt;&lt;br&gt;
[77] &lt;a href="https://lovo.ai/post/transcripts-for-youtube-videos-a-step-by-step-guide" rel="noopener noreferrer"&gt;https://lovo.ai/post/transcripts-for-youtube-videos-a-step-by-step-guide&lt;/a&gt;&lt;br&gt;
[78] &lt;a href="https://x.com/RayFernando1337/status/1935442397938278518" rel="noopener noreferrer"&gt;https://x.com/RayFernando1337/status/1935442397938278518&lt;/a&gt;&lt;br&gt;
[79] &lt;a href="https://www.youtube.com/watch?v=4Oqbsmytqbs" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=4Oqbsmytqbs&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Claude Code Hooks Training Document</title>
      <dc:creator>Jeffrey Hicks</dc:creator>
      <pubDate>Fri, 04 Jul 2025 13:31:26 +0000</pubDate>
      <link>https://dev.to/jrhicks/claude-code-hooks-training-document-26gc</link>
      <guid>https://dev.to/jrhicks/claude-code-hooks-training-document-26gc</guid>
      <description>&lt;h2&gt;
  
  
  Overview
&lt;/h2&gt;

&lt;p&gt;Claude Code Hooks is a groundbreaking feature released by Anthropic that allows developers to inject custom shell commands at specific lifecycle events within Claude Code's operation. This feature addresses the fundamental challenge of probabilistic AI behavior by providing deterministic control over critical development workflows[1][2].&lt;/p&gt;

&lt;h2&gt;
  
  
  What Are Claude Code Hooks?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Definition and Purpose
&lt;/h3&gt;

&lt;p&gt;Claude Code Hooks are &lt;strong&gt;user-defined shell commands that execute automatically at predetermined points in Claude Code's workflow&lt;/strong&gt;[2]. Unlike traditional prompting approaches that rely on the LLM to remember and execute commands, hooks guarantee that specific operations occur consistently without additional user intervention[1][2].&lt;/p&gt;

&lt;p&gt;The core purpose of hooks is to bridge the gap between &lt;strong&gt;AI-driven assistance and rule-based automation&lt;/strong&gt;, providing developers with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Deterministic Control&lt;/strong&gt;: Ensures critical tasks always run, avoiding scenarios where the model might "forget" or choose not to execute an action[2][3]&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Workflow Automation&lt;/strong&gt;: Eliminates repetitive manual steps by embedding them into the AI coding lifecycle[2]&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Integration&lt;/strong&gt;: Seamlessly connects Claude Code with existing development tools and processes[2]&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The Problem Hooks Solve
&lt;/h3&gt;

&lt;p&gt;Large Language Models are inherently probabilistic, which means they might inconsistently execute requested actions. For instance, you might ask Claude to "always run prettier after editing a file," but the AI might not remember to do this in every instance. Hooks solve this by making such actions deterministic and automatic[1][3].&lt;/p&gt;

&lt;h2&gt;
  
  
  Hook Event Types
&lt;/h2&gt;

&lt;p&gt;Claude Code supports four primary hook events that correspond to different stages of the AI's operation lifecycle:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. PreToolUse
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;When&lt;/strong&gt;: Runs after Claude creates tool parameters and before processing the tool call[2]&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use Cases&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Validate code changes before they're applied&lt;/li&gt;
&lt;li&gt;Check for optimization principles before code generation&lt;/li&gt;
&lt;li&gt;Block operations that violate coding standards&lt;/li&gt;
&lt;li&gt;Perform pre-execution security checks&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Common Tool Matchers&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Write&lt;/code&gt; - File creation/overwriting&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Edit&lt;/code&gt;, &lt;code&gt;MultiEdit&lt;/code&gt; - File editing operations&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Bash&lt;/code&gt; - Shell command execution&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Read&lt;/code&gt; - File reading operations&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Task&lt;/code&gt; - Agent task execution[2]&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. PostToolUse
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;When&lt;/strong&gt;: Runs immediately after a tool completes successfully[2]&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use Cases&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Automatic code formatting (e.g., running Prettier on TypeScript files)&lt;/li&gt;
&lt;li&gt;Code quality analysis and metrics calculation&lt;/li&gt;
&lt;li&gt;Logging of executed operations&lt;/li&gt;
&lt;li&gt;Backup or version control operations&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Notification
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;When&lt;/strong&gt;: Runs when Claude Code sends notifications to the user[2]&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use Cases&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Custom notification systems (push notifications, emails, Slack messages)&lt;/li&gt;
&lt;li&gt;Pop-up windows for important alerts&lt;/li&gt;
&lt;li&gt;Integration with external monitoring systems&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. Stop
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;When&lt;/strong&gt;: Runs when the main Claude Code agent has finished responding[2]&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use Cases&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Final linting and formatting passes&lt;/li&gt;
&lt;li&gt;Comprehensive logging and reporting&lt;/li&gt;
&lt;li&gt;Cleanup operations&lt;/li&gt;
&lt;li&gt;Integration with CI/CD pipelines&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  5. SubagentStop
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;When&lt;/strong&gt;: Runs when a Claude Code subagent (Task tool call) has finished responding[2]&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use Cases&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Subagent-specific cleanup&lt;/li&gt;
&lt;li&gt;Hierarchical logging of nested operations&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Configuration and Setup
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Configuration Files
&lt;/h3&gt;

&lt;p&gt;Hooks are configured through JSON settings files with the following priority order:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;User Settings&lt;/strong&gt;: &lt;code&gt;~/.claude/settings.json&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Project Settings&lt;/strong&gt;: &lt;code&gt;.claude/settings.json&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Local Project Settings&lt;/strong&gt;: &lt;code&gt;.claude/settings.local.json&lt;/code&gt; (not committed to version control)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enterprise Managed Policy Settings&lt;/strong&gt;[2]&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Configuration Structure
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"hooks"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"EventName"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"matcher"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"ToolPattern"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"hooks"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"your-command-here"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"timeout"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Key Configuration Elements&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;matcher&lt;/strong&gt;: Pattern to match tool names (supports regex patterns like &lt;code&gt;Edit|Write&lt;/code&gt; or &lt;code&gt;Notebook.*&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;hooks&lt;/strong&gt;: Array of commands to execute when the pattern matches&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;type&lt;/strong&gt;: Currently only &lt;code&gt;"command"&lt;/code&gt; is supported&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;command&lt;/strong&gt;: The bash command to execute&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;timeout&lt;/strong&gt;: Optional timeout in seconds before canceling the hook[2]&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Example Configuration
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"hooks"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"PostToolUse"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"matcher"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Write"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"hooks"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"prettier --write ."&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"PreToolUse"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"matcher"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Edit|MultiEdit"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"hooks"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"./scripts/check-optimization.sh"&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Advanced Use Cases and Implementation Examples
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Optimization Gatekeeper System
&lt;/h3&gt;

&lt;p&gt;Ray Fernando's livestream demonstrates creating an "optimization gatekeeper" that enforces coding principles before code generation[1]. This system:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Blocks operations&lt;/strong&gt; that violate predefined optimization principles&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Analyzes code&lt;/strong&gt; against existing patterns using a "lever framework"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Provides specific feedback&lt;/strong&gt; to Claude when violations occur&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Forces adherence&lt;/strong&gt; to coding standards through exit codes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Implementation Approach&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;
&lt;span class="c"&gt;# optimization-check.sh&lt;/span&gt;
&lt;span class="nv"&gt;input&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;cat&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[[&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$input&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;~ &lt;span class="s2"&gt;"creating new file"&lt;/span&gt; &lt;span class="o"&gt;]]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"BLOCKED: Creating new files when similar ones exist violates optimization principles"&lt;/span&gt;
    &lt;span class="nb"&gt;exit &lt;/span&gt;2
&lt;span class="k"&gt;fi&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Automated Code Quality Pipeline
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"hooks"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"PostToolUse"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"matcher"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Write|Edit|MultiEdit"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"hooks"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"eslint --fix ."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"timeout"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; 
            &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npm test"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"timeout"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;300&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. Notification Integration
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"hooks"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"Notification"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"matcher"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"hooks"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"notify-send 'Claude Code' 'Requires your attention'"&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4. Automatic Version Control
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"hooks"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"Stop"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"matcher"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"hooks"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"jj commit -m 'automatic commit'"&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Integration with Development Workflows
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Cursor IDE Integration
&lt;/h3&gt;

&lt;p&gt;Claude Code integrates seamlessly with Cursor IDE through several mechanisms:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;/IDE&lt;/code&gt; command&lt;/strong&gt;: Integrates Claude Code directly with the IDE interface&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;File selection&lt;/strong&gt;: Claude Code automatically picks up selected files and lines&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;New window mode&lt;/strong&gt;: Pop out Claude Code into a separate window for multi-monitor workflows[1]&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Command Line Interface
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Essential Commands&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;claude&lt;/code&gt; - Start Claude Code session&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;claude --resume&lt;/code&gt; or &lt;code&gt;claude -r&lt;/code&gt; - Resume previous chat sessions&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;bunXCC usage&lt;/code&gt; - Check Claude Code usage and costs (requires Bun)[1]&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Ultra Think Mode
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Ultra Think&lt;/strong&gt; is a special keyword that provides Claude with a larger thinking window (up to 32,000 tokens) for complex analysis tasks. This is particularly useful when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Analyzing extensive documentation&lt;/li&gt;
&lt;li&gt;Following complex optimization principles&lt;/li&gt;
&lt;li&gt;Performing deep code reviews&lt;/li&gt;
&lt;li&gt;Working with large rule sets[1]&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Security Considerations
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Permissions and Safety
&lt;/h3&gt;

&lt;p&gt;⚠️ &lt;strong&gt;Critical Security Note&lt;/strong&gt;: Hooks execute with &lt;strong&gt;full user permissions&lt;/strong&gt; without confirmation. Users are responsible for ensuring hooks are safe and secure. Anthropic is not liable for any data loss or system damage resulting from hook usage[2].&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Best Practices&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Always validate hook scripts before deployment&lt;/li&gt;
&lt;li&gt;Use least-privilege principles in hook commands&lt;/li&gt;
&lt;li&gt;Implement proper error handling and logging&lt;/li&gt;
&lt;li&gt;Test hooks in isolated environments first&lt;/li&gt;
&lt;li&gt;Review hook configurations regularly&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Blocking Operations
&lt;/h3&gt;

&lt;p&gt;Hooks can block operations by:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Returning exit code 2&lt;/strong&gt;: Prevents the operation from proceeding&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Providing feedback&lt;/strong&gt;: Explaining why the operation was blocked&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Suggesting alternatives&lt;/strong&gt;: Guiding Claude toward compliant solutions[1]&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Advanced Features and Capabilities
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Context Access
&lt;/h3&gt;

&lt;p&gt;Hooks receive the full context of operations through standard input, enabling sophisticated analysis and decision-making based on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;File paths and content being modified&lt;/li&gt;
&lt;li&gt;Tool parameters and arguments&lt;/li&gt;
&lt;li&gt;Operation metadata and context[1]&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Pattern Matching
&lt;/h3&gt;

&lt;p&gt;Hook matchers support:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Exact matching&lt;/strong&gt;: &lt;code&gt;"Write"&lt;/code&gt; matches only the Write tool&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Regex patterns&lt;/strong&gt;: &lt;code&gt;"Edit|Write"&lt;/code&gt; or &lt;code&gt;"Notebook.*"&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Wildcard matching&lt;/strong&gt;: Empty string matches all events[2]&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Timeout Management
&lt;/h3&gt;

&lt;p&gt;Configure timeouts to prevent runaway hook processes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"long-running-analysis.sh"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"timeout"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;300&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Performance and Cost Considerations
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Token Usage Management
&lt;/h3&gt;

&lt;p&gt;When using "Ultra Think" mode with hooks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;High token consumption&lt;/strong&gt;: 5-10x more tokens than regular operations&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Strategic usage&lt;/strong&gt;: Reserve for complex analysis tasks&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cost awareness&lt;/strong&gt;: Monitor usage with tools like &lt;code&gt;bunXCC usage&lt;/code&gt;[1]&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Claude Max Subscription Benefits
&lt;/h3&gt;

&lt;p&gt;Ray Fernando's experience shows that the &lt;strong&gt;Claude Max $200/month plan&lt;/strong&gt; provides:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Unlimited Opus usage&lt;/strong&gt;: No more hitting daily limits&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Consistent performance&lt;/strong&gt;: Ability to use advanced features without constraints&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Better ROI&lt;/strong&gt;: Pays for itself through increased productivity[1]&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Real-World Applications
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Convex Database Integration
&lt;/h3&gt;

&lt;p&gt;The livestream demonstrates integrating hooks with &lt;strong&gt;Convex&lt;/strong&gt;, a real-time reactive database system:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Real-time updates&lt;/strong&gt;: Frontend automatically refreshes when backend data changes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reduced boilerplate&lt;/strong&gt;: Less state management code needed&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TypeScript integration&lt;/strong&gt;: Strong typing prevents errors&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cost-effective&lt;/strong&gt;: Generous free tier for development[1]&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Documentation Automation
&lt;/h3&gt;

&lt;p&gt;Hooks can automate documentation updates:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Auto-generate&lt;/strong&gt;: Documentation from code changes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Maintain consistency&lt;/strong&gt;: Ensure docs stay in sync with code&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Organize content&lt;/strong&gt;: Self-organize documentation into logical folders[1]&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Troubleshooting and Best Practices
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Common Issues
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Hook not executing&lt;/strong&gt;: Check matcher patterns and file permissions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Timeout errors&lt;/strong&gt;: Increase timeout values for long-running operations&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Permission errors&lt;/strong&gt;: Ensure hooks have necessary file system access&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Infinite loops&lt;/strong&gt;: Avoid hooks that trigger themselves recursively[4]&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Development Workflow Tips
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Start simple&lt;/strong&gt;: Begin with basic hooks before building complex systems&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test thoroughly&lt;/strong&gt;: Use development environments to validate hook behavior&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Monitor performance&lt;/strong&gt;: Track hook execution times and resource usage&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Document extensively&lt;/strong&gt;: Maintain clear documentation of hook purposes and behaviors&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Version control&lt;/strong&gt;: Keep hook configurations in version control systems&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Future Considerations
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Emerging Patterns
&lt;/h3&gt;

&lt;p&gt;The community is developing innovative hook patterns:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cognitive hooks&lt;/strong&gt;: Using hooks to guide AI reasoning processes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Workflow orchestration&lt;/strong&gt;: Chaining multiple hooks for complex pipelines&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;External integrations&lt;/strong&gt;: Connecting with cloud services and APIs[1]&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Ecosystem Development
&lt;/h3&gt;

&lt;p&gt;The hooks ecosystem is rapidly expanding with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Community scripts&lt;/strong&gt;: Shared hook configurations for common tasks&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tool integrations&lt;/strong&gt;: Plugins for popular development tools&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Template libraries&lt;/strong&gt;: Reusable hook patterns for different use cases[5][6]&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Claude Code Hooks represent a significant advancement in AI-assisted development, providing the deterministic control necessary for professional software development workflows. By understanding and implementing hooks effectively, developers can create robust, automated development environments that combine the creativity of AI with the reliability of traditional tooling.&lt;/p&gt;

&lt;p&gt;The feature's power lies not just in its technical capabilities, but in its ability to ensure consistent, repeatable behaviors that can be trusted in production environments. As the ecosystem continues to evolve, hooks will likely become an essential component of modern AI-assisted development workflows.&lt;/p&gt;

&lt;p&gt;[1] &lt;a href="https://www.youtube.com/watch?v=fkQrySWqUa0" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=fkQrySWqUa0&lt;/a&gt;&lt;br&gt;
[2] &lt;a href="https://js.langchain.com/docs/integrations/chat/anthropic/" rel="noopener noreferrer"&gt;https://js.langchain.com/docs/integrations/chat/anthropic/&lt;/a&gt;&lt;br&gt;
[3] &lt;a href="https://js.langchain.com/v0.2/docs/integrations/platforms/anthropic/" rel="noopener noreferrer"&gt;https://js.langchain.com/v0.2/docs/integrations/platforms/anthropic/&lt;/a&gt;&lt;br&gt;
[4] &lt;a href="https://www.anthropic.com/news/prompt-generator" rel="noopener noreferrer"&gt;https://www.anthropic.com/news/prompt-generator&lt;/a&gt;&lt;br&gt;
[5] &lt;a href="https://apidog.com/blog/claude-code-hooks/" rel="noopener noreferrer"&gt;https://apidog.com/blog/claude-code-hooks/&lt;/a&gt;&lt;br&gt;
[6] &lt;a href="https://www.claudelog.com/faqs/what-is-hooks-in-claude-code" rel="noopener noreferrer"&gt;https://www.claudelog.com/faqs/what-is-hooks-in-claude-code&lt;/a&gt;&lt;br&gt;
[7] &lt;a href="https://docs.anthropic.com/en/docs/claude-code/hooks" rel="noopener noreferrer"&gt;https://docs.anthropic.com/en/docs/claude-code/hooks&lt;/a&gt;&lt;br&gt;
[8] &lt;a href="https://github.com/hikarubw/claude-commands" rel="noopener noreferrer"&gt;https://github.com/hikarubw/claude-commands&lt;/a&gt;&lt;br&gt;
[9] &lt;a href="https://docs.anthropic.com/en/docs/claude-code/slash-commands" rel="noopener noreferrer"&gt;https://docs.anthropic.com/en/docs/claude-code/slash-commands&lt;/a&gt;&lt;br&gt;
[10] &lt;a href="https://www.reddit.com/r/ClaudeAI/comments/1loodjn/claude_code_now_supports_hooks/" rel="noopener noreferrer"&gt;https://www.reddit.com/r/ClaudeAI/comments/1loodjn/claude_code_now_supports_hooks/&lt;/a&gt;&lt;br&gt;
[11] &lt;a href="https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/bash-tool" rel="noopener noreferrer"&gt;https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/bash-tool&lt;/a&gt;&lt;br&gt;
[12] &lt;a href="https://docs.anthropic.com/en/docs/claude-code/settings" rel="noopener noreferrer"&gt;https://docs.anthropic.com/en/docs/claude-code/settings&lt;/a&gt;&lt;br&gt;
[13] &lt;a href="https://www.aibase.com/news/19442" rel="noopener noreferrer"&gt;https://www.aibase.com/news/19442&lt;/a&gt;&lt;br&gt;
[14] &lt;a href="https://danielcorin.com/til/anthropic/claude-code/" rel="noopener noreferrer"&gt;https://danielcorin.com/til/anthropic/claude-code/&lt;/a&gt;&lt;br&gt;
[15] &lt;a href="https://matthewsanabria.dev/posts/running-jujutsu-with-claude-code-hooks/" rel="noopener noreferrer"&gt;https://matthewsanabria.dev/posts/running-jujutsu-with-claude-code-hooks/&lt;/a&gt;&lt;br&gt;
[16] &lt;a href="https://www.reddit.com/r/ClaudeAI/comments/1lqs8rh/found_this_wild_livestream_about_claude_codes/" rel="noopener noreferrer"&gt;https://www.reddit.com/r/ClaudeAI/comments/1lqs8rh/found_this_wild_livestream_about_claude_codes/&lt;/a&gt;&lt;br&gt;
[17] &lt;a href="https://www.reddit.com/r/ClaudeAI/comments/1loxkgj/how_to_run_terminal_command_inside_claude_code/" rel="noopener noreferrer"&gt;https://www.reddit.com/r/ClaudeAI/comments/1loxkgj/how_to_run_terminal_command_inside_claude_code/&lt;/a&gt;&lt;br&gt;
[18] &lt;a href="https://www.cometapi.com/claude-code-hooks-what-is-and-how-to-use-it/" rel="noopener noreferrer"&gt;https://www.cometapi.com/claude-code-hooks-what-is-and-how-to-use-it/&lt;/a&gt;&lt;br&gt;
[19] &lt;a href="https://news.ycombinator.com/item?id=44429225" rel="noopener noreferrer"&gt;https://news.ycombinator.com/item?id=44429225&lt;/a&gt;&lt;br&gt;
[20] &lt;a href="https://github.com/qdhenry/Claude-Command-Suite" rel="noopener noreferrer"&gt;https://github.com/qdhenry/Claude-Command-Suite&lt;/a&gt;&lt;br&gt;
[21] &lt;a href="https://x.com/rohanpaul_ai/status/1939910693106639061" rel="noopener noreferrer"&gt;https://x.com/rohanpaul_ai/status/1939910693106639061&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>The SaaS Paradox and the Future of Software Delivery</title>
      <dc:creator>Jeffrey Hicks</dc:creator>
      <pubDate>Sat, 28 Jun 2025 22:05:35 +0000</pubDate>
      <link>https://dev.to/jrhicks/the-saas-paradox-and-the-future-of-software-delivery-1h9</link>
      <guid>https://dev.to/jrhicks/the-saas-paradox-and-the-future-of-software-delivery-1h9</guid>
      <description>&lt;h2&gt;
  
  
  SaaS's Asymmetry Problem
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Vendors control product and roadmap&lt;/li&gt;
&lt;li&gt;Customers need tailored, evolving solutions&lt;/li&gt;
&lt;li&gt;67% of churn is due to poor experiences&lt;/li&gt;
&lt;li&gt;Customers need features quickly to be successful&lt;/li&gt;
&lt;li&gt;Exclusive use may be desired in some cases &lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  SAAS Evolution not Extinction
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;If SaaS can't fix the asymmetry, customers will build in-house with AI.&lt;/li&gt;
&lt;li&gt;Future-proofing SaaS means delivering &lt;strong&gt;outcomes&lt;/strong&gt;, not platforms.&lt;/li&gt;
&lt;li&gt;Measure features against customer-specific success, not vision led roadmaps and shared user needs.&lt;/li&gt;
&lt;li&gt;AI-powered SWDLC allows small teams to manage 1000s of custom solutions.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Implementation Changes
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;From config specialists, to assemble specialists&lt;/li&gt;
&lt;li&gt;Instead of config experts versed in limitations and capabilities of the platform&lt;/li&gt;
&lt;li&gt;Assembly experts versed in components and architectures enable any capability&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Developer Changes
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Devs go from only automating Infrastructure and CI/CD but automate all steps of the SWDLC&lt;/li&gt;
&lt;li&gt;One dev oversees from 30 to 100s of individual applications.&lt;/li&gt;
&lt;li&gt;Devs assist, administer, review, evaluate, and employ agents&lt;/li&gt;
&lt;li&gt;Agents build, test, monitor, refactor, and upgrade.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Product Changes
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Engages in consultative services directly with individual clients&lt;/li&gt;
&lt;li&gt;Establishes requirements for and curates set of re-usable components&lt;/li&gt;
&lt;li&gt;Curates library of success patterns and common assemblies&lt;/li&gt;
&lt;li&gt;Mission is always client success&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Welcome to Success as a Service
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Problems and opportunities addressed on a per customer basis&lt;/li&gt;
&lt;li&gt;AI enables solution-per-customer applications at scale&lt;/li&gt;
&lt;li&gt;Assembly becomes the new configuration&lt;/li&gt;
&lt;li&gt;Developers guide, review, and optimize agent powered SWDLC&lt;/li&gt;
&lt;li&gt;Product organizes around curating components and assembly patterns that drive customer success&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>Langchain products overview</title>
      <dc:creator>Jeffrey Hicks</dc:creator>
      <pubDate>Fri, 13 Jun 2025 00:27:29 +0000</pubDate>
      <link>https://dev.to/jrhicks/langchain-products-overview-4ldj</link>
      <guid>https://dev.to/jrhicks/langchain-products-overview-4ldj</guid>
      <description>&lt;p&gt;Here is a comprehensive table of LangChain products with their names, release dates, descriptions, motivations, and links to explainer videos:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Product Name&lt;/th&gt;
&lt;th&gt;Release Date&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Motivation&lt;/th&gt;
&lt;th&gt;Video Link&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;LangChain&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;October 2022&lt;/td&gt;
&lt;td&gt;Open-source framework for developing applications powered by large language models (LLMs)&lt;/td&gt;
&lt;td&gt;To simplify every stage of the LLM application lifecycle by providing a standard interface for LLMs and integrations with hundreds of providers&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;LangChain Expression Language (LCEL)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Q3 2023&lt;/td&gt;
&lt;td&gt;Declarative way to define chains of actions using a pipe operator syntax&lt;/td&gt;
&lt;td&gt;To provide a modern approach to building AI workflows with optimized execution and modular design&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;LangServe&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;October 2023&lt;/td&gt;
&lt;td&gt;Deployment tool to host LCEL code as a production-ready API&lt;/td&gt;
&lt;td&gt;To enable easy deployment of LangChain chains as REST APIs, making LLM applications accessible over the web&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;LangGraph&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;January 2023&lt;/td&gt;
&lt;td&gt;Low-level orchestration framework for building agentic and multi-agent applications with graph-based execution&lt;/td&gt;
&lt;td&gt;To solve the problem of adding cycles into applications built on chains, enabling complex reasoning-action loops for agents&lt;/td&gt;
&lt;td&gt;&lt;a href="https://www.youtube.com/watch?v=S3a8RP8Bfc8" rel="noopener noreferrer"&gt;LangGraph Intro for Beginners&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;LangSmith&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;July 2023 (closed beta)&lt;/td&gt;
&lt;td&gt;Platform for debugging, testing, evaluating, and monitoring LLM applications&lt;/td&gt;
&lt;td&gt;To provide LLMOps and observability solutions for development from prototyping to production&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;LangGraph Cloud&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;June 2024&lt;/td&gt;
&lt;td&gt;Infrastructure designed to run fault-tolerant LangGraph agents at scale&lt;/td&gt;
&lt;td&gt;To provide horizontally-scaling task queues, persistence, and integrated monitoring for agent deployment&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;LangGraph Studio&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;August 2024&lt;/td&gt;
&lt;td&gt;First IDE specifically designed for agent development with visualization and debugging capabilities&lt;/td&gt;
&lt;td&gt;To provide specialized tooling for visualizing, interacting with, and debugging agentic applications beyond traditional code editors&lt;/td&gt;
&lt;td&gt;&lt;a href="https://www.youtube.com/watch?v=pLPJoFvq4_M" rel="noopener noreferrer"&gt;LangGraph Studio Overview&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;LangGraph Platform&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;May 2025&lt;/td&gt;
&lt;td&gt;Service for deploying and scaling LangGraph applications with multiple deployment options&lt;/td&gt;
&lt;td&gt;To provide comprehensive infrastructure for long-running, stateful agents with 1-click deployment and horizontal scaling&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Core Ecosystem Components
&lt;/h2&gt;

&lt;p&gt;The LangChain ecosystem consists of several interoperable tools designed to support the entire lifecycle of GenAI projects. The framework launched in October 2022 by Harrison Chase and quickly garnered popularity with improvements from hundreds of contributors on GitHub.&lt;/p&gt;

&lt;p&gt;The products are designed to be used independently or stack for multiplicative benefit, providing a full product suite for reliable agents and LLM apps. LangChain simplifies every stage of the LLM application lifecycle through development with open-source components, productionization with LangSmith monitoring, and deployment with LangGraph Platform.&lt;/p&gt;

&lt;h2&gt;
  
  
  Additional Resources
&lt;/h2&gt;

&lt;p&gt;For developers looking to get started, LangChain offers comprehensive documentation and tutorials. The framework supports integrations with hundreds of providers and includes tools for search, code interpretation, productivity automation, and more. Community contributions through LangChain Community provide additional third-party integrations and tools.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Minimal CopilotKit + LangGraph with AG-UI</title>
      <dc:creator>Jeffrey Hicks</dc:creator>
      <pubDate>Mon, 02 Jun 2025 23:51:18 +0000</pubDate>
      <link>https://dev.to/jrhicks/minimal-copilotkit-langgraph-5173</link>
      <guid>https://dev.to/jrhicks/minimal-copilotkit-langgraph-5173</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxsq3dbpc73pgo9cybr76.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxsq3dbpc73pgo9cybr76.png" alt="Image description" width="433" height="286"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/jrhicks/minimal-copilotkit-langgraph" rel="noopener noreferrer"&gt;https://github.com/jrhicks/minimal-copilotkit-langgraph&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CopilitKit React without NextJS (Vite)&lt;/li&gt;
&lt;li&gt;Self Hosted CopilotKit Runtime with Node.js HTTP&lt;/li&gt;
&lt;li&gt;Self Hosted LangGraph Agent with FastAPI (LangGraph)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  CopilotKit UI
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;[ ] NextJS&lt;/li&gt;
&lt;li&gt;[x] Vite&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  CopilotKit Connection
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;[ ] Copilot Cloud&lt;/li&gt;
&lt;li&gt;[x] Self-Hosted Copilot Runtime&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Self Hosted Copilot Runtime
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;[ ] Next.js App Router&lt;/li&gt;
&lt;li&gt;[ ] Next.js Page Router&lt;/li&gt;
&lt;li&gt;[ ] Node.js Express&lt;/li&gt;
&lt;li&gt;[x] Node.js HTTP&lt;/li&gt;
&lt;li&gt;[ ] NestJS&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  LangGraph Language
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;[x] Python&lt;/li&gt;
&lt;li&gt;[ ] Typescript&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  LangGraph Agent
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;[ ] Local (LangGraph Studio)&lt;/li&gt;
&lt;li&gt;[x] Self hosted (FastAPI)&lt;/li&gt;
&lt;li&gt;[ ] LangGraph Platform&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  AG-UI Features Completed
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;[x] 🤖 Agentic Chat

&lt;ul&gt;
&lt;li&gt;[x] Natural Conversation: Chat with your Copilot in a familiar chat interface,&lt;/li&gt;
&lt;li&gt;[x] Frontend Tool Execution: The Copilot can directly interacts with your UI by calling frontend functions,&lt;/li&gt;
&lt;li&gt;[x] Seamless Integration: Tools defined in the frontend and automatically discovered and made available to the agent,&lt;/li&gt;
&lt;li&gt;[x] Tool Based Generative UI - Frontend Rendering of Tool Calls: Backend tool calls are automatically rendered in the UI&lt;/li&gt;
&lt;li&gt;[x] Pause and Resume Control: Frontend tools can pause agent and agent resumes after user input&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>Services and Ingresses</title>
      <dc:creator>Jeffrey Hicks</dc:creator>
      <pubDate>Sat, 23 Dec 2023 21:20:44 +0000</pubDate>
      <link>https://dev.to/jrhicks/services-and-ingresses-1oo1</link>
      <guid>https://dev.to/jrhicks/services-and-ingresses-1oo1</guid>
      <description>&lt;p&gt;ChatGPT says:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Yes, using an Ingress instead of a LoadBalancer Service can save costs in Kubernetes environments like AWS. An Ingress allows you to manage access to multiple services through a single entry point, often requiring only one Load Balancer, reducing the number of costly resources. It routes traffic based on rules to the appropriate backend services, providing a more cost-effective and efficient way to manage external access to the services in your cluster.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
    </item>
    <item>
      <title>MOPS Speed Run</title>
      <dc:creator>Jeffrey Hicks</dc:creator>
      <pubDate>Thu, 21 Dec 2023 21:52:13 +0000</pubDate>
      <link>https://dev.to/jrhicks/mops-speed-run-2go2</link>
      <guid>https://dev.to/jrhicks/mops-speed-run-2go2</guid>
      <description>&lt;h2&gt;
  
  
  Create AWS Member Account
&lt;/h2&gt;

&lt;p&gt;From Root Organization as Root User&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;From AWS Organizations.  Add an AWS account.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;From IAM Identity Center &amp;gt; Multi-account permissions &amp;gt; AWS Accounts.  Select new account from organizational structure and "Assign users or groups".&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;From IAM Identity Center &amp;gt; Settings.  Navigate to Identity source and note the AWS access portal URL:  &lt;code&gt;https://############.awsapps.com/start&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Start Code Repo
&lt;/h2&gt;

&lt;p&gt;Get Templates&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/jrhicks/mops
&lt;span class="nb"&gt;mv &lt;/span&gt;mops prod
&lt;span class="nb"&gt;cd &lt;/span&gt;prod
&lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="nt"&gt;-rf&lt;/span&gt; .git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Connect to Newly Created Github Repo&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git init
git add &lt;span class="nb"&gt;.&lt;/span&gt;
git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"first commit"&lt;/span&gt;
git branch &lt;span class="nt"&gt;-M&lt;/span&gt; main
git remote add origin https://github.com/YourCompany/prod.git
git push &lt;span class="nt"&gt;-u&lt;/span&gt; origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Scaffold IaC
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;make hygen-cli
make config
code .mops.js
make mops
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Setup AWS CLI
&lt;/h2&gt;

&lt;p&gt;The AWS Identity center allows a single user to access multiple accounts.  First we install the aws-cli then use it to configure a profile for the newly created account.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;make aws-cli
make profile
make login
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Terraform Cluster
&lt;/h2&gt;

&lt;p&gt;Terraform a VPC, EKS cluster, and a variety of resources useful for running web applications in EKS.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;make tf-cli
make cluster
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Operationalize Cluster
&lt;/h2&gt;

&lt;p&gt;Create a Personal Access Token in Github.&lt;/p&gt;

&lt;p&gt;Bootstrap GitOps, Install k8s infrastructure, k8s add-ons, and k8s monitoring.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;make kube-cli
make flux-cli
git add&lt;span class="p"&gt;;&lt;/span&gt; git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"k8s cluster"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; git push
make flux
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check Results&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;make dashboard
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foovd27fa94nk1nwkt6tg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foovd27fa94nk1nwkt6tg.png" alt="Image description" width="800" height="598"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Delegate Name Server
&lt;/h2&gt;

&lt;p&gt;Lookup the nameservers for the terraformed Hosted Zone and configure your DNS to use these Name Servers.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;make nameservers
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Copy output into DNS Provider's Management console.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9xn2zz1lsizjjg34hzgn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9xn2zz1lsizjjg34hzgn.png" alt="Image description" width="800" height="162"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Scaffold App's Infrastructure (As Code)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;AWS Infrastructure (ECR, S3, ACM, SG)&lt;/li&gt;
&lt;li&gt;K8s Infrastructure (Namespace, Deployments, Service, PodMonitor, Dashboards, Secrets)&lt;/li&gt;
&lt;li&gt;Flux Infrastructure (Kustomization, Github Snippets, Automations)
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;make app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Link App into FluxCD by adding generated resources to Kustomizations (FluxCD's Custom Resource For Specifying GitOps Functionality)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;k8s/apps/base/kustomization.yaml&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;k8s/apps/namespaces/kustomization.yaml&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Deploy via GitOps&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git add &lt;span class="nb"&gt;.&lt;/span&gt;
git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"my-app infrastructure as code"&lt;/span&gt;
git push
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Bypass Wait and Trigger Sync&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;make fsync
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Build CI/CD Pipeline
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Configure Github to Push to ECR
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Copy snippets from &lt;code&gt;./snippets/my-app/ci.yaml&lt;/code&gt; to your ci.yaml for your app.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Generate AWS Access Keys&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;make my-app-gh-keys
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Copy keys to Github.  Navigate to repository &amp;gt; Settings &amp;gt; Security &amp;gt; Secrets &amp;amp; Variables &amp;gt; Actions &amp;gt; Repository Secrets&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn7malv4ty32hyrh3209x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn7malv4ty32hyrh3209x.png" alt="Image description" width="800" height="191"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Trigger build
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git add &lt;span class="nb"&gt;.&lt;/span&gt;
git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"chore update ci/cd"&lt;/span&gt;
git push
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Configure Automations
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Configure EKS to work with ECR
&lt;/h4&gt;

&lt;p&gt;Deploy Secrets referenced by FluxCD Image Repository Resource&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;make ecr_credentials_renew
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Deploy Secrets to share with Github&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;make flux-gh-deploy-keys
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Paste into Github Repo &amp;gt; Settings &amp;gt; Security &amp;gt; Deploy Keys &amp;gt; Add Deploy Key&lt;/p&gt;

&lt;p&gt;[x] Enable Write Access.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft4mxf5nh2t2yyq8ns0qr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft4mxf5nh2t2yyq8ns0qr.png" alt="Image description" width="800" height="279"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Attach Database
&lt;/h2&gt;

&lt;p&gt;Create an RDS database threw AWS Web Console, set VPC and Security Group.&lt;/p&gt;

&lt;p&gt;Generate username and password input into web console, and note them to add to your Rails' encrypted credentials.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;make rds-password
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Configure Rails
&lt;/h2&gt;

&lt;p&gt;Get AWS Credentials.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;make my-app-s3-keys
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Load S3 &amp;amp; RDS credentials into Rails encrypted credentials.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ..&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nb"&gt;cd &lt;/span&gt;my-rails-app &lt;span class="c"&gt;# Go over to App Repo&lt;/span&gt;
&lt;span class="nv"&gt;EDITOR&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"code --wait"&lt;/span&gt; bin/rails credentials:edit
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;production&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;database&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;username&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;XXXXXXXX&lt;/span&gt;
    &lt;span class="na"&gt;password&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;XXXXXXXXXXXXXXX&lt;/span&gt;
  &lt;span class="na"&gt;aws&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;access_key_id&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;XXXXXXXXXXX&lt;/span&gt;
    &lt;span class="na"&gt;secret_access_key&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;XXXXXXXXXXX/XXXX&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Edit &lt;code&gt;config/storage_production.yaml&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;amazon_production&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;service&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;S3&lt;/span&gt;
  &lt;span class="na"&gt;access_key_id&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;&amp;lt;%= Rails.application.credentials.production&amp;amp;.dig(:aws, :access_key_id) %&amp;gt;&lt;/span&gt;
  &lt;span class="na"&gt;secret_access_key&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;&amp;lt;%= Rails.application.credentials.production&amp;amp;.dig(:aws, :secret_access_key) %&amp;gt;&lt;/span&gt;
  &lt;span class="na"&gt;region&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;us-east-1&lt;/span&gt;
  &lt;span class="na"&gt;bucket&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;platform-staging-booking-pro-bucket&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Edit &lt;code&gt;config/database.yml&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;production&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;*default&lt;/span&gt;
  &lt;span class="na"&gt;adapter&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;postgresql&lt;/span&gt;
  &lt;span class="na"&gt;encoding&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;unicode&lt;/span&gt;
  &lt;span class="na"&gt;database&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;your_database_name&lt;/span&gt;
  &lt;span class="na"&gt;username&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;&amp;lt;%= Rails.application.credentials.dig(:production, :database, :username) %&amp;gt;&lt;/span&gt;
  &lt;span class="na"&gt;password&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;&amp;lt;%= Rails.application.credentials.dig(:production, :database, :password) %&amp;gt;&lt;/span&gt;
  &lt;span class="na"&gt;host&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;check aws web console&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
  &lt;span class="na"&gt;port&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;5432&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Grab the Rails Master Key from ENV or &lt;code&gt;config/credentials.yml.enc&lt;/code&gt; (which is typically kept private via .gitignore) and add this single Rails Maser Key to K8s as a secret.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ..&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nb"&gt;cd &lt;/span&gt;prod &lt;span class="c"&gt;# Go back to Infrastructure Repo&lt;/span&gt;
make my-app-rails-master-key-secret
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Setup Rails to Work Behind a Terminating Load Balancer, edit &lt;code&gt;config/production.rb&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;assume_ssl&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kp"&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Configure Rails Metrics
&lt;/h2&gt;

&lt;p&gt;Locate the generated snippets in &lt;code&gt;/snippets/your-app&lt;/code&gt; and update the following files in your Rails app:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;/config/initializers/yabeda_prometheus.rb&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;config.ru&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;Gemfile&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;From your IaC Repo, link the Monitor and Dashboard's into&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;k8s/monitoring/configs/kustomization.yaml&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After you deploy the updates, you can view the new Rails Dashboards:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;make dashboard
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp8mkf65x0yoqlnsa0azc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp8mkf65x0yoqlnsa0azc.png" alt="Image description" width="800" height="349"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>DNS, Route53, Ingress, Service, Deployment, Kustomization</title>
      <dc:creator>Jeffrey Hicks</dc:creator>
      <pubDate>Mon, 18 Dec 2023 01:06:17 +0000</pubDate>
      <link>https://dev.to/jrhicks/dns-route53-ingress-service-deployment-kustomization-1aho</link>
      <guid>https://dev.to/jrhicks/dns-route53-ingress-service-deployment-kustomization-1aho</guid>
      <description>&lt;p&gt;Resources&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=yRIY7BJohfo" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=yRIY7BJohfo&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>RDS Networking</title>
      <dc:creator>Jeffrey Hicks</dc:creator>
      <pubDate>Fri, 15 Dec 2023 23:56:06 +0000</pubDate>
      <link>https://dev.to/jrhicks/rds-networking-2k5h</link>
      <guid>https://dev.to/jrhicks/rds-networking-2k5h</guid>
      <description>&lt;p&gt;Use the Same VPC: Ideally, both your EKS cluster and RDS database should be in the same VPC. This simplifies network routing and security group settings.&lt;/p&gt;

&lt;p&gt;Subnet Considerations: Your RDS database should be placed in a private subnet that is not directly accessible from the internet. Ensure that the VPC has sufficient subnet space to accommodate both EKS and RDS.&lt;/p&gt;

&lt;p&gt;Security Groups: Set up security groups for both EKS and RDS. The security group for RDS should allow inbound traffic on the database port (e.g., 3306 for MySQL) from the security group attached to your EKS worker nodes. This ensures that only your EKS cluster can access the RDS instance.&lt;/p&gt;

&lt;p&gt;Network Access Control Lists (NACLs): Ensure that your VPC’s network ACLs allow traffic between your EKS pods and the RDS instance.&lt;/p&gt;

&lt;p&gt;Routing Tables: Make sure that the routing tables within your VPC allow for communication between the subnets where EKS and RDS are located.&lt;/p&gt;

&lt;p&gt;Endpoint Services (Optional): If you want to further enhance security and reduce data transfer costs, consider using VPC Endpoint Services for Amazon RDS. This allows you to keep traffic between your EKS cluster and RDS database within the AWS network.&lt;/p&gt;

&lt;p&gt;Database Authentication and Authorization: Ensure that your database's authentication mechanisms (e.g., username and password, IAM authentication) are properly configured to allow connections from your EKS pods.&lt;/p&gt;

&lt;p&gt;Testing Connectivity: Once setup, you should test the connectivity from a pod in EKS to the RDS instance to ensure that the network configuration is correct.&lt;/p&gt;




&lt;p&gt;Ensuring that Kubernetes network policies don't block necessary traffic to and from your PostgreSQL RDS instance involves a few steps. Kubernetes network policies are used to control the flow of traffic between pod-to-pod and pod-to-external services. Here's a general guide on how to ensure your network policies allow the required traffic:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Understand Existing Network Policies&lt;/strong&gt;: First, review any existing network policies in your Kubernetes cluster. You can list all network policies using the following command:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   kubectl get networkpolicies &lt;span class="nt"&gt;--all-namespaces&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Identify the Affected Pods&lt;/strong&gt;: Determine which pods need to access the RDS instance. This could be your application pods that require database connectivity.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Create/Modify Network Policy&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If there are no existing network policies affecting your pods, you might not need to do anything, as the default behavior in the absence of network policies is to allow all traffic.&lt;/li&gt;
&lt;li&gt;If there are existing policies that could restrict access, you need to either modify them or create new ones to allow traffic to your RDS instance.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Allowing Egress Traffic to RDS&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You need to create an egress policy that allows traffic from your pods to the RDS instance. Here's an example policy that allows egress traffic to a specific RDS endpoint on PostgreSQL's default port (5432):
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt; &lt;span class="na"&gt;apiVersion&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;networking.k8s.io/v1&lt;/span&gt;
 &lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;NetworkPolicy&lt;/span&gt;
 &lt;span class="na"&gt;metadata&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
   &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;allow-rds-egress&lt;/span&gt;
   &lt;span class="na"&gt;namespace&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;your-namespace&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
 &lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
   &lt;span class="na"&gt;podSelector&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
     &lt;span class="na"&gt;matchLabels&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
       &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;key&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;value&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;  &lt;span class="c1"&gt;# Replace with labels that match your pods&lt;/span&gt;
   &lt;span class="na"&gt;policyTypes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
   &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;Egress&lt;/span&gt;
   &lt;span class="na"&gt;egress&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
   &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;to&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
     &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;ipBlock&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
         &lt;span class="na"&gt;cidr&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;RDS IP Range&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;  &lt;span class="c1"&gt;# Replace with the IP range of your RDS instance&lt;/span&gt;
     &lt;span class="na"&gt;ports&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
     &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;protocol&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;TCP&lt;/span&gt;
       &lt;span class="na"&gt;port&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;5432&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Replace &lt;code&gt;[your-namespace]&lt;/code&gt;, &lt;code&gt;[key]: [value]&lt;/code&gt;, and &lt;code&gt;[RDS IP Range]&lt;/code&gt; with the appropriate values for your environment.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Apply the Network Policy&lt;/strong&gt;: Once you have your network policy defined, apply it to your cluster:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   kubectl apply &lt;span class="nt"&gt;-f&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;your-policy-file].yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Test the Connectivity&lt;/strong&gt;: After applying the network policy, test the connectivity to the RDS instance from the pods that require access.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Monitor and Adjust as Necessary&lt;/strong&gt;: Monitor the connectivity and adjust the network policy if needed. Sometimes, fine-tuning is required to get the desired behavior.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Keep in mind that the exact configuration will depend on your specific requirements and setup. Make sure the policy is as restrictive as possible to maintain security, while still allowing the necessary traffic.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Rails Performance Monitoring w/ Prometheus</title>
      <dc:creator>Jeffrey Hicks</dc:creator>
      <pubDate>Tue, 12 Dec 2023 03:18:19 +0000</pubDate>
      <link>https://dev.to/jrhicks/rails-prometheus-4oka</link>
      <guid>https://dev.to/jrhicks/rails-prometheus-4oka</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyqt8x0v2yiwr9sp1eq3z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyqt8x0v2yiwr9sp1eq3z.png" alt="Image description" width="800" height="580"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  gem yabeda-prometheus
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/yabeda-rb/yabeda" rel="noopener noreferrer"&gt;yabeda-rb&lt;/a&gt; - Extendable framework for collecting and exporting metrics from your Ruby application&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.dtreelabs.com/blog/rails-performance-monitoring-with-grafana-prometheus-and-influxdb" rel="noopener noreferrer"&gt;yabeda-rb blog post&lt;/a&gt; - May 2022&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Rails 7.1 Compatibility
&lt;/h2&gt;

&lt;p&gt;Rails 7 excludes Webrick which yabeda uses.  I was able to monkey-patch this to get it working.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="c1"&gt;# /config/initializers/yabeda_prometheus.rb&lt;/span&gt;

&lt;span class="k"&gt;module&lt;/span&gt; &lt;span class="nn"&gt;Yabeda&lt;/span&gt;
  &lt;span class="k"&gt;module&lt;/span&gt; &lt;span class="nn"&gt;Prometheus&lt;/span&gt;
    &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Exporter&lt;/span&gt;
      &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="nb"&gt;self&lt;/span&gt;
        &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;start_metrics_server!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;**&lt;/span&gt;&lt;span class="n"&gt;rack_app_options&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
          &lt;span class="no"&gt;Thread&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
            &lt;span class="n"&gt;default_port&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;ENV&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"PORT"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;9394&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="n"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;rack_app&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;**&lt;/span&gt;&lt;span class="n"&gt;rack_app_options&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="n"&gt;server&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;Puma&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Server&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="n"&gt;server&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add_tcp_listener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;ENV&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"PROMETHEUS_EXPORTER_BIND"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="s2"&gt;"0.0.0.0"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;ENV&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"PROMETHEUS_EXPORTER_PORT"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;default_port&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
            &lt;span class="n"&gt;server&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;
          &lt;span class="k"&gt;end&lt;/span&gt;
        &lt;span class="k"&gt;end&lt;/span&gt;
      &lt;span class="k"&gt;end&lt;/span&gt;
    &lt;span class="k"&gt;end&lt;/span&gt;
  &lt;span class="k"&gt;end&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;

&lt;span class="no"&gt;Yabeda&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Prometheus&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Exporter&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;start_metrics_server!&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Alternative work around
&lt;/h2&gt;

&lt;p&gt;Found this gist for running prometheus exporter as stand-alone process.  Might give this a try instead especially if I got with a multi-process instead of multi-thread env.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://gist.github.com/Envek/96f297c1dfbac8ae5afa7e4abff78f0b" rel="noopener noreferrer"&gt;https://gist.github.com/Envek/96f297c1dfbac8ae5afa7e4abff78f0b&lt;/a&gt; - Running prometheus exporter as stand-alone process.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Example of how to launch separate process to export all metrics from Ruby processes on the same host/container.&lt;/span&gt;

&lt;span class="c1"&gt;# IMPORTANT:&lt;/span&gt;
&lt;span class="c1"&gt;# You MUST configure Direct File store in official Prometheus Ruby client for this to work.&lt;/span&gt;
&lt;span class="c1"&gt;# See https://github.com/yabeda-rb/yabeda-prometheus#multi-process-server-support&lt;/span&gt;

&lt;span class="c1"&gt;# Example of configuration that should be made for additional process to export all metrics&lt;/span&gt;
&lt;span class="c1"&gt;# Here: export Sidekiq metrics from not worker process. See https://github.com/yabeda-rb/yabeda-sidekiq#configuration&lt;/span&gt;
&lt;span class="no"&gt;ENV&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"YABEDA_SIDEKIQ_COLLECT_CLUSTER_METRICS"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'true'&lt;/span&gt;
&lt;span class="no"&gt;ENV&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"YABEDA_SIDEKIQ_DECLARE_PROCESS_METRICS"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'true'&lt;/span&gt;

&lt;span class="c1"&gt;# Boot Rails application&lt;/span&gt;
&lt;span class="no"&gt;APP_PATH&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;File&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;expand_path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'../config/application'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;__dir__&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nb"&gt;require_relative&lt;/span&gt; &lt;span class="s1"&gt;'../config/boot'&lt;/span&gt;
&lt;span class="nb"&gt;require_relative&lt;/span&gt; &lt;span class="s1"&gt;'../config/environment'&lt;/span&gt;

&lt;span class="c1"&gt;# Run exporter&lt;/span&gt;
&lt;span class="n"&gt;default_port&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;ENV&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'PORT'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;9394&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Rack&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Handler&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;WEBrick&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="no"&gt;Yabeda&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Prometheus&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Exporter&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;rack_app&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="no"&gt;Host&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;ENV&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'PROMETHEUS_EXPORTER_BIND'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="s1"&gt;'0.0.0.0'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="no"&gt;Port&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;ENV&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'PROMETHEUS_EXPORTER_PORT'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;default_port&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="no"&gt;AccessLog&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>Using AI to Create a Dashboard for an AWS Load Balancer</title>
      <dc:creator>Jeffrey Hicks</dc:creator>
      <pubDate>Sat, 09 Dec 2023 18:34:21 +0000</pubDate>
      <link>https://dev.to/jrhicks/using-ai-to-create-a-dashboard-for-an-aws-load-balancer-1la1</link>
      <guid>https://dev.to/jrhicks/using-ai-to-create-a-dashboard-for-an-aws-load-balancer-1la1</guid>
      <description>&lt;h2&gt;
  
  
  Stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;K8s&lt;/li&gt;
&lt;li&gt;FluxCD&lt;/li&gt;
&lt;li&gt;AWS Load Balancer Controller&lt;/li&gt;
&lt;li&gt;Prometheous&lt;/li&gt;
&lt;li&gt;Grafana&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Problem
&lt;/h2&gt;

&lt;p&gt;Prometheous has CRDs for K8s known as &lt;code&gt;ServiceMonitor&lt;/code&gt; and &lt;code&gt;PodMonitor&lt;/code&gt;.  I created a ServiceMonitor for AWS Load Balancer Controller, but I had no clue if Prometheous was collecting it's data.&lt;/p&gt;

&lt;h2&gt;
  
  
  AI Interactions
&lt;/h2&gt;

&lt;p&gt;During troubleshooting, I was starting to doubt that I even had an AWS Load balancer controller service.&lt;/p&gt;

&lt;p&gt;I asked:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;should the aws-load-balancer-controller from eks-charts deploy a aws-load-balancer-controller that would show up when I run &lt;code&gt;kubectl get service -n kube-system&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;ChatGPT: Terraform Engineer&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;[no] ... AWS Load Balancer Controller primarily operates as a controller &lt;code&gt;deployment&lt;/code&gt; in your Kubernetes cluster. It does not typically expose a service that you can see with &lt;code&gt;kubectl get service -n kube-system&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Wow! ChatGPT knew better than me that there is a difference between a K8s Service-Resource and a Service referenced by a ServiceMonitor.  Now reassured that my Load Balancer Controller was deployed to my cluster just fine as a &lt;code&gt;Deployment&lt;/code&gt; and not a &lt;code&gt;Service&lt;/code&gt; I asked:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;how can I connect the aws-load-balancer-controller to prometheous&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Along with a lot of suggestions, ChatGPT Terraform Engineer answered:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;... Ensure that the AWS Load Balancer Controller is configured to expose metrics. This is usually done through command-line arguments in the controller's deployment configuration. Look for arguments like --metrics-bind-addr=ADDRESS where ADDRESS specifies the host and port where metrics are exposed (e.g., 0.0.0.0:8080) ...&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;ChatGPT had also provided a lot of details relevant to other deployment solutions, so I re-asked while giving it more context to my context.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;how can I connect the aws-load-balancer-controller to prometheous ... given I'm currently deploying with a HelmRelease in FluxCD&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;ChatGPT Terraform Engineer instructed:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;... Update Your HelmRelease Resource: ... with args &lt;code&gt;- --metrics-bind-addr=0.0.0.0:8080&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;apiVersion&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;helm.toolkit.fluxcd.io/v2beta1&lt;/span&gt;
&lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;HelmRelease&lt;/span&gt;
&lt;span class="na"&gt;metadata&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;aws-load-balancer-controller&lt;/span&gt;
  &lt;span class="na"&gt;namespace&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;kube-system&lt;/span&gt;
&lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;chart&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;chart&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;aws-load-balancer-controller&lt;/span&gt;
      &lt;span class="na"&gt;sourceRef&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;HelmRepository&lt;/span&gt;
        &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;eks&lt;/span&gt;
        &lt;span class="na"&gt;namespace&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;flux-system&lt;/span&gt;
      &lt;span class="na"&gt;version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;&amp;lt;chart version&amp;gt;&lt;/span&gt;
  &lt;span class="na"&gt;values&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;serviceAccount&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;create&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
    &lt;span class="na"&gt;clusterName&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;&amp;lt;your-cluster-name&amp;gt;&lt;/span&gt;
    &lt;span class="na"&gt;region&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;&amp;lt;your-region&amp;gt;&lt;/span&gt;
    &lt;span class="na"&gt;vpcId&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;&amp;lt;your-vpc-id&amp;gt;&lt;/span&gt;
    &lt;span class="na"&gt;args&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;--metrics-bind-addr=0.0.0.0:8080&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;... After FluxCD applies the changes, you can verify that the AWS Load Balancer Controller is exposing metrics by checking the logs of the controller pods or using kubectl port-forward &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So I deployed these updates then asked specifically&amp;gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;provide the cli command for kubectl port-forward to access the metrics endpoint locally.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;ChatGPT Terraform Engineer answered:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Find the Pod Name: ...&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl get pods &lt;span class="nt"&gt;-n&lt;/span&gt; kube-system &lt;span class="nt"&gt;-l&lt;/span&gt; app.kubernetes.io/name&lt;span class="o"&gt;=&lt;/span&gt;aws-load-balancer-controller
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Port Forward to Access Metrics: ...&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl port-forward &lt;span class="nt"&gt;-n&lt;/span&gt; kube-system &amp;lt;pod-name&amp;gt; 8080:8080
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Access Metrics Locally ...&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl http://localhost:8080/metrics
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Eureka! Metrics are available.  Now to work on other 1/2.  &lt;/p&gt;




&lt;p&gt;I was embolden to finish the rest on my own, and after fumbling around and getting back to ChatGPT it suggested to run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl get prometheus kube-prometheus-stack-prometheus &lt;span class="nt"&gt;-n&lt;/span&gt; monitoring &lt;span class="nt"&gt;-o&lt;/span&gt; yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Which ultimately lead to finding it's matchLabels&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt; &lt;span class="na"&gt;serviceMonitorSelector&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;matchLabels&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;release&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;kube-prometheus-stack&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and adding them to the ServiceMonitor:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;apiVersion&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;monitoring.coreos.com/v1&lt;/span&gt;
&lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ServiceMonitor&lt;/span&gt;
&lt;span class="na"&gt;metadata&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;autoscaler-monitor&lt;/span&gt;
  &lt;span class="na"&gt;namespace&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;kube-system&lt;/span&gt;
  &lt;span class="na"&gt;labels&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;release&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;kube-prometheus-stack&lt;/span&gt;
    &lt;span class="na"&gt;app.kubernetes.io/part-of&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;flux&lt;/span&gt;
    &lt;span class="na"&gt;app.kubernetes.io/component&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;monitoring&lt;/span&gt;

    &lt;span class="s"&gt;...&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But this still didn't quite fix it.  So it recommended looking at the prometheus logs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl logs deployment/kube-prometheus-stack-operator &lt;span class="nt"&gt;-n&lt;/span&gt; monitoring
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Ultimately the issue was that the ServiceMonitor needed to be in the &lt;code&gt;monitoring&lt;/code&gt; name space.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;apiVersion&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;monitoring.coreos.com/v1&lt;/span&gt;
&lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ServiceMonitor&lt;/span&gt;
&lt;span class="na"&gt;metadata&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;autoscaler-monitor&lt;/span&gt;
  &lt;span class="na"&gt;namespace&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;monitoring&lt;/span&gt;
  &lt;span class="na"&gt;labels&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;release&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;kube-prometheus-stack&lt;/span&gt;
    &lt;span class="na"&gt;app.kubernetes.io/part-of&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;flux&lt;/span&gt;
    &lt;span class="na"&gt;app.kubernetes.io/component&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;monitoring&lt;/span&gt;

    &lt;span class="s"&gt;...&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>GitOps Folder Organization</title>
      <dc:creator>Jeffrey Hicks</dc:creator>
      <pubDate>Tue, 05 Dec 2023 03:34:42 +0000</pubDate>
      <link>https://dev.to/jrhicks/gitops-folder-organization-48ho</link>
      <guid>https://dev.to/jrhicks/gitops-folder-organization-48ho</guid>
      <description>&lt;p&gt;Ideas&lt;/p&gt;

&lt;p&gt;&lt;a href="https://youtu.be/1fCAwFGX38U?feature=shared&amp;amp;t=623" rel="noopener noreferrer"&gt;Separate Srvc &amp;amp; Infra Repos&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;k8s subfolder of app, doesn't work because the Infra has (or should have) different lifecycle.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://youtu.be/1fCAwFGX38U?feature=shared&amp;amp;t=674" rel="noopener noreferrer"&gt;Different Git Repo Per Environment&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Because Permissions and Access Controlled Easily and Repo Level&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Different Env (Dev, Staging &amp;amp; Production) have different life cycles&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Not mentioned in video, but my own thoughts: Lowers Complexity (99 Bottles ABC) - Like in Sallies 99 Bottles of OO.  A separate repo is analogous to Separate class, we can omit a lot of Assignment/Branches/Conditionals by having dedicated Repos per Env (Dev, Staging, Production)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
  </channel>
</rss>
