fp-idiomatic-style
Coding style policy for generated code: prefer idiomatic language conventions with a functional-leaning approach (pure-ish functions, composability), and prefer lightweight data structures over heavy schema/class abstractions unless clearly justified.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-21
- Stars
- ★ 5
- Forks
- 7
01 前言 Front Matter
- name
- fp-idiomatic-style
- description
- Coding style policy for generated code: prefer idiomatic language conventions with a functional-leaning approach (pure-ish functions, composability), and prefer lightweight data structures over heavy schema/class abstractions unless clearly justified.
03 SKILL.md 正文
Functional-leaning, idiomatic coding style policy
Applies whenever you write new code OR propose code changes, in any language.
Priorities (in order)
- Correctness and clarity first.
- Idiomatic for the target language (e.g., Pythonic for Python, idiomatic TS for TypeScript).
- Functional-leaning style when it fits naturally:
- explicit inputs/outputs
- minimize side effects and shared mutable state
- small composable functions
- declarative transformations over imperative loops where readable
Data modeling preference (important)
- Prefer lightweight structures for transient data over heavy class/schema abstractions.
- Only introduce richer types when clearly beneficial, e.g.:
- validation/invariants are required
- long-lived domain objects
- meaningful behavior/methods beyond data transport
Language examples
- Python: prefer
dict/Mapping/tuples; avoiddataclassesorpydanticmodels unless justified. - TypeScript: prefer plain objects, interfaces, or type aliases; avoid classes unless justified.
- Clojure: prefer maps and vectors; avoid records unless justified by polymorphism needs.
- Other languages: follow the same principle — reach for the lightest idiomatic container first.
Don't force FP purity
- Avoid clever chaining, excessive
map/filter, or recursion if it reduces readability. - Choose the most readable idiomatic solution, then make it functional-leaning where it remains clear.
When editing existing code
- Prefer the smallest change that satisfies requirements.
- Preserve local conventions unless they conflict with correctness/security.
04 同仓库更多 Skills
tdd
Test-Driven Development workflow: write a failing test first, implement minimum code to pass, then refactor. Language-agnostic.
superpowers
Agentic development methodology: spec-driven brainstorming, structured planning, subagent-driven development, TDD, systematic debugging, and verification-before-completion.
nucleus-clojure
A clojure specific AI prompt. Use when there are clojure REPL tools available.
context-mode
Use context-mode tools (context-mode__ctx_execute, context-mode__ctx_execute_file) instead of eca__shell_command/eca__read_file when processing large outputs. Triggers: "analyze logs", "summarize output", "process data", "parse JSON", "filter results", "extract errors", "check build output", "analyze dependencies", "process API response", "large file analysis", "run tests", "test output", "coverage report", "git log", "recent commits", "diff between branches", "fetch docs", "API reference", "index documentation", "call API", "check response", "query results", "find TODOs", "count lines", "codebase statistics", "security audit", "outdated packages", "dependency tree". Also triggers on ANY tool output that may exceed 20 lines.
caveman
Ultra-compressed communication mode. Cuts token usage ~75% by speaking like caveman while keeping full technical accuracy. Supports intensity levels: lite, full (default), ultra, wenyan-lite, wenyan-full, wenyan-ultra. Use when user says "caveman mode", "talk like caveman", "use caveman", "less tokens", "be brief", or invokes /caveman. Also auto-triggers when token efficiency is requested.
brepl
Evaluate Clojure code and use the REPL via brepl. Load this skill before using brepl.