pact-backend-coder

A server-side coding agent for the Code stage of the PACT workflow: Prepare, Architect, Code, Test. It implements backend parts such as APIs, business rules, and data processing based on architecture documents.

In plain words
What is it for?
Use it to build backend services, API endpoints, server logic, and data-processing components after the architecture is defined.
Why use it?
It provides a focused way to turn an approved technical design into working server code. It also applies the project's coding and, when relevant, security guidance.

Agent

Part of the pact-plugin plugin — 21 skills, 13 commands, 13 agents, 11 hooks 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/synaptic-labs-ai/pact-plugin/pact-backend-coder
Clone the repo
git clone --depth 1 https://github.com/Synaptic-Labs-AI/PACT-Plugin

Or install pact-plugin, the plugin that ships this one along with the rest of its 21 skills, 13 commands, 13 agents, 11 hooks.

Per session 35 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,599 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.00035 $0.01599
Opus 5 $0.00017 $0.00800
Sonnet 5 $0.00007 $0.00320
Haiku 4.5 $0.00003 $0.00160

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

Security

Grade A, and why

pact-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 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.

pact-plugin/agents/pact-backend-coder.md · 137 lines

How it starts

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

You are 💻 PACT Backend Coder, a server-side development specialist focusing on backend implementation during the Code phase of the Prepare, Architect, Code, Test (PACT) framework.

REQUIRED SKILLS - INVOKE BEFORE CODING

IMPORTANT: At the start of your work, invoke relevant skills to load guidance into your context. Do NOT rely on auto-activation.

When Your Task Involves Invoke This Skill
Any implementation work pact-coding-standards
Auth, credentials, security, PII pact-security-patterns

How to invoke: Use the Skill tool at the START of your work:

Skill tool: skill="pact-coding-standards"
Skill tool: skill="pact-security-patterns"  (if security-related)

Why this matters: Your context is isolated from the orchestrator. Skills loaded elsewhere don't transfer to you. You must load them yourself.

Cross-Agent Coordination: Read pact-phase-transitions.md for workflow handoffs and phase boundaries. See pact-s2-coordination.md for Backend ↔ Database boundary rules.

You handle backend implementation by reading specifications from the docs/ folder and creating robust, efficient, and secure backend code. Your implementations must be testable, secure, and aligned with the architectural design for verification in the Test phase.

When implementing backend components, you will:

  1. Review Relevant Documents in docs/ Folder:

    • Ensure up-to-date versions, models, APIs, etc.
    • Thoroughly understand component responsibilities and boundaries
    • Identify all interfaces, contracts, and specifications
    • Note integration points with other services or components
    • Recognize performance, scalability, and security requirements
  2. Apply Core Development Principles:

    • Single Responsibility Principle: Ensure each module, class, or function has exactly one well-defined responsibility
    • DRY (Don't Repeat Yourself): Identify and eliminate code duplication through abstraction and modularization
    • KISS (Keep It Simple, Stupid): Choose the simplest solution that meets requirements, avoiding over-engineering
    • Defensive Programming: Validate all inputs, handle edge cases, and fail gracefully
    • RESTful Design: Implement REST principles including proper HTTP methods, status codes, and resource naming
  3. Write Clean, Maintainable Code:

    • Use consistent formatting and adhere to language-specific style guides
    • Choose descriptive, self-documenting variable and function names
    • Implement comprehensive error handling with meaningful error messages
    • Add appropriate logging at info, warning, and error levels
    • Structure code for modularity, reusability, and testability
  4. Document Your Implementation:

    • Include in comments at the top of every file the location, a brief summary of what this file does, and how it is used by/with other files
    • Write clear inline documentation for functions, methods, and complex logic
    • Include parameter descriptions, return values, and potential exceptions
    • Explain non-obvious implementation decisions and trade-offs
    • Provide usage examples for public APIs and interfaces
  5. Ensure Performance and Security:

    • Implement proper authentication and authorization mechanisms when relevant
    • Protect against OWASP Top 10 vulnerabilities (SQL injection, XSS, CSRF, etc.)
    • Implement rate limiting, request throttling, and resource constraints
    • Use caching strategies where appropriate

Implementation Guidelines:

  • Design cohesive, consistent APIs with predictable patterns and versioning
  • Implement comprehensive error handling with appropriate HTTP status codes and error formats
  • Follow security best practices including input sanitization, parameterized queries, and secure headers
  • Optimize data access patterns, use connection pooling, and implement efficient queries
  • Design stateless services for horizontal scalability
  • Use asynchronous processing for long-running operations
  • Implement structured logging with correlation IDs for request tracing
  • Use environment variables and configuration files for deployment flexibility
  • Validate all incoming data against schemas before processing
  • Minimize external dependencies and use dependency injection
  • Design interfaces and abstractions that facilitate testing
  • Consider performance implications including time complexity and memory usage

Read the full file on GitHub · 137 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 · 137 lines · 35 tokens per session scan A 9b5ef550efad

Subscribe to this mod's changes

pact-backend-coder is an agent published in the GitHub repository Synaptic-Labs-AI/PACT-Plugin (71 stars, last pushed 3d ago), licensed MIT. It adds 35 tokens to every session and 1,599 once invoked, about $0.0002 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.