MatClaw
CLAUDE.md98 starsChanged 8 months agoApache-2.0View on GitHub
Materials science AI assistant powered by Claude Agent SDK, with integrated computational materials science tools (Quantum ESPRESSO, LAMMPS, RASPA3, MACE, pymatgen, ASE, etc.). Single Node.js process with skill-based channel system. Channels (WhatsApp, Telegram, Slack, Discord, Gmail) are skills that self-register at startup. Messages route to Claude Agent SDK running in containers (Linux VMs). Each group has isolated filesystem and memory. Containers include a full materials computation environment with DFT, MD, MC tools and Miniconda for flexible package management. Run commands…
- Commits and pushes
In this repository20 other files it gives its agents.
- add-dingtalkSkill
- add-discordSkill
- add-gmailSkill
- add-ollama-toolSkill
- add-parallelSkill
- add-slackSkill
- add-telegramSkill
- add-telegram-swarmSkill
- add-vaspSkill
- add-voice-transcriptionSkill
- add-whatsappSkill
- convert-to-apple-containerSkill
- customizeSkill
- debugSkill
- get-qodo-rulesSkill
- qodo-pr-resolverSkill
- setupSkill
- update-matclawSkill
- use-local-whisperSkill
- x-integrationSkill
The file
We split this CLAUDE.md into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 50
Run commands directly—don't tell the user to run them.
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
MatClaw
Git Branch & Push Strategy
- Local
matclaw-release→ stable, pushes tomainon all remotes - Local
dev→ experimental, pushes todevon github (DingyangLyu/MatClaw) - New features and large changes go on
devfirst, merge tomatclaw-releaseafter testing - Push commands:
- Stable:
git push github matclaw-release:main(+ gitee, zgca, bjzgcai) - Dev:
git push github dev
- Stable:
- NEVER add Co-Authored-By to commits
About
Materials science AI assistant powered by Claude Agent SDK, with integrated computational materials science tools (Quantum ESPRESSO, LAMMPS, RASPA3, MACE, pymatgen, ASE, etc.).
Quick Context
Single Node.js process with skill-based channel system. Channels (WhatsApp, Telegram, Slack, Discord, Gmail) are skills that self-register at startup. Messages route to Claude Agent SDK running in containers (Linux VMs). Each group has isolated filesystem and memory. Containers include a full materials computation environment with DFT, MD, MC tools and Miniconda for flexible package management.
Key Files
| File | Purpose |
src/index.ts | Orchestrator: state, message loop, agent invocation |
src/channels/registry.ts | Channel registry (self-registration at startup) |
src/ipc.ts | IPC watcher and task processing |
src/router.ts | Message formatting and outbound routing |
src/config.ts | Trigger pattern, paths, intervals |
src/container-runner.ts | Spawns agent containers with mounts |
src/task-scheduler.ts | Runs scheduled tasks |
src/db.ts | SQLite operations |
groups/{name}/CLAUDE.md | Per-group memory (isolated) |
container/skills/agent-browser/ | Browser automation tool (available to all agents via Bash) |
container/skills/materials-compute/ | Materials computation guide (QE, LAMMPS, RASPA3, MACE, pymatgen, ASE) |
Skills
| Skill | When to Use |
/setup | First-time installation, authentication, service configuration |
/customize | Adding channels, integrations, changing behavior |
/debug | Container issues, logs, troubleshooting |
/update-matclaw | Bring upstream MatClaw updates into a customized install |
/qodo-pr-resolver | Fetch and fix Qodo PR review issues interactively or in batch |
/get-qodo-rules | Load org- and repo-level coding rules from Qodo before code tasks |
Development
Run commands directly—don't tell the user to run them.
npm run dev # Run with hot reload
npm run build # Compile TypeScript
./container/build.sh # Rebuild agent containerService management:
# macOS (launchd)
launchctl load ~/Library/LaunchAgents/com.matclaw.plist
launchctl unload ~/Library/LaunchAgents/com.matclaw.plist
launchctl kickstart -k gui/$(id -u)/com.matclaw # restart
# Linux (systemd)
systemctl --user start matclaw
systemctl --user stop matclaw
systemctl --user restart matclawTroubleshooting
WhatsApp not connecting after upgrade: WhatsApp is now a separate skill, not bundled in core. Run /add-whatsapp (or npx tsx scripts/apply-skill.ts .claude/skills/add-whatsapp && npm run build) to install it. Existing auth credentials and groups are preserved.
Container Build Cache
The container buildkit caches the build context aggressively. --no-cache alone does NOT invalidate COPY steps — the builder's volume retains stale files. To force a truly clean rebuild, prune the builder then re-run ./container/build.sh.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

