sdg_hub
CLAUDE.md161 starsChanged 6 months agoApache-2.0View on GitHub
Requirements: Python 3.10+ SDG Hub is a Python framework for synthetic data generation using composable blocks and flows. Blocks are processing units that transform datasets; flows chain blocks into pipelines defined in YAML. Core concept: dataset -> Block1 -> Block2 -> Block3 -> enriched_dataset For architecture details, see ARCHITECTURE.md. Full index: docs/agent-knowledge/index.md Use uv for all Python commands and package management. Hooks run automatically on commit: - uv-lock: Keeps uv.lock in sync with pyproject.toml - ruff: Linter with auto-fix -…
- Reads credentials
- Installs packages
In this repository5 other files it gives its agents.
- llms.txtllms.txt
- data-generationSkill
- flow-browserSkill
- setup-guideSkill
- synthetic-data-generationSkill
The file
We split this CLAUDE.md into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 79
Commit prefixes: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert
- Very specific: line 84
Use flow.dry_run(dataset) to validate a pipeline end-to-end without making LLM calls
- Distinctive: line 91
All PRs must pass:
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
Project Overview
Requirements: Python 3.10+
SDG Hub is a Python framework for synthetic data generation using composable blocks and flows. Blocks are processing units that transform datasets; flows chain blocks into pipelines defined in YAML.
Core concept: dataset -> Block1 -> Block2 -> Block3 -> enriched_dataset
For architecture details, see ARCHITECTURE.md.
Agent Knowledge Base
| Task | Read this first |
| Adding a block | docs/agent-knowledge/block-invariants.md |
| Adding a flow | docs/agent-knowledge/flow-invariants.md |
| Adding a connector | docs/agent-knowledge/connector-invariants.md |
| Writing tests | docs/agent-knowledge/testing-standards.md |
| Reviewing code | docs/agent-knowledge/grading-criteria.md |
| Deciding to fix vs escalate | docs/agent-knowledge/decision-rubric.md |
| Checking quality status | docs/agent-knowledge/QUALITY.md |
| All principles | docs/agent-knowledge/core-principles.md |
Full index: docs/agent-knowledge/index.md
Development Commands
Use uv for all Python commands and package management.
# Install with dev dependencies
uv pip install .[dev]
# IMPORTANT: Always install pre-commit hooks after cloning
uv run pre-commit install
uv run pre-commit install --hook-type commit-msg
# Other install targets
uv pip install . # Core only
uv pip install .[vllm] # With vLLM support
uv pip install .[examples] # With examples dependenciesTesting
# Unit tests (excludes slow/integration)
uv run pytest tests/blocks tests/connectors tests/flow tests/utils -m "not (examples or slow)"
# Structural tests (architecture enforcement)
uv run pytest tests/structural/
# With coverage
uv run pytest --cov=sdg_hub --cov-report=term tests/blocks tests/connectors tests/flow tests/utils
# Integration tests (requires API keys)
uv run pytest tests/integration -v -sLinting and Formatting
uv run ruff check --fix src/ tests/ # Lint with auto-fix
uv run ruff format src/ tests/ # Format
uv run mypy src/ # Type checkPre-commit Hooks
Hooks run automatically on commit:
- uv-lock: Keeps
uv.lockin sync withpyproject.toml - ruff: Linter with auto-fix
- ruff-format: Code formatter
- mypy: Type checker (runs
mypy src/sdg_hub) - conventional-pre-commit: Enforces Conventional Commits
Commit prefixes: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert
Common Pitfalls
flow.set_model_config(model="...", api_key="...")must be called beforegenerate()for any flow containing LLM blocks- Use
flow.dry_run(dataset)to validate a pipeline end-to-end without making LLM calls runtime_paramscan be passed toflow.generate(dataset, runtime_params={...})to override block config at execution time- LiteLLM reads standard env vars (
OPENAI_API_KEY,ANTHROPIC_API_KEY, etc.) automatically -- you can skip passingapi_keyif the env var is set - The
FlowCheckpointerenables resumable execution; passcheckpoint_dirtogenerate()to persist intermediate results
CI Requirements
All PRs must pass:
| Check | Command | Workflow |
| Conventional Commits | commitlint | commitlint.yml |
| Ruff formatting | ruff format --check src/ tests/ | lint.yml |
| Ruff linting | ruff check src/ tests/ | lint.yml |
| Type checking | mypy src/sdg_hub | lint.yml |
| Unit tests | pytest tests/blocks tests/connectors tests/flow tests/utils | test.yml |
| Structural tests | pytest tests/structural/ | test.yml |
| Lock file sync | uv lock --check | lock.yml |
| Markdown linting | markdownlint-cli2 | docs.yml |
| GitHub Actions lint | actionlint | actionlint.yml |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

