Files
skill-seekers-reference/examples/cline-django-assistant/README.md
yusyus bdd61687c5 feat: Complete Phase 1 - AI Coding Assistant Integrations (v2.10.0)
Add comprehensive integration guides for 4 AI coding assistants:

## New Integration Guides (98KB total)
- docs/integrations/WINDSURF.md (20KB) - Windsurf IDE with .windsurfrules
- docs/integrations/CLINE.md (25KB) - Cline VS Code extension with MCP
- docs/integrations/CONTINUE_DEV.md (28KB) - Continue.dev for any IDE
- docs/integrations/INTEGRATIONS.md (25KB) - Comprehensive hub with decision tree

## Working Examples (3 directories, 11 files)
- examples/windsurf-fastapi-context/ - FastAPI + Windsurf automation
- examples/cline-django-assistant/ - Django + Cline with MCP server
- examples/continue-dev-universal/ - HTTP context server for all IDEs

## README.md Updates
- Updated tagline: Universal preprocessor for 10+ AI systems
- Expanded Supported Integrations table (7 → 10 platforms)
- Added 'AI Coding Assistant Integrations' section (60+ lines)
- Cross-links to all new guides and examples

## Impact
- Week 2 of ACTION_PLAN.md: 4/4 tasks complete (100%) 
- Total new documentation: ~3,000 lines
- Total new code: ~1,000 lines (automation scripts, servers)
- Integration coverage: LangChain, LlamaIndex, Pinecone, Cursor, Windsurf,
  Cline, Continue.dev, Claude, Gemini, ChatGPT

## Key Features
- All guides follow proven 11-section pattern from CURSOR.md
- Real-world examples with automation scripts
- Multi-IDE consistency (Continue.dev works in VS Code, JetBrains, Vim)
- MCP integration for dynamic documentation access
- Complete troubleshooting sections with solutions

Positions Skill Seekers as universal preprocessor for ANY AI system.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-07 20:46:26 +03:00

8.3 KiB

Cline + Django Assistant Example

Complete example showing how to use Skill Seekers to generate Cline rules for Django development with MCP integration.

What This Example Does

  • Generates Django documentation skill
  • Creates .clinerules for Cline agent
  • Sets up MCP server for dynamic documentation access
  • Shows autonomous Django code generation

Quick Start

1. Generate Django Skill

# Install Skill Seekers with MCP support
pip install skill-seekers[mcp]

# Generate Django documentation skill
skill-seekers scrape --config configs/django.json

# Package for Cline (markdown format)
skill-seekers package output/django --target markdown

2. Copy to Django Project

# Copy rules to project root
cp output/django-markdown/SKILL.md my-django-project/.clinerules

# Or use the automation script
python generate_clinerules.py --project my-django-project

3. Configure MCP Server

# In VS Code Cline panel:
# Settings → MCP Servers → Add Server

# Add this configuration:
{
  "skill-seekers": {
    "command": "python",
    "args": ["-m", "skill_seekers.mcp.server_fastmcp", "--transport", "stdio"],
    "env": {}
  }
}

# Reload VS Code

4. Test in Cline

# Open project in VS Code
code my-django-project/

# Open Cline panel (sidebar icon)
# Start autonomous task:

"Create a Django blog app with:
- Post model with author, title, content, created_at
- Comment model with post foreign key
- Admin registration
- REST API with DRF
- Full test suite with pytest"

# Cline will autonomously generate code following Django best practices

Expected Results

Before (Without .clinerules)

Cline Task: "Create a Django user model"

Output:

from django.db import models

class User(models.Model):
    username = models.CharField(max_length=100)
    email = models.EmailField()

Missing timestamps No str method No Meta class Not using AbstractUser

After (With .clinerules)

Cline Task: "Create a Django user model"

Output:

from django.contrib.auth.models import AbstractUser
from django.db import models

class User(AbstractUser):
    email = models.EmailField(unique=True)
    bio = models.TextField(blank=True)

    created_at = models.DateTimeField(auto_now_add=True)
    updated_at = models.DateTimeField(auto_now=True)

    class Meta:
        ordering = ['-created_at']
        verbose_name = 'User'
        verbose_name_plural = 'Users'

    def __str__(self):
        return self.username

Uses AbstractUser Includes timestamps Has str method Proper Meta class Email uniqueness

Files in This Example

  • generate_clinerules.py - Automation script
  • mcp_config.json - MCP server configuration
  • requirements.txt - Python dependencies
  • example-project/ - Minimal Django project
    • manage.py
    • app/models.py
    • app/views.py
    • tests/

MCP Integration Benefits

