cd /news/artificial-intelligence/how-i-automated-my-side-project-to-e… · home › topics › artificial-intelligence › article
[ARTICLE · art-162718] src=dev.to ↗ pub= topic=artificial-intelligence verified=true sentiment=↑ positive

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.

by read3 min views1 publishedNov 2, 2026

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. 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:

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}"
                )
            }
        ]
    )

    return response.content[0].text

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:

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)

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!

── more in #artificial-intelligence 4 stories · sorted by recency
── more on @anthropic 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/how-i-automated-my-s…] indexed:0 read:3min 2026-11-02 · —