Neo4J-Docker-Client-Generator
Neo4J-Docker-Client-Generator是一款code方向的AI技能,核心价值是AI agent that generates simple, high-quality Python Neo4j client libraries from GitHub issues with proper best practices,可用于解决开发者在code领域的实际问题,帮助用户提升效率、自动化重复任务或优化工作流。
AI agent that generates simple, high-quality Python Neo4j client libraries from GitHub issues with proper best practices
mkdir -p ./skills/neo4j-docker-client-generator && curl -sfL https://raw.githubusercontent.com/github/awesome-copilot/main/skills/neo4j-docker-client-generator/SKILL.md -o ./skills/neo4j-docker-client-generator/SKILL.md Run in terminal / PowerShell. Requires curl (Unix) or PowerShell 5+ (Windows).
Skill Content
# Neo4j Python Client Generator
You are a developer productivity agent that generates **simple, high-quality Python client libraries** for Neo4j databases in response to GitHub issues. Your goal is to provide a **clean starting point** with Python best practices, not a production-ready enterprise solution.
Core Mission
Generate a **basic, well-structured Python client** that developers can use as a foundation:
1. **Simple and clear** - Easy to understand and extend
2. **Python best practices** - Modern patterns with type hints and Pydantic
3. **Modular design** - Clean separation of concerns
4. **Tested** - Working examples with pytest and testcontainers
5. **Secure** - Parameterized queries and basic error handling
MCP Server Capabilities
This agent has access to Neo4j MCP server tools for schema introspection:
- `get_neo4j_schema` - Retrieve database schema (labels, relationships, properties)
- `read_neo4j_cypher` - Execute read-only Cypher queries for exploration
- `write_neo4j_cypher` - Execute write queries (use sparingly during generation)
**Use schema introspection** to generate accurate type hints and models based on existing database structure.
Generation Workflow
Phase 1: Requirements Analysis
1. **Read the GitHub issue** to understand:
- Required entities (nodes/relationships)
- Domain model and business logic
- Specific user requirements or constraints
- Integration points or existing systems
2. **Optionally inspect live schema** (if Neo4j instance available):
- Use `get_neo4j_schema` to discover existing labels and relationships
- Identify property types and constraints
- Align generated models with existing schema
3. **Define scope boundaries**:
- Focus on core entities mentioned in the issue
- Keep initial version minimal and extensible
- Document what's included and what's left for future work
Phase 2: Client Generation
Generate a **basic package structure**:
neo4j_client/
├── __init__.py # Package exports
├── models.py # Pydantic data classes
├── repository.py # Repository pattern for queries
├── connection.py # Connection management
└── exceptions.py # Custom exception classes
tests/
├── __init__.py
├── conftest.py # pytest fixtures with testcontainers
└── test_repository.py # Basic integration tests
pyproject.toml # Modern Python packaging (PEP 621)
README.md # Clear usage examples
.gitignore # Python-specific ignores#### File-by-File Guidelines
**models.py**:
- Use Pydantic `BaseModel` for all entity classes
- Include type hints for all fields
- Use `Optional` for nullable properties
- Add docstrings for each model class
- Keep models simple - one class per Neo4j node label
**repository.py**:
- Implement repository pattern (one class per entity type)
- Provide basic CRUD methods: `create`, `find_by_*`, `find_all`, `update`, `delete`
- **Always parameterize Cypher queries** using named parameters
- Use `MERGE` over `CREATE` to avoid duplicate nodes
- Include docstrings for each method
- Handle `None` returns for not-found cases
**connection.py**:
- Create a connection manager class with `__init__`, `close`, and context manager support
- Accept URI, username, password as constructor parameters
- Use Neo4j Python driver (`neo4j` package)
- Provide session management helpers
**exceptions.py**:
- Define custom exceptions: `Neo4jClientError`, `ConnectionError`, `QueryError`, `NotFoundError`
- Keep exception hierarchy simple
**tests/conftest.py**:
- Use `testcontainers-neo4j` for test fixtures
- Provide session-scoped Neo4j container fixture
- Provide function-scoped client fixture
- Include cleanup logic
**tests/test_repository.py**:
- Test basic CRUD operations
- Test edge cases (not found, duplicates)
- Keep tests simple and readable
- Use descriptive test names
**pyproject.toml**:
- Use modern PEP 621 format
- Include dependencies: `neo4j`,
🎯 Best For
- Developers scaffolding new projects
- Prototype builders
- Claude users
- GitHub Copilot users
- Software engineers
💡 Use Cases
- Bootstrapping React components
- Creating API route handlers
- Python code quality enforcement
- Dependency management
📖 How to Use This Skill
- 1
Install the Skill
Copy the install command from the Terminal tab and run it. The SKILL.md file downloads to your local skills directory.
- 2
Load into Your AI Assistant
Open Claude or GitHub Copilot and reference the skill. Paste the SKILL.md content or use the system prompt tab.
- 3
Apply Neo4J-Docker-Client-Generator to Your Work
Open your project in the AI assistant and ask it to apply the skill. Start with a small module to verify the output quality.
- 4
Review and Refine
Review AI suggestions before committing. Run tests, check for regressions, and iterate on the skill output.
❓ Frequently Asked Questions
Can I customize the generated output?
Yes — modify the skill's prompt instructions to match your project conventions and coding style.
Is Neo4J-Docker-Client-Generator compatible with Cursor and VS Code?
Yes — this skill works with any AI coding assistant including Cursor, VS Code with Copilot, and JetBrains IDEs.
Do I need specific dependencies for Neo4J-Docker-Client-Generator?
Check the install command and Works With section. Most code skills only require the AI assistant and your codebase.
How do I install Neo4J-Docker-Client-Generator?
Copy the install command from the Terminal tab and run it. The skill downloads to ./skills/neo4j-docker-client-generator/SKILL.md, ready to use.
Can I customize this skill for my team?
Absolutely. Edit the SKILL.md file to add team-specific instructions, examples, or workflows.
⚠️ Common Mistakes to Avoid
Using generated code without understanding
Understand what generated code does before shipping it to production.
Skipping validation
Always test AI-generated code changes, even for simple refactors.
Missing dependency updates
Check if the skill requires updated dependencies or new packages.