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 and such that the bazel server keeps running. This has been reverted because we'll first split up the CI from the dev-container and then add claude to the dev-container.

  • 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. This has also been reverted and we'll probably also do this later.

  • 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
Copy link
Contributor

@nmattia nmattia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Got some questions about the devenv setup, though the .claude additions LGTM.

@github-actions
Copy link
Contributor

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

New container image: sha256:89f5f3ed34c5c4c23e80372dd8bc444c953ce305d6fd51e9d46032a0a0885641
New container tag: 8bba9523f8a4518798d447dc9f3ea538f68bcedfa2438c219c17733df733256a

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.

3 participants