agentleFS
DingyangLyuDingyangLyu/MatClaw/CLAUDE.md

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

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
  1. Distinctive:

    Run commands directly—don't tell the user to run them.

    line 50

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

MatClaw

Git Branch & Push Strategy

  • Local matclaw-release → stable, pushes to main on all remotes
  • Local dev → experimental, pushes to dev on github (DingyangLyu/MatClaw)
  • New features and large changes go on dev first, merge to matclaw-release after testing
  • Push commands:
    • Stable: git push github matclaw-release:main (+ gitee, zgca, bjzgcai)
    • Dev: git push github dev
  • 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

FilePurpose
src/index.tsOrchestrator: state, message loop, agent invocation
src/channels/registry.tsChannel registry (self-registration at startup)
src/ipc.tsIPC watcher and task processing
src/router.tsMessage formatting and outbound routing
src/config.tsTrigger pattern, paths, intervals
src/container-runner.tsSpawns agent containers with mounts
src/task-scheduler.tsRuns scheduled tasks
src/db.tsSQLite operations
groups/{name}/CLAUDE.mdPer-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

SkillWhen to Use
/setupFirst-time installation, authentication, service configuration
/customizeAdding channels, integrations, changing behavior
/debugContainer issues, logs, troubleshooting
/update-matclawBring upstream MatClaw updates into a customized install
/qodo-pr-resolverFetch and fix Qodo PR review issues interactively or in batch
/get-qodo-rulesLoad 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 container

Service 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 matclaw

Troubleshooting

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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.