/fp-enforcer:fp-learnfrom fp-enforcer
Use when asked to assimilate or learn the FP libraries present in a project so enforcement and repair understand their operators and types.
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.
Detect functional-programming libraries in a project and generate agent-facing knowledge profiles for enforcement and repair.
fp-enforcer learn --dest /path/to/project
The tool inspects pubspec.yaml and package.json for known FP libraries:
Profiles are written to:
<project>/.fp-enforcer/knowledge/
Review each generated profile before relying on it in repair or code generation.
Each profile summarizes:
Either, Option, Task, IO)flatMap, fold, mapLeft, etc.)Use these profiles when interpreting validation reports or rewriting violating code.
When a project uses an FP library the tool does not detect, author a profile manually under .fp-enforcer/knowledge/<library>.md with the same sections:
Keep profiles concise and aligned with the rules in .fp-enforcer/rules/.
When a new library introduces constructs that should be banned or flagged, add entries to the appropriate pattern pack:
<project>/.fp-enforcer/rules/patterns/<language>.json
Each pattern entry requires:
{"id": "unique-id", "regex": "...", "message": "...", "rule": "fp-* N"}
Re-run validate after adding patterns to confirm they match intended constructs and avoid excessive false positives.
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-repairUse when a validation report or hook feedback lists functional-programming violations that need to be fixed in source code./fp-validateUse when asked to lint, validate, or check code blocks, diffs, pull requests, or an entire codebase for functional-programming compliance./fp-wireUse when asked to install, wire, update, or remove fp-enforcer in a coding project for Cursor, Claude, Codex, or Antigravity.