Foundry git workflow
Skill dor-rondel/agent-skills-mcp/resources/solidity/foundry-git-workflow
mcp server serving coding agent skills with helper tools
npx -y skills add dor-rondel/agent-skills-mcp --skill foundry-git-workflowAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Use this skill when running local pre-commit checks (compile, format, test), analyzing contract changes, committing smart contract updates, or pushing to GitHub.
SKILL.md
2.3 KB, as published. Nobody here has run it
Web3 Git Commit & Push Workflow
This skill hooks the Forge smart contract development verification directly into the Git workflow, ensuring no broken Solidity code or unformatted contracts get pushed to the remote repository.
๐ ๏ธ Toolchain Prerequisites
- EVM Framework:
forge(Foundry) - Project Root: Run all commands from the directory containing
foundry.toml.
๐โโ๏ธ Step 1: Pre-Commit Contract Verification
Execute these verification checks in order. Stop the workflow immediately if any check fails.
| Step | Task | Command | Target / Standard |
|---|---|---|---|
| 1 | Code Formatting | forge fmt | Enforces Solidity style guide layouts |
| 2 | Contract Compilation | forge build | Verifies the code compiles without errors |
| 3 | Smart Contract Tests | forge test | Executes local unit and integration tests |
๐ Step 2: Stage & Diff Analysis
Once the code passes all local Forge checks, review exactly what changes are being prepared for the commit.
- Check Workspace Status:
git status
- Stage Changes:
git add .
- Review Staged Changes: Run the following command to review the precise lines added or modified in the contracts:
git diff --cached
- Agent Instruction: Carefully analyze the structural modifications to the smart contracts or test files in this diff to formulate a highly accurate, precise commit message.
๐ Step 3: Git Commit & Push
Only proceed to this step after all pre-commit contract checks have passed and the staged diff has been reviewed.
- Commit with Context:
- Craft a concise, clear commit message using the imperative mood (e.g.,
feat: add memo validation to buyMeCoffee function). - Base the description directly on your findings from the
git diff --cachedoutput.
- Craft a concise, clear commit message using the imperative mood (e.g.,
git commit -m "<descriptive-message-from-diff>"
- Push to Remote:
git push origin HEAD