SEO Content Assistant 🚀

A powerful CLI tool for generating SEO-optimized content for the Akkuş Avukatlık website. This tool uses Claude AI to generate high-quality Turkish legal content that ranks well in search engines.

Features

Prerequisites

  1. Node.js >= 20.0.0
  2. ANTHROPIC_API_KEY environment variable set with your Claude API key

Installation

1. Install Anthropic SDK

npm install @anthropic-ai/sdk

2. Set up API Key

# Add to your .env file or shell profile
export ANTHROPIC_API_KEY="sk-your-api-key-here"

3. Make the tool executable (optional)

chmod +x tools/seo-assistant.js

Usage

Basic Help

node tools/seo-assistant.js help

Generate Service Page

node tools/seo-assistant.js generate service

Interactive prompts:

Output:

Generate Blog Post

node tools/seo-assistant.js generate post

Interactive prompts:

Output:

Generate FAQ Content

node tools/seo-assistant.js generate faq

Interactive prompts:

Output:

Optimize Existing Content

node tools/seo-assistant.js optimize seo

Interactive prompts:

Output:

Output Examples

Service Page Structure

Generated files include:

---
slug: bosanma-ve-aile-hukuku
title: Boşanma ve Aile Hukuku
description: Boşanma, nafaka, velayet ve mal paylaşımı konularında uzman avukat
language: tr
image: /img/placeholder.jpg
draft: true
enableTOC: true
tags: [avukat, bosanma, izmir, ...]
seo:
  title: "Boşanma Avukatı İzmir | Aile Hukuku Danışmanlığı"
  description: "İzmir'de boşanma avukatı..."
  slug: bosanma-ve-aile-hukuku
questions:
  - question: "..."
    answer: "..."
---

# Boşanma ve Aile Hukuku

[Comprehensive content generated by Claude]

## Istanbul'de Hukuki Destek

[CTA section]

Blog Post Structure

---
slug: izmir-en-iyi-bosanma-avukati
title: İzmir'in En İyi Boşanma Avukatı
date: 2024-01-15T10:00:00Z
image: /img/placeholder.jpg
draft: true
services: bosanma-ve-aile-hukuku
tags: [bosanma, avukat, izmir, ...]
seo:
  title: "İzmir'in En İyi Boşanma Avukatı | Tecrübeli Danışmanlık"
  description: "En iyi boşanma avukatının özellikleri..."
  slug: izmir-en-iyi-bosanma-avukati
questions: []
---

[Blog content]

FAQ Output Format

questions:
  - question: "Anlaşmalı boşanma süreci nasıl işler?"
    answer: "Anlaşmalı boşanmada eşler boşanma ve sonuçları hakkında anlaşırlar..."
  - question: "Çekişmeli boşanma davası ne kadar sürer?"
    answer: "Çekişmeli boşanma davaları genellikle 1-2 yıl sürebilir..."

Configuration

Edit tools/seo-config.json to customize:

{
  "siteContext": {
    "title": "Your firm name",
    "location": "Your location",
    "phone": "Your phone",
    "email": "Your email"
  },
  "contentGuidelines": {
    "minWordCount": 1000,
    "maxWordCount": 2500,
    "includedSections": ["definition", "process", "faq", "cta"]
  }
}

Best Practices

Before Generation

  1. Define Clear Keywords - Know what you want to rank for
  2. Check Existing Content - Avoid duplicate topics
  3. Plan Structure - Have an outline in mind
  4. Set Location - Use "İzmir" references for local SEO

After Generation

  1. Review Content - Claude makes great drafts, but legal content needs approval
  2. Verify Accuracy - Check legal references and procedures
  3. Add Images - Use relevant images in front matter
  4. Update Status - Change draft: false when ready to publish
  5. Internal Links - Add/adjust links to related services
  6. Test SEO - Use Google Search Console to monitor ranking

Content Quality Checklist

SEO Tips

Keywords

Structure

Internal Linking

Front Matter SEO Fields

seo:
  title: "50-60 characters - Include keyword and location"
  description: "150-160 characters - Start with action, include keyword"
  slug: "keyword-slug-format"

Troubleshooting

"ANTHROPIC_API_KEY not found"

# Verify key is set
echo $ANTHROPIC_API_KEY

# If not, add to shell profile (~/.zshrc or ~/.bash_profile)
export ANTHROPIC_API_KEY="sk-..."

# Then reload
source ~/.zshrc

API Rate Limits

Content Quality Issues

If generated content is too generic:

  1. Provide more context in the prompts
  2. Specify the angle (e.g., "focus on budget considerations")
  3. Edit and enhance the generated content
  4. Combine outputs with your own expertise

Integration with Build

Add to your npm scripts in package.json:

{
  "scripts": {
    "content:generate": "node tools/seo-assistant.js generate",
    "content:optimize": "node tools/seo-assistant.js optimize seo",
    "content:help": "node tools/seo-assistant.js help"
  }
}

Then run:

npm run content:generate service
npm run content:optimize

Advanced Usage

Generate Multiple Content Pieces

# Service pages
node tools/seo-assistant.js generate service
# Answer prompts...
# Creates: services/bosanma-ve-aile-hukuku.md

# Blog posts
node tools/seo-assistant.js generate post
# Creates: posts/2024-01-15-bosanma-davasi-sureci.md

# FAQ sections
node tools/seo-assistant.js generate faq
# Output YAML to add to front matter

Batch Processing

Create a script to generate multiple pieces:

#!/bin/bash
topics=(
  "boşanma"
  "nafaka"
  "velayet"
  "mal paylaşımı"
  "ceza hukuku"
)

for topic in "${topics[@]}"; do
  echo "Generating content for: $topic"
  # Add automation here
done

Resources

Support

For issues or suggestions:

  1. Check this README's Troubleshooting section
  2. Review generated content carefully
  3. Adjust configuration in seo-config.json
  4. Consult with content team for SEO strategy

Version


Remember: This tool generates great starting content, but all legal content should be reviewed by qualified attorneys before publication.