# How to Contribute Code to AI For Beginners: A Complete 10-Step Guide

> Learn how to contribute code to AI For Beginners. Follow this 10-step guide to fork the Microsoft repository, add code, and submit your first Pull Request.

- Repository: [Microsoft/AI-For-Beginners](https://github.com/microsoft/AI-For-Beginners)
- Tags: how-to-guide
- Published: 2026-08-02

---

**To contribute code to AI For Beginners, fork the Microsoft repository, create a feature branch, make your changes in the `lessons/` or `examples/` directories, verify with the provided conda environment, and submit a Pull Request through the Microsoft CLA workflow.**

The [AI For Beginners](https://github.com/microsoft/AI-For-Beginners) repository by Microsoft is an open-source AI curriculum containing 24 lessons, code examples, and interactive quizzes. Contributing follows a standard GitHub workflow with Microsoft-specific requirements for licensing. This guide walks through the exact steps based on the project's [`CONTRIBUTING.md`](https://github.com/microsoft/AI-For-Beginners/blob/main/CONTRIBUTING.md) and source structure.

## Ready the Prerequisites

Before writing any code, understand the project's legal and technical requirements.

### Sign the Microsoft CLA

The project requires the **Microsoft Contributor License Agreement (CLA)**. You only sign this once across all Microsoft open-source projects. A CLA-bot automatically detects when you open your first Pull Request and guides you through the signing process in a comment on your PR【/cache/repos/github.com/microsoft/AI-For-Beginners/main/CONTRIBUTING.md#L5-L10】.

### Set Up Your Development Environment

The repository includes an [`environment.yml`](https://github.com/microsoft/AI-For-Beginners/blob/main/environment.yml) file that pins exact versions of TensorFlow, PyTorch, and other dependencies. Create this environment to ensure your code runs identically to the production curriculum:

```bash
conda env create -f environment.yml
conda activate ai-for-beginners

```

## Fork and Clone the Repository

Create your personal copy of the codebase to work on.

### Fork on GitHub

Click **Fork** on the [microsoft/AI-For-Beginners](https://github.com/microsoft/AI-For-Beginners) repository page. This creates `<your-username>/AI-For-Beginners` under your account.

### Clone Your Fork

For most contributions, clone normally:

```bash
git clone https://github.com/<your-username>/AI-For-Beginners.git
cd AI-For-Beginners

```

The repository is large due to the `translations/` folder. For translation work specifically, consider a sparse checkout to avoid downloading all language files【/cache/repos/github.com/microsoft/AI-For-Beginners/main/README.md#L33-L40】.

## Create a Feature Branch

Isolate your work to keep the main branch clean:

```bash
git checkout -b fix-typo-lesson-3

```

Use descriptive branch names:
- `fix-perceptron-notebook-typo`
- `add-translation-es-lesson-1`
- `update-quiz-app-dependencies`

## Navigate Source Code Locations

Understanding the repository structure ensures you edit the correct files.

| Directory | Purpose |
|-----------|---------|
| `lessons/` | Core curriculum content—Jupyter notebooks and README markdown files organized by topic |
| `examples/` | Standalone Python scripts demonstrating AI concepts |
| `etc/quiz-app/` | Vue.js frontend for the interactive quiz application |
| `translations/<lang-code>/` | Localized curriculum versions (e.g., `translations/es/`) |

The master [`README.md`](https://github.com/microsoft/AI-For-Beginners/blob/main/README.md) at repository root contains the curriculum map and "Getting Started" instructions【/cache/repos/github.com/microsoft/AI-For-Beginners/main/README.md#L45-L52】.

## Make Your Code Changes

Edit files relevant to your contribution type.

### Fix Lesson Content

Example: correcting a typo in the Perceptron lesson.

Before ([`lessons/3-NeuralNetworks/03-Perceptron/README.md`](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/3-NeuralNetworks/03-Perceptron/README.md)):

```markdown
Perceptron is a **simple** binary classification model that uses a **single**

```

After:

```markdown
Perceptron is a **simple** binary classification model that uses a **single** neuron.

```

### Add Example Code

Creating a new helper function in [`examples/01-hello-ai-world.py`](https://github.com/microsoft/AI-For-Beginners/blob/main/examples/01-hello-ai-world.py):

```python
def greet(name: str) -> str:
    """Return a friendly AI greeting."""
    return f"Hello, {name}! Welcome to AI for Beginners."

print(greet("Alice"))

```

### Update the Quiz Application

For Vue.js changes in `etc/quiz-app/`, run linting before committing:

```bash
cd etc/quiz-app
npm install
npm run lint

```

## Verify Your Changes

Always confirm modifications work as expected.

### Test Jupyter Notebooks

Execute notebooks end-to-end in your conda environment:

```bash
jupyter notebook lessons/3-NeuralNetworks/03-Perceptron/Perceptron.ipynb

```

Run all cells and verify no errors appear. Notebooks are a primary delivery format for the curriculum.

### Test Python Scripts

Run modified scripts directly:

```bash
python examples/01-hello-ai-world.py

```

## Commit with Clear Messages

Describe what changed and why:

```bash
git add lessons/3-NeuralNetworks/03-Perceptron/README.md
git commit -m "Fix typo in Perceptron description: add missing 'neuron'"

```

Or for the greeting helper:

```bash
git add examples/01-hello-ai-world.py
git commit -m "Add greeting helper to hello-ai-world example

Provides a reusable function for personalized AI welcome messages."

```

## Push and Open Your Pull Request

Upload your branch and initiate review:

```bash
git push origin fix-typo-lesson-3

```

Then on GitHub:
1. Click **Compare & pull request**
2. Select `main` as the base branch
3. Write a concise description referencing the issue (if applicable)
4. Submit the PR

The CLA-bot will automatically label your PR and comment if CLA signing is required.

## Address Review Feedback

Maintainers may request:
- Link updates in markdown files
- Code formatting adjustments
- Additional test coverage
- Linting fixes for quiz-app submissions

Respond to comments promptly and push additional commits to the same branch—they automatically appear in the PR.

## Special Contribution Paths

### Add Translations

Place new language content under `translations/<lang-code>/` following existing naming conventions. Translation-specific guidelines live in [`etc/CONTRIBUTING.md`](https://github.com/microsoft/AI-For-Beginners/blob/main/etc/CONTRIBUTING.md)【/cache/repos/github.com/microsoft/AI-For-Beginners/main/CONTRIBUTING.md#L19-L22】.

Example structure:

```

translations/
├── es/          # Spanish

├── zh-cn/       # Simplified Chinese

├── your-lang/   # Your new translation

```

### Contribute to the Quiz App

The Vue.js application in `etc/quiz-app/` requires:
- `npm install` for dependencies
- `npm run lint` for code quality
- Manual testing of UI changes in a browser

## Summary

- **Sign the Microsoft CLA** once before your first contribution
- **Fork and clone** from `https://github.com/<your-username>/AI-For-Beginners`
- **Use the conda environment** in [`environment.yml`](https://github.com/microsoft/AI-For-Beginners/blob/main/environment.yml) for dependency consistency
- **Edit files in `lessons/`** for curriculum content, **`examples/`** for Python scripts, or **`etc/quiz-app/`** for the Vue.js frontend
- **Verify notebooks run end-to-end** before submitting
- **Follow the 10-step workflow**: branch → change → test → commit → push → PR → review → merge

## Frequently Asked Questions

### Does Microsoft AI For Beginners require a CLA for all contributions?

Yes. Every Pull Request triggers the Microsoft CLA-bot, which checks whether you have signed the Contributor License Agreement. If you haven't, the bot provides a direct link to complete the one-time signing process【/cache/repos/github.com/microsoft/AI-For-Beginners/main/CONTRIBUTING.md#L5-L10】.

### Can I contribute without downloading the entire repository?

Yes. The `translations/` folder contains large language-specific files. Use Git's sparse-checkout feature to clone only the directories you need, as mentioned in the [`README.md`](https://github.com/microsoft/AI-For-Beginners/blob/main/README.md) clone instructions【/cache/repos/github.com/microsoft/AI-For-Beginners/main/README.md#L33-L40】.

### What dependencies do I need to run the curriculum code?

The [`environment.yml`](https://github.com/microsoft/AI-For-Beginners/blob/main/environment.yml) file pins exact versions of TensorFlow, PyTorch, and supporting libraries. Create the conda environment with `conda env create -f environment.yml` to ensure your code runs identically to the published curriculum.

### How do I add a new language translation to AI For Beginners?

Create a folder under `translations/` using the standard language code (e.g., `translations/de/` for German). Follow the file structure of existing translations and consult [`etc/CONTRIBUTING.md`](https://github.com/microsoft/AI-For-Beginners/blob/main/etc/CONTRIBUTING.md) for translation-specific formatting guidelines【/cache/repos/github.com/microsoft/AI-For-Beginners/main/CONTRIBUTING.md#L19-L22】.