Claude Code & TYPO3: A Practical Developer Guide

Claude Code & TYPO3: A Practical Developer Guide

Claude Code brings agentic AI coding to TYPO3 development. This guide shows you how to combine your TYPO3 expertise with AI assistance to build extensions faster while maintaining code quality and architectural integrity.

TYPO3 extension development requires deep knowledge of Extbase, Fluid, TCA configurations, and TypoScript. Claude Code doesn't replace that expertise, it amplifies it. Think of Claude Code as a highly skilled assistant that handles boilerplate, maintains coding standards, and speeds up repetitive tasks while you focus on architecture and business logic.

The reality is simple: AI + Your TYPO3 Knowledge = Better Productivity. Claude Code excels at structure generation and pattern implementation, but you still need to understand what you're building, validate outputs, and make architectural decisions. This guide shows you how to leverage both effectively.

What is Claude Code?

Claude Code is Anthropic's command-line agentic coding tool from the Claude 4 model family. Unlike autocomplete tools, it operates autonomously across your entire codebase, planning, executing multi-file changes, and integrating with git workflows.

Key characteristics:

  • Agentic behavior: Plans and executes changes with minimal supervision
  • Full codebase understanding: Analyzes project structure before making changes
  • Multi-file operations: Edits multiple files while maintaining consistency
  • Git integration: Creates contextual commits and manages branches
  • TYPO3 pattern recognition: Understands extension conventions, TCA syntax, Extbase patterns, and TypoScript

Claude Code Architecture:

Manual vs AI-Assisted Development: The Honest Reality

AspectManual DevelopmentClaude Code + Your Expertise
SpeedMethodical, complete controlFast scaffolding, requires validation
Code QualityDepends entirely on your skillConsistent patterns, needs edge case review
LearningDeep understanding from ground upFaster results, but can mask knowledge gaps
Complex LogicPrecise implementationNeeds clear specifications and review
MaintenanceFull ownership of every lineGood prompts = maintainable code
CostYour time onlyAPI costs + review time

Key Insight: Claude Code works best when you understand TYPO3 well enough to write effective prompts, validate outputs, and catch mistakes. It's a productivity multiplier, not a skill replacement.

System Requirements

Checklist:

  • [ ] Node.js 18.0 or higher
  • [ ] Anthropic API account
  • [ ] TYPO3 Composer-based installation
  • [ ] Git configured
  • [ ] Terminal access
  • [ ] IDE (VS Code or PhpStorm recommended)

Installing Claude Code

Quick installation:

# Install globally
npm install -g @anthropic-ai/claude-code

# Authenticate
claude-code auth

# Or set API key manually
export ANTHROPIC_API_KEY="your-api-key"

IDE Integration Setup

Claude Code integrates with popular IDEs for seamless workflow.

General integration benefits:

  • Context-aware suggestions based on current file
  • Inline previews before accepting changes
  • Diff views for comparing AI-generated code
  • Quick access via keyboard shortcuts
  • Integrated git staging of changes
  • Immediate syntax validation

Setup resources:

The Single Prompt Approach

Effective Claude Code usage starts with comprehensive prompts. Include extension purpose, data model, features, and technical requirements in one conversation starter.

Example: News Comments Extension

Create a TYPO3 extension called "news_comments".

Purpose: Frontend comment system for news articles with moderation.

Data model:
- Comment table with fields: author, email, content, news_uid, 
  status (pending/approved/rejected), created_at
- Relation to ext:news

Features:
- Frontend comment form plugin
- Backend moderation module
- Email notifications

Technical:
- Extbase/Fluid patterns
- PSR-12 standards
- Include TypoScript, TCA, composer.json

What gets generated:

news_comments/
├── Classes/
│   ├── Controller/ (Comment, Moderation)
│   ├── Domain/Model/ (Comment)
│   ├── Domain/Repository/ (CommentRepository)
│   └── Service/ (NotificationService)
├── Configuration/
│   ├── TCA/ (comment configuration)
│   ├── TypoScript/ (setup, constants)
│   └── Backend/ (module registration)
├── Resources/Private/Templates/
├── composer.json
├── ext_emconf.php
├── ext_localconf.php
└── ext_tables.sql

