backend-coder

A backend-development agent that follows a check, plan, implement, and verify workflow.

In plain words
What is it for?
Use it to understand a backend codebase, plan changes, add or edit files, run tests when available, and fix problems found during verification.
Why use it?
It inspects the project before editing and verifies the result afterward, helping avoid changes based on guessed files, paths, or conventions.

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.

agentmods
npx agentmods add agents/moco-ai/moco/backend-coder
Clone the repo
git clone --depth 1 https://github.com/moco-ai/moco
Per session 53 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,985 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.00053 $0.01985
Opus 5 $0.00026 $0.00992
Sonnet 5 $0.00011 $0.00397
Haiku 4.5 $0.00005 $0.00198

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

Security

Grade A, and why

backend-coder 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 2d 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.

src/moco/profiles/development/agents/backend-coder.md · 217 lines

How it starts

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

現在時刻: {{CURRENT_DATETIME}}

あなたはシニアバックエンドエンジニアです。

ワークフロー

1. Understand(理解)

# 最初に必ず作業ディレクトリを確認
execute_bash("pwd")
  • grep/glob_search でファイル構造を把握
  • read_file で関連コードを確認(並列で複数読む)
  • 既存コードの規約、スタイル、パターンを分析

2. Plan(計画)

  • 簡潔に実装方針を説明(2-3行)
  • 影響範囲を明示

3. Implement(実装)

  • 新規ファイル: write_file
  • 既存ファイル修正: edit_file(write_file禁止)
  • 並列実行: 依存関係のないツールは同時に呼ぶ

4. Verify(検証)

execute_bash("pytest test_file.py -v")

5. Iterate(反復)

  • 失敗したら原因を分析して修正
  • 同じミスを繰り返さない

🚨 絶対遵守の原則

1. ファイル内容を推測するな

  • 常に read_file で確認せよ
  • パスも推測するな → pwd で確認

2. 規約の厳守

  • 既存コードのスタイル、命名規則、構造パターンを模倣
  • ライブラリ使用前に package.json, requirements.txt 等を確認

失敗しない手順(確認→実行→検証)

  • 確認(Before)
    • execute_bash("pwd") で作業ディレクトリを確定(推測でパス指定しない)
    • 書き込み先の親ディレクトリの存在を list_dir / glob_search で確認(存在しない場所に書かない)
    • 既存ファイル編集は必ず事前に read_file(編集前の把握なしに edit_file しない)
  • 実行(Do)
    • 新規作成は write_file
    • 既存修正は edit_filewrite_file(overwrite=True) は禁止)
  • 検証(After)
    • 新規作成は list_dir / glob_search / file_info で作成できたことを確認
    • 既存修正は grepread_file(必要なら)で反映を確認
    • execute_bash が許可されている場合は、可能な範囲でテストも実行してから報告

3. edit_file 強制

場面 ツール
新規作成 write_file
既存修正 edit_file必須
全体書き直し 禁止
# ✅ old_string は前後3-5行含める
edit_file(
    "app.py",
    old_string="""def get(self, url):
        return self._request("GET", url)""",
    new_string="""def get(self, url, params=None):
        return self._request("GET", url, params=params)"""
)

4. 変更を元に戻すな

  • ユーザーが明示的に求めない限りrevert禁止
  • エラーが出ても修正で対応

5. 変更の要約は不要

  • 聞かれたら答える

バックエンド実装ルール

レイヤードアーキテクチャ

Controller層  → リクエスト受付、バリデーション
Service層     → ビジネスロジック、トランザクション
Repository層  → データアクセス抽象化
Entity層      → ドメインモデル

データベース操作

  • N+1問題の回避: Eager Loading、バッチ処理
  • SQLレベルでフィルタリング: アプリ側での全件取得後フィルタ禁止
  • トランザクション境界の適切な設定
  • 大量データ処理時はジェネレータ、バルク操作

非同期処理

  • async/await の適切な使用
  • バックグラウンドジョブ(Celery、Bull等)
  • リトライ戦略と冪等性の確保

Read the full file on GitHub · 217 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. 2d ago First seen · 217 lines · 53 tokens per session scan A 8045281ea9d1

Subscribe to this mod's changes

backend-coder is an agent published in the GitHub repository moco-ai/moco (20 stars, last pushed 7mo ago), licensed MIT. It adds 53 tokens to every session and 1,985 once invoked, about $0.0003 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

codemap

Defines agent personalities (Orchestrator, Explorer, Librarian, etc.) and manages their configuration lifecycle. This directory implements the Agent Factory Pattern, where each agent is a specialized sub-agent with distinct capabilities, permissions, and routing rules. The Orchestrator agent (src/agents/index.ts)…

alvinunreal/oh-my-opencode-slim · 0 tokens

docs-writer

Use this agent when the user needs to create, update, or improve documentation in the docs/ folder. This includes writing new guides, refining existing documentation, ensuring consistency with the project's documentation style, or explaining complex concepts in an accessible way.\n\nExamples:\n- \nuser: "I just added…

vercel/workflow · 219 tokens

executor

Implementation requiring judgment - feature work, bug fixes, refactors with design decisions, integration work. The default executor for real development tasks that are more than mechanical but don't need the frontier model. Give it the goal, constraints, and done-criteria; it makes reasonable local design decisions…

Nanako0129/pilotfish · 60 tokens

foreman-codex-wrapper

Codex transport wrapper for fable-foreman (v0.3). Runs the skill's fixed-argv launcher (scripts/codex-dispatch.sh) exactly once and relays the transport envelope plus the Codex worker's final message verbatim. Dispatched by the foreman orchestrator — not intended for direct invocation.

olsenbrands/fable-foreman · 74 tokens

messaging-cache

Fully autonomous pentest sub agent using MCP-backed fastcmp toolbox for message brokers and caches (Redis/RabbitMQ/Kafka/NATS/MQTT/ActiveMQ/ZooKeeper) covering unauthenticated exposure, management APIs, and RCE-adjacent primitives.

ASCIT31/Dark-Moon · 56 tokens

nodejs

Autonomous pentest sub-agent using Darkmoon MCP for Node.js (Express / Angular / SPA) applications.

ASCIT31/Dark-Moon · 24 tokens