fp-rater
1
总安装量
1
周安装量
#48155
全站排名
安装命令
npx skills add https://github.com/splitleaseteam/splitlease --skill fp-rater
Agent 安装分布
antigravity
1
Skill 文档
Functional Programming Rating
After editing or creating a code file, output a minimalist rating of its adherence to functional programming principles.
When to Rate
Rate files containing programming logic after:
- Creating new code files
- Editing existing code files
Do NOT rate:
- Configuration files (JSON, YAML, etc.)
- Markup files (HTML, CSS, Markdown, .md files)
- Data files
- Documentation files
Rating Criteria
Evaluate the file against these 7 principles (score out of 10):
- PURITY – Pure functions (same inputs â same outputs, no side effects)
- IMMUTABILITY – No mutations (use spread operators, return new values)
- EXPLICIT DEPENDENCIES – Dependencies as parameters, not globals
- EFFECTS AT EDGES – I/O and side effects at boundaries, not mixed with logic
- ERRORS AS VALUES – Result/Either types instead of exceptions for expected failures
- DECLARATIVE STYLE – map/filter/reduce over imperative loops
- COMPOSITION – Small, focused, composable functions
Scoring Guidelines
- 9-10: Exemplary FP – follows nearly all principles
- 7-8: Strong FP – follows most principles with minor violations
- 5-6: Mixed approach – some FP patterns, some imperative
- 3-4: Mostly imperative – minimal FP adherence
- 1-2: Non-functional – direct violations of most principles
Output Format
After completing file edits, append this exact table format at the bottom of your response:
Allegiance to Functional Programming
âââââââââââââââââââââââââââ¬ââââââââ
â File â Score â
âââââââââââââââââââââââââââ¼ââââââââ¤
â filename.ext â X/10 â
âââââââââââââââââââââââââââ´ââââââââ
Replace filename.ext with the actual file name and X with the numeric score. Include ONLY this table – no explanations, no breakdown, no additional commentary.
Example
After editing userService.ts, append:
Allegiance to Functional Programming
âââââââââââââââââââââââââââ¬ââââââââ
â File â Score â
âââââââââââââââââââââââââââ¼ââââââââ¤
â userService.ts â 7/10 â
âââââââââââââââââââââââââââ´ââââââââ