Claude Code Setup and Agents Swarm in Action

Claude Code Setup and Agents Swarm in Action

VSC Claude Code ExtensionVSC Claude Code ExtensionHello everyone! Today we’re diving into Claude Code — the new buzzword everyone is talking about.

In this article, I’ll walk through the setup step by step and experiment with the new Agents Swarm feature to see whether it really lives up to the hype.

First, What is Claude Code?

Claude Code is an AI-powered command-line interface (CLI) tool from Anthropic that helps developers directly inside the terminal.

But what if you’re not a CLI person and prefer working inside an IDE?

Good news: there’s a Claude Code extension for VS Code. Just open Extensions in VSC → search for Claude Code → install. That’s it.

Article content
VSC Claude Code Extension

Requirements

To use Claude Code, you need a Claude subscription: Pro, Max, Teams, Enterprise, or a Claude Console account.

Here is the link for the Pricing: https://claude.com/pricing

I personally created a Claude Pro monthly subscription for around $21.40/month.

Now, let us work on Installing Claude Code

On mac, and linux OS run this command

curl -fsSL https://claude.ai/install.sh | bash

For windows powershell, run the command below

irm https://claude.ai/install.ps1 | iex

I’m using a Mac OS, so I ran the first command. The install takes just a few seconds, and you’ll see a success message when it’s finished.

Article content

Then, you need to run this additional command to add Claude to your PATH:

echo ‘export PATH=”$HOME/.local/bin:$PATH”’ >> ~/.zshrc && source ~/.zshrc

Now let us verify that everything works by running command “Claude — — help” that successfully lists the different arguments, options and usage for each one of them

Article content

Ok, cool, now it is time to see the Claude Code agents swarm feature in action:

Claude Code New Project

First, Let’s create a project and start Claude:

mkdir claude-code-test-project
cd claude-code-test-project
claude

Claude will ask to select the:

  • Theme (light/dark)
  • Login method

Article content
Claude login method

After selecting your option, you’ll be redirected to a browser window to authorize Claude.

Article content

I decided to go with Claude pro subscription account. First, I tried creating an Anthropic Console account, but I had issues confirming payment. So I recommend that you set up the Claude subscription BEFORE running the tool.

Once login is successful, you see the message below on the screen:

Article content

Close the browser window, and return to the terminal and press Enter.

Article content

Then Claude will:

  • Display security notes, press enter to continue

Article content
Claude main notifications and settings

  • Terminal settings, select recommended one and press enter

Article content

  • Final security notification about files you work with when using Claude code agent, select yes and hit enter to continue

Article content

At this point, you’re ready. Let us explore existing functionality:

Exploring Commands

Claude Code uses special prefixes:

  • ! → Bash mode
  • / → Claude commands
  • @ → File paths
  • $ → Background tasks

Type / and you’ll see available commands.

Article content

The most interesting ones are:

  • /agents
  • /chrome

Today, we’re focusing on /agents and building a swarm of collaborating agents.

Creating Specialized AI Agents

For testing, I’ll create two agents with different perspectives:

1. Robert Greene–style Strategic Advisor

This agent analyzes:

  • Power dynamics
  • Human nature
  • Long-term strategy

Second agent

2. Martin Luther King — Moral Counselor

This agent focuses on:

  • Justice
  • Empathy
  • Ethical leadership
  • Transforming conflict

Article content

These two agents will collaborate together to give advice for questions related to the domains they cover.

Ok, i’ll start creating the strategic advisor agent,

Use the agents command, create a new agent,

Article content

You’ll notice you can create a local agent tied to a specific project, or a general agent that works across all projects. For this demo, I’ll choose the Project option.

Article content
Select Agent Location
Article content
Write Agent Prompt

then write your detailed prompt., and Claude will generate their configuration.

Article content

Once done, repeat the same process with a different prompt for the moral agent.

To confirm that both agents are created successfully, use command /agents to list them

Article content

You should see the two project agents listed. The strategic advisor and the moral counsel

Now The Moment of Truth — Agent Swarm in action!

Let’s test if both agents collaborate effectively.

I’ll ask a question that falls within the domain of both agents

“What are the top 3 war and peace strategies? Also tell me which agents you used to answer.”

Claude then activates both agents in parallel!

Article content

You’ll see:

  • Strategic analysis from the Robert Greene agent
  • Moral and justice-based perspectives from the Martin Luther King agent
  • An additional section of where both viewpoints converge

Article content
Generated output by a swarm of agents

And honestly — this part is super cool.

You get stable, grounded perspectives because each agent stays consistent with its persona, instead of a single agent switching viewpoints to please the user

That was really impressive and easy to set up!

Claude made a breakthrough with these powerful, capable agents — and it definitely put other competitors behind.

That’s it for today — I hope to enjoy this article about Claude Code swarm agents.

Author

Noor Sabahi Senior AI & Cloud Engineer | AWS Ambassador

To view or add a comment, sign in

More articles by New Math Data

Others also viewed

Explore content categories