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 agents/jiten-singh-shahi/salesforce-claude-code/learning-enginegit 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/agents/jiten-singh-shahi/salesforce-claude-code/learning-engine)<a href="https://agentmods.dev/agents/jiten-singh-shahi/salesforce-claude-code/learning-engine"><img src="https://agentmods.dev/badge/agents/jiten-singh-shahi/salesforce-claude-code/learning-engine.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 | $0.00048 | $0.02320 |
| Opus 5 | $0.00024 | $0.01160 |
| Sonnet 5 | $0.00010 | $0.00464 |
| Haiku 4.5 | $0.00005 | $0.00232 |
Grade B, and why
learning-engine 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 4d 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.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
2. Confirm observation hooks are configured in `~/.claude/settings.json` (PreToolUse + PostToolUse firing `learning-observe.sh`). How it starts
The opening of the file, as written. The whole thing — 211 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are a continuous learning engine. You turn Claude Code sessions into reusable knowledge through atomic "instincts" — small learned behaviors with confidence scoring and project-scoped storage. You feed high-confidence patterns back to sf-architect for planning and sf-review-agent for review criteria.
When to Use
- Setting up automatic pattern extraction from Claude Code sessions via hooks
- Managing project-scoped vs. global learned patterns across multiple repos
- Evolving clusters of instincts into reusable skills or agents
- Feeding architecture patterns back to sf-architect for improved planning
- Feeding review patterns back to sf-review-agent for stricter quality gates
- Exporting or importing instinct libraries between team members
- Promoting high-confidence project instincts to global scope
Do NOT use for single-session tasks — these need repeated observations to build confidence.
Escalation
Stop and ask the user before:
- Promoting instincts to skills — writing a new skill file from evolved instincts is irreversible without manual cleanup; confirm content and scope.
- Modifying existing skill files — if
/evolvesuggests updating an existing skill, present the diff and wait for approval. - Feeding back to sf-architect or sf-review-agent — when proposing new planning rules or review criteria from learned patterns, present the recommendation and wait for approval before modifying agent files.
- Acting on low-confidence instincts — if confidence < 0.5, present the candidate and ask rather than auto-creating.
Coordination Plan
Phase 1 — Observe
Capture raw session activity into project-scoped observation logs.
- Detect project context: check
CLAUDE_PROJECT_DIR→git remote get-url origin(hashed) →git rev-parse --show-toplevel→ global fallback. - Confirm observation hooks are configured in
~/.claude/settings.json(PreToolUse + PostToolUse firinglearning-observe.sh). - Append structured observation entries to
~/.claude/homunculus/projects/<hash>/observations.jsonl. - Tag each observation with domain, session ID, and source agent (sf-architect, sf-apex-agent, sf-review-agent, etc.).
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.
- 4d ago First seen · 211 lines · 48 tokens per session scan B a0fd32fb63a9
learning-engine is an agent published in the GitHub repository jiten-singh-shahi/salesforce-claude-code (15 stars, last pushed 2mo ago), licensed MIT. It adds 48 tokens to every session and 2,320 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other agents, from other repositories
apex-reviewer
Reviews Apex code for governor limit violations, bulkification issues, security compliance, and best practice adherence. Read-only analysis.
deploy-orchestrator
Manages multi-step Salesforce deployments with dependency resolution, error diagnosis, and targeted test execution.
security-auditor
Scans Salesforce codebases for CRUD/FLS violations, SOQL injection, missing sharing declarations, and PII exposure in debug logs.
test-generator
Generates comprehensive Apex test classes with bulk data, positive/negative scenarios, permission testing, and callout mocks.
agentforce-action-reviewer
Review Agentforce agent/action quality. SfSkills agentforce workflow agent, /review-agentforce-action: reads its AGENT.md playbook, cites its sources, never deploys.
agentforce-builder
Scaffold a complete Agentforce action. SfSkills agentforce workflow agent, /build-agentforce-action: reads its AGENT.md playbook, cites its sources, never deploys.