Generation time: ~3 minutes
Manual equivalent: 3-4 hours

Quick Review & Refinement

Validation checklist:

  • [ ] Namespace matches composer.json
  • [ ] TCA configuration present
  • [ ] Database schema complete
  • [ ] TypoScript plugin registered
  • [ ] Templates include ViewHelper imports

Follow-up prompts for adjustments:

"Add a rating field (1-5 stars) to comments with frontend display"
"Create HTML email template for admin notifications"
“Add German and French localization files”

Pro Tip: Claude Code maintains conversation context. Reference files by name for quick modifications without re-explaining the structure.

Installation

# Install in your TYPO3 project
composer require mycompany/news-comments:@dev
./vendor/bin/typo3 extension:activate news_comments
./vendor/bin/typo3 database:updateschema
./vendor/bin/typo3 cache:flush

Example 1: Custom Content Element

Scenario: Testimonial content element with author info, quote, and rating.

Prompt:

Create a TYPO3 testimonial content element in "site_package" extension.
Fields: author_name, author_role, company, testimonial_text, 
rating (1-5 stars), author_image (FAL).
Include backend preview, responsive frontend template, TypoScript setup.
Use tt_content approach.

Generated:

  • TCA override for tt_content
  • TypoScript FLUIDTEMPLATE configuration
  • Fluid template with star rating display
  • PageTSconfig for content wizard

Time: ~2 minutes | Manual: 1.5 hours

Example 2: Product Catalog with Variants

Scenario: E-commerce products with size/color variants and stock tracking.

Prompt:

Create "product_catalog" extension.
Models: Product (title, price, sku), ProductVariant (size, color, stock), 
ProductImage (FAL).
Backend: List module with filters, inline editing, stock indicators.
Frontend: Product list, single view with variant selector.

Generated:

  • 3 Extbase models with relationships
  • Repository with custom queries
  • Backend module with filtering
  • Frontend controller and templates
  • Complete TCA with inline records

Time: ~5 minutes | Manual: 10-12 hours

Example 3: Legacy Extension Migration

Scenario: Update old extension to modern TYPO3 with API replacements.

Prompt:

Migrate "events_calendar" extension to modern TYPO3.
Fix: Old namespaces (Tx_ prefix), deprecated BackendUtility calls, 
wizard TCA syntax, $GLOBALS['TYPO3_DB'] queries.
Update to PSR-4, QueryBuilder, modern TCA, proper plugin registration.

