forcedotcom/sf-skills is a collection of reusable instructions that help AI coding agents build and work with Salesforce applications and platform features. Developers use it for Agentforce agents, Lightning apps, Flow, Apex, SOQL, Lightning Web Components, and related Salesforce configuration. The catalogue entries are the repository’s skills, plugins, commands, MCP servers, and agents for AI tools that support skills.
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 skills add forcedotcom/sf-skills --skill dx-code-analyzer-custom-rule-creategit clone --depth 1 https://github.com/forcedotcom/sf-skillsWrote 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/forcedotcom/sf-skills/dx-code-analyzer-custom-rule-create)<a href="https://agentmods.dev/skills/forcedotcom/sf-skills/dx-code-analyzer-custom-rule-create"><img src="https://agentmods.dev/badge/skills/forcedotcom/sf-skills/dx-code-analyzer-custom-rule-create/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/forcedotcom/sf-skills/dx-code-analyzer-custom-rule-create"><img src="https://agentmods.dev/badge/skills/forcedotcom/sf-skills/dx-code-analyzer-custom-rule-create.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- Socket pass
- Snyk pass
- NVIDIA SkillSpector pass
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.00228 | $0.09630 |
| Opus 5.5 | $0.00091 | $0.03852 |
| Sonnet 5.5 | $0.00046 | $0.01926 |
| Haiku 4.5 | $0.00023 | $0.00963 |
Grade C, and why
dx-code-analyzer-custom-rule-create scanned grade C 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 3mo 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.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
8. **Cleanup** — delete ALL sample files AND their parent directories (LWC requires a folder per component). Use `rm -rf <directory>`, not just `rm <file>`. Do not leave empty directories or temporary test fixtures in th How it starts
The opening of the file, as written. The whole thing — 488 lines — stays where its author put it; the contents beside it link to each section on GitHub.
dx-code-analyzer-custom-rule-create: Custom Code Analyzer Rule Authoring
Ecosystem: This skill is part of a 3-skill Code Analyzer suite —
dx-code-analyzer-run(scans & results) ·dx-code-analyzer-configure(setup, config, CI/CD) ·dx-code-analyzer-custom-rule-create(custom rule authoring).
Use this skill when the user needs to create a custom rule that enforces a pattern not covered by Code Analyzer's built-in rules. Supports Regex engine (text pattern matching) and PMD engine (structural XPath queries against the AST).
When This Skill Owns the Task
Use dx-code-analyzer-custom-rule-create when the work involves:
- Creating a new custom rule for Code Analyzer (any engine)
- Enforcing team-specific coding standards via static analysis
- Banning specific patterns (System.debug, hardcoded IDs, TODOs)
- Writing XPath expressions for PMD rules (Apex or metadata XML)
- Writing regex patterns for the Regex engine
- Setting up custom ESLint rules/plugins for LWC/JavaScript
- Enforcing metadata governance (API versions, field descriptions, dangerous permissions)
- Overriding built-in rule thresholds (CyclomaticComplexity, ExcessiveParameterList, etc.)
- Organizing multiple rules into shared rulesets
- Iterating on a custom rule that isn't matching correctly
Delegate elsewhere when the user is:
- Running a scan against existing rules →
dx-code-analyzer-runskill - Configuring engines, prerequisites, CI/CD →
dx-code-analyzer-configureskill - Explaining what an existing built-in rule means →
dx-code-analyzer-runskill - Writing Apex code or tests →
generating-apex/running-apex-testsskills
Required Context to Gather First
Ask for or infer:
- What pattern to catch — what code should be flagged? (If user selected code in their IDE, the selection IS the answer — do not re-ask.)
- What to allow — any exceptions? (test classes, specific contexts)
- File scope — which file types? (.cls, .trigger, .js, all?)
- Severity — how critical? (default: 3/Moderate)
What ships with it
23 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- assets/pmd-ruleset-template.xml 877 B
- examples/metadata-xml-example-fields-api.md 2.8 KB
- examples/metadata-xml-example-flows.md 2.9 KB
- examples/metadata-xml-example-permissions.md 2.8 KB
- examples/metadata-xml-examples.md 3.7 KB
- examples/regex-examples.md 4.2 KB
- examples/xpath-examples.md 5.5 KB
- references/advanced-pmd-patterns.md 8.7 KB
- references/apex-ast-reference.md 5.0 KB
- references/eslint-custom-plugins.md 6.8 KB
- references/eslint-rules-discovery.md 6.9 KB
- references/eslint-tier2-configurable.md 2.6 KB
- references/eslint-tier3-custom-plugins.md 2.8 KB
- references/metadata-xml-rules.md 10 KB
- references/regex-rule-schema.md 6.9 KB
- references/troubleshooting.md 11 KB
- references/xpath-patterns-governor-limits.md 2.7 KB
- references/xpath-patterns-method-calls.md 2.9 KB
- references/xpath-patterns-security.md 1.7 KB
- references/xpath-patterns-structure.md 3.0 KB
- references/xpath-patterns.md 7.5 KB
- scripts/create-pmd-rule.js 7.6 KB runs code
- scripts/create-regex-rule.js 8.4 KB runs code
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.
- 3mo ago First seen · 488 lines · 228 tokens per session scan C 5c52e68e9bd3
dx-code-analyzer-custom-rule-create is a skill published in the GitHub repository forcedotcom/sf-skills (1,201 stars, last pushed 5d ago), licensed Apache-2.0. It adds 228 tokens to every session and 9,630 once invoked, about $0.0009 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
dx-code-analyzer-custom-rule-create compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| dx-code-analyzer-custom-rule-createforcedotcom/sf-skills | Skill | 1.2k | 5d ago | Apache-2.0 | C | 228 | Claude Code |
| autoreviewopenclaw/clawhub | Skill | 9.6k | today | MIT | A | 17 | Claude Code, Codex |
| omh-code-reviewrlaope/oh-my-hermes | Skill | 6.2k | yesterday | MIT | A | 18 | Claude Code |
| agent-teams-simplify-and-hardenLeoYeAI/openclaw-master-skills | Skill | 2.2k | 10d ago | MIT | A | 115 | Claude Code, Codex |
| asplos-writing-stylebrycewang-stanford/Awesome-Journal-Skills | Skill | 1.5k | 4d ago | MIT | A | 65 | Claude Code |
| revdiff-planumputun/revdiff | Skill | 974 | today | MIT | A | 84 | Claude Code |
| re0-mergeLilMGenius/paperthin | Skill | 1.5k | yesterday | MIT | A | 51 | Claude Code, Codex |