Skip to content

Conversation

@basvandijk
Copy link
Collaborator

@basvandijk basvandijk commented Jan 7, 2026

What?

Add support for Claude Code for developing dfinity/ic.

Why?

We should use AI tools more for developing dfinity/ic to increase our productivity.

I had some initial success: using this PR claude was able to produce #8287 with about 4 prompts and a bit of manual work.

How?

  • Install the claude CLI in the dev container. It's important to have claude run in the dev container such that it can easily call cargo and bazel without wrapping all those commands in ci/container/container-run.sh.

  • Install the Claude Code VS Code extension. For me the extension is not working correctly yet since I can't login for some reason. I need to debug this further with IT.

  • Add a .claude/README.md with some preliminary notes on how to use claude.

  • Add a preliminary .claude/CLAUDE.md instructing Claude how to build and test the ic repository.
    This document is submitted with every prompt. We expect it to be continuously tweaked by every team to optimise their prompting.

Future Work

Add hooks

Consider moving some of the instructions from .claude/CLAUDE.md to hooks like cargo fmt and cargo clippy after modifying .rs files. This will keep the context as small as possible.

Add dfinity/ic specific Agent Skills.

Examples:

  • How to query Apache Superset (or ideally the PostgreSQL DB directly via psql) for:
    the most flaky tests,
    the slowest tests on PRs,
    previous failed / flaky tests runs of a given test,
    failure rate of a given test over time,
    run time of a given test over time.

  • How to download a bazel test log from BuildBuddy.

  • How to debug system-tests.

  • How to download the IC node logs of a testnet / mainnet from ElasticSearch.

  • How to query Prometheus in testnets for relevant metrics.

Interesting Reads

Apart from the Claude Code Docs the following are interesting Reads on how to optimize working with Claude Code:

@github-actions github-actions bot added the chore label Jan 7, 2026
…4e7de60d508df7149f79dd6b7e8c6b

Image tag: de9bafc7cf17b0213ff7ce7883cd21f8d538b5c4fe16b5d7aac9074108f256bf
@github-actions
Copy link
Contributor

github-actions bot commented Jan 7, 2026

Run URL: https://github.com/dfinity/ic/actions/runs/20799437251

New container image: sha256:e4e5c4d3acd1dbfa591e2a4589f65115f04e7de60d508df7149f79dd6b7e8c6b
New container tag: de9bafc7cf17b0213ff7ce7883cd21f8d538b5c4fe16b5d7aac9074108f256bf

basvandijk and others added 2 commits January 9, 2026 12:23
…11a6d56941a7c45574870843e92ecc

Image tag: fce88279927e39e73aeee10f40121761adf272500f61045c9f1506b0c628c37e
@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

Run URL: https://github.com/dfinity/ic/actions/runs/20851800107

New container image: sha256:41f0b90954aca8c8099e3b03e18b5958fd11a6d56941a7c45574870843e92ecc
New container tag: fce88279927e39e73aeee10f40121761adf272500f61045c9f1506b0c628c37e

@basvandijk basvandijk marked this pull request as ready for review January 9, 2026 19:13
@basvandijk basvandijk requested review from a team as code owners January 9, 2026 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants