Anthropic Revolutionizes Development with Claude Code Routines

Le brief IA que les pros lisent chaque soir
Les 7 actus IA du jour, décryptées en 5 min. Gratuit.
Inclus dès l'inscription : notre sélection des meilleurs guides & comparatifs IA.
Choisis ton rythme
Gratuit · Pas de spam · Désabonnement en 1 clic
With the introduction of Claude Code routines, Anthropic offers a significant advancement for developers by automating repetitive tasks. Launched in mid-April, these routines allow for autonomous management of code, files, and machines, even overnight. When used effectively, they can save developers valuable time by automating repetitive workflow tasks.
Simplified Routine Configuration
To configure a Claude Code routine, simply access Claude's graphical interface, select "Code," and then "Routines." Each routine consists of a prompt, a trigger, and connectors. Routines primarily run in the cloud, but can also function locally if the machine is powered on. In cloud mode, Claude Code uses a GitHub repository as the workspace, while in local mode, a target folder must be specified.
Users can choose between "Local" execution for tasks like folder sorting or "Remote" for automated code reviews. The graphical configurator allows for the definition of the routine's name, description, and prompt. In cloud mode, the trigger can be a fixed time, a GitHub event, or an API call from your application. In local mode, only the schedule is available as a trigger. Usual connectors can be added or removed as needed, but it is crucial not to grant access to sensitive connectors. For example, a routine can scan your emails every morning before you wake up and classify them automatically.
Limitations and Use Cases
The creation of routines is limited to 5 per day for a Pro account, 15 for a Max account, and 25 for Team or Enterprise offerings. The tokens used are deducted from the usual Claude Code quota, just like any standard usage.
Nightly Code Review
One of the most useful applications is the automated code review, which can be scheduled every night. This routine not only analyzes the codebase but also includes a security audit. The analysis covers three areas: code quality, documentation, and security. It is scheduled each night to take advantage of the broader token usage limit and submits a Pull Request in the morning with corrections categorized by severity.
Prompt to use:
“You are a senior expert in code review and application security auditing, specializing in OWASP Top 10, CWE, and DevSecOps best practices. Your mission is to conduct a comprehensive review of this entire codebase covering three areas.
- First area, code quality: readability, cyclomatic complexity, duplication, adherence to language conventions, error handling, test coverage, and technical debt.
- Second area, documentation: presence and relevance of docstrings, comments on complex business logic, up-to-date README, consistency between code and existing documentation.
- Third area, security: injections (SQL, command, XSS), management of secrets and environment variables, vulnerable dependencies, authentication and authorization, user input validation, exposure of sensitive data in logs, CORS configuration, data encryption at rest and in transit.
For each identified issue, indicate the affected file and line number, classify the severity (critical, high, medium, low), briefly explain the risk or impact, and propose a concrete correction. Once the analysis is complete, directly apply the corrections in the code by creating a new branch named claude-code/audit-{date}, then open a Pull Request with a structured summary of the changes, grouping changes by category (quality, documentation, security) and by severity. If you encounter a part of the code whose business intent you do not understand, flag it in the PR rather than inventing a correction: it is better to flag a false positive than to break functional logic.”
Automatic Bug Fixing
Claude Code can also handle bug tickets on platforms like Jira. The agent identifies priority bugs, proposes fixes, and submits Pull Requests for each correction. This routine includes a root cause analysis and the creation of tests to validate the fixes, ensuring that the changes do not introduce new errors.
Prompt to use:
“You are a senior expert in debugging and software incident resolution, with solid experience in root cause analysis and non-regressive correction. Your mission is to automatically address bugs reported in the connected ticketing system (Jira, Linear, GitHub Issues, or equivalent based on the available MCP connector). Start by retrieving the complete list of open tickets labeled as bug, incident, or equivalent, which are not already assigned or being processed by a human.
Next, identify the 5 most priority bugs by cross-referencing three criteria: the severity stated in the ticket (critical, major, minor), the recency of the report (a recent bug on a production feature takes precedence over an old bug on a legacy feature), and the functional scope affected (a bug blocking a critical user journey like authentication or payment takes precedence over a display bug).
For each of these 5 bugs, conduct a deep analysis of the relevant code by tracing the stack or the description of the behavior, identify the precise root cause (not just the symptom), and propose a fix that addresses the cause and not the symptom. Before applying the fix, ensure that it does not break existing tests, and if the code area is not covered by tests, add a unit or integration test that reproduces the bug and validates the fix. Create a branch for each bug, named claude-code/fix-{ticket-id}, and submit a separate Pull Request for each fix to facilitate human review and potential rollback.
In each PR, structure the description as follows: reference to the original ticket, description of the observed bug, identified root cause, applied fix, tests added or modified, and any residual risks. If a bug seems to require a product decision (change in business behavior, redesign of a feature, UX arbitration), do not fix it: add a detailed comment on the Jira ticket explaining why human intervention is required and move on to the next bug in the priority list. Never close a ticket yourself: leave this action to the team after PR validation.”
Technology Watch
Finally, Claude Code can conduct a technology watch on relevant open source projects, test these tools in an isolated environment, and provide a structured report with recommendations. This routine includes an analysis of the technical context, targeted monitoring on GitHub, and testing in an isolated environment to assess the relevance of the identified tools.
Prompt to use:
“You are an expert in technology watch and evaluation of open source software, with dual expertise as a software architect and product analyst. Your mission unfolds in four phases.
-
Phase 1, context analysis: explore the codebase to identify the technical stack used (languages, frameworks, main libraries, database, infrastructure), the functional stakes of the application (read the README, documentation files, names of main modules and dependencies to reconstruct the business domain), and friction points or areas where third-party tools could add value (performance, observability, security, DX, test automation, data management, etc.).
-
Phase 2, targeted monitoring: conduct a search on GitHub for relevant open source projects published or significantly updated in the last three months, focusing on those with over 500 stars or showing rapid growth (more than 100 stars per week), and that are compatible with our identified stack from phase 1. Exclude unmaintained projects (last commit over 6 months ago), forks without added value, and projects whose license is incompatible with commercial use (AGPL, SSPL, BSL if you cannot confirm compatibility with our usage model).
-
Phase 3, selection and testing: choose between 3 and 5 projects among the most relevant, prioritizing diversity of use cases covered rather than five variants of the same tool. For each, create an evaluation folder in a dedicated directory /tech-watch/{date}/{project-name}, install the project following its official documentation, configure a minimally viable integration with a representative use case from our codebase (without touching production code: create an isolated sandbox), and execute at least three test scenarios covering a nominal case, an error case, and a boundary case.
-
Phase 4, report and recommendation: write a structured report for each tested project, including a description of the project, test results, identified advantages and disadvantages, and a clear recommendation on whether to integrate the project into our stack. Consider feedback from developers who tested the project, and if possible, propose improvements or adaptations to maximize the added value of the project in our context.”
These innovations from Anthropic with Claude Code promise to transform the way developers manage their projects by automating complex tasks and optimizing the efficiency of their workflows.
Brief IA — L'actualité IA en français
L'essentiel de l'actualité de l'intelligence artificielle, décrypté et expliqué chaque jour.