<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Raniel Mendonça on Medium]]></title>
        <description><![CDATA[Stories by Raniel Mendonça on Medium]]></description>
        <link>https://medium.com/@raniel?source=rss-ab2bdae61f20------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Vtla3xW9-IKBnPcDqUKrDw.jpeg</url>
            <title>Stories by Raniel Mendonça on Medium</title>
            <link>https://medium.com/@raniel?source=rss-ab2bdae61f20------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 04:10:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@raniel/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How I Use AI (Claude Code) to Boost My Daily Productivity as a Senior Frontend Engineer (React +…]]></title>
            <link>https://medium.com/@raniel/how-i-use-ai-claude-code-to-boost-my-daily-productivity-as-a-senior-frontend-engineer-react-81e146d6340d?source=rss-ab2bdae61f20------2</link>
            <guid isPermaLink="false">https://medium.com/p/81e146d6340d</guid>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[claude]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Raniel Mendonça]]></dc:creator>
            <pubDate>Thu, 18 Dec 2025 12:54:24 GMT</pubDate>
            <atom:updated>2025-12-18T12:58:08.224Z</atom:updated>
            <content:encoded><![CDATA[<h3>How I Use AI (Claude Code) to Boost My Daily Productivity as a Senior Frontend Engineer (React + TypeScript)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Emgxtz9T6CwV4CxUWq6y0g.png" /></figure><p>The idea here is to share how I have been using AI to increase my productivity every day.</p><p>The first thing I learned is that you need to “talk” to models often, understand how they process information, and learn how to ask in a way that consistently produces better results. The more details and context you provide, the better the outcome, and that becomes better for you too.</p><h3>The public companion repository (all prompts, no clutter)</h3><p>To avoid polluting the article with long templates, I made a public repository with every prompt and example used here:</p><ul><li>Repo: <a href="https://github.com/ranielm/ai-workflow-prompts">https://github.com/ranielm/ai-workflow-prompts</a></li></ul><p>Prompts:</p><ul><li>Bug Report Creator: <a href="https://github.com/ranielm/ai-workflow-prompts/blob/master/prompts/01-bug-report-creator.md">https://github.com/ranielm/ai-workflow-prompts/blob/master/prompts/01-bug-report-creator.md</a></li><li>Jira Task Processor: <a href="https://github.com/ranielm/ai-workflow-prompts/blob/master/prompts/02-jira-task-processor.md">https://github.com/ranielm/ai-workflow-prompts/blob/master/prompts/02-jira-task-processor.md</a></li><li>Document in CLAUDE.md: <a href="https://github.com/ranielm/ai-workflow-prompts/blob/master/prompts/03-document-in-claude-md.md">https://github.com/ranielm/ai-workflow-prompts/blob/master/prompts/03-document-in-claude-md.md</a></li><li>Generate PR title and description: <a href="https://github.com/ranielm/ai-workflow-prompts/blob/master/prompts/04-generate-pr-title-and-description.md">https://github.com/ranielm/ai-workflow-prompts/blob/master/prompts/04-generate-pr-title-and-description.md</a></li></ul><p>Example:</p><ul><li>PR description example: <a href="https://github.com/ranielm/ai-workflow-prompts/blob/master/examples/pr-description-example.md">https://github.com/ranielm/ai-workflow-prompts/blob/master/examples/pr-description-example.md</a></li></ul><h3>1) The core principle: context wins</h3><p>When you give more context, the model performs better. In practice, this means describing the behavior you want, and adding the technical details that matter. You can do this in your native language first, then translate to English.</p><h3>Why CLAUDE.md matters in real projects</h3><p>In the Claude Code workflow, the model starts by reading CLAUDE.md files in the project root, then it tries to infer which components and folders are relevant, and it reads deeper CLAUDE.md files to build a priority and dependency “tree”.</p><p>Because of that, I treat documentation as part of the deliverable. Any serious pull request should include updated documentation, especially in CLAUDE.md, so the next task gets faster and more consistent.</p><h3>2) Step one: generate a Jira ticket from a rough bug report (Claude Web)</h3><p>Once I have a rough idea written down, I ask Claude on the web to create the Jira task using a predefined template. For this to work, Jira must be connected to Claude Web through its UI integration.</p><p>This is the first “project” I use:</p><h3>Bug Report Creator</h3><p>It detects that the message is a bug report, translates to English when needed, then formats everything into a consistent Jira defect template, including reproduction steps, actual vs expected behavior, and a ready branch command plus a Claude Code implementation prompt.</p><p>Prompt:</p><ul><li><a href="https://github.com/ranielm/ai-workflow-prompts/blob/master/prompts/01-bug-report-creator.md">https://github.com/ranielm/ai-workflow-prompts/blob/master/prompts/01-bug-report-creator.md</a></li></ul><p>Why this matters: it turns a messy report into a ticket that is ready to be worked on, without losing important details.</p><h3>3) Step two: convert the Jira ticket into an execution prompt (Claude Code-ready)</h3><p>Not every ticket is created by AI. Sometimes someone wrote it quickly, or it came from a different process. So I use a second prompt that reads the Jira ticket and generates two outputs:</p><ol><li>A Git branch command following a standard naming convention</li><li>A clear, imperative, technical Claude Code prompt that the model can execute</li></ol><p>This is the second “project”:</p><h3>Jira Task Processor</h3><p>It accepts ticket screenshots, Jira URLs, or just ticket IDs, and it produces the branch command plus a Claude Code prompt in a fixed response format.</p><p>Prompt:</p><ul><li><a href="https://github.com/ranielm/ai-workflow-prompts/blob/master/prompts/02-jira-task-processor.md">https://github.com/ranielm/ai-workflow-prompts/blob/master/prompts/02-jira-task-processor.md</a></li></ul><p>I also like running more than one model in the pipeline, for example one to create the ticket, one to interpret it, another to rewrite the final execution prompt, because the output becomes more neutral and consistent after multiple passes.</p><h3>4) Step three: implement inside Claude Code Desktop</h3><p>With the final prompt ready, I move to Claude Code inside the Claude Desktop UI. Lately I prefer it over terminal-only usage because it is easier to share screenshots, and I can show visual differences between what the browser displays and what Figma expects.</p><p>Also, the integration between the model and the codebase becomes simple, you just select the project folder and start. From there, I paste the prompt, grant the required permissions, and follow the model’s reasoning.</p><p>At this stage, my job becomes very focused:</p><ul><li>Describe what must be done, precisely</li><li>Review decisions and code quality</li><li>Test the final solution</li></ul><p>The repetitive, expensive, and intermediate steps are handled by preconfigured prompts and the model workflow.</p><p>A key point: you need a solid foundation before you trust the model with most of the implementation. The more examples and internal documentation it can use as reference, the better the final delivery.</p><h3>5) Step four: document the work (so future you ships faster)</h3><p>Once the bug fix or feature is done, I document what was implemented.</p><p>I use a prompt that:</p><ul><li>Detects the current branch and ticket ID</li><li>Summarizes the diff against origin/develop</li><li>Picks the best folder to place the documentation</li><li>Creates or appends a structured entry in CLAUDE.md</li><li>Commits and pushes</li></ul><p>Prompt (documentation automation):</p><ul><li><a href="https://github.com/ranielm/ai-workflow-prompts/blob/master/prompts/03-document-in-claude-md.md">https://github.com/ranielm/ai-workflow-prompts/blob/master/prompts/03-document-in-claude-md.md</a></li></ul><p>This is how I make documentation consistent and lightweight, instead of something people skip when they are tired.</p><h3>6) Step five: generate PR title and PR description, and update PR_DESCRIPTION.md locally</h3><p>After documentation, the branch is ready, commits and push are done, then it is time to open the pull request or merge request.</p><p>I use a prompt that generates:</p><ul><li>A PR title following a consistent format</li><li>A PR description based on the real diff vs origin/develop</li><li>A local update to PR_DESCRIPTION.md at the repo root, so it is ready to paste into the PR platform</li></ul><p>Prompt:</p><ul><li><a href="https://github.com/ranielm/ai-workflow-prompts/blob/master/prompts/04-generate-pr-title-and-description.md">https://github.com/ranielm/ai-workflow-prompts/blob/master/prompts/04-generate-pr-title-and-description.md</a></li></ul><p>Example output:</p><ul><li><a href="https://github.com/ranielm/ai-workflow-prompts/blob/master/examples/pr-description-example.md">https://github.com/ranielm/ai-workflow-prompts/blob/master/examples/pr-description-example.md</a></li></ul><p>The final PR description usually includes:</p><ul><li>What needed to be done and what was done</li><li>A step by step “How to Test” checklist for QA</li><li>Additional notes about impacted areas or breaking changes</li></ul><p>That’s the end to end lifecycle, using AI from start to finish inside a typical delivery cycle.</p><h3>Closing thoughts</h3><p>The initial setup is hard, but after a few weeks the productivity gains are very noticeable. The real win is consistency:</p><ul><li>clearer tickets</li><li>better execution prompts</li><li>better documentation</li><li>faster, higher quality PRs</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=81e146d6340d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Supercharging Your Development Workflow with Claude Code Agents and Commands]]></title>
            <link>https://medium.com/@raniel/supercharging-your-development-workflow-with-claude-code-agents-and-commands-8387c4a41ec0?source=rss-ab2bdae61f20------2</link>
            <guid isPermaLink="false">https://medium.com/p/8387c4a41ec0</guid>
            <dc:creator><![CDATA[Raniel Mendonça]]></dc:creator>
            <pubDate>Sun, 31 Aug 2025 22:37:36 GMT</pubDate>
            <atom:updated>2025-08-31T22:37:36.352Z</atom:updated>
            <content:encoded><![CDATA[<p><em>How to build intelligent automation for React development with custom AI agents and task-specific commands</em></p><p>As a React developer shipping large enterprise apps, I’ve found Claude Code’s agents + commands system to be a game-changer. After creating 15+ custom automations for a real IndySoft project, here’s how these tools can raise code quality and speed up your workflow.</p><h3>What Are Claude Code Agents and Commands?</h3><p><strong>Agents</strong> are specialized AI assistants with focused expertise (code review, testing, refactoring, i18n). They follow detailed instructions and use the full Claude Code toolkit.</p><p><strong>Commands</strong> are task-specific automations that execute predefined workflows. Think “smart scripts” that analyze code, make decisions, and perform multi-step ops across your repo.</p><p>The magic happens when they work together: agents enforce standards; commands handle repeatable chores.</p><h3>Real-World Agent Examples (Production-ready)</h3><h3>React Branch Reviewer</h3><p>A virtual senior dev that cleans and reviews feature branches before merge.</p><pre>---<br>name: react-branch-reviewer<br>description: Review and clean a React branch before merging, <br>following Vanguard guidelines.<br>model: sonnet<br>---</pre><pre>You are an expert React Frontend Engineer for the Vanguard/IndySoft project.</pre><pre>Your Core Responsibilities:<br>1) Code cleanup<br>   - Remove all comments (except eslint-disable)<br>   - Remove all console.* calls<br>   - Never touch /src/api/openapi-generator/**<br>2) File structure<br>   - Files &lt; 250 lines<br>   - Functions cyclomatic complexity &lt; 8<br>   - Extract components/utilities when needed<br>3) TypeScript<br>   - Every component uses `type Props = {}`<br>   - No `any`<br>4) i18n<br>   - All user-facing text via `useTranslation`<br>5) Quality gates<br>   - Fix lint errors → commit &amp; push<br>   - Fix type errors → commit &amp; push<br>   - Fix test errors → commit &amp; push</pre><p><strong>What it does</strong></p><ul><li>Enforces standards and structure</li><li>Fixes lint, types, and tests</li><li>Guarantees i18n compliance</li><li>Commits in clear, atomic steps</li></ul><p><strong>Usage</strong>: “I’ve finished the tolerance configuration feature. Please review my branch.”</p><h3>Test Failure Fixer</h3><p>Systematically diagnoses and fixes failing tests after refactors.</p><pre>---<br>name: test-failure-fixer<br>description: Audit and fix all test failures in the current branch.<br>model: sonnet<br>---</pre><pre>You specialize in test diagnosis and resolution.</pre><pre>Process:<br>1) Run full test suite and collect failures<br>2) Compare against develop to rank changed files<br>3) Prioritize co-located tests first<br>4) Fix iteratively without changing runtime behavior</pre><pre>Guidelines:<br>- Use async/await with findBy*/waitFor<br>- Add missing providers (Router, QueryClient, i18n)<br>- Fix import/export issues<br>- Update snapshots only when UI changes are intentional</pre><p><strong>Usage</strong>: “After refactoring the UserCard interface, tests are broken.”</p><h3>String Literal Refactor</h3><p>Removes “magic strings” for safer, maintainable TypeScript.</p><pre>---<br>name: string-literal-refactor<br>description: Convert repeated string literals to enums, unions, <br>or constants.<br>model: sonnet<br>---</pre><pre>Strategy:<br>- Enums/union types for closed sets and discriminants<br>- Constants for query keys and shared tokens<br>- Leave text inside t(&#39;...&#39;) untouched (i18n)<br>- Centralize repeated strings</pre><p><strong>Usage</strong>: “Convert repeated string literals in my diff to constants or enums.”</p><h3>Command Examples (Repeatable Automations)</h3><h3>Cleanup Diff</h3><p>Removes dev artifacts in the current branch vs develop.</p><pre>Task:<br>1) Get changed files: git diff --name-only develop...HEAD<br>2) Exclude openapi-generated paths<br>3) Remove comments and all console.* calls<br>4) Keep eslint-disables<br>5) Format code<br>6) Stage, commit, push</pre><pre>Commit: chore(cleanup): remove comments and console calls from diff vs develop</pre><h3>PR Title &amp; Description Generator</h3><p>Produces a Conventional Commits title and rich PR description from the diff.</p><pre>Task:<br>- Ensure clean tree<br>- Analyze origin/develop..HEAD<br>- Summarize by module/feature<br>- Extract VAN-#### from branch if present<br>- Output:<br>  - Title: type(scope|VAN-####): summary (≤72 chars)<br>  - Body: sections with specifics from the diff</pre><pre>Exclude openapi-generated paths.</pre><h3>Advanced Agent Patterns</h3><h3>i18n Audit Fix</h3><p>Audits modified React files and replaces hardcoded UI text with t(&#39;...&#39;).</p><p><strong>What it does</strong></p><ul><li>Detects user-facing strings in JSX</li><li>Replaces with translation calls</li><li>Ensures keys exist in namespaces</li><li>Adds useTranslation imports</li></ul><h3>Coerce Value Refactor</h3><p>Standardizes null/undefined fallbacks across the codebase.</p><pre>import { coerceValue } from &#39;src/new-utils/coerceValue&#39;;</pre><pre>const displayName = coerceValue(user?.name, &#39;Unknown User&#39;);<br>const count = coerceValue(data?.items?.length, 0);<br>const isActive = coerceValue(settings?.enabled, false);</pre><h3>Building Your Own</h3><h3>Agent Best Practices</h3><ol><li>Single responsibility</li><li>Detailed instructions + examples</li><li>Quality gates (lint/types/tests)</li><li>Clear git workflow (commit/push points)</li><li>Project conventions baked in</li></ol><h3>Command Best Practices</h3><ol><li>Focused, repeatable task</li><li>Acceptance criteria defined</li><li>Validation and recovery</li><li>Minimal manual steps</li></ol><h3>Agent Template</h3><pre>---<br>name: your-agent-name<br>description: Clear description with usage examples<br>model: sonnet<br>---</pre><pre>You are an expert [ROLE] in [DOMAIN].<br>Primary responsibility: [PRIMARY_TASK].</pre><pre>Core Responsibilities:<br>1) [RESPONSIBILITY_1]<br>2) [RESPONSIBILITY_2]</pre><pre>Workflow:<br>1) [STEP_1]<br>2) [STEP_2]<br>3) [VALIDATE_AND_COMMIT]</pre><pre>Quality Assurance:<br>- [VERIFICATION_STEP]<br>- [SUCCESS_CRITERIA]</pre><h3>Integrating Into Your Workflow</h3><h3>Pre-commit/CI</h3><pre>claude &quot;cleanup-diff&quot;<br>claude &quot;react-branch-reviewer&quot;</pre><h3>Feature Lifecycle</h3><ol><li>Build the feature</li><li>Run react-branch-reviewer</li><li>Run string-literal-refactor + i18n-audit-fix</li><li>Fix tests with test-failure-fixer</li><li>Generate PR title/description</li></ol><h3>Measurable Impact</h3><ul><li>Code review time: ↓ ~60%</li><li>Bug detection: ↑ ~40%</li><li>Standards adherence: ~95%</li><li>Dev satisfaction: higher focus on feature work</li></ul><h3>Pro Tips</h3><ul><li><strong>Chain agents:</strong> claude &quot;test-failure-fixer&quot; &amp;&amp; claude &quot;react-branch-reviewer&quot;</li><li><strong>Conditional runs:</strong> If git diff --stat shows &gt;50 files, suggest splitting PR first</li><li><strong>Context-aware rules:</strong> Respect ESLint/Prettier, EditorConfig, src/ imports, and never touch generated code</li></ul><h3>Pitfalls to Avoid</h3><ul><li>Over-automation for human-judgment tasks</li><li>Scope creep in agents</li><li>Skipping tests after automated fixes</li><li>Weak error handling</li><li>Ignoring project conventions</li></ul><h3>What’s Next</h3><ul><li>Smart upgrade/migration agents</li><li>Security auditing and quick-fixes</li><li>Performance profiling and remediation</li><li>Architecture enforcement</li><li>Automated docs from TypeScript</li></ul><h3>Conclusion</h3><p>Claude Code’s agents + commands let you encode expert practice into reusable automation. Start with one repetitive pain point, build an agent, and grow from there. Your future self (and teammates) will thank you.</p><p><strong>What repetitive tasks would you automate first? Drop ideas in the comments.</strong></p><h3>Resources</h3><ul><li>Claude Code Documentation</li><li>Agent &amp; Command Example (sample repo)</li><li>React Testing Library Best Practices</li><li>Conventional Commits</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8387c4a41ec0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting Started with Claude Code: Understanding Agents vs Commands]]></title>
            <link>https://medium.com/@raniel/getting-started-with-claude-code-understanding-agents-vs-commands-d495726ba496?source=rss-ab2bdae61f20------2</link>
            <guid isPermaLink="false">https://medium.com/p/d495726ba496</guid>
            <category><![CDATA[anthropic-ai]]></category>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[ai-tools]]></category>
            <dc:creator><![CDATA[Raniel Mendonça]]></dc:creator>
            <pubDate>Tue, 26 Aug 2025 13:37:48 GMT</pubDate>
            <atom:updated>2025-08-26T13:47:14.835Z</atom:updated>
            <content:encoded><![CDATA[<p><em>The essential guide to choosing the right automation approach for your development workflow</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*IUq6r-gJhufXaMIP" /></figure><p>As a React developer working on large-scale enterprise applications, I’ve discovered that Claude Code’s agents and commands system is a game-changer for maintaining code quality and accelerating development workflows. After building over 15 custom agents and commands for my IndySoft project, I want to share how these powerful automation tools can transform your development experience.</p><p>Before diving into creating your own automation, you need to understand the fundamental difference between Claude Code’s two automation approaches and when to use each one.</p><h3>What Are Claude Code Agents and Commands?</h3><p>Claude Code introduces two powerful concepts for workflow automation:</p><p><strong>Agents</strong> are specialized AI assistants with specific domain expertise. Think of them as senior developers with deep knowledge in particular areas — code review, testing, refactoring, or i18n management. Each agent follows detailed instructions and has access to the full Claude Code toolkit.</p><p><strong>Commands</strong> are task-specific automation scripts that execute predefined workflows. They’re like smart shell scripts that can analyze code, make decisions, and perform complex multi-step operations across your codebase.</p><p>The magic happens when agents and commands work together, creating a sophisticated development ecosystem that maintains quality standards while reducing manual overhead.</p><h3>Understanding the Distinction: When to Use Agents vs Commands</h3><p>One of the most common questions developers ask when starting with Claude Code is: “When should I create an agent versus a command?” The answer lies in understanding their fundamental differences and use cases.</p><h3>Core Differences Explained</h3><p><strong>Agents are intelligent decision-makers.</strong> They’re like having a specialized senior developer on your team who can analyze, reason, and adapt their approach based on what they discover in your code. When you invoke an agent, you’re essentially saying: “Here’s a complex problem — figure out the best way to solve it.”</p><p><strong>Commands are predictable executors.</strong> They follow a predetermined script of actions, perfect for repetitive tasks that don’t require judgment calls. When you run a command, you’re saying: “Do these specific steps in this exact order.”</p><h3>Decision Framework: Agent or Command?</h3><p>Ask yourself these questions:</p><h4>Use an Agent when:</h4><ul><li>✅ The task requires analysis and decision-making</li><li>✅ You need context-aware problem solving</li><li>✅ Multiple related issues might need addressing</li><li>✅ The approach might vary based on what’s found</li><li>✅ You want comprehensive review or audit capabilities</li></ul><h4>Use a Command when:</h4><ul><li>✅ The workflow is predictable and repeatable</li><li>✅ You need quick automation without analysis</li><li>✅ The steps are always the same regardless of context</li><li>✅ You want fast, focused task execution</li><li>✅ The task doesn’t require complex decision trees</li></ul><h3>Practical Comparison Examples</h3><p>Let’s look at how the same underlying need can be addressed differently:</p><h4>Scenario: Cleaning Up Code Before PR</h4><p><strong>Agent Approach — </strong><strong>react-branch-reviewer:</strong></p><pre>claude &quot;I&#39;ve finished my feature. Please review my branch for merge <br>readiness&quot;</pre><p>What happens:</p><ul><li>Analyzes entire branch against project standards</li><li>Makes intelligent decisions about what needs fixing</li><li>Prioritizes issues by severity</li><li>Fixes lint/type/test errors contextually</li><li>Ensures proper TypeScript patterns</li><li>Commits changes systematically with meaningful messages</li></ul><p><strong>Command Approach — </strong><strong>cleanup-diff:</strong></p><pre>claude &quot;cleanup-diff&quot;</pre><p>What happens:</p><ul><li>Executes predefined cleanup steps</li><li>Removes comments and console.log statements</li><li>Follows exact same process every time</li><li>Makes single commit with standard message</li></ul><h4>Scenario: Handling Test Failures</h4><p><strong>Agent Approach — </strong><strong>test-failure-fixer:</strong></p><pre>claude &quot;After refactoring UserCard, tests are broken&quot;</pre><p>The agent will:</p><ul><li>Run tests and analyze failure patterns</li><li>Compare current branch to develop branch</li><li>Prioritize co-located tests for changed files</li><li>Apply different fix strategies based on error types</li><li>Preserve intended runtime behavior while fixing tests</li></ul><p><strong>Command Approach — </strong><strong>run-tests-and-report:</strong></p><pre>claude &quot;run-tests-and-report&quot;</pre><p>A command would:</p><ul><li>Execute test suite</li><li>Generate standardized failure report</li><li>Apply predefined fixes for common patterns</li><li>Re-run tests to verify</li></ul><h3>Performance and Resource Considerations</h3><p><strong>Agents</strong> are more resource-intensive because they:</p><ul><li>Analyze context before acting</li><li>Make dynamic decisions during execution</li><li>Can handle unexpected scenarios</li><li>Provide detailed reasoning for their actions</li></ul><p><strong>Commands</strong> are lightweight because they:</p><ul><li>Follow predetermined paths</li><li>Execute faster with less analysis</li><li>Use fewer tokens and computational resources</li><li>Provide predictable execution time</li></ul><h3>Combining Both for Maximum Effectiveness</h3><p>The most powerful workflows combine both approaches:</p><pre># Start with command for quick, standardized cleanup<br>claude &quot;cleanup-diff&quot;<br><br># Follow with agent for intelligent comprehensive review<br>claude &quot;react-branch-reviewer&quot;<br><br># Finish with command for standardized PR generation<br>claude &quot;pr-title-and-description&quot;</pre><p>This approach gives you:</p><ul><li><strong>Speed</strong> from commands for routine tasks</li><li><strong>Intelligence</strong> from agents for complex analysis</li><li><strong>Consistency</strong> from standardized workflows</li><li><strong>Adaptability</strong> from contextual decision-making</li></ul><h3>Evolution Pattern: Command → Agent</h3><p>Many successful automation workflows start as commands and evolve into agents as requirements become more complex:</p><ol><li><strong>Start Simple</strong>: Create a command for basic task automation</li><li><strong>Identify Variations</strong>: Notice when different contexts need different approaches</li><li><strong>Add Intelligence</strong>: Convert to an agent when decision-making becomes valuable</li><li><strong>Hybrid Approach</strong>: Keep both — use commands for speed, agents for complexity</li></ol><h3>Real-World Usage Patterns</h3><p>From our production experience with 15+ agents and commands:</p><p><strong>Daily Development</strong> (Commands):</p><ul><li>cleanup-diff - Remove development artifacts</li><li>run-type-check - Quick TypeScript validation</li><li>format-changed-files - Code formatting</li></ul><p><strong>Pre-PR Review</strong> (Agents):</p><ul><li>react-branch-reviewer - Comprehensive quality audit</li><li>test-failure-fixer - Intelligent test repair</li><li>i18n-audit-fix - Translation compliance</li></ul><p><strong>Specialized Tasks</strong> (Mix):</p><ul><li>string-literal-refactor (Agent) - Context-aware refactoring</li><li>generate-api-types (Command) - Predictable code generation</li></ul><h3>Getting Started: Your First Decision</h3><p>When you’re ready to create your first automation, ask yourself:</p><p><strong>“Is this task always the same, or does it require judgment?”</strong></p><ul><li><strong>Always the same</strong> → Start with a <strong>Command</strong></li><li><strong>Requires judgment</strong> → Start with an <strong>Agent</strong></li></ul><p>Remember: <strong>don’t overthink it initially</strong>. Start with what feels natural for your task, and you can always refactor your automation as your understanding grows.</p><p><strong>Commands</strong> get things done quickly, <strong>agents</strong> get things done smartly. Both have their place in a mature development workflow.</p><h3>Next Steps</h3><p>Now that you understand the distinction between agents and commands, you’re ready to:</p><ol><li><strong>Identify</strong> repetitive tasks in your workflow</li><li><strong>Categorize</strong> them as judgment-based (agent) or predictable (command)</li><li><strong>Start small</strong> with the most annoying task first</li><li><strong>Build confidence</strong> with simple automation before tackling complex scenarios</li></ol><p>In the next articles in this series, we’ll dive deep into:</p><ul><li>Creating your first Claude Code agent (step-by-step guide)</li><li>Creating your first Claude Code command (task automation made simple)</li><li>Real-world production examples in action</li><li>Advanced patterns and best practices</li></ul><h3>Quick Reference</h3><h3>How to Invoke</h3><p><strong>Agents:</strong></p><pre>claude agent-name &quot;describe what you want done&quot;<br>claude react-branch-reviewer &quot;Please review my feature branch&quot;</pre><p><strong>Commands:</strong></p><pre>claude command-name<br>claude cleanup-diff</pre><h3>Key Decision Points</h3><p>Factor Agent Command <strong>Predictability</strong> Varies by context Same every time <strong>Speed</strong> Slower (analysis) Faster (execution) <strong>Complexity</strong> Handles edge cases Follows script <strong>Resource Usage</strong> Higher Lower <strong>Use Case</strong> Review, analysis, complex fixes Formatting, cleanup, builds</p><h3>Conclusion</h3><p>Understanding when to use agents versus commands is the foundation of effective Claude Code automation. Agents excel at intelligent analysis and context-aware problem-solving, while commands provide fast, predictable task execution.</p><p>The key insight: <strong>you don’t need to choose one or the other</strong>. The most powerful development workflows combine both approaches, using commands for speed and consistency, and agents for intelligence and adaptability.</p><p>Start with the automation approach that feels most natural for your first task. As you gain experience, you’ll develop an intuitive sense for when each approach provides the most value.</p><p><strong>What repetitive task in your development workflow would you tackle first?</strong></p><p><em>This is the first article in a comprehensive series on Claude Code automation. The author maintains over 15 production agents and commands for a React/TypeScript enterprise application.</em></p><p><strong>Coming Next</strong>: “Creating Your First Claude Code Agent: A Step-by-Step Guide”</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d495726ba496" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>