Claude Code Routines by Anthropic automate codebase tasks such as security audits and code improvements by running scheduled or event-triggered prompts that analyze and modify codebases, creating pull requests for enhancements or fixes without manual intervention. Demonstrated through examples like adding features to a to-do app and fixing OWASP top 10 vulnerabilities, these routines operate in the cloud, improving code maintenance and security continuously while allowing developers to review changes before merging.
The video introduces Claude Code Routines, a new feature by Anthropic that automates codebase tasks such as security audits and code improvements on a schedule or triggered by events. The presenter demonstrates how Claude Code Routines can scan an entire codebase for security vulnerabilities, specifically against the OWASP top 10, and automatically create pull requests to fix any issues without manual intervention. This automation runs in the cloud, allowing it to operate independently of the user’s local machine, making it a powerful tool for continuous code maintenance and security.
Routines in Claude Code are essentially automated prompts configured to run on a schedule, via API calls, or triggered by external events like GitHub pull requests. By linking a GitHub repository to a routine, Claude Code can analyze and modify the codebase based on the instructions provided. The presenter highlights the ease of setting up routines, noting that users can select the repository, define the prompt, choose the trigger frequency, and add connectors such as Gmail for notifications. The feature is available with usage limits depending on the subscription plan.
The presenter walks through creating two routines from scratch. The first is an “auto improver” routine that explores the codebase to identify meaningful improvements, such as UI enhancements or new features, and then creates a pull request with the proposed changes. In the demo, Claude Code identified a missing edit feature in a simple to-do app and implemented it, showcasing how the routine can enhance applications over time without direct developer input. The changes are isolated in a feature branch, allowing for review before merging.
The second routine demonstrated is a security audit based on the OWASP top 10 web application security risks. The presenter explains that the security scanner skill, which must be installed within the project repository, is used by the routine to perform a thorough audit and automatically fix vulnerabilities. In the demo app, hard-coded API keys and other security flaws were detected and resolved, with a detailed audit report generated and stored in the repository. The routine also automatically merged the fixes into the main branch, significantly improving the app’s security posture.
In conclusion, Claude Code Routines offer a transformative way to automate routine coding tasks, especially security audits, making it easier to maintain and improve codebases continuously. The presenter encourages viewers to try out these routines in their projects and highlights additional resources like the Agenteclabs community for those interested in advancing their agentic coding skills. The video emphasizes the value of these routines in enhancing productivity and security, inviting viewers to subscribe and engage with further content.