vibe-force
CLAUDE.md2 starsChanged 2 months agoMITView on GitHub
This repository is the plugin, not a Salesforce project. Changes here change how every consuming project's sessions behave, so the bar is: deterministic, dependency-free, and tested. - No npm dependencies. Hooks and checks use node: builtins only. scripts/lib, scripts/hooks and the scripts/vf-*.js tools are CommonJS .js; scripts/checks is ESM .mjs. Node >= 20. The one npm package the plugin references is the Salesforce DX MCP server in .mcp.json, which Claude Code runs through npx in the user's environment - never…
In this repository34 other files it gives its agents.
- sf-agentforce-developmentSkill
- sf-apex-developmentSkill
- sf-apex-testingSkill
- sf-async-apex-patternsSkill
- sf-cli-operationsSkill
- sf-code-analyzer-qualitySkill
- sf-data-cloudSkill
- sf-data-managementSkill
- sf-debugging-logsSkill
- sf-deployment-strategiesSkill
- sf-fflib-domain-service-uowSkill
- sf-fflib-foundationsSkill
- sf-fflib-operationsSkill
- sf-fflib-selector-layerSkill
- sf-fflib-testingSkill
- sf-flow-automationSkill
- sf-governor-limitsSkill
- sf-integration-patternsSkill
- sf-local-developmentSkill
- sf-lwc-developmentSkill
- sf-lwc-jest-testingSkill
- sf-minimal-changeSkill
- sf-org-security-auditSkill
- sf-packaging-releaseSkill
- sf-post-deploy-verificationSkill
- sf-process-builder-migrationSkill
- sf-project-structureSkill
- sf-scratch-orgs-sandboxesSkill
- sf-security-modelSkill
- sf-setup-automationSkill
- sf-soql-sosl-optimizationSkill
- sf-technical-debt-auditSkill
- sf-ui-test-automationSkill
- sf-workflow-orchestrationSkill
The file
We split this CLAUDE.md into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
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 67
Add a module under scripts/checks/lib/, register it in the dispatcher, keep the contract: exit 0 pass, 1 gate failed, 2 misconfiguration or …
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md 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
Working on vibe-force
This repository is the plugin, not a Salesforce project. Changes here change how every consuming project's sessions behave, so the bar is: deterministic, dependency-free, and tested.
Invariants
- No npm dependencies. Hooks and checks use
node:builtins only.scripts/lib,scripts/hooksand thescripts/vf-*.jstools are CommonJS.js;scripts/checksis ESM.mjs. Node >= 20. The one npm package the plugin references is the Salesforce DX MCP server in.mcp.json, which Claude Code runs throughnpxin the user's environment - never imported by a hook or a check. - Hooks fail open. A handler that throws must never wedge a session:
hook-io.main()catches, notes to stderr, and exits 0. Guard decisions are pure functions inscripts/lib/*-guards.jsso they can be asserted without spawning Claude Code. - Rule logic lives in libs, I/O lives in handlers. A new guard is a rule object in
bash-guards.js,mcp-guards.js, or a branch inedit-guards.js, plus a test. Handlers stay thin. - One source of truth per fact. Salesforce API version:
config/vibe-force.defaults.json. Path-to-slice ownership:scripts/lib/sf-paths.js(SLICES), mirrored inskills/sf-workflow-orchestration/references/ownership-matrix.md. Check list and exit codes:scripts/checks/vf-check.mjs, mirrored in the README and the orchestration skill. - Salesforce CLI v2 only.
sf ...with an explicit--target-org. Retiredsfdx force:*syntax appears only inside a documented migration table. - No third-party plugin references. Skills, agents, commands and docs stand on official
Salesforce documentation. Do not cite other Claude Code plugins as prior art. The marketplace
may link Salesforce-authored plugins from
forcedotcom/sf-skills(seedocs/salesforce-skills.md); linking is not citing. - Never copy external skill text. Upstream declares Apache-2.0 in
LICENSE.txtand CC-BY-NC-4.0 in the npm package publishing the sameskills/tree. Nothing from it, or from any other skill corpus, is pasted here - not prose, not tables, not scripts. Prove it:node scripts/dev/skill-originality.mjs --corpus <clone>must exit 0. Fix a hit by rewriting from the documentation;scripts/dev/originality-allow.txttakes reviewed facts only. - Tests gate every change.
node --test tests/must pass. A new guard rule without a test that fails before the rule existed is not done.
Adding a skill
skills/<name>/SKILL.md frontmatter name == directory name
skills/<name>/references/*.md exhaustive tables, long examples, checklistsSKILL.md shape: ## When to use, a decision table, numbered core patterns with runnable
examples, ## Anti-patterns with the failing code and the fix, ## Verification with the exact
sf / vf-check commands, ## References. 180-400 lines; references 150-500 lines each.
Grounding rules: fetch the documentation you cite in the session you write it (official docs
first; Context7's /llmstxt/developer_salesforce_llms_txt, /salesforcecli/cli,
/websites/lwc_dev are useful indexes into it). Never invent a limit, a flag, an API name or a
rule id. Mark anything you could not verify [unverified]. Cross-link sibling skills by name
and name the vf-check that enforces a rule whenever one does.
Adding an agent
Plugin agents support name, description, model, tools, disallowedTools, skills,
effort, maxTurns only. hooks, mcpServers and permissionMode are ignored for
plugin-shipped agents: do not add them. Keep description short - all agent descriptions share
one context budget. Body sections: Mission, Owned paths, Inputs, Method, Checks you MUST run,
Minimal change ladder, Hand-off, Hard rules.
Owned paths must be disjoint from every sibling in the same wave, and must match
scripts/lib/sf-paths.js. If you add a slice, update the lib, the tests, and the ownership
matrix reference together.
Adding a check
Add a module under scripts/checks/lib/, register it in the dispatcher, keep the contract:
exit 0 pass, 1 gate failed, 2 misconfiguration or missing tool, 3 org or network error;
write a report to .vibeforce/reports/<check>-<ISO>.json; support --changed, --files,
--target-org, --json, --project-dir. Org-touching checks refuse production aliases unless
the operation is inherently safe or VF_ALLOW_PROD=1 is set.
Adding a metadata tool
A scripts/vf-<name>.js CLI is for work that is neither a gate nor a hook: it reads or rewrites
metadata on demand. Contract: CommonJS, a USAGE string, parseArgs, exit 0 done / 1 the
answer is "no" / 2 misuse, all logic in a pure scripts/lib/ module so tests/ can assert it
without spawning a process, and a commands/vf-<name>.md entry point or the sessions that need it
will never find it. A tool that writes XML re-checks well-formedness with xml-lint before it
writes, and never reformats bytes outside the range it was asked to change.
Local verification
node --test tests/ # hook engine
node scripts/checks/vf-check.mjs --help # runner contract
jq . .claude-plugin/plugin.json hooks/hooks.json # manifests parse
claude plugin validate . # marketplace manifest only: both manifests live here
node scripts/dev/skill-originality.mjs --corpus /tmp/sf-skills # no copied external prose
node scripts/dev/verify-metadata-dirs.mjs # slice directories exist in the metadata registryclaude plugin validate . stops at .claude-plugin/marketplace.json and never reaches the agents
or commands. Frontmatter that fails to parse - an unquoted : in a description is the usual
cause - loads at runtime with every field silently dropped. Validate the plugin itself:
cp -R . /tmp/vfplugin && rm -f /tmp/vfplugin/.claude-plugin/marketplace.json
claude plugin validate /tmp/vfplugin --strict # agents, skills, commandsManual hook check without a Salesforce project:
echo '{"hook_event_name":"PreToolUse","tool_name":"Bash","tool_input":{"command":"sf project deploy start -o acme-prod"}}' \
| node scripts/hooks/pre-bash-guard.js | jq .Style
English, no emojis, no filler. Tables for reference data. Tagged code fences. Comments explain why, not what. Prose that could be a table should be a table.
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.

