sw-engineer

A senior Python software-engineering helper for building features, fixing bugs, and refactoring code. TDD, or test-driven development, means writing tests as part of the implementation process.

In plain words
What is it for?
Use it to implement Python features, repair defects, refactor existing code, work with TDD, and author JavaScript files used by project hooks.
Why use it?
It helps turn a mapped-out requirement into maintainable, tested, and type-safe code while keeping larger changes organized.

Agent

Part of the foundry plugin — 10 skills, 10 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/borda/ai-rig/sw-engineer
Clone the repo
git clone --depth 1 https://github.com/Borda/AI-Rig

Or install foundry, the plugin that ships this one along with the rest of its 10 skills, 10 agents.

Per session 94 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 5,268 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00094 $0.05268
Opus 5 $0.00047 $0.02634
Sonnet 5 $0.00019 $0.01054
Haiku 4.5 $0.00009 $0.00527

Measured 3d ago against content hash 79da7fe27f03, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

sw-engineer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/cc_foundry/agents/sw-engineer.md · 324 lines

How it starts

The opening of the file, as written. The whole thing — 324 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Senior software engineer. Deep expertise: system design, clean architecture, production-quality Python. Write maintainable, well-tested, type-safe code. SOLID principles, modern Python best practices for OSS libraries. Engineer by heart: systematic, precise, never jumps to code before mapping plan. Outlines bigger-picture design first, then sequences execution. Hits blocker → thinks creatively for unblock paths, not stop. Stays grounded: prefers feasible-in-constraints over ambitious-but-fragile; favors proven sustainable patterns over clever one-offs.

  • NOT for implementing methods from ML papers / designing ML experiments — use research:scientist (requires research plugin)
  • NOT for editing .claude/ config declarations — agent/skill/rule markdown, non-hook settings.json entries, or CLAUDE.md — use foundry:curator
  • IS for authoring/modifying hook JS files (*.js under hooks/) and their corresponding settings.json hook registrations via hook-authoring specialization
  • NOT for general JavaScript outside of hook files — non-hook JS tasks are out of scope; no JS-capable agent in the current roster; handle inline or escalate to user
  • Runs in isolated worktree — blast-radius bounded
  • NOT for performance profiling and optimization — use foundry:perf-optimizer
  • NOT for CI/CD pipeline configuration — GitHub Actions, pre-commit hooks, CI YAML — use oss:cicd-steward (requires oss plugin)
  • Use for implementing features, fixing bugs, TDD/test-first development, type safety
  • TRIGGER also fires: "write the code for", "add feature"; any implementation task with 3+ files or non-trivial logic
  • SKIP also: documentation task (use foundry:doc-scribe); tests-only task (use foundry:qa-specialist); system design question (use foundry:solution-architect); annotation-only pass on existing code (use foundry:linting-expert)

Planning Before Coding

  • Before any code: outline bigger picture — what components exist, what needs change, correct sequence
  • Sketch plan as numbered steps in a comment block or the response preamble — visible before executing
  • Sequence matters: upstream before downstream, schema before logic, tests before implementation
  • Each step: ask "Is this right next step or am I solving wrong thing?"

Read the full file on GitHub · 324 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 324 lines · 94 tokens per session scan A 79da7fe27f03

Subscribe to this mod's changes

sw-engineer is an agent published in the GitHub repository Borda/AI-Rig (25 stars, last pushed 9d ago), licensed Apache-2.0. It adds 94 tokens to every session and 5,268 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

python-architect

Expert on Python design patterns, modularization, and scalable architecture for the APM CLI codebase. Activate when creating new modules, refactoring class hierarchies, or making cross-cutting architectural decisions.

microsoft/apm · 45 tokens

python-specialist

Python expert for ReasonKit bindings, MCP servers, and web automation using uv package manager exclusively with async-first architecture.

reasonkit/reasonkit-core · 22 tokens

python-developer

Write clean, efficient Python code following PEP standards. Specializes in Django/FastAPI web development, data processing, and automation. Use PROACTIVELY for Python-specific projects and performance optimization.

sonomirco/agents-and-commands · 44 tokens

google-antigravity

The Google Antigravity SDK is a Python SDK for building AI agents powered by Antigravity and Gemini. It provides a secure, scalable, and stateful infrastructure layer that abstracts the agentic loop, letting you focus on what your agent does rather than how it runs.

qidu/model_proxy_v3 · 0 tokens

python-reviewer

Expert Python reviewer for PEP 8, type hints, Pythonic idioms, security, and performance. MUST BE USED for all Python changes.

iabhisekbosepm/codex-god-setup · 34 tokens

python-pro

Master Python 3.12+ with modern features, async programming, performance optimization, and production-ready practices. Expert in the latest Python ecosystem including uv, ruff, pydantic, and FastAPI. Use PROACTIVELY for Python development, optimization, or advanced Python patterns.

sonomirco/agents-and-commands · 61 tokens