Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions ai-toolkit/contributions.mdx

This file was deleted.

5 changes: 0 additions & 5 deletions ai-toolkit/evals.mdx

This file was deleted.

5 changes: 0 additions & 5 deletions ai-toolkit/meta.json

This file was deleted.

100 changes: 0 additions & 100 deletions ai-toolkit/overview.mdx

This file was deleted.

4 changes: 0 additions & 4 deletions ai-toolkit/skills.mdx

This file was deleted.

2 changes: 1 addition & 1 deletion meta.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"title": "Documentation",
"pages": ["get-started", "trading", "liquidity", "ai-tooling", "api", "protocols", "sdks", "unichain", "ecosystem"]
"pages": ["get-started", "trading", "liquidity", "uniswap-ai", "api", "protocols", "sdks", "unichain", "ecosystem"]
}
210 changes: 210 additions & 0 deletions uniswap-ai/contributions.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,210 @@
---
title: Contributions
description: Contribute skills, plugins, and improvements to Uniswap AI.
---

Thank you for your interest in contributing to Uniswap AI! This guide will help you get started.

## Prerequisites

- Node.js 22.x or later
- npm 11.7.0 or later
- Git
- Familiarity with TypeScript and Nx

## Getting Started

### 1. Fork and clone

```bash
# Fork the repository on GitHub, then clone
git clone https://github.com/YOUR_USERNAME/uniswap-ai.git
cd uniswap-ai
```

### 2. Install dependencies

```bash
# Ensure you have the correct npm version
npm install -g npm@11.7.0

# Install dependencies
npm install
```

### 3. Verify setup

```bash
# Run tests
npx nx run-many --target=test

# Build all packages
npx nx run-many --target=build

# Start docs dev server
npm run docs:dev
```

## Development Workflow

### Creating changes

1. **Create a branch** from `main`:

```bash
git checkout -b feature/your-feature-name
```

2. **Make your changes** following the code guidelines

3. **Test your changes**:

```bash
# Run affected tests
npx nx affected --target=test

# Run affected linting
npx nx affected --target=lint

# Check formatting
npx nx format:check
```

4. **Commit using conventional commits**:

```bash
git commit -m "feat(hooks): add new feature"
```

### Pull request process

1. Push your branch and create a PR
2. Ensure all CI checks pass
3. Request review from maintainers
4. Address any feedback
5. Once approved, the PR will be merged

## Code Guidelines

### TypeScript

- Use strict TypeScript (`strict: true`)
- Never use `any` - prefer `unknown` with type guards
- Use explicit types at function boundaries
- Prefer union types over enums

### Nx usage

- All packages must be Nx projects
- Use Nx commands for build, test, lint
- Leverage Nx caching and affected detection

### Documentation

After making changes:

1. Update relevant CLAUDE.md files
2. Update README.md if needed
3. Add/update documentation in `docs/`
4. Run `npm exec markdownlint-cli2 -- --fix "**/*.md"`

## Creating New Packages

### New plugin

```bash
# Plugins go in packages/plugins/
mkdir -p packages/plugins/my-plugin
```

Each plugin needs:

- `package.json` with plugin metadata
- `project.json` for Nx configuration
- `.claude-plugin/plugin.json` manifest
- `README.md` documentation

### New skill

Skills are defined in `packages/plugins/*/skills/`:

```bash
mkdir -p packages/plugins/uniswap-hooks/skills/my-skill
```

Each skill needs:

- `SKILL.md` - The skill definition
- Validation through lint, tests, and documentation updates

## PR workflow highlights

### Branch naming

Use descriptive branch names:

```text
feature/add-v4-security-skill
fix/plugin-timeout-issue
docs/update-installation-guide
```

### PR title and commit format

Use Conventional Commits for both commit messages and PR titles:

```text
feat(hooks): add dynamic fee hook skill
fix(trading): improve swap integration guidance
docs: update installation guide
```

### CI checks to expect

Typical checks include:

- Build
- Lint
- Format
- Tests
- Plugin validation

## Commit Message Format

You can use [Conventional Commits](https://www.conventionalcommits.org/):

```text
<type>(<scope>): <description>

[optional body]

[optional footer]
```

### Types

| Type | Description |
| ---------- | --------------------- |
| `feat` | New feature |
| `fix` | Bug fix |
| `docs` | Documentation only |
| `style` | Formatting changes |
| `refactor` | Code restructuring |
| `test` | Adding/updating tests |
| `chore` | Maintenance tasks |

### Scopes

- `hooks` - uniswap-hooks plugin
- `cca` - uniswap-cca plugin
- `trading` - uniswap-trading plugin
- `viem` - uniswap-viem plugin
- `driver` - uniswap-driver plugin
- `docs` - Documentation
- `ci` - CI/CD workflows

## Getting Help

- Open an issue for bugs or feature requests
- Join the [Uniswap Discord](https://discord.gg/uniswap) for discussions
- Check existing issues before creating new ones
5 changes: 5 additions & 0 deletions uniswap-ai/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"title": "Uniswap AI",
"root": true,
"pages": ["overview", "skills", "contributions"]
}
Loading