Jaganpro/sf-skills

Salesforce Skills for Agentic Coding Tools — AI-powered Apex, Flow, LWC, SOQL, Agentforce, and more for Claude Code. 14 skills, 420+ validation points, LSP integration.

License:MITLanguage:Python245

Deep Analysis

全面的 Salesforce 代理编码技能套件,包含 16 个预构建技能,涵盖 Apex、Flow、LWC、SOQL、Agentforce 和 DevOps,具有自动验证钩子和 LSP 集成

Core Features

Technical Implementation

Highlights
  • 自动激活系统 - 技能根据用户提示自动建议
  • 代理自动修复循环 - 检测错误、自动修复并验证最多 3 次
  • 420+ 验证点覆盖所有技能
  • 实时查询计划分析与实际执行指标
  • LSP 集成提供零延迟本地工具执行
  • 8 种不同代理编码工具的跨 CLI 支持
Use Cases
  • Salesforce Apex 触发器和类生成
  • Flow 创建和批量验证
  • Lightning Web Component 开发
  • 自然语言到 SOQL 查询生成和优化
  • 测试类生成和覆盖率分析
  • 调试日志分析
  • Agentforce 代理创建
  • CI/CD 自动化和部署编排
Limitations
  • 需要 Salesforce CLI v2+ 和 Python 3.10+ 进行验证
  • 大多数技能最低 API 版本 62.0;Agentforce 需要 65.0
  • 实时查询计划分析需要连接 Salesforce org
  • LSP 实时验证需要 VS Code 和 Salesforce 扩展
  • 大多数技能标记为 Alpha 状态
Tech Stack
Python 3.10+Salesforce CLI (sf) v2.xSalesforce Code Analyzer V5PMDSFGEESLintSalesforce LSP serversJava 11+Node.js 18+

Salesforce Skills for Agentic Coding Tools

💙 Community-powered agentic coding knowledge, shared by a Salesforce Certified Technical Architect (CTA)

Author
License: MIT

A collection of reusable skills for Agentic Salesforce Development, enabling AI-powered code generation, validation, testing, debugging, and deployment. Built for Claude Code with planned support for other agentic coding tools.

16 skills60+ templates520+ validation pointsLSP integration


💡 What is a Skill?

Skills are portable knowledge packs that supercharge AI coding agents with domain expertise.

Think of skills as "installable superpowers" for your agentic coding tool. Instead of repeatedly explaining Salesforce best practices to your AI assistant, a skill pre-loads that knowledge so the AI becomes an instant expert.

sf-apex/
├── SKILL.md              # 🧠 The brain - prompts & instructions
├── templates/            # 📁 Code templates & patterns
├── hooks/                # ✅ Validation scripts
└── examples/             # 📖 Usage examples

💡 Tip: Skills are open-source and composable. You can fork, customize, or create your own!

Why Use Skills?

🚀 Stop explaining Salesforce patterns. Start building.

1. Instant Expertise — AI knows Trigger Actions Framework, Flow bulkification, deployment best practices from the first message.

2. Automatic Validation — Every Apex class, Flow, and agent script is scored against 100-150 point rubrics. Catch anti-patterns before deployment.

3. Built-in Templates — 50+ production-ready templates across Apex, Flow, Metadata, Agentforce, and more.

4. Tool Orchestration — "Deploy to production" becomes a single command. Skills handle sf CLI complexity.

5. Context Efficiency — Skills load only when invoked, saving ~2000 tokens per conversation vs. pasting prompts.

Before After
❌ Prompt engineering every conversation Skill(skill="sf-apex")
❌ 10+ messages to explain requirements ✅ 1 message, skill fills the gaps
❌ Review code manually for issues ✅ Hooks validate on every save

🤖 Supported Agentic Coding Tools

Tool Status Install Path
Claude Code CLI ✅ Full Support .claude-plugin/ Claude
OpenCode CLI ✅ Installer .opencode/skill/ OpenCode
Codex CLI ✅ Installer .codex/skills/ OpenAI
Gemini CLI ✅ Installer ~/.gemini/skills/ Google
Amp CLI ✅ Compatible .claude/skills/ Amp
Droid CLI ✅ Installer .factory/skills/ Factory
Cursor CLI ✅ Installer .cursor/rules/ Cursor
Agentforce Vibes ✅ Installer .clinerules/ Salesforce

Agent Skills Open Standard: These skills follow the Agent Skills specification for cross-CLI compatibility.

CLI Compatibility Notes

🤝 Call for Volunteers! This repo is community-driven, sharing knowledge to strengthen the Salesforce ecosystem. We need volunteers to test skills on different CLIs (OpenCode, Codex, Gemini, Cursor, etc.). You'll learn a ton about agentic workflows while helping the community! Open an issue to get started.

