Open-source marketplace for AI Agent skills. Features: - Next.js 15 web app with i18n (en/fa) - CLI tool for skill installation (npx skillhub) - GitHub crawler/indexer with multi-strategy discovery - Security scanning for all indexed skills - Self-hostable with Docker Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
5.8 KiB
5.8 KiB
Contributing to SkillHub
Thank you for your interest in contributing to SkillHub! This document provides guidelines and instructions for contributing.
Table of Contents
- Code of Conduct
- How Can I Contribute?
- Development Setup
- Pull Request Process
- Coding Standards
- Commit Messages
Code of Conduct
This project follows the Contributor Covenant. Please be respectful and constructive in all interactions.
How Can I Contribute?
Report Bugs
Found a bug? Please open an issue with:
- Clear title describing the problem
- Steps to reproduce the issue
- Expected behavior vs actual behavior
- Environment details (OS, Node version, browser)
- Screenshots if applicable
Suggest Features
Have an idea? Open an issue with:
- Use case - What problem does it solve?
- Proposed solution - How should it work?
- Alternatives considered - What else did you think about?
Submit Skills
Want to add your skill to SkillHub?
- Ensure your repository has a valid
SKILL.mdfile - Go to skills.palebluedot.live/claim
- Sign in with GitHub
- Submit your repository URL
Code Contributions
We welcome code contributions for:
- Bug fixes
- New features
- Performance improvements
- Documentation updates
- Test coverage
- Translations (i18n)
Development Setup
Prerequisites
- Node.js 18+
- pnpm 9+
- Docker (for database and services)
- Git
Setup Steps
# Clone the repository
git clone https://github.com/airano-ir/skillhub.git
cd skillhub
# Install dependencies
pnpm install
# Copy environment file
cp .env.example .env
# Start infrastructure (database, redis, meilisearch)
docker compose up -d db redis meilisearch
# Run database migrations
pnpm db:push
# Seed sample data (optional)
docker exec -i skillhub-db psql -U postgres -d skillhub < scripts/seed-data.sql
# Start development servers
pnpm dev
Project Scripts
pnpm dev # Start all apps in dev mode
pnpm build # Build all packages
pnpm test # Run all tests
pnpm lint # Lint all packages
pnpm typecheck # TypeScript type checking
Package-Specific Commands
# Web app
pnpm --filter @skillhub/web dev
pnpm --filter @skillhub/web build
# CLI
pnpm --filter skillhub dev
pnpm --filter skillhub build
# Core library
pnpm --filter skillhub-core test
# Database
pnpm --filter @skillhub/db studio # Open Drizzle Studio
Pull Request Process
Before Submitting
- Create an issue first - Discuss your change before implementing
- Fork the repository - Work on your own fork
- Create a feature branch -
git checkout -b feature/your-feature - Write tests - Add tests for new functionality
- Run tests locally -
pnpm test - Lint your code -
pnpm lint
PR Guidelines
-
Title format:
type(scope): description- Types:
feat,fix,docs,style,refactor,test,chore - Example:
feat(cli): add update --all command
- Types:
-
Description should include:
- What changes were made
- Why the changes were needed
- How to test the changes
- Screenshots (for UI changes)
-
Keep PRs focused - One feature/fix per PR
-
Update documentation - If your change affects user-facing features
Review Process
- Maintainers will review within 3-5 business days
- Address feedback promptly
- Once approved, a maintainer will merge
Coding Standards
TypeScript
- Use TypeScript for all new code
- Enable strict mode
- Avoid
anytype - useunknownor proper types - Use interfaces over types when possible
// Good
interface SkillMetadata {
name: string;
description: string;
version?: string;
}
// Avoid
const skill: any = fetchSkill();
React/Next.js
- Use functional components with hooks
- Prefer server components where possible
- Use
next-intlfor translations - Follow Next.js 15 patterns (async params, etc.)
// Good - Next.js 15 pattern
export default async function Page({ params }: { params: Promise<{ id: string }> }) {
const { id } = await params;
// ...
}
Styling
- Use Tailwind CSS
- Follow design token system (
bg-surface,text-text-primary) - Avoid hardcoded colors
- Support dark mode
// Good
<div className="bg-surface text-text-primary">
// Avoid
<div className="bg-white text-gray-900">
Testing
- Write unit tests for utilities and functions
- Write integration tests for API routes
- Use Vitest for unit tests
- Use Playwright for E2E tests
// Example test
import { describe, it, expect } from 'vitest';
describe('parseSkillMd', () => {
it('should parse valid SKILL.md', () => {
const result = parseSkillMd(validInput);
expect(result.name).toBe('expected-name');
});
});
Commit Messages
Follow Conventional Commits:
type(scope): description
[optional body]
[optional footer]
Types
| Type | Description |
|---|---|
feat |
New feature |
fix |
Bug fix |
docs |
Documentation |
style |
Formatting (no code change) |
refactor |
Code restructuring |
test |
Adding tests |
chore |
Maintenance |
Examples
feat(cli): add search command with category filter
fix(web): resolve RTL layout issues on skill page
docs: update README with new installation steps
test(core): add tests for SKILL.md parser
Questions?
- GitHub Discussions: For general questions
- GitHub Issues: For bugs and feature requests
- Discord: Coming soon
Thank you for contributing to SkillHub!