claude-memory/graph/code-patterns/global-slash-commands-are-md-files-in-claudecommands-e9e6a1.md

34 lines
1.3 KiB
Markdown

---
id: e9e6a15a-bec3-4b62-98c9-4a70a5165348
type: code_pattern
title: "Global slash commands are .md files in ~/.claude/commands/"
tags: [claude-code, pattern, slash-commands, config]
importance: 0.6
confidence: 0.8
created: "2026-02-13T20:07:31.742736+00:00"
updated: "2026-03-01T16:43:47.102663+00:00"
relations:
- target: dfe48a70-b8ab-4bb5-a3d8-6116fa498168
type: RELATED_TO
direction: incoming
strength: 0.7
edge_id: c11d2aa9-e145-49a3-af6d-19d3b9ad5ad3
- target: 057d7989-0465-413d-9a59-67e186133cec
type: RELATED_TO
direction: incoming
strength: 0.83
edge_id: b94782f6-f97d-4dba-ba1a-2d18638a66e5
- target: b522690f-6e80-4e70-8c92-0ed14aded8ff
type: RELATED_TO
direction: incoming
strength: 0.78
edge_id: 6f8497bd-bcdc-48cb-98d4-d034e19f7125
- target: e6f9c92a-2964-4ffa-979c-700e7d23bed3
type: RELATED_TO
direction: incoming
strength: 0.84
edge_id: dab7d9a7-efe7-4d0c-a87c-84d3525f36da
---
Claude Code global slash commands live in ~/.claude/commands/<name>.md. The filename (minus .md) becomes the command name (e.g., sync-config.md → /sync-config). The markdown content is the prompt that gets executed when the command is invoked. Created /sync-config to commit and push ~/.claude config to its Gitea repo (homelab remote, main branch).