/fp-enforcer:fp-validatefrom fp-enforcer
Use when asked to lint, validate, or check code blocks, diffs, pull requests, or an entire codebase for functional-programming compliance.
Ships in fp-enforcer. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Run the fp-enforcer CLI to scan for heuristic pattern violations against the canonical rules in .fp-enforcer/rules/.
Specific paths or directories
fp-enforcer validate path/to/file.dart lib/
Git diff (added lines only)
git diff | fp-enforcer validate --diff -
Whole tree — pass the project root or .:
fp-enforcer validate .
When installed in a target project, rules and pattern packs live under <project>/.fp-enforcer/rules/. Run commands from the project root so relative paths resolve correctly.
If the fp-enforcer executable is not on PATH, run the vendored copy instead: PYTHONPATH=.fp-enforcer python3 -m fp_enforcer validate ....
Each violation line follows this format:
path:line: [pattern-id] message (rule)
Example:
lib/use_case.dart:42: [no-else] no else branches: use switch expressions or fold (fp-core 8-9)
rules/patterns/<language>.json.fp-core 8-9, fp-dartz 7).Pattern packs are line-scanners, not semantic analyzers. A flagged line deserves judgment before treating it as a real violation. Common false positives:
else inside a string literal or commentthrow in generated or third-party code excluded by suffix filtersvar in a doc comment or example blockConsult the cited rule file under .fp-enforcer/rules/ when context is unclear.
fp-repair to fix them.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub theocarranza/fp-enforcer --plugin fp-enforcer5 skills in this plugin
/fp-assimilateUse when asked to assimilate FP libraries or language features of a project into enforcement — activates curated pattern packs so validation and hooks understand library-specific anti-patterns./fp-learnUse when asked to assimilate or learn the FP libraries present in a project so enforcement and repair understand their operators and types./fp-repairUse when a validation report or hook feedback lists functional-programming violations that need to be fixed in source code./fp-wireUse when asked to install, wire, update, or remove fp-enforcer in a coding project for Cursor, Claude, Codex, or Antigravity.