With MCP server configured, Cline can:

  1. Search documentation dynamically

    Cline task: "Use skill-seekers MCP to search Django async views"
    
  2. Generate fresh rules

    Cline task: "Use skill-seekers MCP to scrape latest Django 5.0 docs"
    
  3. Package skills on-demand

    Cline task: "Use skill-seekers MCP to package React docs for this project"
    

Rule Files Structure

After setup, your project has:

my-django-project/
├── .clinerules                    # Core Django patterns (auto-loaded)
├── .clinerules.models             # Model-specific patterns (optional)
├── .clinerules.views              # View-specific patterns (optional)
├── .clinerules.testing            # Testing patterns (optional)
├── .clinerules.project            # Project conventions (highest priority)
└── .cline/
    └── memory-bank/               # Persistent project knowledge
        └── README.md

Cline automatically loads all .clinerules* files.

Customization

Add Project-Specific Patterns

Create .clinerules.project:

# Project-Specific Conventions

## Database Queries

ALWAYS use select_related/prefetch_related:

\```python
# BAD
posts = Post.objects.all()  # N+1 queries!

# GOOD
posts = Post.objects.select_related('author').prefetch_related('comments').all()
\```

## API Responses

NEVER expose sensitive fields:

\```python
class UserSerializer(serializers.ModelSerializer):
    class Meta:
        model = User
        fields = ['id', 'username', 'email', 'bio']
        # NEVER include: password, is_staff, is_superuser
\```

Memory Bank Setup

# Initialize memory bank
mkdir -p .cline/memory-bank

# Add project context
cat > .cline/memory-bank/README.md << 'EOF'
# Project Memory Bank

## Tech Stack
- Django 5.0
- PostgreSQL 16
- Redis for caching
- Celery for background tasks

## Architecture
- Modular apps (users, posts, comments)
- API-first with Django REST Framework
- Async views for I/O-bound operations

## Conventions
- All models inherit from BaseModel (timestamps)
- Use pytest for testing
- API versioning: /api/v1/
EOF

# Ask Cline to initialize
# In Cline: "Initialize memory bank from README"

Troubleshooting

Issue: .clinerules not loading

Solution: Check file location

# Must be at project root
ls -la .clinerules

# Reload VS Code
# Cmd+Shift+P → "Developer: Reload Window"

Issue: MCP server not connecting

Solution 1: Verify installation

pip show skill-seekers
# Should show: [mcp] extra installed

Solution 2: Test MCP server directly

python -m skill_seekers.mcp.server_fastmcp --transport stdio
# Should start without errors

Solution 3: Use absolute Python path

{
  "skill-seekers": {
    "command": "/usr/local/bin/python3",
    "args": ["-m", "skill_seekers.mcp.server_fastmcp", "--transport", "stdio"]
  }
}

Issue: Cline not using rules

Solution: Add explicit instructions

# Django Expert

You MUST follow these patterns in ALL Django code:
- Include timestamps in models
- Use select_related for queries
- Write tests with pytest

NEVER deviate from these patterns.

Advanced Usage

Multi-Framework Project (Django + React)

# Backend rules
skill-seekers package output/django --target markdown
cp output/django-markdown/SKILL.md .clinerules.backend

# Frontend rules
skill-seekers package output/react --target markdown
cp output/react-markdown/SKILL.md .clinerules.frontend

# Now Cline knows BOTH Django AND React patterns

Cline + RAG Pipeline

# Create both .clinerules and RAG pipeline
from skill_seekers.cli.doc_scraper import main as scrape
from skill_seekers.cli.package_skill import main as package

# Scrape
scrape(["--config", "configs/django.json"])

# For Cline
package(["output/django", "--target", "markdown"])

# For RAG search
package(["output/django", "--target", "langchain", "--chunk-for-rag"])

# Now you have:
# 1. .clinerules (for Cline context)
# 2. LangChain docs (for deep search)

Real-World Workflow

Complete Blog API with Cline

Task: "Create production-ready blog API"

Cline Autonomous Steps:

  1. Creates models (Post, Comment) with timestamps, str, Meta
  2. Adds select_related to querysets (from .clinerules)
  3. Creates serializers with nested data (from .clinerules)
  4. Implements ViewSets with filtering (from .clinerules)
  5. Sets up URL routing (from .clinerules)
  6. Writes pytest tests (from .clinerules.testing)
  7. Adds admin registration (from .clinerules)

Result: Production-ready API in minutes, following all best practices!

Next Steps

  1. Add more frameworks (React, Vue) for full-stack
  2. Create memory bank for project knowledge
  3. Build RAG pipeline with --target langchain
  4. Share your .clinerules patterns with community
  5. Integrate custom MCP tools for project-specific needs

Support