elisp-threading
Skill by tychoish
Refactors nested seq-* and mapcar calls in Emacs Lisp into thread-last pipelines. It is for developers editing or reviewing .el files that chain seq operations on the same collection.
Install elisp-threading
Built from the published package, never by AI.
git clone --depth 1 https://github.com/tychoish/.emacs.d /tmp/.emacs.d && mkdir -p ~/.claude/skills && cp -r /tmp/.emacs.d/.agent/skills/elisp-threading ~/.claude/skills/elisp-threadingRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/tychoish/.emacs.d /tmp/.emacs.d && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/.emacs.d/.agent/skills/elisp-threading ~/.gemini/antigravity-cli/skills/elisp-threadingAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
This agent skill gives the assistant a set of rules for rewriting Emacs Lisp code. When two or more seq-* or mapcar operations are nested or chained on the same collection, it replaces the nesting with a thread-last pipeline, one stage per line. Single operations are left as they are.
The skill also includes mapping tables. These convert dash.el functions and legacy or cl-lib functions such as mapcar, cl-remove-if and delq nil to their seq.el equivalents. It covers when to drop single-use let bindings, when to keep threading out, and how to check argument position. It applies to files matching **/*.el and is aimed at Emacs Lisp developers doing refactoring or code review.
Written from the project's SKILL.md and checked against it.
What it can do
- Nested seq to thread-lastRewrites nested seq-* or mapcar calls on one collection into a thread-last pipeline.
- dash.el migrationMaps dash.el functions such as -map, -filter and -group-by to seq.el equivalents.
- Legacy function migrationReplaces mapcar, mapc, mapcan and cl-lib helpers with seq-* functions.
- Let binding cleanupRemoves single-use let bindings that only hold an intermediate collection.
- Lambda simplificationSwaps single-call lambdas for #' function references where that fits.
- Code review checklistLists steps to scan, reorder and verify argument position during review or editing.
What you need
- Emacs Lisp source files (**/*.el)
Try asking
- Refactor this nested seq-map and seq-filter into a thread-last pipeline
- Convert the dash.el calls in this file to seq.el equivalents
- Simplify the nested mapcar calls in this Emacs Lisp function
Good to know
- Single seq operations are not threaded.
- Let bindings used more than once are kept, since threading would recompute them.
- Functions that take the collection first, such as string-join, need thread-first or a lambda stage instead.
- Buffer and point traversal with while loops has no seq equivalent and is left as-is.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .agent/skills/elisp-threading/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to elisp-threading
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
elisp-threading: common questions
What does the elisp-threading skill change in my code?
It rewrites nested seq-* and mapcar calls on the same collection into thread-last pipelines with one stage per line. Single operations stay unchanged.
Does it convert dash.el code to seq.el?
Yes. The skill includes a table that maps dash.el functions such as -map, -filter and -reduce-from to their seq.el equivalents before threading.
When should the skill leave code alone?
The source says to skip threading for single operations, for let bindings used in more than one place, for functions that take the collection first, and for buffer traversal loops.
How do I install elisp-threading?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is elisp-threading free?
The code is published under the GPL-3.0 licence. The service it connects to may have its own pricing.
Is elisp-threading safe to use?
It scores 69 of 100. Grades: maintenance A, licence C, quality C. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to elisp-threading?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
