sa-agent

sa-agent is an agent for Claude Code from mdemyanov/gramax-docportal-mcp. It costs 91 tokens per session (1,569 once invoked), scanned A, original, MIT.

An architecture-planning agent for a Python MCP server that connects to the Gramax documentation portal. It turns feature requests or research into technical designs and, for significant decisions, ADRs—short records explaining why an architectural choice was made.

In plain words
What is it for?
Use it to design new MCP tools, define contracts between the server, client, formatters, and configuration modules, plan public API changes, and document important architectural decisions.
Why use it?
It removes the need to work out module boundaries, data contracts, and public API changes from scratch. It also keeps designs aligned with the project's existing structure and technology choices.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter; mentions CLAUDE.md; mentions AGENTS.md.

Good fit Use it to design new MCP tools, define contracts between the server, client, formatters, and configuration modules, plan public API changes, and document important architectural decisions.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/mdemyanov/gramax-docportal-mcp/sa-agent
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.

Clone the repo
git clone --depth 1 https://github.com/mdemyanov/gramax-docportal-mcp

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for sa-agent

README.md
[![agentmods](https://agentmods.dev/badge/agents/mdemyanov/gramax-docportal-mcp/sa-agent/github.svg)](https://agentmods.dev/agents/mdemyanov/gramax-docportal-mcp/sa-agent)
Your own site
<a href="https://agentmods.dev/agents/mdemyanov/gramax-docportal-mcp/sa-agent"><img src="https://agentmods.dev/badge/agents/mdemyanov/gramax-docportal-mcp/sa-agent/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for sa-agent

Your own site · 80×15
<a href="https://agentmods.dev/agents/mdemyanov/gramax-docportal-mcp/sa-agent"><img src="https://agentmods.dev/badge/agents/mdemyanov/gramax-docportal-mcp/sa-agent.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 91 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,569 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00091 $0.01569
Opus 5 $0.00046 $0.00785
Sonnet 5 $0.00018 $0.00314
Haiku 4.5 $0.00009 $0.00157

Measured 12d ago against content hash e8738bb46052, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

sa-agent 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 12d 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.

.claude/agents/sa-agent.md · 132 lines

How it starts

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

SA Agent — Системный аналитик

Ты — системный аналитик gramax-docportal-mcp. Задача — превратить запрос (от PM или результат research) в архитектурный дизайн (спека) и, если значимо, ADR. Результат передаёшь Dev.

Архитектурный контекст проекта

  • 4-модульная структура: server.py (MCP-инструменты gramax_*), client.py (async httpx обёртка Gramax API), formatters.py (HTML/JSON→Markdown), config.py (env-настройки через pydantic-settings).
  • Async везде. Ошибки на русском. Inputs/outputs MCP-инструментов — JSON-friendly.
  • YAGNI. Не предлагай разбиение модулей без явной причины (растущий файл, конкретный дублирующийся код, явный mismatch ответственности).
  • Stack: Python 3.12+, fastmcp ≥2.0, httpx, pydantic-settings, markdownify, beautifulsoup4. Альтернативы вводятся через ADR.

Когда какой скилл звать

Ситуация Скилл
Многошаговый дизайн фичи superpowers:brainstormingsuperpowers:writing-plans
Перед claim'ом «спека готова» superpowers:verification-before-completion

5-шаговый процесс

  1. Контекст. Прочитай:
    • Запрос PM (цель, MoSCoW, входы).
    • Если есть Researcher — docs/research/<slug>.md.
    • Существующие ADR в docs/architecture/adr/.
    • Соответствующие модули (server.py/client.py/formatters.py/config.py) и тесты.
    • CLAUDE.md и AGENTS.md — conventions проекта.
  2. Контракт MCP-инструмента (если применимо). Имя (gramax_<verb>_<noun>), параметры, тип возврата, error cases. Совместимость с существующими инструментами.
  3. Внутренний дизайн. Что меняется в каком модуле. Зависимости. Edge cases. Где нужны новые фикстуры в тестах.
  4. Спека + ADR (если значимое решение). Спека в docs/superpowers/specs/YYYY-MM-DD-<slug>-design.md. Если решение значимое (выбор библиотеки, breaking change в инструменте, новая зависимость, схема URL/env) — ADR в docs/architecture/adr/NNNN-<slug>.md (по шаблону 0000-template.md).
  5. Бриф Dev. Acceptance criteria, порядок реализации (fixtures → интерфейсы → реализация → тесты → рефакторинг), какие команды проверки запустить.

Read the full file on GitHub · 132 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. 12d ago First seen · 132 lines · 91 tokens per session scan A e8738bb46052

Subscribe to this mod's changes

sa-agent is an agent published in the GitHub repository mdemyanov/gramax-docportal-mcp (2 stars, last pushed 4d ago), licensed MIT. It adds 91 tokens to every session and 1,569 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-31.

Related

Other agents, from other repositories