Generated updates:

  • Namespace conversions across 8 files
  • TCA modernization (wizard → renderType
  • Database queries to Doctrine DBAL
  • Proper plugin registration
  • composer.json with PSR-4 autoloading

Time: ~15 minutes | Manual: 1-2 days

What is T3AB?

T3AB (TYPO3 AI Builder) is an extension providing AI-powered development directly in TYPO3 backend. While Claude Code works from command line, T3AB offers visual interfaces for content creation.

Core capabilities:

  • AI-powered content block generation
  • Visual TYPO3 Core forms builder
  • Extension scaffolding through backend UI
  • Compatible with modern TYPO3 versions

Feature Comparison

FeatureClaude CodeT3AB
EnvironmentCommand-line toolTYPO3 backend module
Setupnpm + API keyExtension install
Full Codebase Access-
Visual Interface-
Multi-extension Work-
Content Block BuilderCode-based✓ Visual builder
Git Integration✓ NativeManual

Choosing the Right Tool

Use Claude Code for:

  • Complex extensions with custom logic
  • Multi-extension refactoring
  • Legacy code migrations
  • Automated testing workflows
  • Full control over generated code

Use T3AB for:

  • Quick content block creation
  • Visual form building
  • Backend-only workflows
  • Training non-technical team members
  • Rapid content element prototyping

Combined approach: Claude Code handles core extension architecture and business logic, while T3AB empowers content teams to create visual content blocks without leaving TYPO3 backend.

Multi-File Operations

  • Refactor namespaces across entire projects
  • Update deprecated APIs in multiple extensions simultaneously
  • Standardize coding conventions project-wide

Example: “Update all extensions in packages/ to use modern TYPO3 APIs and create a summary report”

Best Practices Integration

  • Automatically apply PSR-12 coding standards
  • Enforce TYPO3 Coding Guidelines
  • Generate proper PHPDoc blocks

Example: “Audit extension for PSR-12 compliance and fix all violations”

Git Workflow Automation

  • Generate contextual commit messages
  • Create feature branches with descriptions
  • Prepare pull request documentation

Example: “Create feature branch for comment system, commit changes, and generate PR description”

Performance Optimization

  • Identify N+1 query problems
  • Suggest database indexing
  • Recommend caching strategies

Example: “Analyze ProductRepository and suggest performance optimizations for query efficiency”

Effective Prompting

Do ✓Don't ✗
Specify complete data modelsGive vague descriptions
Mention PSR standardsSkip architectural requirements
Include example structuresAssume Claude knows your conventions
Request documentationGenerate undocumented code
Test incrementallyCreate entire systems in one prompt
Specify dependenciesIgnore existing extensions

Pro Tip: Start with project context:

"TYPO3 project with ext:news and ext:powermail. Custom extensions 
use 'MyCompany' vendor. Follow PSR-12. Remember this context"

Security Review Checklist

  • [ ] Input sanitization on all forms
  • [ ] Proper Fluid escaping
  • [ ] QueryBuilder with parameter binding
  • [ ] File upload validation
  • [ ] XSS protection in templates
  • [ ] CSRF tokens on forms
  • [ ] Access control in controllers

Warning: Always review AI-generated code for security vulnerabilities before deployment.

Installation issues:

# Check Node.js version
node --version  # Should be 18+

# Reinstall if needed
npm install -g @anthropic-ai/claude-code

# Verify authentication
claude-code auth

TCA errors: Use Claude Code to debug: “Review TCA configuration for Comment model. I'm getting 'Unknown field type' error”

Extension not appearing:

  • Verify composer.json has "type": “typo3-cms-extension”
  • Run composer dump-autoload
  • Clear caches: ./vendor/bin/typo3 cache:flush

Context limitations: Break large tasks into smaller prompts: “Focus only on Classes/Controller/ directory for this refactoring”

Claude Code transforms TYPO3 development by handling boilerplate and maintaining standards, letting you focus on architecture and business logic. The key is combining your TYPO3 expertise with AI assistance, not replacing one with the other.

Remember: Effective use requires understanding what to build, how to prompt clearly, and when to review critically. Your TYPO3 knowledge remains essential for architectural decisions, security review, and quality validation.

Next in series: We'll explore Cursor, the AI-first code editor with inline completion and codebase chat, comparing its IDE-native experience with Claude Code's command-line approach.

Yes, it needs API connection to Anthropic's servers for all operations.

Yes, Claude Code excels at refactoring, debugging, and modernizing existing codebases.

Absolutely. Claude Code amplifies your knowledge but doesn't replace it. You need TYPO3 expertise to write effective prompts and validate outputs.

Claude Code uses Anthropic's API with usage-based pricing. Check their pricing page for current rates based on token consumption.

Always review outputs. Use follow-up prompts to fix issues: "The TCA has a syntax error in line 45. Fix the field type declaration."

Yes, it works with standard git workflows. Each developer uses it independently and merges through version control.

Your One-Stop Solutions for Custom TYPO3 Development

  • A Decade of TYPO3 Industry Experience
  • 350+ Successful TYPO3 Projects
  • 87% Repeat TYPO3 Customers
TYPO3 Service
wolfgang weber

Post a Comment

×