farm-stack

farm-stack is a skill for Claude Code from Sagargupta16/claude-skills. It costs 50 tokens per session (1,864 once invoked), scanned B, original, MIT.

A set of development rules for applications built with FastAPI, React, and MongoDB, known together here as a FARM stack. It describes how to structure the code, configuration, database access, containers, frontend, and tests.

In plain words
What is it for?
Use it when building or extending a FARM application, including creating models, services, and routes, configuring MongoDB, running the app with Docker, and writing asynchronous tests.
Why use it?
It gives developers a consistent way to add features and avoid mixing database, business, and web code in the same places.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the farm-stack plugin — 1 skill, 1 command, 1 agent shipped together

Good fit Use it when building or extending a FARM application, including creating models, services, and routes, configuring MongoDB, running the app with Docker, and writing asynchronous tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sagargupta16/claude-skills/farm-stack
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.

Any agent
npx skills add Sagargupta16/claude-skills --skill farm-stack
Clone the repo
git clone --depth 1 https://github.com/Sagargupta16/claude-skills

Made for: Claude Code.

Or install farm-stack, the plugin that ships this one along with the rest of its 1 skill, 1 command, 1 agent.

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 farm-stack

README.md
[![agentmods](https://agentmods.dev/badge/skills/sagargupta16/claude-skills/farm-stack/github.svg)](https://agentmods.dev/skills/sagargupta16/claude-skills/farm-stack)
Your own site
<a href="https://agentmods.dev/skills/sagargupta16/claude-skills/farm-stack"><img src="https://agentmods.dev/badge/skills/sagargupta16/claude-skills/farm-stack/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 farm-stack

Your own site · 80×15
<a href="https://agentmods.dev/skills/sagargupta16/claude-skills/farm-stack"><img src="https://agentmods.dev/badge/skills/sagargupta16/claude-skills/farm-stack.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,864 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00050 $0.01864
Opus 5 $0.00025 $0.00932
Sonnet 5 $0.00010 $0.00373
Haiku 4.5 $0.00005 $0.00186

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

Security

Grade B, and why

farm-stack scanned grade B with 1 finding 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 9d 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

| Run as root in Docker | Add non-root user |
plugins/farm-stack/skills/farm-stack/SKILL.md · 246 lines

How it starts

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

FARM Stack Development Patterns

Quick Reference

Task Approach
New project Use /scaffold-farm or follow structure below
Add feature Create model -> service -> route (one file per domain per layer)
Config Dual-layer: env vars (priority) + YAML fallback
Database Motor async client, never sync PyMongo in routes
Docker Alpine-based, compose with MongoDB + backend
Frontend Vite + React, proxy API in dev, static mount in prod
Testing pytest + httpx async, 80%+ coverage target

Project Structure

project-root/
├── main.py                    # FastAPI entry with lifespan
├── requirements.txt           # Pinned dependencies
├── pyproject.toml             # Tool config (ruff, pytest)
├── .env.example               # Environment template
├── Dockerfile                 # python:3.13-alpine
├── docker-compose.yml         # MongoDB + backend + optional frontend
├── Makefile                   # Dev commands (run, test, lint, build)
├── config/
│   ├── __init__.py
│   ├── secrets_parser.py      # Env + YAML config loader, Motor client
│   ├── secrets.yml            # Local dev config (git-ignored)
│   ├── secrets.yml.example    # Template with placeholders
│   └── logging.py             # Logging setup
├── models/                    # Pydantic v2 data models
│   └── {domain}_models.py     # Base -> Create -> Response per domain
├── routes/                    # API endpoint handlers
│   └── {domain}_routes.py     # APIRouter per domain
├── services/                  # Business logic layer
│   └── {domain}_services.py   # Async MongoDB operations
├── utils/                     # Shared utilities
├── tests/                     # pytest suite
│   └── test_{domain}.py       # Per-domain tests
├── client/                    # React + Vite frontend
│   ├── package.json
│   ├── vite.config.js
│   └── src/
└── client_build/              # Built frontend (served as static)

Naming Convention

Domain files follow strict naming: {domain}_models.py, {domain}_services.py, {domain}_routes.py, test_{domain}.py.

Read the full file on GitHub · 246 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. 9d ago First seen · 246 lines · 50 tokens per session scan B 6cc04a676825

Subscribe to this mod's changes

farm-stack is a skill published in the GitHub repository Sagargupta16/claude-skills (5 stars, last pushed 3d ago), licensed MIT. It adds 50 tokens to every session and 1,864 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.