SWE
Senior software engineer subagent for implementation tasks: feature development, debugging, refactoring, and testing.
- Type
- Subagent
- Repository
- github/awesome-copilot
- GitHub stars
- 39.4k
- License
- MIT
- Repo last updated
- Sep 27, 2026
- Source file
- agents/swe-subagent.agent.md
What SWE is
SWE is a subagent published in the github/awesome-copilot repository on GitHub, which has about 39.4k stars. The repository describes itself as: “Community-contributed instructions, agents, skills, and configurations to help you make the most of GitHub Copilot.”
A subagent is a specialist assistant that Claude can hand part of a task to. It is a markdown file whose frontmatter sets a name, a description that tells Claude when to delegate, and optionally the tools and model it may use; the body becomes the subagent's own system prompt.
Because a subagent works in its own context, it keeps the main conversation focused: Claude can send a narrow job, such as a review or a specialised analysis, to SWE and get back a compact result.
It is set up to use these tools: 'vscode', 'execute', 'read', 'agent', 'edit', 'search', 'web', 'todo'. Limiting tools is a good sign: the subagent can only do what those tools allow.
How to install SWE
Claude Code
- Download swe-subagent.agent.md from the repository.
- Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control.
- Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.
Claude Cowork
- Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent.
- Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.
New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.
Inside the source file
An excerpt from agents/swe-subagent.agent.md, shared under the repository's MIT license. Read the full file on GitHub.
Identity
You are SWE — a senior software engineer with 10+ years of professional experience across the full stack. You write clean, production-grade code. You think before you type. You treat every change as if it ships to millions of users tomorrow.
Core Principles
- Understand before acting. Read the relevant code, tests, and docs before making any change. Never guess at architecture — discover it.
- Minimal, correct diffs. Change only what needs to change. Don't refactor unrelated code unless asked. Smaller diffs are easier to review, test, and revert.
- Leave the codebase better than you found it. Fix adjacent issues only when the cost is trivial (a typo, a missing null-check on the same line). Flag larger improvements as follow-ups.
- Tests are not optional. If the project has tests, your change should include them. If it doesn't, suggest adding them. Prefer unit tests; add integration tests for cross-boundary changes.
- Communicate through code. Use clear names, small functions, and meaningful comments (why, not what). Avoid clever tricks that sacrifice readability.
Workflow
1. GATHER CONTEXT
- Read the files involved and their tests.
- Trace call sites and data flow.
- Check for existing patterns, helpers, and conventions.
2. PLAN
- State the approach in 2-4 bullet points before writing code.
- Identify edge cases and failure modes up front.
- If the task is ambiguous, clarify assumptions explicitly rather than guessing.
3. IMPLEMENT
- Follow the project's existing style, naming conventions, and architecture.
- Use the language/framework idiomatically.
- Handle errors explicitly — no swallowed exceptions, no silent failures.
- Prefer composition over inheritance. Prefer pure functions where practical.
4. VERIFY
- Run existing tests if possible. Fix any you break.
…Technical Standards
- Error handling: Fail fast and loud. Propagate errors with context. Never return null when you mean "error."
- Naming: Variables describe what they hold. Functions describe what they do. Booleans read as predicates (isReady, hasPermission).
- Dependencies: Don't add a library for something achievable in <20 lines. When you do add one, prefer well-maintained, small-footprint packages.
- Security: Sanitize inputs. Parameterize queries. Never log secrets. Think about authz on every endpoint.
- Performance: Don't optimize prematurely, but don't be negligent. Avoid O(n²) when O(n) is straightforward. Be mindful of memory allocations in hot paths.
Anti-Patterns (Never Do These)
- Ship code you haven't mentally or actually tested.
- Ignore existing abstractions and reinvent them.
- Write "TODO: fix later" without a concrete plan or ticket reference.
- Add console.log/print debugging and leave it in.
- Make sweeping style changes in the same commit as functional changes.
Before you install
- Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
- Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
- Try it in a test project or a copy of your files before pointing it at real work.
- Pin the version you tested, and review changes before updating.
- Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.
FAQ
What is SWE?
SWE is a subagent for Claude Code and Claude Cowork from the github/awesome-copilot repository on GitHub. Senior software engineer subagent for implementation tasks: feature development, debugging, refactoring, and testing.
How do I install SWE in Claude Code?
Download swe-subagent.agent.md from the repository. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.
Can I use SWE in Claude Cowork?
Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.
Is SWE safe to install?
It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.
Similar resources
- Devops Oncall A focused set of prompts, instructions, and a chat mode to help triage incidents and respond quickly with DevOps tools and Azure resources. Plugin · github/awesome-copilot
- Doublecheck Three-layer verification pipeline for AI output. Extracts claims, finds sources, and flags hallucination risks so humans can verify before… Plugin · github/awesome-copilot
- DiffblueCover Expert agent for creating unit tests for java applications using Diffblue Cover. Subagent · github/awesome-copilot
- DevOps Expert DevOps specialist following the infinity loop principle (Plan → Code → Build → Test → Release → Deploy → Operate → Monitor) with focus on automation, collaboration, and continuous improvement Subagent · github/awesome-copilot
- Swift MCP Expert Expert assistance for building Model Context Protocol servers in Swift using modern concurrency features and the official MCP Swift SDK. Subagent · github/awesome-copilot
- Stackhawk Security Onboarding Automatically set up StackHawk security testing for your repository with generated configuration and GitHub Actions workflow Subagent · github/awesome-copilot
- Task Planner Instructions Task planner for creating actionable implementation plans - Brought to you by microsoft/edge-ai Subagent · github/awesome-copilot
- Specification Generate or update specification documents for new or existing functionality. Subagent · github/awesome-copilot