The Technique — A Browser-Based Claude Agent for Teams
A developer, frustrated by constant Microsoft Teams interruptions, created a script that delegates message responses to Claude Code. The core idea is simple but powerful: automate Claude Code to periodically open Teams in a browser, check for unread messages, and generate replies. This isn't a deep integration with the Microsoft Graph API; it's a pragmatic, browser-automation approach that works with any web-based messaging platform.
The project, called "son-of-claude," is essentially a batch or shell script that runs claude -p in a loop with the --chrome flag. Every two minutes, it instructs Claude Code to open the Teams web app, read new messages, and craft responses. The genius lies in its use of local context: because it runs from your terminal with Claude Code, it can also read your local repository files. When a colleague asks, "How does the authentication module work?" or "What's the status of feature X?" the agent can provide specific, informed answers based on the actual codebase, not generic placations.
Why It Works — Leveraging Claude Code's Native Capabilities
This works because it directly utilizes two of Claude Code's built-in, powerful features: the --chrome flag for browser control and the -p (persistent) mode for long-running agentic tasks. The --chrome flag allows Claude to interact with a real browser session, meaning it can log into your corporate Teams account and see exactly what you see. The -p mode keeps the Claude agent alive and context-aware across multiple interactions.
Crucially, the system is governed by two markdown configuration files, mirroring the philosophy of a CLAUDE.md file but for a social agent:
BRAIN.md: This file acts as the operational rulebook. It defines who the agent should respond to (e.g., your team) and who to ignore (e.g., your boss), which websites it's allowed to access, and safety rails to prevent overreach.SOUL.md: This file defines the agent's personality and tone—professional, helpful, concise—ensuring replies sound appropriately like you.
By combining Claude Code's reasoning with local file access, the agent moves beyond a simple chatbot. It becomes a coding-aware proxy that can discuss architecture, explain recent changes, or summarize project status based on the files in your working directory.
How To Apply It — Setup and Customization
1. Get the Script: Clone the repository from GitHub: git clone https://github.com/asarnaout/son-of-claude.
2. Configure for Your Environment: The beauty is its adaptability. While set up for Teams, you can redirect it to Slack, Discord, or Google Chat by updating the target URL and interaction steps in BRAIN.md. The core loop command in the script looks like this:
# Simplified loop concept
while true; do
claude -p --chrome "Go to teams.microsoft.com, check for unread messages from my team, and respond based on BRAIN.md and SOUL.md. You can reference my local code at ./ for technical answers."
sleep 120 # Wait 2 minutes
done
3. Define the Rules: Spend time tailoring BRAIN.md and SOUL.md. BRAIN.md is critical for security and professionalism—be explicit about boundaries. SOUL.md ensures the agent's communication style matches yours.
4. Run with Caution: As the creator warns, this is an "agentic coding agent" and is prone to prompt injection or unexpected behavior if someone in the chat deliberately tries to manipulate it. Use it at your own risk, especially in a professional setting. It's best framed as a powerful experiment that demonstrates the potential of Claude Code as a platform for automation, not as a production-ready tool.
This project is a compelling example of using Claude Code not just for writing code, but for building contextual, automated workflows that bridge communication and development. It turns Claude from a coding assistant in your terminal into an active participant in your team's communication loop, armed with the specific context of your work.