Claude Code (Anthropic) — Full Native Support

Claude Code is the recommended platform for sf-skills with full native support for all features.

# Install via marketplace
/plugin marketplace add Jaganpro/sf-skills
  • Install Path: .claude-plugin/ (per-skill plugin structure)
  • Format: Native SKILL.md with hooks, templates, and examples
  • Hooks: ✅ Automatic validation on Write/Edit operations
  • LSP: ✅ Real-time syntax validation with auto-fix loops
  • Templates: ✅ Referenced dynamically (no duplication)
  • Tool Execution: Local tools (Read, Write, Edit, Bash, Grep, Glob) — no MCP overhead
  • Docs: claude.ai/code

Why Claude Code for sf-skills:

  • Zero-latency tools — Local execution vs. MCP JSON-RPC roundtrips
  • Automatic hooks — Validation runs on every file save without manual invocation
  • Context efficiency — Skills load on-demand, saving ~2000 tokens per conversation
  • LSP integration — Apex, Agent Script, and LWC syntax errors caught in real-time
OpenCode CLI — Open-Source Claude Code Alternative

OpenCode is an open-source alternative to Claude Code with skill support.

# Install all skills for OpenCode
python tools/installer.py --cli opencode --all
  • Install Path: .opencode/skill/ (project) or ~/.opencode/skill/ (global)
  • Format: SKILL.md with scripts and templates
  • Hooks: ⚠️ Manual execution (run scripts/validate_*.py)
  • Claude Compatibility: Also reads .claude/skills/ directory
  • Docs: github.com/opencode-ai/opencode
Codex CLI (OpenAI) — GPT-Powered Coding Agent

Codex CLI is OpenAI's terminal-based coding agent.

# Install all skills for Codex
python tools/installer.py --cli codex --all
  • Install Path: .codex/skills/ (project) or ~/.codex/skills/ (global)
  • Format: SKILL.md with assets/ (templates) and references/ (docs)
  • Hooks: ⚠️ Manual execution (run scripts/validate_*.py)
  • Enable Skills: codex --enable skills
  • Docs: github.com/openai/codex
Gemini CLI (Google) — 1M+ Token Context

Gemini CLI is Google's Gemini-powered terminal agent with massive context window.

# Install all skills for Gemini
python tools/installer.py --cli gemini --all
  • Install Path: ~/.gemini/skills/ (user scope by default)
  • Format: SKILL.md with scripts and templates
  • Hooks: ⚠️ Manual execution (run scripts/validate_*.py)
  • Context: 1M+ tokens — can load entire codebases
  • Symlink: ln -s ~/.gemini/skills/sf-apex ~/.claude/skills/sf-apex
  • Docs: github.com/google-gemini/gemini-cli
Amp CLI (Sourcegraph) — Claude Code Compatible

Amp is Sourcegraph's agentic coding tool, fully compatible with Claude Code skills.

# No installer needed — Amp reads Claude Code skills directly
# Place skills in .claude/skills/ directory
  • Install Path: .claude/skills/ (same as Claude Code)
  • Format: Native Claude Code format (SKILL.md + hooks + templates)
  • Hooks: ✅ Compatible with Claude Code hooks
  • Codebase Search: Powered by Sourcegraph's code intelligence
  • Docs: sourcegraph.com/amp
Droid CLI (Factory.ai) — Claude Code Compatible

Droid CLI (v0.26.0+) natively supports Claude Code skills format. Use the installer or import directly:

# Install via installer
python tools/installer.py --cli droid --all

# Or Droid auto-discovers skills from .claude/skills/ directory
# Use the /skills command within Droid to manage skills
Cursor CLI — Installer with MDC Transformation

Cursor CLI uses its own rules system (.cursor/rules/ with MDC format). The installer transforms skills to Cursor's native format:

# Install skills transformed to MDC format
python tools/installer.py --cli cursor --all
  • Install Path: .cursor/rules/{name}.mdc
  • Format: MDC (Markdown with YAML frontmatter: description, globs, alwaysApply)
  • Templates: Copied to assets/, docs to references/
  • Alternative: SkillPort MCP bridge for runtime skill access
  • Docs: docs.cursor.com/context/rules-for-ai
Agentforce Vibes (Salesforce) — Enterprise Vibe-Coding Tool

Agentforce Vibes is Salesforce's enterprise vibe-coding tool with strong Model Context Protocol (MCP) support.

# Install all skills for Agentforce Vibes
python tools/installer.py --cli agentforce-vibes --all
  • Install Path: .clinerules/ (project directory)
  • Format: Pure markdown files with numeric prefixes (01-sf-apex.md, 02-sf-flow.md, etc.)
  • Templates: Inlined directly into markdown rules (self-contained)
  • Includes: /newrule command refe