Thank you for your interest in contributing to skillctrl! This document provides guidelines for contributing.
- Rust 1.70 or later
- Git
- A code editor (VS Code, IntelliJ IDEA, etc.)
# Clone the repository
git clone https://github.com/yourusername/skillctrl.git
cd skillctrl
# Build in debug mode
cargo build
# Build in release mode
cargo build --release
# Run tests
cargo test --workspace- Fork the repository
- Create a feature branch
- Make your changes
- Write tests
- Ensure all tests pass
- Submit a pull request
We follow standard Rust conventions:
# Format code
cargo fmt
# Run linter
cargo clippy -- -D warnings# Run all tests
cargo test --workspace
# Run tests for specific crate
cargo test -p skillctrl-core
# Run tests with output
cargo test --workspace -- --nocapture
# Run specific test
cargo test test_nameskillctrl/
├── crates/
│ ├── skillctrl-core/ # Core types and traits
│ │ ├── src/
│ │ │ ├── component.rs # Component types
│ │ │ ├── endpoint.rs # Endpoint types
│ │ │ ├── scope.rs # Scope types
│ │ │ └── ...
│ │ └── Cargo.toml
│ │
│ ├── skillctrl-catalog/ # Catalog/bundle parsing
│ ├── skillctrl-git/ # Git operations
│ ├── skillctrl-state/ # State management
│ │
│ ├── skillctrl-adapter-core/ # Adapter traits
│ ├── skillctrl-adapter-claude/ # Claude Code adapter
│ │
│ ├── skillctrl-importer-core/ # Importer traits
│ ├── skillctrl-importer-claude/ # Claude Code importer
│ │
│ └── skillctrl-cli/ # CLI
│
└── examples/
└── market/ # Example catalog and bundles
To add support for a new AI coding assistant:
- Create a new crate:
crates/skillctrl-adapter-<name>/ - Implement the
Adapter,InstallAdapter,UninstallAdapter, andStatusAdaptertraits - Create a corresponding importer crate:
crates/skillctrl-importer-<name>/ - Register the adapter in the CLI
- Add tests and documentation
Example:
use async_trait::async_trait;
use skillctrl_adapter_core::{Adapter, InstallAdapter, ...};
pub struct MyAdapter;
#[async_trait]
impl Adapter for MyAdapter {
fn endpoint(&self) -> Endpoint {
Endpoint::Custom("my-assistant".to_string())
}
fn capabilities(&self) -> AdapterCapabilities {
// ...
}
}
#[async_trait]
impl InstallAdapter for MyAdapter {
async fn plan_install(&self, bundle: &BundleManifest, ctx: &InstallContext) -> Result<InstallPlan> {
// ...
}
async fn apply_install(&self, plan: &InstallPlan) -> Result<InstallResult> {
// ...
}
}- Add the variant to
ComponentKindinskillctrl-core/src/component.rs - Update adapters to handle the new component type
- Add importers to recognize the component
- Update documentation
- Public APIs must be documented with rustdoc comments
- User-facing changes should be documented in README.md
- New features should be added to CHANGELOG.md
Use conventional commit format:
type(scope): description
Types: feat, fix, docs, style, refactor, test, chore
Examples:
- feat(cli): add dry-run flag to install command
- fix(claude): correct skill directory path
- docs(readme): update installation instructions
Include:
- Why: What problem does this solve?
- What: What changes were made?
- How: How was it implemented?
- Testing: How was it tested?
- Breaking Changes: Are there any breaking changes?
- Code follows style guidelines
- Tests are included and passing
- Documentation is updated
- No unnecessary dependencies added
- Backward compatibility maintained (or documented)
Feel free to open an issue for discussion before starting significant work.