Skip to content

Conversation

@rin-st
Copy link
Member

@rin-st rin-st commented Jan 30, 2026

Still work in progress, but you can already test it and make a general overview

/add-extension skill adds extensions to existing SE-2 projects.

Allows adding multiple extensions one by one. For now works only with create-eth-extensions extensions and only with Claude code


Example:

  claude /add-extension erc-20

Or just open claude and run /add-extension with or without params. It suggests you what to do if needed

(I tested mostly with erc-20, erc-721, ponder)


How it works, skill + Claude together (generated by Claude)

The skill script:

  1. Validates SE-2 project and extension name
  2. Fetches extension files from repo
  3. Detects frameworks (Hardhat/Foundry)
  4. Analyzes what needs to change (new files, merges, dependencies)
  5. Auto-merges simple cases (new files, package.json deps)
  6. Outputs summary of changes for Claude to see

Then Claude takes over:

  1. Reviews the skill's output/summary
  2. Handles complex merges - when files conflict or need manual integration
  3. Suggests changes - explains what the extension does and how to integrate it
  4. Edits files - merges configs, updates imports, adapts extension code to your project
  5. Installs deps - runs yarn/npm install if needed

There are multiple things in the script that do the same as create-eth does: fetch extension data, detect framework etc. Since we can't use create-eth here I think it's ok. There's multiple things that I can mention there, but I think it's easier to just read the code. Start from skill.mjs and then we can discuss. Or just ask any questions here!

Some notes anyway:

When adding extension, script adds new field to current app package.json, so it could understand which extensions already installed when adding new extensions.

  "scaffoldEth": {
    "extensions": [
      "erc-721"
    ]
  }

The most interesting part is how it allows the use multiple extensions:

  • it fetches files of all the extensions
  • do regular things for non-conflicting files
  • if there's some args files which is in 2 or more extensions, it takes all the args, combine them together, and then use in the template

Solidity framework is chosen by current project structure. So if there's hardhat in the current project and there's both frameworks in extension, hardhat will be taken automatically. There's not so clear for now what to do if the user wants to take opposite framework in the extension.

  • prohibit it? (I think I'll do it that way)
  • rewrite solidity framework folder and package.json script?

There's some small bugs/AI hallucinations I'm still working on. But feel free to add your thoughts!

@rin-st rin-st marked this pull request as draft January 30, 2026 10:01
@rin-st
Copy link
Member Author

rin-st commented Jan 30, 2026

Added some changes

  • now you can add extensions with only solidity framework which is already exists in the app, or you can choose if don't have any
  • now it's possible to use any extension from https://github.com/scaffold-eth/create-eth/tree/main/src/extensions, but still not sure if we should allow sre challenges
  • changed --framework to --solidity-framework or -s
  • added --list flag to show the list of all the possible extensions
  • refactored the code

Copy link
Collaborator

@Pabl0cks Pabl0cks left a comment

Choose a reason for hiding this comment

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

Awesome job Rinat! This is looking good, it's going to be awesome to have this working in prod 🔥

Did a first pass from my Windows machine, executing the /add-extension with Claude, installing Ponder and then Drizzle-neon, will try it from WSL too but writing down the "walls" I faced, which were quickly spoted&fixed by cursor+opus.

During the installation I saw some errors, pasting Ponder and then Drizzle-neon installations:

Screenshots

Ponder
Image
Drizzle-neon
Image

Then trying to use the SE-2 instance with the extensions installed:

  • Missed to add drizzle-kit commands to nextjs package.json
  • Missed to add the drizzle-neon related dependencies to nextjs package.json
  • Workspace '@se-2/ponder' not found. Cursor added it
Image

After those fixes, the database and ponder worked nicely. Will update when I test with WSL 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants