agentleFS
UnfoldCRO-OrganizationUnfoldCRO-Organization/cro-agent-skills/skills/dev-patterns/SKILL.md

dev-patterns

Skill0 starsChanged 22 days agoMITView on GitHub

House build patterns - auth/roles, payments (Razorpay/Stripe), webhooks, cron/jobs, file uploads, email/WhatsApp, audit log, multi-currency, API errors, LLM features. Use for "add auth", "add payments", "integrate <API>". NOT new-project setup (dev-kickoff) or agent orchestration (dev-agents).

  • Reads credentials

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read project CLAUDE.md + Docs map: stack, host (VPS/PM2 vs Vercel), ORM, auth lib, existing libs.

    line 30
  2. Very specific:

    Keep the flow steps; swap code shape to the project's ORM, router, auth lib, naming (agent.md → Code Standards).

    line 38
  3. Distinctive:

    Every protected page, route handler and server action guards itself.

    line 48
  4. Very specific:

    No prod reset/drop/--accept-data-loss/--force-reset/DELETE without explicit OK + backup first.

    line 51

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Dev Patterns

Task: $ARGUMENTS

House pattern library used mid-build: "how do we do X here". Pick → adapt → verify. Load only the reference(s) the task needs.

Index

NeedLoad
login, SSO, allowlist, roles/permissions, page guards, Shopify app OAuth, WP capsreferences/auth-roles.md
checkout, gateway, order states, refunds, reconciliation, GST invoicereferences/payments.md
inbound webhook, cron, queue, background job, retries, dead letters, rate limitsreferences/webhooks-jobs.md
DB access, migrations, audit log, soft delete, UTC/money storage, uploads (R2/S3), backupsreferences/data-files.md
transactional email, WhatsApp/SMS, OTP delivery, notifications, Payload hooksreferences/messaging.md
route vs server action, response shape, zod, errors, external API clients, cachingreferences/api-errors.md
₹ lakh/crore vs Western formats, timezones, locales, hreflang, phone/address, consentreferences/i18n-markets.md
LLM feature inside a client appreferences/ai-features.md

Cross-cutting features load several: checkout = payments + webhooks-jobs + messaging + data-files.

Before picking

  1. Read project CLAUDE.md + Docs map: stack, host (VPS/PM2 vs Vercel), ORM, auth lib, existing libs.
  2. Grep repo for an existing implementation (lib/auth*, *mail*, cron, webhook, money, storage). Extend it; don't add a parallel one.
  3. Sibling the agency project already solved it → copy the pattern only. Never its data, DB, creds or env values.
  4. Smallest pattern that meets the need. No adapter interface for one provider, no Redis/queue infra for 10 jobs/day.
  5. Stack fork: Next.js = default code shapes · WP/PHP + Shopify flagged per reference · other Node/PHP in Docker → adapt the Next shape.

Adapting

  • Keep the flow steps; swap code shape to the project's ORM, router, auth lib, naming (agent.md → Code Standards).
  • Third-party accounts (gateway, SMTP, WhatsApp, Google Cloud, R2, LLM key) = client-owned, client email. Unknown → ask. the agency's own products exempt.
  • Client code: client prefix or neutral names. No org/the-org in classes, IDs, files, comments.
  • Secrets: env var NAMES only in code, docs, chat. Values → .env FILL_ME + hidden-input set-secrets.sh (read -rsp) the user runs on the target.
  • (verify) = legal/tax/provider-limit claim. Confirm against current official docs (Context7 / provider docs) before shipping.
  • React UI for the feature → Astryx + Motion. Never in WP/PHP/Liquid.

Hard rules

  • Server is source of truth: amount, price, role, status, ownership. Client input is a request, never a fact.
  • Every protected page, route handler and server action guards itself. Middleware alone ≠ auth.
  • Inbound events: verify + store + idempotent. Outbound calls: timeout + bounded retry.
  • Store UTC. Money = integer minor units + currency code.
  • No prod reset/drop/--accept-data-loss/--force-reset/DELETE without explicit OK + backup first.
  • Code change → build-review-loop. Push/merge/deploy/prod data writes → explicit approval.
  • Auth, payments, uploads, webhooks → focused /security-audit pass before go-live.

Verify (every pattern)

  • Name the end state first: "revoked user gets 401 on /orders", "webhook replayed 3× → 1 order, 1 email".
  • Assert it on the real path (staging/live data, provider sandbox, headless browser with no cookies).
  • Proxies are not proof: queue empty, wp_mail() true, SMTP verify(), CI green, tsc clean, "deploy success".
  • Indirect check → say it's indirect.

Point to, don't duplicate

  • DB depth: prisma-patterns, mysql-patterns, database-migrations (project-scoped)
  • LLM: claude-api (provider/model/params) · cost-aware-llm-pipeline (budgets/routing)
  • File-processing cache: content-hash-cache-pattern
  • Vercel runtime: vercel:queues, vercel:workflow, vercel:vercel-functions
  • Shopify Admin scripts: <templates>/shopify-admin-app kit
  • Standards: ~/.claude/agent.md (Security, Response Shape, Error Handling, DB Safety, WP Rules)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.