Thank you for your interest in contributing to the Cortex! This document provides guidelines for different types of contributions.
- Code of Conduct
- Getting Started
- Types of Contributions
- Development Workflow
- Contributing Community Skills
- Contributing Core Features
- Contributing Documentation
- Pull Request Process
- Style Guidelines
- Testing Guidelines
- Getting Help
This project adheres to a Code of Conduct that all contributors are expected to follow:
- Be respectful: Treat all community members with respect and consideration
- Be collaborative: Work together constructively and help others
- Be professional: Keep discussions focused on technical merit
- Be inclusive: Welcome contributors from all backgrounds and experience levels
Unacceptable behavior includes harassment, discrimination, trolling, or personal attacks. Violations should be reported to project maintainers.
- Python 3.8 or higher
- Git
- Claude Code CLI (for testing)
- Familiarity with YAML and Markdown
-
Fork the repository on GitHub
-
Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/claude-cortex.git cd claude-cortex -
Add upstream remote:
git remote add upstream https://github.com/NickCrew/claude-cortex.git
# Install the package in editable mode
python3 -m pip install -e .
# Install development dependencies
python3 -m pip install -r requirements-dev.txt
# Verify installation
cortex --versionWe welcome several types of contributions:
Expert knowledge modules in specific domains. See Contributing Community Skills.
Corrections to existing functionality. Include:
- Clear description of the bug
- Steps to reproduce
- Expected vs actual behavior
- Your fix with tests
Improvements to existing features. Discuss in GitHub Issues first.
Improvements to README, guides, examples, or code comments.
Additional test coverage for existing functionality.
Improvements to build process, CLI, or developer experience.
# Update your local main branch
git checkout main
git pull upstream main
# Create feature branch
git checkout -b feature/your-feature-name
# or
git checkout -b fix/bug-description
# or
git checkout -b skill/your-skill-nameBranch naming conventions:
feature/- New features or enhancementsfix/- Bug fixesskill/- Community skillsdocs/- Documentation updatesrefactor/- Code refactoringtest/- Test additions or improvements
- Follow the Style Guidelines
- Write clear commit messages
- Add tests for new functionality
- Update documentation as needed
# Run validation
cortex skills validate your-skill-name
# Run tests (if available)
python -m pytest tests/
# Test CLI commands
cortex --help
cortex skills list
cortex skills info your-skill-nameUse clear, descriptive commit messages:
git add .
git commit -m "Add: Brief description of change
Detailed explanation of what changed and why.
Include any breaking changes or migration notes.
Fixes #123"Commit message format:
Add:- New features or filesFix:- Bug fixesUpdate:- Changes to existing featuresRefactor:- Code refactoringDocs:- Documentation changesTest:- Test additions or changesChore:- Maintenance tasks
# Push to your fork
git push origin feature/your-feature-name
# Create pull request on GitHubCommunity skills are the most common contribution type. See skills/community/README.md for comprehensive guidelines.
-
Copy the template:
mkdir -p skills/community/your-skill-name cp skills/community/.template/SKILL.md skills/community/your-skill-name/SKILL.md
-
Write your skill following the template structure
-
Update frontmatter:
--- name: your-skill-name description: Clear description. Use when [trigger]. author: Your Name <your.email@example.com> version: 1.0.0 license: MIT tags: [category1, category2] created: 2024-10-17 updated: 2024-10-17 ---
-
Validate:
cortex skills validate your-skill-name
-
Add registry entry in
skills/community/registry.yaml:your-skill-name: author: Your Name email: your.email@example.com github: yourusername version: 1.0.0 status: active license: MIT created: 2024-10-17 updated: 2024-10-17 downloads: 0 activations: 0 rating: 0.0 tags: - category1 - category2 related_skills: [] dependencies: []
-
Submit PR with title:
[Community Skill] Add {skill-name}
- Follows template structure
- Valid YAML frontmatter
- Clear activation triggers
- 5-10 "When to Use" scenarios
- Code examples are working and tested
- Progressive disclosure structure
- Best practices summary included
- No emojis (unless domain-specific)
- Grammar and spelling checked
- Token count: 500-8,000 tokens
- Passes
cortex skills validate - Registry entry added
- Author contact information complete
Core features (commands, agents, CLI) require maintainer approval and higher standards.
- Open an issue describing the feature
- Discuss design with maintainers
- Get approval before implementing
- Follow project architecture patterns
- Test coverage: Minimum 80% for new code
- Documentation: Update relevant docs
- Backward compatibility: No breaking changes without major version bump
- Performance: No significant performance regression
- Security: Follow security best practices
# Example: Python code standards
"""
Module docstring explaining purpose.
"""
from typing import List, Dict, Optional
def function_name(param: str, optional_param: Optional[int] = None) -> Dict[str, str]:
"""
Clear docstring explaining what function does.
Args:
param: Description of parameter
optional_param: Description with default
Returns:
Description of return value
Raises:
ValueError: When this error occurs
"""
# Implementation with clear comments
passDocumentation improvements are always welcome!
- README updates: Main project README
- Guide improvements: Skills guide, contribution guide
- Code comments: Inline documentation
- Examples: Usage examples and tutorials
- Website docs: Jekyll documentation site
- Clear and concise: Avoid jargon, explain concepts
- Examples included: Show, don't just tell
- Up-to-date: Match current codebase
- Well-organized: Logical structure and flow
- Accessible: Appropriate for target audience
# For website docs
cd docs
bundle install
bundle exec jekyll serve --livereload
# Verify links work
# Check formatting renders correctly
# Test code examplesUse clear, descriptive titles:
[Community Skill] Add {skill-name}[Feature] Add {feature-description}[Fix] Resolve {bug-description}[Docs] Update {documentation-area}[Refactor] Improve {component-name}
## Summary
Brief description of changes
## Type of Change
- [ ] Bug fix (non-breaking change fixing an issue)
- [ ] New feature (non-breaking change adding functionality)
- [ ] Community skill (new skill contribution)
- [ ] Breaking change (fix or feature requiring version bump)
- [ ] Documentation update
## Motivation
Why this change is needed
## Changes Made
- Change 1
- Change 2
- Change 3
## Testing
How changes were tested:
- [ ] Validated with cortex commands
- [ ] Added/updated tests
- [ ] Tested locally
- [ ] Documentation reviewed
## Checklist
- [ ] Code follows project style guidelines
- [ ] Self-review completed
- [ ] Comments added for complex logic
- [ ] Documentation updated
- [ ] No new warnings generated
- [ ] Tests added/updated and passing
- [ ] Dependent changes merged
## Related Issues
Fixes #123
Related to #456
## Screenshots (if applicable)- Automated checks: CI runs validation and tests
- Maintainer review: Code quality, design, tests
- Community feedback: For significant changes
- Approval required: At least one maintainer approval
- Merge: Squash and merge to main
- Community skills: 3-7 days
- Bug fixes: 1-3 days
- Features: 5-14 days
- Documentation: 1-3 days
# Use 2-space indentation
# Quote strings when necessary
# Consistent key ordering
name: skill-name
description: Clear description with proper grammar.
tags:
- lowercase-hyphenated
- consistent-naming# Use ATX-style headers (# not underlines)
# One blank line between sections
# Code blocks with language specifiers
# Consistent list formatting (- for unordered, 1. for ordered)
## Section Header
Paragraph with **bold** and *italic* formatting.
- List item 1
- List item 2
- Nested item
```language
// Code block with language
### File Naming
- **Hyphen-case**: `your-skill-name/` not `Your_Skill_Name/`
- **Descriptive**: Clear purpose from name
- **Consistent**: Follow existing patterns
- **No special chars**: Alphanumeric and hyphens only
### Code Comments
```python
# Good: Explains WHY
# Cache result to avoid expensive computation on repeated calls
result = expensive_function()
# Bad: Explains WHAT (code already shows this)
# Set x to 5
x = 5
# Validate single skill
cortex skills validate your-skill-name
# Validate all skills
cortex skills validate --all
# Check token count
cortex skills info your-skill-name --show-tokensTest your changes with real Claude Code usage:
- Install your changes locally
- Test relevant CLI commands
- Verify skill activation
- Check error handling
- Test edge cases
Document how to test your changes in PR description:
## Testing Steps
1. Install package: `pip install -e .`
2. Run command: `cortex skills info your-skill-name`
3. Verify output matches expected result
4. Test error case: `cortex skills info nonexistent`
5. Confirm error message is clear- Documentation: Project docs
- Skills guide: skills/README.md
- Community guide: skills/community/README.md
- Template: skills/community/.template/SKILL.md
- Questions: GitHub Discussions
- Bug reports: GitHub Issues
- Feature requests: GitHub Issues with
enhancementlabel - PR help: Comment on your pull request
- Start small: Begin with documentation or small bug fixes
- Ask questions: Use Discussions for clarification
- Review existing PRs: Learn from approved contributions
- Be patient: Reviews take time, especially for complex changes
- Iterate: Expect feedback and be ready to make changes
Contributors are recognized in several ways:
- Credited in files: Author attribution in contributed skills
- Registry entry: Community skills registry
- Contributors list: GitHub contributors page
- Release notes: Significant contributions mentioned
Thank you for contributing to Cortex!
By contributing, you agree that your contributions will be licensed under the same license as the project (see LICENSE file).
If you have questions not covered here:
- Check existing documentation
- Search GitHub Issues
- Ask in GitHub Discussions
- Open a new issue with the
questionlabel
We're here to help make your contribution successful!