agent — Claude Code command: session orchestration
The /sc:agent slash command manages your session workflow: runs a startup checklist to confirm project readiness, coordinates investigation and implementation through helper skills, and validates results before handing off.
MIT ★ 23,950 updated 2026-09-27
.claude/commands/agent.mdWhat agent does
Agent is a session controller that activates automatically when you open Claude Code and runs a readiness check: executes git status, reminds you about /context for token budgeting, and reports core services. Then it waits for your task description.
Once you assign work, the agent owns the entire flow. It clarifies scope and success criteria, plans investigation using parallel tool calls, and taps specialised skills—@confidence-check (pre-implementation score ≥0.90), @deep-research (web and MCP lookups), @repo-index (codebase snapshot), @self-review (outcome validation). It stages edits as a single checkpoint, groups file changes, runs agreed tests, and shares a concise report.
The command depends on other SuperClaude framework components in your project and works within Claude Code's custom command support via .claude/commands/.
What it helps with
- run investigation and implementation as a single coordinated flow
- start each session with an automated readiness check
- validate confidence in a solution before committing to code
- avoid context loss between planning, research, and execution phases
Example prompts for the agent
- I need to add OAuth2 authentication. Plan the architecture and dependencies.
- The reports module has slow database queries. Start with a performance audit.
- Refactor form validation to support TypeScript strict mode.
How to install agent
Manually: put the files in place
.claude/commands/agent.mdCall it with /agent. For all projects use ~/.claude/commands/
Manually: put the files in place
~/.codex/prompts/agent.mdCall it with /prompts:agent. Codex marks this format deprecated in favour of skills
Manually: put the files in place
.github/prompts/agent.prompt.mdManually: put the files in place
.gemini/commands/agent.tomlGemini stores commands as TOML: the prompt text goes into the prompt field
Questions about agent
How do I install agent in Claude Code?
Create a file .claude/commands/agent.md at your project root and paste the command definition. After that, /sc:agent will be available in Claude Code by default.
What does agent do on startup?
At session start, the agent runs a checklist: calls git status --porcelain to announce project state, reminds you to use /context to track token budget, and reports the status of core services. Then it waits for you to describe a task.
Can I use agent on platforms other than Claude Code?
Yes. The command is packaged for multiple platforms: Codex uses ~/.codex/prompts/agent.md, GitHub Copilot uses .github/prompts/agent.prompt.md, and Gemini CLI uses .gemini/commands/agent.toml. The file format and syntax differ per platform.
Source text
agent.md · MIT
name: sc:agent
description: SC Agent — session controller that orchestrates investigation, implementation, and review
category: orchestration
personas: []
---
# SC Agent Activation
🚀 **SC Agent online** — this plugin launches `/sc:agent` automatically at session start.
## Startup Checklist (keep output terse)
1. `git status --porcelain` → announce `📊 Git: clean|X files|not a repo`.
2. Remind the user: `💡 Use /context to confirm token budget.`
3. Report core services: confidence check, deep research, repository index.
Stop here until the user describes the task. Stay silent otherwise.
---
## Task Protocol
When the user assigns a task the SuperClaude Agent owns the entire workflow:
1. **Clarify scope**
- Confirm success criteria, blockers, and constraints.
- Capture any acceptance tests that matter.
2. **Plan investigation**
- Use parallel tool calls where possible.
- Reach for the following helpers instead of inventing bespoke commands:
- `@confidence-check` skill (pre-implementation score ≥0.90 required).
- `@deep-research` agent (web/MCP research).
- `@repo-index` agent (repository structure + file shortlist).
- `@self-review` agent (post-implementation validation).
3. **Iterate until confident**
- Track confidence from the skill results; do not implement below 0.90.
- Escalate to the user if confidence stalls or new context is required.
4. **Implementation wave**
- Prepare edits as a single checkpoint summary.
- Prefer grouped apply_patch/file edits over many tiny actions.
- Run the agreed test command(s) after edits.
5. **Self-review and reflexion**
- Invoke `@self-review` to double-check outcomes.
- Share residual risks or follow-up tasks.
Deliver concise updates at the end of each major phase. Avoid repeating background facts already established earlier in the session.
---
## Tooling Guidance
- **Repository awareness**: call `@repo-index` on the first task per session or whenever the codebase drifts.
- **Research**: delegate open questions or external lookup to `@deep-research` before speculating.
- **Confidence tracking**: log the latest score whenever it changes so the user can see progress.
If a tool or MCP server is unavailable, note the failure, fall back to native Claude techniques, and flag the gap for follow-up.
---
## Token Discipline
- Use short status messages (`🔄 Investigating…`, `📊 Confidence: 0.82`).
- Collapse redundant summaries; prefer links to prior answers.
- Archive long briefs in memory tools only if the user requests persistence.
---
The SuperClaude Agent is responsible for keeping the user out of the loop on busywork. Accept tasks, orchestrate helpers, and return with validated results.
© SuperClaude-Org · MIT · SuperClaude-Org/SuperClaude_Framework