continuous-agent-loop
Skill15 starsChanged 7 months agoMITView on GitHub
Use when building autonomous Claude Code loops for Salesforce Apex and LWC projects. Patterns from sequential pipelines to RFC-driven multi-agent DAG systems with quality gates. Do NOT use for single-shot Apex tasks.
18 other projects use a version of this, 15 of them edited.
Adopted by
Most recently taken up by
- Rojios/everything-claude-codeedited, first seen Nov 8, 2026
- pankaj-mahaur/Agent-Daemonedited, first seen Nov 6, 2026
- renepf/claude-skillsedited, first seen Oct 25, 2026
- davidanthonyn/claude-skillsedited, first seen Oct 20, 2026
- gongyijie85/dsh-eccedited, first seen Oct 13, 2026
- MohamedEssam0-0/claude-skillsedited, first seen Oct 11, 2026
Used with
Projects with it also use safety-guard, token-budget-advisor and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
loulanyueSkillsafety-guard
Also in 5 projects that use this
Exploration-labsSkilltoken-budget-advisor
Proactive token budget assessment and task chunking strategy. Use this skill when queries involve multiple large file uploads, requests for comprehensive multi-document analysis, complex multi-step workflows with heavy research (10+ tool calls), phrases like "complete analysis", "full audit", "thorough review", "deep dive", or tasks combining extensive research with large output artifacts. This skill helps assess token consumption risk early and recommend chunking strategies before beginning work.
Also in 4 projects that use this
Yog-SothoSkillpytorch-patterns
PyTorch deep learning patterns and best practices for building robust, efficient, and reproducible training pipelines, model architectures, and data loading. Always activate when the user is writing PyTorch models or training scripts, reviewing deep learning code, debugging training loops or data pipelines, optimizing GPU memory or training speed, setting up reproducible experiments, implementing transfer learning or fine-tuning, or asks anything about nn.Module, DataLoader, autograd, AMP, or torch.compile.
Also in 4 projects that use this
loulanyueSkillnuxt4-patterns
Nuxt 4 app patterns for hydration safety, performance, route rules, lazy loading, and SSR-safe data fetching with useFetch and useAsyncData.
Also in 3 projects that use this
RojiosSkillsecurity-bounty-hunter
Hunt for exploitable, bounty-worthy security issues in repositories. Focuses on remotely reachable vulnerabilities that qualify for real reports instead of noisy local-only findings.
Also in 3 projects that use this
GSA-TTSSkillarchitecture-decision-records
Load when a user wants architecture decision records (ADRs) drafted from requirements or a design discussion, asks which decisions need an ADR, or wants an ADR draft reviewed for one-sided trade-offs, weak alternatives or missing requirement links. Not for setting up a project's whole documentation system (project-documentation-system).
Also in 7 projects that use this
- +3 more from loulanyue
Other versions18 projects use a version of this.
Word for word · 0
None found.
Edited · 15
- loulanyue/awesome-claude-notes★ 27218% same
- Fmarzochi/EGC★ 6118% same
- gongyijie85/dsh-ecc★ 816% same
- get-proofpilot/claude-skills-catalog★ 118% same
- NISTALTALSON/essential-claude-skills★ 116% same
- Rojios/everything-claude-code★ 118% same
- SamuelNDCE/claude-super-skill-library★ 118% same
- TironFox/everything-claude-code★ 118% same
- davidanthonyn/claude-skills★ 018% same
- eugenezhangco-spec/athena★ 018% same
5 more not listed
Wrote their own version · 3
- woxiangyangzhimao/skills★ 14same name
- junimnjw/everything-claude-code★ 1same name
- thanvish21/hcc-bundle★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository58 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- asideSkill
- checkpointSkill
- configure-sccSkill
- mcp-server-patternsSkill
- model-routeSkill
- prompt-optimizerSkill
- refactor-cleanSkill
- resume-sessionSkill
- save-sessionSkill
- search-firstSkill
- security-scanSkill
- sessionsSkill
- sf-2gp-security-reviewSkill
- sf-agentforce-developmentSkill
- sf-agentforce-mcp-actionsSkill
- sf-apex-async-patternsSkill
- sf-apex-best-practicesSkill
- sf-apex-constraintsSkill
- sf-apex-cursorSkill
- sf-apex-enterprise-patternsSkill
- sf-apex-testingSkill
- sf-api-designSkill
- sf-approval-processesSkill
- sf-aura-developmentSkill
- sf-build-fixSkill
- sf-cli-referenceSkill
- sf-data-modelingSkill
- sf-debuggingSkill
- sf-deployment-constraintsSkill
- sf-deploymentSkill
- sf-devops-ci-cdSkill
- sf-docs-lookupSkill
- sf-e2e-testingSkill
- sf-experience-cloudSkill
- sf-flow-developmentSkill
- sf-governor-limitsSkill
- sf-harness-auditSkill
- sf-helpSkill
- sf-integrationSkill
- sf-lwc-constraintsSkill
- sf-lwc-developmentSkill
- sf-lwc-testingSkill
- sf-metadata-managementSkill
- sf-platform-events-cdcSkill
- sf-quickstartSkill
- sf-security-constraintsSkill
- sf-securitySkill
- sf-soql-constraintsSkill
- sf-soql-optimizationSkill
- sf-tdd-workflowSkill
- sf-testing-constraintsSkill
- sf-trigger-constraintsSkill
- sf-trigger-frameworksSkill
- sf-visualforce-developmentSkill
- strategic-compactSkill
- update-docsSkill
- update-platform-docsSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 70
Variations: Use --model opus for architecture analysis, --model haiku for simple fixes.
- Distinctive: line 90
Don't rely on agents to self-differentiate.
- Distinctive: line 131
Add-on for any loop: When you ask an LLM to implement Apex with TDD, it over-tests:
- Distinctive: line 137
Solution: Don't constrain the Implementer — let it be thorough.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.
Files
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 --> sequentialLoop 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"Variations: Use --model opus for architecture analysis, --model haiku for simple fixes. Use --allowedTools "Read,Grep,Glob" for read-only analysis passes.
2. Infinite Agentic Loop
Two-prompt system for parallel sub-agents. Useful for generating multiple Apex test class variants or LWC component iterations from a spec.
PROMPT 1 (Orchestrator) PROMPT 2 (Sub-Agents)
┌─────────────────────┐ ┌──────────────────────┐
│ Parse spec file │ │ Receive full context │
│ Scan output dir │ deploys │ Read assigned number │
│ Plan iteration │────────────│ Follow spec exactly │
│ Assign creative dirs │ N agents │ Generate unique output │
└─────────────────────┘ └──────────────────────┘Key Insight: Uniqueness via Assignment
Don't rely on agents to self-differentiate. The orchestrator assigns each agent a specific test scenario and iteration number. Batching: 1-5 simultaneously, 6-20 in batches of 5, infinite in waves of 3-5.
3. Continuous Claude PR Loop
Production-grade shell script that runs Claude Code in a continuous loop, creating PRs, waiting for CI (including Apex test runs), and merging automatically.
┌─────────────────────────────────────────────────────┐
│ 1. Create branch (continuous-claude/iteration-N) │
│ 2. Run claude -p with Apex TDD prompt │
│ 3. (Optional) Reviewer pass │
│ 4. Commit + Push + Create PR │
│ 5. Wait for CI (sf apex run test --code-coverage) │
│ 6. CI failure? → Auto-fix pass (claude -p) │
│ 7. Merge PR (squash) → Return to main → repeat │
│ Limit by: --max-runs N | --max-cost $X │
└─────────────────────────────────────────────────────┘Cross-Iteration Context: SHARED_TASK_NOTES.md
The critical innovation — a file that persists across iterations:
## Progress
- [x] OrderService.cls — 82% coverage (iteration 1)
- [ ] OrderController.cls — 45% coverage, needs work
## Next Steps
- Focus on OrderController.cls
- Named credential for external API is set upClaude reads this at iteration start, updates at iteration end.
4. The De-Sloppify Pattern
Add-on for any loop. When you ask an LLM to implement Apex with TDD, it over-tests:
- Tests verifying Salesforce platform behavior
- Defensive null checks for schema-guaranteed fields
- Excessive try/catch blocks
Solution: Don't constrain the Implementer — let it be thorough. Then add a focused cleanup pass:
# Implement (thorough)
claude -p "Implement OrderService.cls with full TDD."
# De-sloppify (separate context)
claude -p "Review changes. Remove tests for platform behavior, redundant null checks,
System.debug statements, commented-out code. Run 'sf apex run test' after cleanup."Two focused agents outperform one constrained agent.
5. Ralphinho / RFC-Driven DAG
Most sophisticated. RFC-driven pipeline that decomposes a Salesforce feature into a dependency DAG, runs each unit through quality stages, and lands via merge queue.
Salesforce RFC/PRD
│
DECOMPOSITION (sf-architect)
Break into: Apex → LWC → Integration → Metadata layers
│
┌──────────────────────────────────────────────────┐
│ For each DAG layer (sequential, by dependency): │
│ │
│ Quality Pipelines (parallel per unit): │
│ Research → Plan → Implement → Test → Review │
│ Apex: governor check + ≥75% coverage gate │
│ LWC: Jest tests + accessibility check │
│ │
│ Merge Queue: │
│ Rebase → sf deploy validate → Apex tests → │
│ Pass → Land | Fail → Evict + re-enter │
└──────────────────────────────────────────────────┘Complexity Tiers
| Tier | Pipeline Stages |
| trivial | implement → sf deploy validate |
| small | implement → apex test → code-review |
| medium | research → plan → implement → apex test → governor-check → review-fix |
| large | + sf-architect final review |
When to Use Ralphinho vs SCC-Native
| Signal | Ralphinho | SCC-Native |
| 10+ interdependent work units | Yes | No |
| Need worktree isolation | Yes | No |
| Single feature with 3 layers | No | Yes |
| Quick Apex + LWC iteration | No | Yes |
Salesforce Loop Patterns
| Pattern | Loop Type | Stop Condition |
| Governor Fix | sequential | No more governor violations |
| Coverage Ramp | sequential | All classes at 75%+ (85% target) |
| PB→Flow Migration | continuous-pr | All Process Builders converted |
| Trigger Framework Migration | sequential | All triggers use handler pattern |
| Deployment Monitor | infinite (30s) | Deploy succeeds/fails/cancelled |
SF-Specific Checkpoint Format
── SF Checkpoint #N ────────────────────────
Apex Tests: 142/145 passing (+3)
Coverage: 78% → 82% (target: 85%)
Governor: 2 violations remaining (was 8)
Deploy: Validates against scratch org
Iteration: N/max
────────────────────────────────────────────Choosing the Right Pattern
Is the task a single focused Salesforce change?
├─ Yes → Sequential Pipeline
└─ No → Is there a written RFC/spec?
├─ Yes → Need parallel layers?
│ ├─ Yes → RFC-Driven DAG
│ └─ No → Continuous Claude PR Loop
└─ No → Need many variants from a spec?
├─ Yes → Infinite Agentic Loop
└─ No → Sequential + De-SloppifyCombining Patterns
- Sequential + De-Sloppify — Most common. Every Apex implement step gets a cleanup pass.
- Continuous Claude + De-Sloppify — Add
--review-promptwith de-sloppify directive. - Any loop + Quality Gates — Use the
sf-review-agentagent as a gate before commits. - Model routing —
--model haikufor simple fixes,--model opusfor architecture.
Anti-Patterns
- Infinite loops without exit conditions — Always have max-runs, max-cost, or completion signal.
- No context bridge — Use
SHARED_TASK_NOTES.mdto bridgeclaude -pinvocations. - Retrying same failure — Capture failure output and feed to next attempt.
- Negative instructions instead of cleanup — Don't say "don't add System.debug." Add a separate de-sloppify pass.
- All agents in one context — Separate concerns into different agent processes.
- Ignoring deploy dependency order — Apex before LWC before metadata.
References
| Project | Author | SCC Context |
| Ralphinho | enitrat | Adapted for Salesforce layers |
| Infinite Agentic Loop | disler | Useful for Apex test generation |
| Continuous Claude | AnandChowdhary | Use with sf apex run test as CI gate |
Related
- Agent:
loop-operator— For monitoring and managing autonomous agent loops
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
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.

