How I Automated My Side Project to Earn While I Sleep Using Claude A developer automated a niche technical newsletter and code-auditing side project using Python and the Anthropic API, running the pipeline on a cron job to generate subscriber reports and process micro-payments without manual intervention. The setup uses claude-opus-5 with adaptive thinking and high effort for deep code analysis, and claude-sonnet-5 with a JSON-schema output_config to produce structured audit results for a backend database. The developer notes that temperature, top_p and top_k parameters have been removed, with behavior now steered through explicit prompt instructions. 3 min read · 606 words We’ve all heard the holy grail of indie hacking: making money while you sleep. But let's be real—most "passive income" projects require active maintenance, bug fixing, and endless content creation. Until recently, my side project—a niche technical newsletter and automated code-auditing service—was eating up my weekends. I spent hours curating updates, writing summaries, and generating custom feedback reports for users. Then I decided to completely automate the pipeline using Python and the Anthropic API https://console.anthropic.com/ . Now, the system runs autonomously on a cron job, delivering value to subscribers and processing micro-payments without my intervention. Here is how I built it. The system is straightforward: claude-opus-5 analyzes the data, extracts key insights, and drafts personalized user reports. Because we are working with heavy processing tasks that exceed standard token limits, we need to stream the response and leverage adaptive thinking for deep code analysis. First, install the latest Anthropic SDK: pip install anthropic Here is the core script that powers the automated analysis. Notice how we use claude-opus-5 , enable adaptive thinking, and omit parameters like temperature which have been removed in the current API version: python import anthropic client = anthropic.Anthropic def generate nightly report raw code data: str - str: response = client.messages.create model="claude-opus-5", max tokens=25000, thinking={"type": "adaptive"}, output config={"effort": "high"}, messages= { "role": "user", "content": "Analyze the following repository data and generate a concise, " "high-value security audit and summary for our subscribers:\n\n" f"{raw code data}" } Extract the text content block from the response return response.content 0 .text Example execution if name == " main ": sample data = "Repo: async-cache-tools | PR 42: Memory leak in worker pool cleanup." report = generate nightly report sample data print "Generated Autonomous Report:" print report To make the automation fully hands-off, the reports need to be automatically categorized and saved to a database. Instead of relying on prompt engineering alone, we use output config={"format": {...}} to guarantee a clean JSON payload. Here is how we structure the output for our backend database: python import json import anthropic client = anthropic.Anthropic def generate structured audit issue description: str - dict: response = client.messages.create model="claude-sonnet-5", max tokens=8000, output config={ "format": { "type": "json schema", "schema": { "type": "object", "properties": { "severity": {"type": "string", "enum": "low", "medium", "high", "critical" }, "summary": {"type": "string"}, "actionable fix": {"type": "string"} }, "required": "severity", "summary", "actionable fix" } } }, messages= { "role": "user", "content": f"Audit this bug report and return the required JSON schema: {issue description}" } return json.loads response.content 0 .text Example execution if name == " main ": bug = "Database connection pool exhausts under heavy concurrent load." audit json = generate structured audit bug print json.dumps audit json, indent=2 temperature , top p , and top k are gone. Steer your model's creativity and focus entirely through clear, explicit prompt instructions and the output config={"effort": ...} setting. output config to enforce structured data types every single time. By combining robust backend cron jobs with the raw analytical power of claude-opus-5 and claude-sonnet-5 , my side project now runs like a well-oiled machine while I sleep. Have you automated your side projects using AI yet? Drop a comment below or share what models you are deploying in production