Answer: To create a slash command extension for GitHub Copilot CLI, create the extension file at .github/extensions/token-counter/extension.mjs in the root of your project's Git repository, then load it by starting an interactive session with experimental features enabled using copilot --experimental. A slash command is defined by three fields: name, description, and handler. Status: Confirmed Entry: tool/github-copilot/commands-and-shortcuts/create-slash-command-extension Revision: 3 Digest: sha256:b94d16209a1c5f6b (changes whenever the content changes) Timeline: Created: 2026-11-13T03:33:48Z Last changed: 2026-11-19T13:09:38Z (registration call: — → joinSession) Last verified: 2026-11-20T13:15:58Z Next check: 2026-11-21T13:15:58Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of extension file path | .github/extensions/token-counter/extension.mjs | [1] | 2026-11-20 load command | copilot ‑‑experimental | [1] | 2026-11-20 slash command fields | name | [1] | 2026-11-20 description field | description | [1] | 2026-11-20 handler field | handler | [1] | 2026-11-20 registration call | joinSession | [1] | 2026-11-20 confirm command | /extensions manage | [1] | 2026-11-20 Sources: [1] GitHub. "Creating extensions for GitHub Copilot CLI - GitHub Docs". https://docs.github.com/en/copilot/tutorials/create-an-extension Role: primary. Accessed: 2026-11-20T13:15:58Z Quote: "create the following directories and file: .github/extensions/token-counter/extension.mjs" (Supports: extension file path) Quote: "Start an interactive session from the same repository, with experimental features enabled: Shell copilot ‑‑experimental" (Supports: load command) Quote: "A slash command is defined by three fields: name —the command name, without the leading slash." (Supports: slash command fields) Quote: "description —the text shown next to the command in the slash command picker." (Supports: description field) Quote: "handler —an async function that runs when you invoke the command." (Supports: handler field) Quote: "The call to joinSession registers everything the extension adds to the CLI—in this case, a single slash command." (Supports: registration call) Quote: "Run the /extensions manage command to open the extension manager." (Supports: confirm command) Snapshot SHA-256: 53534ac8002ca798d87d96416d8061d7b3e55ad02387c579f59c98b7d2c77100 (captured 2026-11-18T13:12:31Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-18T13:12:32Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:15:58Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:15:58Z Last attempt: 2026-11-20T13:15:58Z Notes and limitations: Extracted automatically from a single official source (section "Example extension 2: A token usage slash command"). Related: https://latestn.com/tool/github-copilot/commands-and-shortcuts/diff-command-review How do I review changes with /diff in GitHub Copilot? https://latestn.com/tool/github-copilot/commands-and-shortcuts/discover-slash-commands-acp How do I discover available slash commands from my ACP client with GitHub Copilot? https://latestn.com/tool/github-copilot/commands-and-shortcuts/enable-disable-plugin How do I enable or disable a GitHub Copilot CLI plugin? https://latestn.com/tool/github-copilot/commands-and-shortcuts/copilot-cli-login-options How do I log in to GitHub Copilot CLI using the copilot login command? https://latestn.com/tool/github-copilot/commands-and-shortcuts/copilot-cli-slash-commands Which slash commands can I use in the GitHub Copilot CLI interactive interface? https://latestn.com/tool/github-copilot/commands-and-shortcuts/create-pull-request-pr-command How do I create a pull request with the GitHub Copilot CLI /pr command? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-19T13:09:38Z | changed | registration call: — → joinSession | [1] 2026-11-19T13:09:38Z | changed | handler field: — → handler | [1] 2026-11-19T13:09:38Z | changed | description field: — → description | [1] 2026-11-19T13:09:38Z | changed | slash command fields: — → name | [1] 2026-11-19T13:09:38Z | changed | registration function: joinSession → — | [1] 2026-11-17T13:36:09Z | changed | registration function: — → joinSession | [1] 2026-11-17T13:36:09Z | changed | registration call: joinSession → — | [1] 2026-11-17T13:36:09Z | changed | handler field: handler → — | [1] 2026-11-17T13:36:09Z | changed | description field: description → — | [1] 2026-11-17T13:36:09Z | changed | slash command fields: name → — | [1] 2026-11-13T03:33:48Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/github-copilot/commands-and-shortcuts/create-slash-command-extension/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/github-copilot/commands-and-shortcuts/create-slash-command-extension POST: https://latestn.com/dispute/tool/github-copilot/commands-and-shortcuts/create-slash-command-extension with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/github-copilot/commands-and-shortcuts/create-slash-command-extension?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I create a slash command extension for GitHub Copilot CLI? Revision 3, last verified 2026-11-20T13:15:58Z. https://latestn.com/tool/github-copilot/commands-and-shortcuts/create-slash-command-extension (accessed 2026-11-21T09:57:08Z). @misc{LatestN_tool_github_copilot_commands_and_shortcuts_create_slash_command_extension_r3, title = {How do I create a slash command extension for GitHub Copilot CLI?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/github-copilot/commands-and-shortcuts/create-slash-command-extension}}, note = {Revision 3; digest sha256:b94d16209a1c5f6b; last verified 2026-11-20T13:15:58Z; accessed 2026-11-21T09:57:08Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/github-copilot/commands-and-shortcuts/create-slash-command-extension