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.
npx agentmods add skills/jiten-singh-shahi/salesforce-claude-code/continuous-agent-loopnpx skills add jiten-singh-shahi/salesforce-claude-code --skill continuous-agent-loopgit clone --depth 1 https://github.com/jiten-singh-shahi/salesforce-claude-codeWrote 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.
[](https://agentmods.dev/skills/jiten-singh-shahi/salesforce-claude-code/continuous-agent-loop)<a href="https://agentmods.dev/skills/jiten-singh-shahi/salesforce-claude-code/continuous-agent-loop"><img src="https://agentmods.dev/badge/skills/jiten-singh-shahi/salesforce-claude-code/continuous-agent-loop.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00043 | $0.02385 |
| Opus 5 | $0.00022 | $0.01192 |
| Sonnet 5 | $0.00009 | $0.00477 |
| Haiku 4.5 | $0.00004 | $0.00238 |
Grade A, and why
continuous-agent-loop 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 5d 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.
How it starts
The opening of the file, as written. The whole thing — 261 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Continuous Agent Loop
Patterns, architectures, and reference implementations for running Claude Code autonomously in loops on Salesforce projects. Covers sequential claude -p pipelines through RFC-driven multi-agent DAG orchestration with Apex test gates.
When to Use
- Setting up autonomous Salesforce development workflows (Apex TDD cycles, LWC iteration)
- Choosing the right loop architecture for your problem (simple deploy vs complex feature)
- Building CI/CD-style continuous development pipelines with SF CLI gates
- Running parallel agents for multi-layer Salesforce work (Apex + LWC + Integration)
- Adding quality gates (governor limits, coverage thresholds) to autonomous workflows
Loop Selection Flow
Start
|
+-- Need strict CI/PR control? -- yes --> continuous-pr
|
+-- Need RFC decomposition? -- yes --> rfc-dag
|
+-- Need exploratory parallel generation? -- yes --> infinite
|
+-- default --> sequential
Loop Pattern Spectrum
| Pattern | Complexity | Best For |
|---|---|---|
| Sequential Pipeline | Low | Daily Apex dev steps, scripted SFDX workflows |
| Infinite Agentic Loop | Medium | Parallel Apex/LWC generation from a spec |
| Continuous Claude PR Loop | Medium | Multi-day Apex TDD iterations with CI gates |
| De-Sloppify Pattern | Add-on | Quality cleanup after any Implementer step |
| Ralphinho / RFC-Driven DAG | High | Large Salesforce features with parallel units and merge queue |
1. Sequential Pipeline
The simplest loop. Chain claude -p calls — each is a focused step with a clear prompt.
#!/bin/bash
set -e
# Step 1: Implement with TDD
claude -p "Read docs/order-service-spec.md. Implement OrderService.cls with TDD.
Target 85% coverage. No SOQL or DML inside for loops."
# Step 2: De-sloppify
claude -p "Review changes. Remove: unnecessary null checks, tests verifying platform
behavior, System.debug statements, commented-out code.
Run 'sf apex run test --class-names OrderServiceTest' after cleanup."
# Step 3: Verify
claude -p "Run 'sf project deploy start --dry-run --source-dir force-app/main/default/classes'.
Fix any failures. Do not add new features."
# Step 4: Commit
claude -p "Commit with message: feat: add order service with test coverage"
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.
- 5d ago First seen · 261 lines · 43 tokens per session scan A a3de1b86362d
continuous-agent-loop is a skill published in the GitHub repository jiten-singh-shahi/salesforce-claude-code (15 stars, last pushed 2mo ago), licensed MIT. It adds 43 tokens to every session and 2,385 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.
Other skills, from other repositories
sf-agentforce
Build, configure, and test Agentforce agents on Salesforce. Covers agent setup, topics, actions (Flow, Apex, PromptTemplate, External Service), Agent Scripts for deterministic FSM-based agents, PromptTemplate authoring, GenAI Models API, metadata structure, and agent testing via the Testing Center and CLI. Activate on…
sf-debug
Debug and troubleshoot Salesforce applications using debug logs, governor limit monitoring, error diagnosis, and performance profiling. Use when analyzing debug logs, diagnosing governor limit violations, interpreting stack traces, resolving common Salesforce errors, or profiling Apex performance. Activate on .log…
sf-diagram
Generate Mermaid diagrams from Salesforce metadata and architecture. Reads org metadata, Apex classes, Flow XML, and object definitions to produce ERDs, class diagrams, sequence diagrams, flow visualizations, and deployment dependency graphs. Activate on "diagram", "visualize", "ERD", "sequence diagram", "class…
sf-integration
Configure Salesforce integrations: Named Credentials, Connected Apps, External Services, Platform Events, CDC, and auth flows. Use when setting up integration infrastructure, metadata XML, or choosing architecture patterns. Activate on .namedCredential-meta.xml, .connectedApp-meta.xml, .platformEvent-meta.xml…
sf-omnistudio
Comprehensive OmniStudio / Salesforce Industries development skill covering OmniScripts, FlexCards, Integration Procedures, Data Mappers (DataRaptors), namespace detection, dependency mapping, and migration patterns. TRIGGER when: user works with OmniStudio components, asks about OmniScripts, FlexCards, Integration…
sf-permissions
Manage and audit Salesforce permissions: Permission Sets, Profiles, Permission Set Groups, object/field-level security (CRUD/FLS), custom permissions, and access troubleshooting. Use when asked about "who has access", permission set creation, FLS auditing, access errors, permission comparison, or muting permission…