# AI-Berkshire Project Main Entry Point: Skills, Sync Scripts, and CLI Tools

> Discover AI-Berkshire's entry points for skills, sync scripts, and CLI tools. Learn how to run the project efficiently using its utility scripts and main entry points.

- Repository: [Xbt Lin/ai-berkshire](https://github.com/xbtlin/ai-berkshire)
- Tags: getting-started
- Published: 2026-07-01

---

**The AI-Berkshire repository does not expose a single [`main.py`](https://github.com/xbtlin/ai-berkshire/blob/main/main.py) executable; instead, the primary entry points are the [`scripts/sync-codex-skills.py`](https://github.com/xbtlin/ai-berkshire/blob/main/scripts/sync-codex-skills.py) sync script and individual utility files such as [`tools/stock_screener.py`](https://github.com/xbtlin/ai-berkshire/blob/main/tools/stock_screener.py) that expose `if __name__ == '__main__':` guards.**

The `xbtlin/ai-berkshire` project is organized as a modular collection of markdown-based **skill definitions** rather than a monolithic application. According to the source code, there is no traditional entry point that launches the entire system. Instead, developers interact with the codebase through synchronization scripts that generate Codex-compatible artifacts or by invoking standalone utility tools directly.

## Understanding the AI-Berkshire Architecture

AI-Berkshire follows a skill-centric workflow architecture. The canonical source of truth resides in the `skills/` directory, while Python scripts handle the transformation of these definitions into runnable artifacts.

### Skill Definitions in `skills/`

Each workflow is defined as a markdown file under `skills/`. For example, [`skills/investment-research.md`](https://github.com/xbtlin/ai-berkshire/blob/main/skills/investment-research.md) contains the logic for investment research workflows. These files are not executable Python scripts; they serve as the source material that sync scripts process into Codex skill packages.

### Sync Scripts as Logical Entry Points

Because the skills are written in markdown, the repository provides Python scripts to materialize them into usable forms. These scripts function as the **de facto main entry points** for the development workflow:

- **[`scripts/sync-codex-skills.py`](https://github.com/xbtlin/ai-berkshire/blob/main/scripts/sync-codex-skills.py)** – Reads `skills/*.md` files and generates corresponding skill packages in `codex-skills/`.
- **[`scripts/sync-codex-prompts.py`](https://github.com/xbtlin/ai-berkshire/blob/main/scripts/sync-codex-prompts.py)** – Creates slash-prompt compatibility files under `codex-prompts/`.

## The Primary Entry Point: [`scripts/sync-codex-skills.py`](https://github.com/xbtlin/ai-berkshire/blob/main/scripts/sync-codex-skills.py)

The [`scripts/sync-codex-skills.py`](https://github.com/xbtlin/ai-berkshire/blob/main/scripts/sync-codex-skills.py) file serves as the central entry point for developers working with the AI-Berkshire skill system. This script parses the markdown skill definitions and produces the Codex-compatible artifacts required for execution.

To generate the Codex skill packages from the source definitions, run:

```bash
python3 scripts/sync-codex-skills.py

```

This command reads all markdown files in `skills/` and outputs the generated packages to `codex-skills/`, effectively "compiling" the skill definitions into their executable form.

## Utility Tools with CLI Entry Points

For specific investment tasks, AI-Berkshire provides self-contained utility scripts that expose traditional command-line entry points through `if __name__ == '__main__':` guards.

### [`tools/stock_screener.py`](https://github.com/xbtlin/ai-berkshire/blob/main/tools/stock_screener.py)

The stock screener is a standalone tool for filtering equities based on defined criteria. It can be invoked directly without running the sync scripts:

```bash
python3 tools/stock_screener.py --watchlist data/watchlist.json

```

### [`tools/report_audit.py`](https://github.com/xbtlin/ai-berkshire/blob/main/tools/report_audit.py)

This utility provides command-line audit functionality for financial reports. Like the screener, it functions as an independent entry point:

```bash
python3 tools/report_audit.py

```

## Optional Workflow: Generating Slash Prompts

If your workflow requires slash-prompt compatibility for Codex integration, run the secondary sync script:

```bash
python3 scripts/sync-codex-prompts.py

```

This generates the necessary prompt files under `codex-prompts/` based on the skill definitions in `skills/`.

## Summary

- AI-Berkshire uses a **decentralized architecture** without a single [`main.py`](https://github.com/xbtlin/ai-berkshire/blob/main/main.py) launcher.
- The **[`scripts/sync-codex-skills.py`](https://github.com/xbtlin/ai-berkshire/blob/main/scripts/sync-codex-skills.py)** script acts as the primary entry point for generating Codex-compatible artifacts from markdown skill definitions.
- Individual utilities like **[`tools/stock_screener.py`](https://github.com/xbtlin/ai-berkshire/blob/main/tools/stock_screener.py)** and **[`tools/report_audit.py`](https://github.com/xbtlin/ai-berkshire/blob/main/tools/report_audit.py)** provide standalone CLI entry points for specific tasks.
- Skill definitions reside in **`skills/`** as markdown files and serve as the canonical source of workflows.
- The **[`scripts/sync-codex-prompts.py`](https://github.com/xbtlin/ai-berkshire/blob/main/scripts/sync-codex-prompts.py)** script provides an optional entry point for slash-prompt generation.

## Frequently Asked Questions

### Does the AI-Berkshire project have a traditional main entry point?

No. According to the `xbtlin/ai-berkshire` source code, there is no single executable script that launches the entire system. Instead, the project uses a skill-based architecture where [`scripts/sync-codex-skills.py`](https://github.com/xbtlin/ai-berkshire/blob/main/scripts/sync-codex-skills.py) serves as the primary entry point for generating artifacts, while individual tools in `tools/` provide standalone entry points for specific functions.

### How do I run the AI-Berkshire stock screener?

Navigate to the repository root and execute `python3 tools/stock_screener.py` with the appropriate arguments. For example: `python3 tools/stock_screener.py --watchlist data/watchlist.json`. This utility exposes a `if __name__ == '__main__':` guard, allowing it to run independently without syncing the full skill set.

### What is a "skill" in the AI-Berkshire project?

A skill is a workflow definition written in markdown and stored in the `skills/` directory. These files, such as [`skills/investment-research.md`](https://github.com/xbtlin/ai-berkshire/blob/main/skills/investment-research.md), define reusable investment workflows. They are not directly executable; instead, you run [`scripts/sync-codex-skills.py`](https://github.com/xbtlin/ai-berkshire/blob/main/scripts/sync-codex-skills.py) to process these definitions into Codex-compatible skill packages stored in `codex-skills/`.

### Where are the generated Codex artifacts stored?

When you run `python3 scripts/sync-codex-skills.py`, the script outputs generated artifacts to the `codex-skills/` directory. Similarly, running [`scripts/sync-codex-prompts.py`](https://github.com/xbtlin/ai-berkshire/blob/main/scripts/sync-codex-prompts.py) creates files under `codex-prompts/`. These output directories contain the runnable versions of the markdown skill definitions.