OpenParable
Skip to content
← Back to skills

Xonsh

Development
xonsh

Xonsh is an Agent Skill for development published in the carapace-sh/carapace repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Use when working with xonsh shell internals — completion system, RichCompletion, CommandContext, contextual_command_completer, completer pipeline, prompt-toolkit integration, key bindings, Python/shell hybrid model, subprocess execution, xontribs, event system, rc.xsh configuration, or environment variables. Triggers on: "xonsh", "xonsh completion", "xonsh RichCompletion", "xonsh CommandContext", "xonsh completer", "contextual_command_completer", "xonsh prompt-toolkit", "xonsh xontrib", "xonsh event", "xonsh rc.xsh", "add_one_completer", "sub_proc_get_output", "XONSH_COMPLETER_MODE", "xonsh subprocess", "xonsh quoting", "xonsh environment".

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/carapace-sh/carapace/blob/HEAD/skills/xonsh/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/xonsh, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

Xonsh Shell In-Depth Reference

Comprehensive reference for xonsh shell internals, with emphasis on the completion system and how external tools hook into it.

Sub-Resources

Load the reference that matches your task. When in doubt, load multiple references.

KeywordsReference
RichCompletion, CommandContext, CommandArg, CompletionContext, contextual_command_completer, contextual_command_completer_for, non_exclusive_completer, add_one_completer, Completer class, completer pipeline, exclusive vs non-exclusive, deduplication, sorting tiers, filter function, prefix_len, append_closing_quote, append_space, display, description, style, provider, tag_provider, apply_lprefix, complete_from_sub_proc, comp_based_completer, on_completer_filter, XONSH_COMPLETER_MODE, XONSH_COMPLETER_TRACE, COMPLETION_QUERY_LIMIT, XONSH_COMPLETER_DIRS, CommandCompleter, xompletions, bash completion bridge, path completer, command completer, python completer, base completerreferences/completion.md
PromptToolkitShell, PromptToolkitCompleter, PromptSession, Completion, CompleteStyle, key bindings, on_ptk_create, COMPLETIONS_DISPLAY, COMPLETION_MODE, COMPLETIONS_CONFIRM, COMPLETIONS_MENU_ROWS, UPDATE_COMPLETIONS_ON_KEYPRESS, COMPLETION_IN_THREAD, AUTO_SUGGEST_IN_COMPLETIONS, XONSH_PROMPT_AUTO_SUGGEST, auto-suggest, menu-complete, display_meta, _highlight_match, unquote, ptk shell, vi mode, emacs mode, XONSH_AUTOPAIRreferences/prompt-toolkit.md
Python-powered shell, subprocess execution, SubprocSpec, CommandPipeline, capture modes, $() vs !() vs $[] vs ![], pipe redirect, a>p, e>p, subprocess syntax, Python expressions, shell expressions, @(), $(), ![], subprocess wrapping, quoting, string literals, raw strings, p-strings, f-strings, path strings, word splitting, glob expansion, tilde expansion, environment access, $VAR, ${VAR}, ${{VAR}}, alias system, callable alias, ExecAliasreferences/language-execution.md
rc.xsh, .xonshrc, XONSHRC, XONSHRC_DIR, XONSH_CONFIG_DIR, xontrib, xontrib load, xontrib list, load_xontrib, unload_xontrib, entry points, event system, Event, LoadEvent, EventManager, on_chdir, on_precommand, on_postcommand, on_command_not_found, on_pre_prompt, on_post_prompt, on_envvar_change, on_transform_command, on_exit, on_ptk_create, on_completer_filter, XSH, XSH.env, XSH.completers, XSH.commands_cache, XSH.builtins, environment variables, Env class, Var, VarPattern, detype, LsColors, EnvPath, XONSH_* env vars, BASH_COMPLETIONS, COMPLETE_DOTS, SUBSEQUENCE_PATH_COMPLETION, FUZZY_PATH_COMPLETION, SUGGEST_THRESHOLD, CMD_COMPLETIONS_SHOW_DESC, ALIAS_COMPLETIONS_OPTIONS_BY_DEFAULTreferences/startup-config.md

Quick Guide

Cross-Project References

  • For carapace-specific xonsh integration (snippet, patch phase, value formatting, JSON output, style conversion), see the carapace-dev skill → references/shell-xonsh.md.