Skip to content

Instantly share code, notes, and snippets.

@rjurney
Created May 13, 2025 21:08
Show Gist options
  • Save rjurney/f7364f2dd0f6b6c21ecd33690eee4fdf to your computer and use it in GitHub Desktop.
Save rjurney/f7364f2dd0f6b6c21ecd33690eee4fdf to your computer and use it in GitHub Desktop.
Current Claude Code Configuration
{
"permissions": {
"allow": [
"Bash(git status:*)",
"Bash(git diff:*)",
"Bash(git log:*)",
"Bash(git add:*)",
"Bash(git grep:*)",
"Bash(poetry update:*)",
"Bash(pip show:*)",
"Bash(pip freeze:*)",
"Bash(pip list:*)",
"Bash(mypy:*)",
"Bash(pytest:*)",
"Bash(black:*)",
"Bash(isort:*)",
"Bash(flake8:*)",
"Bash(jupyter notebook:*)",
"Bash(poetry run mypy *)",
"Bash(poetry run mypy:*)",
"Bash(poetry run black:*)",
"Bash(poetry run isort:*)",
"Bash(poetry run flake8:*)",
"Bash(poetry run pytest:*)",
"Bash(poetry run pytest tests/)",
"Bash(ls:*)",
"Bash(cat:*)",
"Bash(pwd:*)",
"Bash(cd:*)",
"Bash(mkdir:*)",
"Bash(poetry add:*)",
"Bash(poetry install:*)",
"Bash(poetry update:*)",
"Bash(touch *__init__.py",
"Bash(grep:*)"
],
"deny": [
"Bash(pip install:*)"
]
},
"dontCrawlDirectory": false,
"mcpServers": { },
"ignorePatterns": [ ],
"exampleFiles": [
"eridu/train/utils.py",
"eridu/cli/main.py",
"eridu/train/fine_tune_sbert.py",
"eridu/etl/report.py"
]
}

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Commands

  • Install Dependencies: poetry install
  • Run CLI: poetry run abzu
  • Build/Generate abzu/baml_client code: baml-cli generate
  • Test baml_src code: baml-cli test, poetry run pytest tests/
  • Test single: poetry run pytest tests/path_to_test.py::test_name
  • Lint: pre-commit run --all-files, poetry run flake8
  • Format: poetry run black ., poetry run isort .
  • Type check: poetry run mypy

Code Style

  • Line length: 100 characters
  • Python version: 3.12
  • Formatter: black with isort (profile=black)
  • Types: Always use type annotations, warn on any return
  • Imports: Use absolute imports, organize imports to be PEP compliant with isort (profile=black)
  • Error handling: Use mdecific exception types with logging
  • Naming: snake_case for variables/functions, CamelCase for classes
  • BAML: Use for LLM-related code, regenerate client with baml-cli generate
  • Whitespaces: leave no trailing whitespaces, use 4 spaces for indentation, leave no whitespace on blank lines
  • Strings: Use double quotes for strings, use f-strings for string interpolation
  • Docstrings: Use Numpy style for docstrings, include type hints in docstrings
  • Comments: Use comments to explain complex code, avoid obvious comments
  • Tests: Use pytest for testing, include type hints in test functions, use fixtures for setup/teardown
  • Type hints: Use type hints for all function parameters and return types
  • Type checking: Use mypy for type checking, run mypy before committing code
  • Logging: Use logging for error handling, avoid print statements
  • Documentation: Use Sphinx for documentation, include docstrings in all public functions/classes
  • Code style: Follow PEP 8 for Python code style, use flake8 for linting

Claude Logic

  • Command Line Interfaces - at the end of your coding tasks, please alter the 'abzu' CLI to accommodate the changes.
  • Separate logic from the CLI - separate the logic under abzu and sub-modules from the command line interface (CLI) code in abzu.cli. The CLI should only handle input/output from/to the user and should not contain any business logic. For example the module for abzu process kg should be in abzu.kg.* and not in abzu.cli.api. Similarly, the module for abzu process articles should be in abzu.articles.* and not in abzu.cli.api.
  • PySpark - Limit the number of functions within scripts that control dataflow in Spark scripts. We prefer a more linear flow. This only applies to Spark code.
  • Flake8 - fix flake8 errors without being asked and without my verification.
  • Black - fix black errors without being asked and without my verification.
  • Isort - fix isort errors without being asked and without my verification.
  • Mypy - fix mypy errors without being asked and without my verification.
  • Pre-commit - fix pre-commit errors without being asked and without my verification.
  • New Modules - create a folder for a new module without being asked and without my verification.
  • init.py - add these files to new module directories without being asked and without my verification.
  • Edit Multiple Files at Once - if you need to edit multiple files for a single TODO operation, do so in a single step. Do not create multiple steps for the same task.
  • abzu steps Command - Add new steps in the data pipeline to the abzu steps command. This command is used to run the data pipeline in a specific order. The steps should be added in the order they are executed in the pipeline. If you aren't sure about the order, ask me.
  • Git - do not put anything in commit messages other than a description of the code changes. Do not put "Generated with Claude Code" or anything else relating to Claude or Anthropic.

Alerts

  • BEEP when you are done with something and prompt me, the user in your UI. I need to hear that you're done because I do more than one thing at once. Use the comand echo -ne '\007' to beep.
  • Use the applescript-mcp server to send me a message when you are done with something. Say "Done with task X" where X is the task you are done with. Alternatively, use the command osascript -e 'tell application "System Events" to display dialog "Done with task X"' to send me a message.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment