Skip to main content

Cornell University

From Back-Burner to Production: My First Week with Claude Code

From Back-Burner to Production: My First Week with Claude Code

How an AI coding assistant helped me finally ship the Drupal features our team needed

Six months ago, I was excited.

I’d just discovered the Drupal AI module and Anthropic’s Claude API. The vision was clear: our Arts & Sciences website could automatically generate content summaries when editors published pages. No more manually writing meta descriptions. No more inconsistent summaries across 1,000+ pages. No more page titles as summaries and all the bad SEO that comes from that. Just smart, automated content that would save our team time spent doing a repetitive task.

I got the module installed. I configured the API key. I set up the automators.

And then… nothing happened.

The automators wouldn’t trigger. I’d save a page, check the logs, and see nothing. No errors, no success messages, just silence. I spent a few frustrating sessions digging through configuration files, checking permissions, re-reading documentation. The problem remained mysterious, and my motivation evaporated.

So, I did what we all do with those projects: I told myself I’d come back to it “when I had more time” and moved on to something else. The Drupal AI module sat there, installed but dormant, mocking me every time I saw it in the module list.

Pete’s Nudge

Fast forward to last month. My friend Pete Stergion sent me a link to his blog post about Claude Code. “You should try this,” he said. “It’s different.”

I was skeptical. I’d used ChatGPT and Gemini for code snippets and debugging. It was helpful, but nothing revolutionary. How different could another AI tool really be?

But Pete was enthusiastic, and I trust his judgment on technical tools. So I installed Claude Code and pointed it at my Drupal project.

That was Sunday evening.

Week One: Small Wins That Add Up

By Friday, I’d shipped four features that had been languishing on my to-do list for months.

Monday: The “Cannot Decrement” Mystery

I started by asking Claude Code to help me run a database update that kept failing. The error was cryptic: “Cannot decrement Drupal\as_page_components\Entity\PageComponentEntity.”

Within minutes, Claude had: – Read the update hook code – Identified the problem (entity reference counting issues) – Explained why it was happening – Fixed it with two lines of code

The update that had been failing ran successfully. More importantly, I understood why it failed and how the fix worked.

Tuesday: The Database Pull Dance

My friend Bob Marteal (our web services manager and front-end developer) and I shared a recurring frustration: the post-database-pull routine. Every time we pulled a fresh database from Pantheon to test locally, we’d go through the same manual checklist:

  1. Run lando pull
  2. Wait (and wait some more) for it to finish
  3. Enable development settings
  4. Run database updates
  5. Clear caches
  6. Remember we forgot step 3, do it again
  7. Clear caches again

It was tedious, error-prone, and broke our flow. We’d talked about automating it but… well, you know how those conversations go. “We should really…” followed by “Yeah, someday.”

I asked Claude to help set up a post-database-pull script that would handle all of this automatically. Within 20 minutes, we had scripts/post-db-pull-setup.sh that: – Enables Twig debug and disables caching for local development – Runs any pending database updates – Clears all caches – Runs automatically after lando pull

Bob’s reaction when I showed him? “Wait, it just… does it all now? Why didn’t we do this months ago?”

Good question, Bob. Good question.

Wednesday: Code Quality Debt

I asked Claude to review our custom modules against Drupal coding standards. What I expected: “Looks fine.”

What I got: A comprehensive 35-issue report covering: – Missing docblocks on 14 functions – Logic bugs I didn’t know existed – Duplicate code – Inconsistent formatting

Then Claude fixed all the critical issues—adding proper documentation, removing invalid imports, fixing a logic error that would have caused production problems, and adding error handling I should have written months ago.

Code review is humbling. Code review that then fixes the issues is actually useful.

Thursday: The Field Validation Trap

During testing, I hit another error: “Attempt to read property ‘value’ on null.” Claude immediately spotted the pattern—we were accessing field values without checking if they existed first—and added safety checks to five different functions.

Each fix was explained. Each change was surgical. No unnecessary refactoring, no over-engineering, just solving the actual problem.

Friday: The AI Automators (Finally)

Remember that back-burner project? I asked Claude to help diagnose why the AI automators weren’t triggering.

Turns out the automators were working. They were just failing silently because of an environment variable configuration in my local Lando setup. Claude walked me through: – Verifying the API key was accessible – Checking the key module configuration – Testing the Anthropic connection – Reviewing the automator logs

By Friday afternoon, content summaries were generating automatically. The feature that had frustrated me for months was live.

What Changed

It wasn’t the AI that changed. Claude’s API was the same one I’d tried to use six months ago. What changed was the interface.

Context That Persists

Like Pete discovered, Claude Code maintains context across your entire session. It remembers the file structure, the previous errors, the patterns in your codebase. When I asked it to fix the third field validation error, it didn’t need me to explain the pattern because it had seen the first two.

Reading Before Writing

Claude Code reads files before modifying them. It understands your existing code style. It doesn’t just paste Stack Overflow snippets; it writes code that fits your project.

Explaining, Not Just Fixing

Every fix came with an explanation. “This error happens because Drupal’s entity reference counting…” or “This field might not exist on all entities, so we should check…” I wasn’t just getting code; I was getting a patient pair programming partner.

Small, Testable Changes

No massive refactors. No “while we’re here, let’s redesign everything.” Just focused changes that solved specific problems. I could test each fix immediately and understand exactly what changed. This aligns well with our team’s practices of rapid prototyping and incremental improvements across the platform.

Getting Started

If you’re maintaining a Drupal site (or any codebase, really) and you have a list of tasks that are technically achievable but practically intimidating, try Claude Code.

Quick Start: 

1. Install Claude Code: brew install claude-code (or via npm: npm install -g @anthropic/claude-code)

2. In your shell environment for Claude Code, set the API base URL to https://api.ai.it.cornell.edu and set the API key to your Cornell AI Gateway key.

3. Navigate to your project directory

4. Run claude code 

5. Start with something small: “Can you review this function and check it against Drupal coding standards?”

What Worked for Me: 

Start with diagnosis before solutions – “Why is this error happening?” before “Fix this error”

Ask for reviews, not rewrites – Code review catches more than you’d expect

Test immediately – Small changes mean fast feedback loops

Keep context – Don’t exit Claude Code between related tasks; let it build understanding of your codebase

Fair Warning: – You still need to understand what’s being changed (don’t blindly accept fixes) – Test in a development environment first (always) – Review the diffs (Claude shows you exactly what changed) – Watch those API keys! I had to ask some smart questions so they didn’t get committed to git as config.

The Week in Numbers

  • 4 production features shipped
  • 35 code quality issues fixed
  • ~6 months of procrastination overcome
  • 1 critical bug caught before production
  • Countless hours saved for our content team

But the real win wasn’t the numbers. It was finally understanding why my AI automators weren’t working, shipping code I’d been avoiding, and clearing technical debt that had been nagging at me for months.

Six months of procrastination, gone in a week. Thanks for the nudge, Pete. You were right—it is different.


Want to learn more?

Read Pete’s journey: From ChatGPT to Claude Code 

Claude Code documentation

Drupal AI module