SpyBara
Go Premium Account
2026
9 Dec 2025, 18:01
12 May 2026, 16:02 12 May 2026, 14:59 12 May 2026, 01:59 12 May 2026, 00:01 11 May 2026, 23:00 11 May 2026, 21:57 11 May 2026, 20:02 11 May 2026, 18:59 11 May 2026, 18:00 11 May 2026, 15:00 10 May 2026, 23:03 10 May 2026, 17:00 10 May 2026, 04:02 9 May 2026, 04:57 9 May 2026, 04:01 9 May 2026, 03:01 8 May 2026, 22:00 8 May 2026, 19:00 8 May 2026, 18:00 8 May 2026, 16:57 8 May 2026, 07:02 8 May 2026, 06:02 8 May 2026, 03:01 8 May 2026, 02:03 8 May 2026, 01:02 8 May 2026, 00:02 7 May 2026, 22:59 7 May 2026, 21:57 7 May 2026, 17:08 5 May 2026, 23:00 5 May 2026, 21:00 5 May 2026, 17:00 5 May 2026, 15:59 5 May 2026, 14:57 5 May 2026, 00:02 4 May 2026, 22:58 4 May 2026, 22:01 4 May 2026, 18:58 4 May 2026, 15:35 4 May 2026, 06:55 4 May 2026, 04:18 2 May 2026, 18:14 2 May 2026, 04:05 2 May 2026, 00:19 1 May 2026, 18:19 1 May 2026, 04:22 1 May 2026, 00:20 29 Apr 2026, 21:21 29 Apr 2026, 15:36 29 Apr 2026, 09:39 29 Apr 2026, 04:11 29 Apr 2026, 00:20 28 Apr 2026, 21:21 28 Apr 2026, 18:28 28 Apr 2026, 15:45 28 Apr 2026, 06:49 27 Apr 2026, 21:20 27 Apr 2026, 18:23 26 Apr 2026, 04:08 25 Apr 2026, 21:10 24 Apr 2026, 18:11 24 Apr 2026, 06:34 24 Apr 2026, 00:17 23 Apr 2026, 18:19 23 Apr 2026, 04:04 23 Apr 2026, 00:17 22 Apr 2026, 21:15 22 Apr 2026, 04:00 22 Apr 2026, 00:13 21 Apr 2026, 21:14 21 Apr 2026, 09:30 21 Apr 2026, 04:01 20 Apr 2026, 21:14 20 Apr 2026, 18:16 18 Apr 2026, 18:09 18 Apr 2026, 00:13 17 Apr 2026, 21:13 17 Apr 2026, 18:14 17 Apr 2026, 00:15 16 Apr 2026, 21:13 16 Apr 2026, 18:21 16 Apr 2026, 15:30 16 Apr 2026, 04:02 16 Apr 2026, 00:16 15 Apr 2026, 18:20 15 Apr 2026, 15:24 15 Apr 2026, 09:29 15 Apr 2026, 04:00 14 Apr 2026, 21:14 14 Apr 2026, 18:21 14 Apr 2026, 06:32 14 Apr 2026, 04:00 14 Apr 2026, 00:16 13 Apr 2026, 21:14 13 Apr 2026, 18:21 11 Apr 2026, 00:11 10 Apr 2026, 21:09 10 Apr 2026, 18:13 10 Apr 2026, 06:32 10 Apr 2026, 00:12 9 Apr 2026, 21:14 9 Apr 2026, 18:17 9 Apr 2026, 15:29 9 Apr 2026, 03:55 9 Apr 2026, 00:09 8 Apr 2026, 21:13 8 Apr 2026, 18:21 8 Apr 2026, 15:27 8 Apr 2026, 00:12 7 Apr 2026, 21:14 4 Apr 2026, 18:05 4 Apr 2026, 03:46 4 Apr 2026, 00:09 3 Apr 2026, 21:07 3 Apr 2026, 18:08 3 Apr 2026, 03:54 3 Apr 2026, 00:11 2 Apr 2026, 21:08 2 Apr 2026, 18:12 2 Apr 2026, 09:19 2 Apr 2026, 06:21 2 Apr 2026, 03:53 1 Apr 2026, 21:12 1 Apr 2026, 18:13 1 Apr 2026, 04:00 1 Apr 2026, 00:11 31 Mar 2026, 21:09 31 Mar 2026, 06:24 31 Mar 2026, 03:56 31 Mar 2026, 00:11 30 Mar 2026, 21:13 30 Mar 2026, 18:15 28 Mar 2026, 18:04 28 Mar 2026, 15:06 27 Mar 2026, 21:09 27 Mar 2026, 18:14 27 Mar 2026, 15:15 27 Mar 2026, 06:21 27 Mar 2026, 03:56 27 Mar 2026, 00:10 26 Mar 2026, 21:07 26 Mar 2026, 18:16 26 Mar 2026, 15:25 26 Mar 2026, 06:21 26 Mar 2026, 03:55 26 Mar 2026, 00:10 25 Mar 2026, 21:08 25 Mar 2026, 18:15 25 Mar 2026, 06:18 25 Mar 2026, 03:47 25 Mar 2026, 00:08 24 Mar 2026, 18:15 24 Mar 2026, 00:07 23 Mar 2026, 21:08 23 Mar 2026, 18:13 23 Mar 2026, 00:09 22 Mar 2026, 18:04 22 Mar 2026, 00:07 21 Mar 2026, 18:03 21 Mar 2026, 00:07 20 Mar 2026, 21:05 20 Mar 2026, 18:08 20 Mar 2026, 15:13 20 Mar 2026, 03:45 20 Mar 2026, 00:08 19 Mar 2026, 06:17 19 Mar 2026, 00:08 18 Mar 2026, 18:16 18 Mar 2026, 12:11 18 Mar 2026, 09:15 18 Mar 2026, 03:50 18 Mar 2026, 00:09 17 Mar 2026, 21:10 17 Mar 2026, 18:15 17 Mar 2026, 03:46 17 Mar 2026, 00:08 16 Mar 2026, 21:10 16 Mar 2026, 18:15 14 Mar 2026, 03:44 14 Mar 2026, 00:08 13 Mar 2026, 21:07 13 Mar 2026, 18:07 13 Mar 2026, 06:12 12 Mar 2026, 21:07 12 Mar 2026, 18:12 12 Mar 2026, 00:07 11 Mar 2026, 03:43 11 Mar 2026, 00:05 10 Mar 2026, 03:43 10 Mar 2026, 00:05 9 Mar 2026, 21:06 7 Mar 2026, 03:37 7 Mar 2026, 00:07 6 Mar 2026, 06:10 6 Mar 2026, 03:44 6 Mar 2026, 00:12 5 Mar 2026, 06:12 5 Mar 2026, 03:45 5 Mar 2026, 00:07 4 Mar 2026, 21:06 4 Mar 2026, 18:09 4 Mar 2026, 09:09 1 Mar 2026, 06:10 1 Mar 2026, 03:49 28 Feb 2026, 21:01 28 Feb 2026, 00:05 27 Feb 2026, 21:05 27 Feb 2026, 18:07 27 Feb 2026, 09:11 27 Feb 2026, 06:13 27 Feb 2026, 00:08 26 Feb 2026, 21:08 26 Feb 2026, 18:12 26 Feb 2026, 09:14 26 Feb 2026, 06:17 26 Feb 2026, 00:07 25 Feb 2026, 03:47 25 Feb 2026, 00:09 24 Feb 2026, 21:08 24 Feb 2026, 18:15 23 Feb 2026, 21:13 21 Feb 2026, 18:03 21 Feb 2026, 06:08 20 Feb 2026, 21:03 20 Feb 2026, 06:14 20 Feb 2026, 00:07 19 Feb 2026, 21:06 19 Feb 2026, 03:48 19 Feb 2026, 00:08 18 Feb 2026, 03:48 17 Feb 2026, 21:08 17 Feb 2026, 00:08 16 Feb 2026, 21:05 14 Feb 2026, 03:44 13 Feb 2026, 21:09 12 Feb 2026, 00:06 11 Feb 2026, 21:10 11 Feb 2026, 00:11 10 Feb 2026, 21:13 10 Feb 2026, 03:56 10 Feb 2026, 00:11 9 Feb 2026, 15:17 9 Feb 2026, 00:08 7 Feb 2026, 21:05 7 Feb 2026, 18:03 7 Feb 2026, 03:43 6 Feb 2026, 21:06 6 Feb 2026, 00:05 5 Feb 2026, 21:06 5 Feb 2026, 18:13 5 Feb 2026, 03:46 5 Feb 2026, 00:07 4 Feb 2026, 21:07 4 Feb 2026, 18:11 4 Feb 2026, 03:45 4 Feb 2026, 00:06 3 Feb 2026, 21:08 3 Feb 2026, 18:14 3 Feb 2026, 09:10 3 Feb 2026, 03:46 1 Feb 2026, 21:03 1 Feb 2026, 18:02 31 Jan 2026, 03:42 31 Jan 2026, 00:06 30 Jan 2026, 18:07 30 Jan 2026, 00:06 29 Jan 2026, 21:03 28 Jan 2026, 15:06 28 Jan 2026, 03:30 28 Jan 2026, 00:05 27 Jan 2026, 21:01 27 Jan 2026, 18:03 27 Jan 2026, 06:02 26 Jan 2026, 21:03 25 Jan 2026, 03:34 24 Jan 2026, 03:29 23 Jan 2026, 21:01 23 Jan 2026, 18:02 23 Jan 2026, 00:05 22 Jan 2026, 21:03 22 Jan 2026, 15:05 22 Jan 2026, 03:31 22 Jan 2026, 00:05 21 Jan 2026, 21:05 21 Jan 2026, 06:02 21 Jan 2026, 03:30 21 Jan 2026, 00:05 20 Jan 2026, 21:03 20 Jan 2026, 18:03 20 Jan 2026, 15:05 20 Jan 2026, 03:30 19 Jan 2026, 21:01 19 Jan 2026, 00:05 16 Jan 2026, 21:01 16 Jan 2026, 18:02 16 Jan 2026, 15:02 16 Jan 2026, 00:05 14 Jan 2026, 06:02 14 Jan 2026, 00:05 12 Jan 2026, 21:02 12 Jan 2026, 18:02 12 Jan 2026, 00:05 11 Jan 2026, 18:02 11 Jan 2026, 03:31 11 Jan 2026, 00:06 10 Jan 2026, 21:01 10 Jan 2026, 03:29 10 Jan 2026, 00:04 9 Jan 2026, 21:01 9 Jan 2026, 00:04 8 Jan 2026, 21:02 8 Jan 2026, 06:02 8 Jan 2026, 03:29 8 Jan 2026, 00:05 7 Jan 2026, 21:01 7 Jan 2026, 18:02 7 Jan 2026, 09:05 7 Jan 2026, 06:02 7 Jan 2026, 03:30 7 Jan 2026, 00:04 6 Jan 2026, 21:01 6 Jan 2026, 03:29 6 Jan 2026, 00:05 3 Jan 2026, 18:02 27 Dec 2025, 06:02 27 Dec 2025, 03:28 23 Dec 2025, 18:02 20 Dec 2025, 00:04 19 Dec 2025, 21:01 19 Dec 2025, 18:02 19 Dec 2025, 00:05 18 Dec 2025, 21:01 18 Dec 2025, 18:02 18 Dec 2025, 15:02 17 Dec 2025, 15:02 17 Dec 2025, 03:27 16 Dec 2025, 21:01 16 Dec 2025, 18:02 16 Dec 2025, 00:05 15 Dec 2025, 21:01 15 Dec 2025, 18:02 13 Dec 2025, 06:02 12 Dec 2025, 21:01 12 Dec 2025, 00:05 11 Dec 2025, 21:02 11 Dec 2025, 18:01 11 Dec 2025, 06:02 10 Dec 2025, 09:03 9 Dec 2025, 18:01 9 Dec 2025, 06:02 9 Dec 2025, 03:25 8 Dec 2025, 21:01 8 Dec 2025, 06:02 8 Dec 2025, 00:05 6 Dec 2025, 18:02 5 Dec 2025, 00:04 4 Dec 2025, 21:02 4 Dec 2025, 18:02 4 Dec 2025, 06:02 4 Dec 2025, 03:26 3 Dec 2025, 00:04 2 Dec 2025, 21:01 2 Dec 2025, 00:04 1 Dec 2025, 03:31 27 Nov 2025, 06:02 27 Nov 2025, 03:20 26 Nov 2025, 00:04 25 Nov 2025, 03:22 24 Nov 2025, 21:01 21 Nov 2025, 00:04 20 Nov 2025, 18:02 20 Nov 2025, 06:02 20 Nov 2025, 03:20 19 Nov 2025, 03:21 19 Nov 2025, 00:05 18 Nov 2025, 18:02 18 Nov 2025, 09:02 18 Nov 2025, 03:21 17 Nov 2025, 03:24 17 Nov 2025, 00:04 16 Nov 2025, 00:04 14 Nov 2025, 21:26 6 Nov 2025, 18:02 6 Nov 2025, 15:02 6 Nov 2025, 12:02 6 Nov 2025, 06:01 6 Nov 2025, 03:22 4 Nov 2025, 18:02 4 Nov 2025, 03:19 4 Nov 2025, 00:04 3 Nov 2025, 21:01 3 Nov 2025, 12:03 3 Nov 2025, 09:02 3 Nov 2025, 06:02 3 Nov 2025, 03:24 3 Nov 2025, 00:04 2 Nov 2025, 18:01 2 Nov 2025, 12:02 2 Nov 2025, 09:01 1 Nov 2025, 21:01 31 Oct 2025, 00:04 30 Oct 2025, 18:02 29 Oct 2025, 21:02 28 Oct 2025, 18:02 27 Oct 2025, 18:02 24 Oct 2025, 21:01 23 Oct 2025, 21:02 23 Oct 2025, 09:02 23 Oct 2025, 06:02 23 Oct 2025, 00:04 21 Oct 2025, 00:04 20 Oct 2025, 21:02 20 Oct 2025, 15:12 20 Oct 2025, 00:05 17 Oct 2025, 18:01 17 Oct 2025, 12:03 16 Oct 2025, 18:02 16 Oct 2025, 00:05 15 Oct 2025, 18:02 13 Oct 2025, 21:01 12 Oct 2025, 18:01
8 Jan 2026, 03:29
12 May 2026, 16:02 12 May 2026, 14:59 12 May 2026, 01:59 12 May 2026, 00:01 11 May 2026, 23:00 11 May 2026, 21:57 11 May 2026, 20:02 11 May 2026, 18:59 11 May 2026, 18:00 11 May 2026, 15:00 10 May 2026, 23:03 10 May 2026, 17:00 10 May 2026, 04:02 9 May 2026, 04:57 9 May 2026, 04:01 9 May 2026, 03:01 8 May 2026, 22:00 8 May 2026, 19:00 8 May 2026, 18:00 8 May 2026, 16:57 8 May 2026, 07:02 8 May 2026, 06:02 8 May 2026, 03:01 8 May 2026, 02:03 8 May 2026, 01:02 8 May 2026, 00:02 7 May 2026, 22:59 7 May 2026, 21:57 7 May 2026, 17:08 5 May 2026, 23:00 5 May 2026, 21:00 5 May 2026, 17:00 5 May 2026, 15:59 5 May 2026, 14:57 5 May 2026, 00:02 4 May 2026, 22:58 4 May 2026, 22:01 4 May 2026, 18:58 4 May 2026, 15:35 4 May 2026, 06:55 4 May 2026, 04:18 2 May 2026, 18:14 2 May 2026, 04:05 2 May 2026, 00:19 1 May 2026, 18:19 1 May 2026, 04:22 1 May 2026, 00:20 29 Apr 2026, 21:21 29 Apr 2026, 15:36 29 Apr 2026, 09:39 29 Apr 2026, 04:11 29 Apr 2026, 00:20 28 Apr 2026, 21:21 28 Apr 2026, 18:28 28 Apr 2026, 15:45 28 Apr 2026, 06:49 27 Apr 2026, 21:20 27 Apr 2026, 18:23 26 Apr 2026, 04:08 25 Apr 2026, 21:10 24 Apr 2026, 18:11 24 Apr 2026, 06:34 24 Apr 2026, 00:17 23 Apr 2026, 18:19 23 Apr 2026, 04:04 23 Apr 2026, 00:17 22 Apr 2026, 21:15 22 Apr 2026, 04:00 22 Apr 2026, 00:13 21 Apr 2026, 21:14 21 Apr 2026, 09:30 21 Apr 2026, 04:01 20 Apr 2026, 21:14 20 Apr 2026, 18:16 18 Apr 2026, 18:09 18 Apr 2026, 00:13 17 Apr 2026, 21:13 17 Apr 2026, 18:14 17 Apr 2026, 00:15 16 Apr 2026, 21:13 16 Apr 2026, 18:21 16 Apr 2026, 15:30 16 Apr 2026, 04:02 16 Apr 2026, 00:16 15 Apr 2026, 18:20 15 Apr 2026, 15:24 15 Apr 2026, 09:29 15 Apr 2026, 04:00 14 Apr 2026, 21:14 14 Apr 2026, 18:21 14 Apr 2026, 06:32 14 Apr 2026, 04:00 14 Apr 2026, 00:16 13 Apr 2026, 21:14 13 Apr 2026, 18:21 11 Apr 2026, 00:11 10 Apr 2026, 21:09 10 Apr 2026, 18:13 10 Apr 2026, 06:32 10 Apr 2026, 00:12 9 Apr 2026, 21:14 9 Apr 2026, 18:17 9 Apr 2026, 15:29 9 Apr 2026, 03:55 9 Apr 2026, 00:09 8 Apr 2026, 21:13 8 Apr 2026, 18:21 8 Apr 2026, 15:27 8 Apr 2026, 00:12 7 Apr 2026, 21:14 4 Apr 2026, 18:05 4 Apr 2026, 03:46 4 Apr 2026, 00:09 3 Apr 2026, 21:07 3 Apr 2026, 18:08 3 Apr 2026, 03:54 3 Apr 2026, 00:11 2 Apr 2026, 21:08 2 Apr 2026, 18:12 2 Apr 2026, 09:19 2 Apr 2026, 06:21 2 Apr 2026, 03:53 1 Apr 2026, 21:12 1 Apr 2026, 18:13 1 Apr 2026, 04:00 1 Apr 2026, 00:11 31 Mar 2026, 21:09 31 Mar 2026, 06:24 31 Mar 2026, 03:56 31 Mar 2026, 00:11 30 Mar 2026, 21:13 30 Mar 2026, 18:15 28 Mar 2026, 18:04 28 Mar 2026, 15:06 27 Mar 2026, 21:09 27 Mar 2026, 18:14 27 Mar 2026, 15:15 27 Mar 2026, 06:21 27 Mar 2026, 03:56 27 Mar 2026, 00:10 26 Mar 2026, 21:07 26 Mar 2026, 18:16 26 Mar 2026, 15:25 26 Mar 2026, 06:21 26 Mar 2026, 03:55 26 Mar 2026, 00:10 25 Mar 2026, 21:08 25 Mar 2026, 18:15 25 Mar 2026, 06:18 25 Mar 2026, 03:47 25 Mar 2026, 00:08 24 Mar 2026, 18:15 24 Mar 2026, 00:07 23 Mar 2026, 21:08 23 Mar 2026, 18:13 23 Mar 2026, 00:09 22 Mar 2026, 18:04 22 Mar 2026, 00:07 21 Mar 2026, 18:03 21 Mar 2026, 00:07 20 Mar 2026, 21:05 20 Mar 2026, 18:08 20 Mar 2026, 15:13 20 Mar 2026, 03:45 20 Mar 2026, 00:08 19 Mar 2026, 06:17 19 Mar 2026, 00:08 18 Mar 2026, 18:16 18 Mar 2026, 12:11 18 Mar 2026, 09:15 18 Mar 2026, 03:50 18 Mar 2026, 00:09 17 Mar 2026, 21:10 17 Mar 2026, 18:15 17 Mar 2026, 03:46 17 Mar 2026, 00:08 16 Mar 2026, 21:10 16 Mar 2026, 18:15 14 Mar 2026, 03:44 14 Mar 2026, 00:08 13 Mar 2026, 21:07 13 Mar 2026, 18:07 13 Mar 2026, 06:12 12 Mar 2026, 21:07 12 Mar 2026, 18:12 12 Mar 2026, 00:07 11 Mar 2026, 03:43 11 Mar 2026, 00:05 10 Mar 2026, 03:43 10 Mar 2026, 00:05 9 Mar 2026, 21:06 7 Mar 2026, 03:37 7 Mar 2026, 00:07 6 Mar 2026, 06:10 6 Mar 2026, 03:44 6 Mar 2026, 00:12 5 Mar 2026, 06:12 5 Mar 2026, 03:45 5 Mar 2026, 00:07 4 Mar 2026, 21:06 4 Mar 2026, 18:09 4 Mar 2026, 09:09 1 Mar 2026, 06:10 1 Mar 2026, 03:49 28 Feb 2026, 21:01 28 Feb 2026, 00:05 27 Feb 2026, 21:05 27 Feb 2026, 18:07 27 Feb 2026, 09:11 27 Feb 2026, 06:13 27 Feb 2026, 00:08 26 Feb 2026, 21:08 26 Feb 2026, 18:12 26 Feb 2026, 09:14 26 Feb 2026, 06:17 26 Feb 2026, 00:07 25 Feb 2026, 03:47 25 Feb 2026, 00:09 24 Feb 2026, 21:08 24 Feb 2026, 18:15 23 Feb 2026, 21:13 21 Feb 2026, 18:03 21 Feb 2026, 06:08 20 Feb 2026, 21:03 20 Feb 2026, 06:14 20 Feb 2026, 00:07 19 Feb 2026, 21:06 19 Feb 2026, 03:48 19 Feb 2026, 00:08 18 Feb 2026, 03:48 17 Feb 2026, 21:08 17 Feb 2026, 00:08 16 Feb 2026, 21:05 14 Feb 2026, 03:44 13 Feb 2026, 21:09 12 Feb 2026, 00:06 11 Feb 2026, 21:10 11 Feb 2026, 00:11 10 Feb 2026, 21:13 10 Feb 2026, 03:56 10 Feb 2026, 00:11 9 Feb 2026, 15:17 9 Feb 2026, 00:08 7 Feb 2026, 21:05 7 Feb 2026, 18:03 7 Feb 2026, 03:43 6 Feb 2026, 21:06 6 Feb 2026, 00:05 5 Feb 2026, 21:06 5 Feb 2026, 18:13 5 Feb 2026, 03:46 5 Feb 2026, 00:07 4 Feb 2026, 21:07 4 Feb 2026, 18:11 4 Feb 2026, 03:45 4 Feb 2026, 00:06 3 Feb 2026, 21:08 3 Feb 2026, 18:14 3 Feb 2026, 09:10 3 Feb 2026, 03:46 1 Feb 2026, 21:03 1 Feb 2026, 18:02 31 Jan 2026, 03:42 31 Jan 2026, 00:06 30 Jan 2026, 18:07 30 Jan 2026, 00:06 29 Jan 2026, 21:03 28 Jan 2026, 15:06 28 Jan 2026, 03:30 28 Jan 2026, 00:05 27 Jan 2026, 21:01 27 Jan 2026, 18:03 27 Jan 2026, 06:02 26 Jan 2026, 21:03 25 Jan 2026, 03:34 24 Jan 2026, 03:29 23 Jan 2026, 21:01 23 Jan 2026, 18:02 23 Jan 2026, 00:05 22 Jan 2026, 21:03 22 Jan 2026, 15:05 22 Jan 2026, 03:31 22 Jan 2026, 00:05 21 Jan 2026, 21:05 21 Jan 2026, 06:02 21 Jan 2026, 03:30 21 Jan 2026, 00:05 20 Jan 2026, 21:03 20 Jan 2026, 18:03 20 Jan 2026, 15:05 20 Jan 2026, 03:30 19 Jan 2026, 21:01 19 Jan 2026, 00:05 16 Jan 2026, 21:01 16 Jan 2026, 18:02 16 Jan 2026, 15:02 16 Jan 2026, 00:05 14 Jan 2026, 06:02 14 Jan 2026, 00:05 12 Jan 2026, 21:02 12 Jan 2026, 18:02 12 Jan 2026, 00:05 11 Jan 2026, 18:02 11 Jan 2026, 03:31 11 Jan 2026, 00:06 10 Jan 2026, 21:01 10 Jan 2026, 03:29 10 Jan 2026, 00:04 9 Jan 2026, 21:01 9 Jan 2026, 00:04 8 Jan 2026, 21:02 8 Jan 2026, 06:02 8 Jan 2026, 03:29 8 Jan 2026, 00:05 7 Jan 2026, 21:01 7 Jan 2026, 18:02 7 Jan 2026, 09:05 7 Jan 2026, 06:02 7 Jan 2026, 03:30 7 Jan 2026, 00:04 6 Jan 2026, 21:01 6 Jan 2026, 03:29 6 Jan 2026, 00:05 3 Jan 2026, 18:02 27 Dec 2025, 06:02 27 Dec 2025, 03:28 23 Dec 2025, 18:02 20 Dec 2025, 00:04 19 Dec 2025, 21:01 19 Dec 2025, 18:02 19 Dec 2025, 00:05 18 Dec 2025, 21:01 18 Dec 2025, 18:02 18 Dec 2025, 15:02 17 Dec 2025, 15:02 17 Dec 2025, 03:27 16 Dec 2025, 21:01 16 Dec 2025, 18:02 16 Dec 2025, 00:05 15 Dec 2025, 21:01 15 Dec 2025, 18:02 13 Dec 2025, 06:02 12 Dec 2025, 21:01 12 Dec 2025, 00:05 11 Dec 2025, 21:02 11 Dec 2025, 18:01 11 Dec 2025, 06:02 10 Dec 2025, 09:03 9 Dec 2025, 18:01 9 Dec 2025, 06:02 9 Dec 2025, 03:25 8 Dec 2025, 21:01 8 Dec 2025, 06:02 8 Dec 2025, 00:05 6 Dec 2025, 18:02 5 Dec 2025, 00:04 4 Dec 2025, 21:02 4 Dec 2025, 18:02 4 Dec 2025, 06:02 4 Dec 2025, 03:26 3 Dec 2025, 00:04 2 Dec 2025, 21:01 2 Dec 2025, 00:04 1 Dec 2025, 03:31 27 Nov 2025, 06:02 27 Nov 2025, 03:20 26 Nov 2025, 00:04 25 Nov 2025, 03:22 24 Nov 2025, 21:01 21 Nov 2025, 00:04 20 Nov 2025, 18:02 20 Nov 2025, 06:02 20 Nov 2025, 03:20 19 Nov 2025, 03:21 19 Nov 2025, 00:05 18 Nov 2025, 18:02 18 Nov 2025, 09:02 18 Nov 2025, 03:21 17 Nov 2025, 03:24 17 Nov 2025, 00:04 16 Nov 2025, 00:04 14 Nov 2025, 21:26 6 Nov 2025, 18:02 6 Nov 2025, 15:02 6 Nov 2025, 12:02 6 Nov 2025, 06:01 6 Nov 2025, 03:22 4 Nov 2025, 18:02 4 Nov 2025, 03:19 4 Nov 2025, 00:04 3 Nov 2025, 21:01 3 Nov 2025, 12:03 3 Nov 2025, 09:02 3 Nov 2025, 06:02 3 Nov 2025, 03:24 3 Nov 2025, 00:04 2 Nov 2025, 18:01 2 Nov 2025, 12:02 2 Nov 2025, 09:01 1 Nov 2025, 21:01 31 Oct 2025, 00:04 30 Oct 2025, 18:02 29 Oct 2025, 21:02 28 Oct 2025, 18:02 27 Oct 2025, 18:02 24 Oct 2025, 21:01 23 Oct 2025, 21:02 23 Oct 2025, 09:02 23 Oct 2025, 06:02 23 Oct 2025, 00:04 21 Oct 2025, 00:04 20 Oct 2025, 21:02 20 Oct 2025, 15:12 20 Oct 2025, 00:05 17 Oct 2025, 18:01 17 Oct 2025, 12:03 16 Oct 2025, 18:02 16 Oct 2025, 00:05 15 Oct 2025, 18:02 13 Oct 2025, 21:01 12 Oct 2025, 18:01
Sat 3 18:02 Tue 6 00:05 Tue 6 03:29 Tue 6 21:01 Wed 7 00:04 Wed 7 03:30 Wed 7 06:02 Wed 7 09:05 Wed 7 18:02 Wed 7 21:01 Thu 8 00:05 Thu 8 03:29 Thu 8 06:02 Thu 8 21:02 Fri 9 00:04 Fri 9 21:01 Sat 10 00:04 Sat 10 03:29 Sat 10 21:01 Sun 11 00:06 Sun 11 03:31 Sun 11 18:02 Mon 12 00:05 Mon 12 18:02 Mon 12 21:02 Wed 14 00:05 Wed 14 06:02 Fri 16 00:05 Fri 16 15:02 Fri 16 18:02 Fri 16 21:01 Mon 19 00:05 Mon 19 21:01 Tue 20 03:30 Tue 20 15:05 Tue 20 18:03 Tue 20 21:03 Wed 21 00:05 Wed 21 03:30 Wed 21 06:02 Wed 21 21:05 Thu 22 00:05 Thu 22 03:31 Thu 22 15:05 Thu 22 21:03 Fri 23 00:05 Fri 23 18:02 Fri 23 21:01 Sat 24 03:29 Sun 25 03:34 Mon 26 21:03 Tue 27 06:02 Tue 27 18:03 Tue 27 21:01 Wed 28 00:05 Wed 28 03:30 Wed 28 15:06 Thu 29 21:03 Fri 30 00:06 Fri 30 18:07 Sat 31 00:06 Sat 31 03:42
Details

48export AWS_PROFILE=your-profile-name48export AWS_PROFILE=your-profile-name

49```49```

50 50 

51**Option D: Bedrock API keys**51**Option D: AWS Management Console credentials**

52 

53```bash theme={null}

54aws login

55```

56 

57[Learn more](https://docs.aws.amazon.com/signin/latest/userguide/command-line-sign-in.html) about `aws login`.

58 

59**Option E: Bedrock API keys**

52 60 

53```bash theme={null}61```bash theme={null}

54export AWS_BEARER_TOKEN_BEDROCK=your-bedrock-api-key62export AWS_BEARER_TOKEN_BEDROCK=your-bedrock-api-key


102export ANTHROPIC_SMALL_FAST_MODEL_AWS_REGION=us-west-2110export ANTHROPIC_SMALL_FAST_MODEL_AWS_REGION=us-west-2

103```111```

104 112 

105**For VS Code Extension users**: Configure environment variables in the VS Code extension settings instead of exporting them in your shell. See [Using Third-Party Providers in VS Code](/en/vs-code#using-third-party-providers-vertex-and-bedrock) for detailed instructions. All environment variables shown in this guide should work when configured through the VS Code extension settings.

106 

107When enabling Bedrock for Claude Code, keep the following in mind:113When enabling Bedrock for Claude Code, keep the following in mind:

108 114 

109* `AWS_REGION` is a required environment variable. Claude Code does not read from the `.aws` config file for this setting.115* `AWS_REGION` is a required environment variable. Claude Code does not read from the `.aws` config file for this setting.

chrome.md +220 −0 added

Details

1# Use Claude Code with Chrome (beta)

2 

3> Connect Claude Code to your browser to test web apps, debug with console logs, and automate browser tasks.

4 

5<Note>

6 Chrome integration is in beta and currently works with Google Chrome only. It is not yet supported on Brave, Arc, or other Chromium-based browsers. WSL (Windows Subsystem for Linux) is also not supported.

7</Note>

8 

9Claude Code integrates with the Claude in Chrome browser extension to give you browser automation capabilities directly from your terminal. Build in your terminal, then test and debug in your browser without switching contexts.

10 

11## What the integration enables

12 

13With Chrome connected, you can chain browser actions with terminal commands in a single workflow. For example: scrape documentation from a website, analyze it, generate code based on what you learned, and commit the result.

14 

15Key capabilities include:

16 

17* **Live debugging**: Claude reads console errors and DOM state directly, then fixes the code that caused them

18* **Design verification**: Build a UI from a Figma mock, then have Claude open it in the browser and verify it matches

19* **Web app testing**: Test form validation, check for visual regressions, or verify user flows work correctly

20* **Authenticated web apps**: Interact with Google Docs, Gmail, Notion, or any app you're logged into without needing API connectors

21* **Data extraction**: Pull structured information from web pages and save it locally

22* **Task automation**: Automate repetitive browser tasks like data entry, form filling, or multi-site workflows

23* **Session recording**: Record browser interactions as GIFs to document or share what happened

24 

25## Prerequisites

26 

27Before using Claude Code with Chrome, you need:

28 

29* [Google Chrome](https://www.google.com/chrome/) browser

30* [Claude in Chrome extension](https://chromewebstore.google.com/detail/claude/fcoeoabgfenejglbffodgkkbkcdhcgfn) version 1.0.36 or higher

31* [Claude Code CLI](/en/quickstart#step-1:-install-claude-code) version 2.0.73 or higher

32* A paid Claude plan (Pro, Team, or Enterprise)

33 

34## How the integration works

35 

36Claude Code communicates with Chrome through the Claude in Chrome browser extension. The extension uses Chrome's [Native Messaging API](https://developer.chrome.com/docs/extensions/develop/concepts/native-messaging) to receive commands from Claude Code and execute them in your browser. This architecture lets Claude Code control browser tabs, read page content, and perform actions while you continue working in your terminal.

37 

38When Claude encounters a login page, CAPTCHA, or other blocker, it pauses and asks you to handle it. You can provide credentials for Claude to enter, or log in manually in the browser. Once you're past the blocker, tell Claude to continue and it picks up where it left off.

39 

40Claude opens new tabs for browser tasks rather than taking over existing ones. However, it shares your browser's login state, so if you're already signed into a site in Chrome, Claude can access it without re-authenticating.

41 

42<Note>

43 The Chrome integration requires a visible browser window. When Claude performs browser actions, you'll see Chrome open and navigate in real time. There's no headless mode since the integration relies on your actual browser session with its login state.

44</Note>

45 

46## Set up the integration

47 

48<Steps>

49 <Step title="Update Claude Code">

50 Chrome integration requires a recent version of Claude Code. If you installed using the [native installer](/en/quickstart#step-1:-install-claude-code), updates happen automatically. Otherwise, run:

51 

52 ```bash theme={null}

53 claude update

54 ```

55 </Step>

56 

57 <Step title="Start Claude Code with Chrome enabled">

58 Launch Claude Code with the `--chrome` flag:

59 

60 ```bash theme={null}

61 claude --chrome

62 ```

63 </Step>

64 

65 <Step title="Verify the connection">

66 Run `/chrome` to check the connection status and manage settings. If the extension isn't detected, you'll see a warning with a link to install it.

67 </Step>

68</Steps>

69 

70You can also enable Chrome integration from within an existing session using the `/chrome` slash command.

71 

72## Try it out

73 

74Once connected, type this into Claude to see the integration in action:

75 

76```

77Go to code.claude.com/docs, click on the search box,

78type "hooks", and tell me what results appear

79```

80 

81Claude opens the page, clicks into the search field, types the query, and reports the autocomplete results. This shows navigation, clicking, and typing in a single workflow.

82 

83## Example workflows

84 

85Claude can navigate pages, click and type, fill forms, scroll, read console logs and network requests, manage tabs, resize windows, and record GIFs. Run `/mcp` and click into `claude-in-chrome` to see the full list of available tools.

86 

87The following examples show common patterns for browser automation.

88 

89### Test a local web application

90 

91When developing a web app, ask Claude to verify your changes work correctly:

92 

93```

94I just updated the login form validation. Can you open localhost:3000,

95try submitting the form with invalid data, and check if the error

96messages appear correctly?

97```

98 

99Claude navigates to your local server, interacts with the form, and reports what it observes.

100 

101### Debug with console logs

102 

103If your app has issues, Claude can read console output to help diagnose problems:

104 

105```

106Open the dashboard page and check the console for any errors when

107the page loads.

108```

109 

110Claude reads the console messages and can filter for specific patterns or error types.

111 

112### Automate form filling

113 

114Speed up repetitive data entry tasks:

115 

116```

117I have a spreadsheet of customer contacts in contacts.csv. For each row,

118go to our CRM at crm.example.com, click "Add Contact", and fill in the

119name, email, and phone fields.

120```

121 

122Claude reads your local file, navigates the web interface, and enters the data for each record.

123 

124### Draft content in Google Docs

125 

126Use Claude to write directly in your documents without API setup:

127 

128```

129Draft a project update based on our recent commits and add it to my

130Google Doc at docs.google.com/document/d/abc123

131```

132 

133Claude opens the document, clicks into the editor, and types the content. This works with any web app you're logged into: Gmail, Notion, Sheets, and more.

134 

135### Extract data from web pages

136 

137Pull structured information from websites:

138 

139```

140Go to the product listings page and extract the name, price, and

141availability for each item. Save the results as a CSV file.

142```

143 

144Claude navigates to the page, reads the content, and compiles the data into a structured format.

145 

146### Run multi-site workflows

147 

148Coordinate tasks across multiple websites:

149 

150```

151Check my calendar for meetings tomorrow, then for each meeting with

152an external attendee, look up their company on LinkedIn and add a

153note about what they do.

154```

155 

156Claude works across tabs to gather information and complete the workflow.

157 

158### Record a demo GIF

159 

160Create shareable recordings of browser interactions:

161 

162```

163Record a GIF showing how to complete the checkout flow, from adding

164an item to the cart through to the confirmation page.

165```

166 

167Claude records the interaction sequence and saves it as a GIF file.

168 

169## Best practices

170 

171When using browser automation, keep these guidelines in mind:

172 

173* **Modal dialogs can interrupt the flow**: JavaScript alerts, confirms, and prompts block browser events and prevent Claude from receiving commands. If a dialog appears, dismiss it manually and tell Claude to continue.

174* **Use fresh tabs**: Claude creates new tabs for each session. If a tab becomes unresponsive, ask Claude to create a new one.

175* **Filter console output**: Console logs can be verbose. When debugging, tell Claude what patterns to look for rather than asking for all console output.

176 

177## Troubleshooting

178 

179### Extension not detected

180 

181If Claude Code shows "Chrome extension not detected":

182 

1831. Verify the Chrome extension (version 1.0.36 or higher) is installed

1842. Verify Claude Code is version 2.0.73 or higher by running `claude --version`

1853. Check that Chrome is running

1864. Run `/chrome` and select "Reconnect extension" to re-establish the connection

1875. If the issue persists, restart both Claude Code and Chrome

188 

189### Browser not responding

190 

191If Claude's browser commands stop working:

192 

1931. Check if a modal dialog (alert, confirm, prompt) is blocking the page

1942. Ask Claude to create a new tab and try again

1953. Restart the Chrome extension by disabling and re-enabling it

196 

197### First-time setup

198 

199The first time you use the integration, Claude Code installs a native messaging host that allows communication between the CLI and Chrome. If you encounter permission errors, you may need to restart Chrome for the installation to take effect.

200 

201## Enable by default

202 

203Chrome integration requires the `--chrome` flag each time you start Claude Code. To enable it by default, run `/chrome` and select "Enabled by default".

204 

205<Note>

206 Enabling Chrome by default increases context usage since browser tools are always loaded. If you notice increased context consumption, disable this setting and use `--chrome` only when needed.

207</Note>

208 

209Site-level permissions are inherited from the Chrome extension. Manage permissions in the Chrome extension settings to control which sites Claude can browse, click, and type on. Run `/chrome` to see current permission settings.

210 

211## See also

212 

213* [CLI reference](/en/cli-reference) - Command-line flags including `--chrome`

214* [Common workflows](/en/common-workflows) - More ways to use Claude Code

215* [Getting started with Claude for Chrome](https://support.anthropic.com/en/articles/12012173-getting-started-with-claude-for-chrome) - Full documentation for the Chrome extension, including shortcuts, scheduling, and permissions

216 

217 

218---

219 

220> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt

Details

16* **Repositories not on your local machine**: Work on code you don't have checked out locally16* **Repositories not on your local machine**: Work on code you don't have checked out locally

17* **Backend changes**: Where Claude Code can write tests and then write code to pass those tests17* **Backend changes**: Where Claude Code can write tests and then write code to pass those tests

18 18 

19Claude Code is also available on the Claude iOS app. This is perfect for:19Claude Code is also available on the Claude iOS app for kicking off tasks on the go and monitoring work in progress.

20 20 

21* **On the go**: Kick off tasks while commuting or away from laptop21You can move between local and remote development: [send tasks from your terminal to run on the web](#from-terminal-to-web) with the `&` prefix, or [teleport web sessions back to your terminal](#from-web-to-terminal) to continue locally.

22* **Monitoring**: Watch the trajectory and steer the agent's work

23 

24Developers can also move Claude Code sessions from the Claude app to their terminal to continue tasks locally.

25 22 

26## Who can use Claude Code on the web?23## Who can use Claude Code on the web?

27 24 


54 51 

55## Moving tasks between web and terminal52## Moving tasks between web and terminal

56 53 

54You can start tasks on the web and continue them in your terminal, or send tasks from your terminal to run on the web. Web sessions persist even if you close your laptop, and you can monitor them from anywhere including the Claude iOS app.

55 

56<Note>

57 Session handoff is one-way: you can pull web sessions into your terminal, but you can't push an existing terminal session to the web. The [`&` prefix](#from-terminal-to-web) creates a *new* web session with your current conversation context.

58</Note>

59 

60### From terminal to web

61 

62Start a message with `&` inside Claude Code to send a task to run on the web:

63 

64```

65& Fix the authentication bug in src/auth/login.ts

66```

67 

68This creates a new web session on claude.ai with your current conversation context. The task runs in the cloud while you continue working locally. Use `/tasks` to check progress, or open the session on claude.ai or the Claude iOS app to interact directly. From there you can steer Claude, provide feedback, or answer questions just like any other conversation.

69 

70You can also start a web session directly from the command line:

71 

72```bash theme={null}

73claude --remote "Fix the authentication bug in src/auth/login.ts"

74```

75 

76#### Tips for background tasks

77 

78**Plan locally, execute remotely**: For complex tasks, start Claude in plan mode to collaborate on the approach before sending work to the web:

79 

80```bash theme={null}

81claude --permission-mode plan

82```

83 

84In plan mode, Claude can only read files and explore the codebase. Once you're satisfied with the plan, send it to the web for autonomous execution:

85 

86```

87& Execute the migration plan we discussed

88```

89 

90This pattern gives you control over the strategy while letting Claude execute autonomously in the cloud.

91 

92**Run tasks in parallel**: Each `&` command creates its own web session that runs independently. You can kick off multiple tasks and they'll all run simultaneously in separate sessions:

93 

94```

95& Fix the flaky test in auth.spec.ts

96& Update the API documentation

97& Refactor the logger to use structured output

98```

99 

100Monitor all sessions with `/tasks`. When a session completes, you can create a PR from the web interface or [teleport](#from-web-to-terminal) the session to your terminal to continue working.

101 

57### From web to terminal102### From web to terminal

58 103 

59After starting a task on the web:104There are several ways to pull a web session into your terminal:

105 

106* **Using `/teleport`**: From within Claude Code, run `/teleport` (or `/tp`) to see an interactive picker of your web sessions. If you have uncommitted changes, you'll be prompted to stash them first.

107* **Using `--teleport`**: From the command line, run `claude --teleport` for an interactive session picker, or `claude --teleport <session-id>` to resume a specific session directly.

108* **From `/tasks`**: Run `/tasks` to see your background sessions, then press `t` to teleport into one

109* **From the web interface**: Click "Open in CLI" to copy a command you can paste into your terminal

60 110 

611. Click the "Open in CLI" button111When you teleport a session, Claude verifies you're in the correct repository, fetches and checks out the branch from the remote session, and loads the full conversation history into your terminal.

622. Paste and run the command in your terminal in a checkout of the repo112 

633. Any existing local changes will be stashed, and the remote session will be loaded113#### Requirements for teleporting

644. Continue working locally114 

115Teleport checks these requirements before resuming a session. If any requirement isn't met, you'll see an error or be prompted to resolve the issue.

116 

117| Requirement | Details |

118| ------------------ | ---------------------------------------------------------------------------------------------------------------------- |

119| Clean git state | Your working directory must have no uncommitted changes. Teleport prompts you to stash changes if needed. |

120| Correct repository | You must run `--teleport` from a checkout of the same repository, not a fork. |

121| Branch available | The branch from the web session must have been pushed to the remote. Teleport automatically fetches and checks it out. |

122| Same account | You must be authenticated to the same Claude.ai account used in the web session. |

65 123 

66## Cloud environment124## Cloud environment

67 125 


127 185 

128**To update an existing environment:** Select the current environment, to the right of the environment name, and select the settings button. This will open a dialog where you can update the environment name, network access, and environment variables.186**To update an existing environment:** Select the current environment, to the right of the environment name, and select the settings button. This will open a dialog where you can update the environment name, network access, and environment variables.

129 187 

188**To select your default environment from the terminal:** If you have multiple environments configured, run `/remote-env` to choose which one to use when starting web sessions from your terminal with `&` or `--remote`. With a single environment, this command shows your current configuration.

189 

130<Note>190<Note>

131 Environment variables must be specified as key-value pairs, in [`.env` format](https://www.dotenv.org/). For example:191 Environment variables must be specified as key-value pairs, in [`.env` format](https://www.dotenv.org/). For example:

132 192 

cli-reference.md +11 −7

Details

5## CLI commands5## CLI commands

6 6 

7| Command | Description | Example |7| Command | Description | Example |

8| :--------------------------------- | :--------------------------------------------- | :------------------------------------------------ |8| :------------------------------ | :----------------------------------------------------- | :------------------------------------------------ |

9| `claude` | Start interactive REPL | `claude` |9| `claude` | Start interactive REPL | `claude` |

10| `claude "query"` | Start REPL with initial prompt | `claude "explain this project"` |10| `claude "query"` | Start REPL with initial prompt | `claude "explain this project"` |

11| `claude -p "query"` | Query via SDK, then exit | `claude -p "explain this function"` |11| `claude -p "query"` | Query via SDK, then exit | `claude -p "explain this function"` |

12| `cat file \| claude -p "query"` | Process piped content | `cat logs.txt \| claude -p "explain"` |12| `cat file \| claude -p "query"` | Process piped content | `cat logs.txt \| claude -p "explain"` |

13| `claude -c` | Continue most recent conversation | `claude -c` |13| `claude -c` | Continue most recent conversation in current directory | `claude -c` |

14| `claude -c -p "query"` | Continue via SDK | `claude -c -p "Check for type errors"` |14| `claude -c -p "query"` | Continue via SDK | `claude -c -p "Check for type errors"` |

15| `claude -r "<session-id>" "query"` | Resume session by ID | `claude -r "abc123" "Finish this PR"` |15| `claude -r "<session>" "query"` | Resume session by ID or name | `claude -r "auth-refactor" "Finish this PR"` |

16| `claude update` | Update to latest version | `claude update` |16| `claude update` | Update to latest version | `claude update` |

17| `claude mcp` | Configure Model Context Protocol (MCP) servers | See the [Claude Code MCP documentation](/en/mcp). |17| `claude mcp` | Configure Model Context Protocol (MCP) servers | See the [Claude Code MCP documentation](/en/mcp). |

18 18 


25| `--add-dir` | Add additional working directories for Claude to access (validates each path exists as a directory) | `claude --add-dir ../apps ../lib` |25| `--add-dir` | Add additional working directories for Claude to access (validates each path exists as a directory) | `claude --add-dir ../apps ../lib` |

26| `--agent` | Specify an agent for the current session (overrides the `agent` setting) | `claude --agent my-custom-agent` |26| `--agent` | Specify an agent for the current session (overrides the `agent` setting) | `claude --agent my-custom-agent` |

27| `--agents` | Define custom [subagents](/en/sub-agents) dynamically via JSON (see below for format) | `claude --agents '{"reviewer":{"description":"Reviews code","prompt":"You are a code reviewer"}}'` |27| `--agents` | Define custom [subagents](/en/sub-agents) dynamically via JSON (see below for format) | `claude --agents '{"reviewer":{"description":"Reviews code","prompt":"You are a code reviewer"}}'` |

28| `--allowedTools` | A list of tools that should be allowed without prompting the user for permission, in addition to [settings.json files](/en/settings) | `"Bash(git log:*)" "Bash(git diff:*)" "Read"` |28| `--allowedTools` | Tools that execute without prompting for permission. To restrict which tools are available, use `--tools` instead | `"Bash(git log:*)" "Bash(git diff:*)" "Read"` |

29| `--append-system-prompt` | Append custom text to the end of the default system prompt (works in both interactive and print modes) | `claude --append-system-prompt "Always use TypeScript"` |29| `--append-system-prompt` | Append custom text to the end of the default system prompt (works in both interactive and print modes) | `claude --append-system-prompt "Always use TypeScript"` |

30| `--betas` | Beta headers to include in API requests (API key users only) | `claude --betas interleaved-thinking` |30| `--betas` | Beta headers to include in API requests (API key users only) | `claude --betas interleaved-thinking` |

31| `--chrome` | Enable [Chrome browser integration](/en/chrome) for web automation and testing | `claude --chrome` |

31| `--continue`, `-c` | Load the most recent conversation in the current directory | `claude --continue` |32| `--continue`, `-c` | Load the most recent conversation in the current directory | `claude --continue` |

32| `--dangerously-skip-permissions` | Skip permission prompts (use with caution) | `claude --dangerously-skip-permissions` |33| `--dangerously-skip-permissions` | Skip permission prompts (use with caution) | `claude --dangerously-skip-permissions` |

33| `--debug` | Enable debug mode with optional category filtering (for example, `"api,hooks"` or `"!statsig,!file"`) | `claude --debug "api,mcp"` |34| `--debug` | Enable debug mode with optional category filtering (for example, `"api,hooks"` or `"!statsig,!file"`) | `claude --debug "api,mcp"` |

34| `--disallowedTools` | A list of tools that should be disallowed without prompting the user for permission, in addition to [settings.json files](/en/settings) | `"Bash(git log:*)" "Bash(git diff:*)" "Edit"` |35| `--disallowedTools` | Tools that are removed from the model's context and cannot be used | `"Bash(git log:*)" "Bash(git diff:*)" "Edit"` |

36| `--enable-lsp-logging` | Enable verbose LSP logging for debugging language server issues. Logs are written to `~/.claude/debug/` | `claude --enable-lsp-logging` |

35| `--fallback-model` | Enable automatic fallback to specified model when default model is overloaded (print mode only) | `claude -p --fallback-model sonnet "query"` |37| `--fallback-model` | Enable automatic fallback to specified model when default model is overloaded (print mode only) | `claude -p --fallback-model sonnet "query"` |

36| `--fork-session` | When resuming, create a new session ID instead of reusing the original (use with `--resume` or `--continue`) | `claude --resume abc123 --fork-session` |38| `--fork-session` | When resuming, create a new session ID instead of reusing the original (use with `--resume` or `--continue`) | `claude --resume abc123 --fork-session` |

37| `--ide` | Automatically connect to IDE on startup if exactly one valid IDE is available | `claude --ide` |39| `--ide` | Automatically connect to IDE on startup if exactly one valid IDE is available | `claude --ide` |


41| `--max-turns` | Limit the number of agentic turns in non-interactive mode | `claude -p --max-turns 3 "query"` |43| `--max-turns` | Limit the number of agentic turns in non-interactive mode | `claude -p --max-turns 3 "query"` |

42| `--mcp-config` | Load MCP servers from JSON files or strings (space-separated) | `claude --mcp-config ./mcp.json` |44| `--mcp-config` | Load MCP servers from JSON files or strings (space-separated) | `claude --mcp-config ./mcp.json` |

43| `--model` | Sets the model for the current session with an alias for the latest model (`sonnet` or `opus`) or a model's full name | `claude --model claude-sonnet-4-5-20250929` |45| `--model` | Sets the model for the current session with an alias for the latest model (`sonnet` or `opus`) or a model's full name | `claude --model claude-sonnet-4-5-20250929` |

46| `--no-chrome` | Disable [Chrome browser integration](/en/chrome) for this session | `claude --no-chrome` |

44| `--output-format` | Specify output format for print mode (options: `text`, `json`, `stream-json`) | `claude -p "query" --output-format json` |47| `--output-format` | Specify output format for print mode (options: `text`, `json`, `stream-json`) | `claude -p "query" --output-format json` |

45| `--permission-mode` | Begin in a specified [permission mode](/en/iam#permission-modes) | `claude --permission-mode plan` |48| `--permission-mode` | Begin in a specified [permission mode](/en/iam#permission-modes) | `claude --permission-mode plan` |

46| `--permission-prompt-tool` | Specify an MCP tool to handle permission prompts in non-interactive mode | `claude -p --permission-prompt-tool mcp_auth_tool "query"` |49| `--permission-prompt-tool` | Specify an MCP tool to handle permission prompts in non-interactive mode | `claude -p --permission-prompt-tool mcp_auth_tool "query"` |

47| `--plugin-dir` | Load plugins from directories for this session only (repeatable) | `claude --plugin-dir ./my-plugins` |50| `--plugin-dir` | Load plugins from directories for this session only (repeatable) | `claude --plugin-dir ./my-plugins` |

48| `--print`, `-p` | Print response without interactive mode (see [SDK documentation](https://docs.claude.com/en/docs/agent-sdk) for programmatic usage details) | `claude -p "query"` |51| `--print`, `-p` | Print response without interactive mode (see [SDK documentation](https://docs.claude.com/en/docs/agent-sdk) for programmatic usage details) | `claude -p "query"` |

49| `--resume`, `-r` | Resume a specific session by ID, or by choosing in interactive mode | `claude --resume abc123 "query"` |52| `--resume`, `-r` | Resume a specific session by ID or name, or show an interactive picker to choose a session | `claude --resume auth-refactor` |

50| `--session-id` | Use a specific session ID for the conversation (must be a valid UUID) | `claude --session-id "550e8400-e29b-41d4-a716-446655440000"` |53| `--session-id` | Use a specific session ID for the conversation (must be a valid UUID) | `claude --session-id "550e8400-e29b-41d4-a716-446655440000"` |

51| `--setting-sources` | Comma-separated list of setting sources to load (`user`, `project`, `local`) | `claude --setting-sources user,project` |54| `--setting-sources` | Comma-separated list of setting sources to load (`user`, `project`, `local`) | `claude --setting-sources user,project` |

52| `--settings` | Path to a settings JSON file or a JSON string to load additional settings from | `claude --settings ./settings.json` |55| `--settings` | Path to a settings JSON file or a JSON string to load additional settings from | `claude --settings ./settings.json` |

53| `--strict-mcp-config` | Only use MCP servers from `--mcp-config`, ignoring all other MCP configurations | `claude --strict-mcp-config --mcp-config ./mcp.json` |56| `--strict-mcp-config` | Only use MCP servers from `--mcp-config`, ignoring all other MCP configurations | `claude --strict-mcp-config --mcp-config ./mcp.json` |

54| `--system-prompt` | Replace the entire system prompt with custom text (works in both interactive and print modes) | `claude --system-prompt "You are a Python expert"` |57| `--system-prompt` | Replace the entire system prompt with custom text (works in both interactive and print modes) | `claude --system-prompt "You are a Python expert"` |

55| `--system-prompt-file` | Load system prompt from a file, replacing the default prompt (print mode only) | `claude -p --system-prompt-file ./custom-prompt.txt "query"` |58| `--system-prompt-file` | Load system prompt from a file, replacing the default prompt (print mode only) | `claude -p --system-prompt-file ./custom-prompt.txt "query"` |

56| `--tools` | Specify the list of available tools from the built-in set (use `""` to disable all, `"default"` for all, or tool names like `"Bash,Edit,Read"`) | `claude -p --tools "Bash,Edit,Read" "query"` |59| `--tools` | Restrict which built-in tools Claude can use (works in both interactive and print modes). Use `""` to disable all, `"default"` for all, or tool names like `"Bash,Edit,Read"` | `claude --tools "Bash,Edit,Read"` |

57| `--verbose` | Enable verbose logging, shows full turn-by-turn output (helpful for debugging in both print and interactive modes) | `claude --verbose` |60| `--verbose` | Enable verbose logging, shows full turn-by-turn output (helpful for debugging in both print and interactive modes) | `claude --verbose` |

58| `--version`, `-v` | Output the version number | `claude -v` |61| `--version`, `-v` | Output the version number | `claude -v` |

59 62 


133 136 

134## See also137## See also

135 138 

139* [Chrome extension](/en/chrome) - Browser automation and web testing

136* [Interactive mode](/en/interactive-mode) - Shortcuts, input modes, and interactive features140* [Interactive mode](/en/interactive-mode) - Shortcuts, input modes, and interactive features

137* [Slash commands](/en/slash-commands) - Interactive session commands141* [Slash commands](/en/slash-commands) - Interactive session commands

138* [Quickstart guide](/en/quickstart) - Getting started with Claude Code142* [Quickstart guide](/en/quickstart) - Getting started with Claude Code

common-workflows.md +102 −79

Details

454 * Include screenshots of errors, UI designs, or diagrams for better context454 * Include screenshots of errors, UI designs, or diagrams for better context

455 * You can work with multiple images in a conversation455 * You can work with multiple images in a conversation

456 * Image analysis works with diagrams, screenshots, mockups, and more456 * Image analysis works with diagrams, screenshots, mockups, and more

457 * When Claude references images (for example, `[Image #1]`), `Cmd+Click` (Mac) or `Ctrl+Click` (Windows/Linux) the link to open the image in your default viewer

457</Tip>458</Tip>

458 459 

459***460***


499 500 

500***501***

501 502 

502## Use extended thinking503## Use extended thinking (thinking mode)

503 504 

504Suppose you're working on complex architectural decisions, challenging bugs, or planning multi-step implementations that require deep reasoning.505[Extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking) reserves a portion of the total output token budget for Claude to reason through complex problems step-by-step. This reasoning is visible in verbose mode, which you can toggle on with `Ctrl+O`.

506 

507Extended thinking is particularly valuable for complex architectural decisions, challenging bugs, multi-step implementation planning, and evaluating tradeoffs between different approaches. It provides more space for exploring multiple solutions, analyzing edge cases, and self-correcting mistakes.

505 508 

506<Note>509<Note>

507 [Extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking) is disabled by default in Claude Code. You can enable it on-demand by using `Tab` to toggle Thinking on, or by using prompts like "think" or "think hard". You can also enable it permanently by setting the [`MAX_THINKING_TOKENS` environment variable](/en/settings#environment-variables) in your settings.510 Sonnet 4.5 and Opus 4.5 have thinking enabled by default. All other models have thinking disabled by default. Use `/model` to view or switch your current model.

508</Note>511</Note>

509 512 

510<Steps>513You can configure thinking mode for Claude Code in several ways:

511 <Step title="Provide context and ask Claude to think">

512 ```

513 > I need to implement a new authentication system using OAuth2 for our API. Think deeply about the best approach for implementing this in our codebase.

514 ```

515 514 

516 Claude gathers relevant information from your codebase and515| Scope | How to enable | Details |

517 uses extended thinking, which is visible in the interface.516| --------------------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ |

518 </Step>517| **Toggle shortcut** | Press `Option+T` (macOS) or `Alt+T` (Windows/Linux) | Toggle thinking on/off. May require [terminal configuration](/en/terminal-config) to enable Option key shortcuts |

518| **Global default** | Use `/config` to toggle thinking mode on | Sets your default across all projects.<br />Saved as `alwaysThinkingEnabled` in `~/.claude/settings.json` |

519| **Environment variable override** | Set [`MAX_THINKING_TOKENS`](/en/settings#environment-variables) environment variable | When set, applies a custom token budget to all requests, overriding your thinking mode configuration. Example: `export MAX_THINKING_TOKENS=1024` |

519 520 

520 <Step title="Refine the thinking with follow-up prompts">521### Per-request thinking with `ultrathink`

521 ```

522 > think about potential security vulnerabilities in this approach

523 ```

524 522 

525 ```523You can include `ultrathink` as a keyword in your message to enable thinking for a single request:

526 > think hard about edge cases we should handle

527 ```

528 </Step>

529</Steps>

530 524 

531<Tip>525```

532 Tips to get the most value out of extended thinking:526> ultrathink: design a caching layer for our API

527```

533 528 

534 [Extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking) is most valuable for complex tasks such as:529Note that `ultrathink` both allocates the thinking budget AND semantically signals to Claude to reason more thoroughly, which may result in deeper thinking than necessary for your task.

535 530 

536 * Planning complex architectural changes531The `ultrathink` keyword only works when `MAX_THINKING_TOKENS` is not set. When `MAX_THINKING_TOKENS` is configured, it takes priority and controls the thinking budget for all requests.

537 * Debugging intricate issues

538 * Creating implementation plans for new features

539 * Understanding complex codebases

540 * Evaluating tradeoffs between different approaches

541 532 

542 Use `Tab` to toggle Thinking on and off during a session.533Other phrases like "think", "think hard", and "think more" are interpreted as regular prompt instructions and don't allocate thinking tokens.

543 534 

544 The way you prompt for thinking results in varying levels of thinking depth:535To view Claude's thinking process, press `Ctrl+O` to toggle verbose mode and see the internal reasoning displayed as gray italic text.

545 536 

546 * "think" triggers basic extended thinking537See the [token budget section below](#how-extended-thinking-token-budgets-work) for detailed budget information and cost implications.

547 * intensifying phrases such as "keep hard", "think more", "think a lot", or "think longer" triggers deeper thinking

548 538 

549 For more extended thinking prompting tips, see [Extended thinking tips](https://docs.claude.com/en/docs/build-with-claude/prompt-engineering/extended-thinking-tips).539### How extended thinking token budgets work

550</Tip>

551 540 

552<Note>541Extended thinking uses a **token budget** that controls how much internal reasoning Claude can perform before responding.

553 Claude displays its thinking process as italic gray text above the542 

554 response.543A larger thinking token budget provides:

555</Note>544 

545* More space to explore multiple solution approaches step-by-step

546* Room to analyze edge cases and evaluate tradeoffs thoroughly

547* Ability to revise reasoning and self-correct mistakes

548 

549Token budgets for thinking mode:

550 

551* When thinking is **enabled** (via `/config` or `ultrathink`), Claude can use up to **31,999 tokens** from your output budget for internal reasoning

552* When thinking is **disabled**, Claude uses **0 tokens** for thinking

553 

554**Custom token budgets:**

555 

556* You can set a custom thinking token budget using the [`MAX_THINKING_TOKENS` environment variable](/en/settings#environment-variables)

557* This takes highest priority and overrides the default 31,999 token budget

558* See the [extended thinking documentation](https://docs.claude.com/en/docs/build-with-claude/extended-thinking) for valid token ranges

559 

560<Warning>

561 You're charged for all thinking tokens used, even though Claude 4 models show summarized thinking

562</Warning>

556 563 

557***564***

558 565 

559## Resume previous conversations566## Resume previous conversations

560 567 

561Suppose you've been working on a task with Claude Code and need to continue where you left off in a later session.568When starting Claude Code, you can resume a previous session:

569 

570* `claude --continue` continues the most recent conversation in the current directory

571* `claude --resume` opens a conversation picker or resumes by name

562 572 

563Claude Code provides two options for resuming previous conversations:573From inside an active session, use `/resume` to switch to a different conversation.

564 574 

565* `--continue` to automatically continue the most recent conversation575Sessions are stored per project directory. The `/resume` picker shows sessions from the same git repository, including worktrees.

566* `--resume` to display a conversation picker576 

577### Name your sessions

578 

579Give sessions descriptive names to find them later. This is a best practice when working on multiple tasks or features.

567 580 

568<Steps>581<Steps>

569 <Step title="Continue the most recent conversation">582 <Step title="Name the current session">

570 ```bash theme={null}583 Use `/rename` during a session to give it a memorable name:

571 claude --continue584 

585 ```

586 > /rename auth-refactor

572 ```587 ```

573 588 

574 This immediately resumes your most recent conversation without any prompts.589 You can also rename any session from the picker: run `/resume`, navigate to a session, and press `R`.

575 </Step>590 </Step>

576 591 

577 <Step title="Continue in non-interactive mode">592 <Step title="Resume by name later">

593 From the command line:

594 

578 ```bash theme={null}595 ```bash theme={null}

579 claude --continue --print "Continue with my task"596 claude --resume auth-refactor

580 ```597 ```

581 598 

582 Use `--print` with `--continue` to resume the most recent conversation in non-interactive mode, perfect for scripts or automation.599 Or from inside an active session:

583 </Step>

584 600 

585 <Step title="Show conversation picker">

586 ```bash theme={null}

587 claude --resume

588 ```601 ```

602 > /resume auth-refactor

603 ```

604 </Step>

605</Steps>

589 606 

590 This displays an interactive conversation selector with a clean list view showing:607### Use the session picker

591 608 

592 * Session summary (or initial prompt)609The `/resume` command (or `claude --resume` without arguments) opens an interactive session picker with these features:

593 * Metadata: time elapsed, message count, and git branch

594 610 

595 Use arrow keys to navigate and press Enter to select a conversation. Press Esc to exit.611**Keyboard shortcuts in the picker:**

596 </Step>612 

597</Steps>613| Shortcut | Action |

614| :-------- | :------------------------------------------------ |

615| `↑` / `↓` | Navigate between sessions |

616| `→` / `←` | Expand or collapse grouped sessions |

617| `Enter` | Select and resume the highlighted session |

618| `P` | Preview the session content |

619| `R` | Rename the highlighted session |

620| `/` | Search to filter sessions |

621| `A` | Toggle between current directory and all projects |

622| `B` | Filter to sessions from your current git branch |

623| `Esc` | Exit the picker or search mode |

624 

625**Session organization:**

626 

627The picker displays sessions with helpful metadata:

628 

629* Session name or initial prompt

630* Time elapsed since last activity

631* Message count

632* Git branch (if applicable)

633 

634Forked sessions (created with `/rewind` or `--fork-session`) are grouped together under their root session, making it easier to find related conversations.

598 635 

599<Tip>636<Tip>

600 Tips:637 Tips:

601 638 

602 * Conversation history is stored locally on your machine639 * **Name sessions early**: Use `/rename` when starting work on a distinct task—it's much easier to find "payment-integration" than "explain this function" later

603 * Use `--continue` for quick access to your most recent conversation640 * Use `--continue` for quick access to your most recent conversation in the current directory

604 * Use `--resume` when you need to select a specific past conversation641 * Use `--resume session-name` when you know which session you need

605 * When resuming, you'll see the entire conversation history before continuing642 * Use `--resume` (without a name) when you need to browse and select

643 * For scripts, use `claude --continue --print "prompt"` to resume in non-interactive mode

644 * Press `P` in the picker to preview a session before resuming it

606 * The resumed conversation starts with the same model and configuration as the original645 * The resumed conversation starts with the same model and configuration as the original

607 646 

608 How it works:647 How it works:


611 2. **Message Deserialization**: When resuming, the entire message history is restored to maintain context650 2. **Message Deserialization**: When resuming, the entire message history is restored to maintain context

612 3. **Tool State**: Tool usage and results from the previous conversation are preserved651 3. **Tool State**: Tool usage and results from the previous conversation are preserved

613 4. **Context Restoration**: The conversation resumes with all previous context intact652 4. **Context Restoration**: The conversation resumes with all previous context intact

614 

615 Examples:

616 

617 ```bash theme={null}

618 # Continue most recent conversation

619 claude --continue

620 

621 # Continue most recent conversation with a specific prompt

622 claude --continue --print "Show me our progress"

623 

624 # Show conversation picker

625 claude --resume

626 

627 # Continue most recent conversation in non-interactive mode

628 claude --continue --print "Run the tests again"

629 ```

630</Tip>653</Tip>

631 654 

632***655***

data-usage.md +14 −21

Details

7### Data training policy7### Data training policy

8 8 

9**Consumer users (Free, Pro, and Max plans)**:9**Consumer users (Free, Pro, and Max plans)**:

10Starting August 28, 2025, we're giving you the choice to allow your data to be used to improve future Claude models.10We give you the choice to allow your data to be used to improve future Claude models. We will train new models using data from Free, Pro, and Max accounts when this setting is on (including when you use Claude Code from these accounts).

11 

12We will train new models using data from Free, Pro, and Max accounts when this setting is on (including when you use Claude Code from these accounts).

13 

14* If you're a current user, you can select your preference now and your selection will immediately go into effect.

15 This setting will only apply to new or resumed chats and coding sessions on Claude. Previous chats with no additional activity will not be used for model training.

16* You have until October 8, 2025 to make your selection.

17 If you're a new user, you can pick your setting for model training during the signup process.

18 You can change your selection at any time in your Privacy Settings.

19 11 

20**Commercial users**: (Team and Enterprise plans, API, 3rd-party platforms, and Claude Gov) maintain existing policies: Anthropic does not train generative models using code or prompts sent to Claude Code under commercial terms, unless the customer has chosen to provide their data to us for model improvement (for example, the [Developer Partner Program](https://support.claude.com/en/articles/11174108-about-the-development-partner-program)).12**Commercial users**: (Team and Enterprise plans, API, 3rd-party platforms, and Claude Gov) maintain existing policies: Anthropic does not train generative models using code or prompts sent to Claude Code under commercial terms, unless the customer has chosen to provide their data to us for model improvement (for example, the [Developer Partner Program](https://support.claude.com/en/articles/11174108-about-the-development-partner-program)).

21 13 


51 43 

52For full details, please review our [Commercial Terms of Service](https://www.anthropic.com/legal/commercial-terms) (for Team, Enterprise, and API users) or [Consumer Terms](https://www.anthropic.com/legal/consumer-terms) (for Free, Pro, and Max users) and [Privacy Policy](https://www.anthropic.com/legal/privacy).44For full details, please review our [Commercial Terms of Service](https://www.anthropic.com/legal/commercial-terms) (for Team, Enterprise, and API users) or [Consumer Terms](https://www.anthropic.com/legal/consumer-terms) (for Free, Pro, and Max users) and [Privacy Policy](https://www.anthropic.com/legal/privacy).

53 45 

54## Data flow and dependencies46## Data access

47 

48For all first party users, you can learn more about what data is logged for [local Claude Code](#local-claude-code-data-flow-and-dependencies) and [remote Claude Code](#cloud-execution-data-flow-and-dependencies). Note for remote Claude Code, Claude accesses the repository where you initiate your Claude Code session. Claude does not access repositories that you have connected but have not started a session in.

55 49 

56<img src="https://mintcdn.com/claude-code/-YhHHmtSxwr7W8gy/images/claude-code-data-flow.png?fit=max&auto=format&n=-YhHHmtSxwr7W8gy&q=85&s=4672f138596e864633b4b7c7ae4ae812" alt="Claude Code data flow diagram" data-og-width="1597" width="1597" data-og-height="1285" height="1285" data-path="images/claude-code-data-flow.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/claude-code/-YhHHmtSxwr7W8gy/images/claude-code-data-flow.png?w=280&fit=max&auto=format&n=-YhHHmtSxwr7W8gy&q=85&s=5d9bdaf7ea50fc38dc01bbde7b952835 280w, https://mintcdn.com/claude-code/-YhHHmtSxwr7W8gy/images/claude-code-data-flow.png?w=560&fit=max&auto=format&n=-YhHHmtSxwr7W8gy&q=85&s=525736e5860ac9f262de4b40c9c68a0e 560w, https://mintcdn.com/claude-code/-YhHHmtSxwr7W8gy/images/claude-code-data-flow.png?w=840&fit=max&auto=format&n=-YhHHmtSxwr7W8gy&q=85&s=5262f9d1a1d0cffb0d5944e49b2d72be 840w, https://mintcdn.com/claude-code/-YhHHmtSxwr7W8gy/images/claude-code-data-flow.png?w=1100&fit=max&auto=format&n=-YhHHmtSxwr7W8gy&q=85&s=ec74e6b2f87b667f6d0e2278c20944de 1100w, https://mintcdn.com/claude-code/-YhHHmtSxwr7W8gy/images/claude-code-data-flow.png?w=1650&fit=max&auto=format&n=-YhHHmtSxwr7W8gy&q=85&s=05f11b1d061b6ddbb69969d4e535547a 1650w, https://mintcdn.com/claude-code/-YhHHmtSxwr7W8gy/images/claude-code-data-flow.png?w=2500&fit=max&auto=format&n=-YhHHmtSxwr7W8gy&q=85&s=9b9cce0fb5989bd1d27f143825be73ff 2500w" />50## Local Claude Code: Data flow and dependencies

51 

52The diagram below shows how Claude Code connects to external services during installation and normal operation. Solid lines indicate required connections, while dashed lines represent optional or user-initiated data flows.

53 

54<img src="https://mintcdn.com/claude-code/I9Dpo7RZuIbc86cX/images/claude-code-data-flow.svg?fit=max&auto=format&n=I9Dpo7RZuIbc86cX&q=85&s=9e77f476347e7c9983f6e211d27cf6a9" alt="Diagram showing Claude Code's external connections: install/update connects to NPM, and user requests connect to Anthropic services including Console auth, public-api, and optionally Statsig, Sentry, and bug reporting" data-og-width="720" width="720" data-og-height="520" height="520" data-path="images/claude-code-data-flow.svg" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/claude-code/I9Dpo7RZuIbc86cX/images/claude-code-data-flow.svg?w=280&fit=max&auto=format&n=I9Dpo7RZuIbc86cX&q=85&s=94c033b9b6db3d10b9e2d7c6d681d9dc 280w, https://mintcdn.com/claude-code/I9Dpo7RZuIbc86cX/images/claude-code-data-flow.svg?w=560&fit=max&auto=format&n=I9Dpo7RZuIbc86cX&q=85&s=430aaaf77c28c501d5753ffa456ee227 560w, https://mintcdn.com/claude-code/I9Dpo7RZuIbc86cX/images/claude-code-data-flow.svg?w=840&fit=max&auto=format&n=I9Dpo7RZuIbc86cX&q=85&s=63c3c3f160b522220a8291fe2f93f970 840w, https://mintcdn.com/claude-code/I9Dpo7RZuIbc86cX/images/claude-code-data-flow.svg?w=1100&fit=max&auto=format&n=I9Dpo7RZuIbc86cX&q=85&s=a7f6e838482f4a1a0a0b4683439369ea 1100w, https://mintcdn.com/claude-code/I9Dpo7RZuIbc86cX/images/claude-code-data-flow.svg?w=1650&fit=max&auto=format&n=I9Dpo7RZuIbc86cX&q=85&s=5fbf749c2f94babb3ef72edfb7aba1e9 1650w, https://mintcdn.com/claude-code/I9Dpo7RZuIbc86cX/images/claude-code-data-flow.svg?w=2500&fit=max&auto=format&n=I9Dpo7RZuIbc86cX&q=85&s=7a1babbdccc4986957698d9c5c30c4a8 2500w" />

57 55 

58Claude Code is installed from [NPM](https://www.npmjs.com/package/@anthropic-ai/claude-code). Claude Code runs locally. In order to interact with the LLM, Claude Code sends data over the network. This data includes all user prompts and model outputs. The data is encrypted in transit via TLS and is not encrypted at rest. Claude Code is compatible with most popular VPNs and LLM proxies.56Claude Code is installed from [NPM](https://www.npmjs.com/package/@anthropic-ai/claude-code). Claude Code runs locally. In order to interact with the LLM, Claude Code sends data over the network. This data includes all user prompts and model outputs. The data is encrypted in transit via TLS and is not encrypted at rest. Claude Code is compatible with most popular VPNs and LLM proxies.

59 57 

60Claude Code is built on Anthropic's APIs. For details regarding our API's security controls, including our API logging procedures, please refer to compliance artifacts offered in the [Anthropic Trust Center](https://trust.anthropic.com).58Claude Code is built on Anthropic's APIs. For details regarding our API's security controls, including our API logging procedures, please refer to compliance artifacts offered in the [Anthropic Trust Center](https://trust.anthropic.com).

61 59 

62### Cloud execution60### Cloud execution: Data flow and dependencies

63 

64<Note>

65 The above data flow diagram and description applies to Claude Code CLI running locally on your machine. For cloud-based sessions using Claude Code on the web, see the section below.

66</Note>

67 61 

68When using [Claude Code on the web](/en/claude-code-on-the-web), sessions run in Anthropic-managed virtual machines instead of locally. In cloud environments:62When using [Claude Code on the web](/en/claude-code-on-the-web), sessions run in Anthropic-managed virtual machines instead of locally. In cloud environments:

69 63 

70* **Code storage**: Your repository is cloned to an isolated VM and automatically deleted after session completion64* **Code and data storage:** Your repository is cloned to an isolated VM. Code and session data are subject to the retention and usage policies for your account type (see Data retention section above)

71* **Credentials**: GitHub authentication is handled through a secure proxy; your GitHub credentials never enter the sandbox65* **Credentials:** GitHub authentication is handled through a secure proxy; your GitHub credentials never enter the sandbox

72* **Network traffic**: All outbound traffic goes through a security proxy for audit logging and abuse prevention66* **Network traffic:** All outbound traffic goes through a security proxy for audit logging and abuse prevention

73* **Data retention**: Code and session data are subject to the retention and usage policies for your account type67* **Session data:** Prompts, code changes, and outputs follow the same data policies as local Claude Code usage

74* **Session data**: Prompts, code changes, and outputs follow the same data policies as local Claude Code usage

75 68 

76For security details about cloud execution, see [Security](/en/security#cloud-execution-security).69For security details about cloud execution, see [Security](/en/security#cloud-execution-security).

77 70 

desktop.md +24 −2

Details

53 53 

54### Launch Claude Code on the web54### Launch Claude Code on the web

55 55 

56From the desktop app, you can kick off Claude Code sessions that run on Anthropic's secure cloud infrastructure. This is useful for:56From the desktop app, you can kick off Claude Code sessions that run on Anthropic's secure cloud infrastructure.

57 57 

58To start a web session from desktop, select a remote environment when creating a new session.58To start a web session from desktop, select a remote environment when creating a new session.

59 59 


67 The bundled Claude Code version in Desktop may differ from the latest CLI version. Desktop prioritizes stability while the CLI may have newer features.67 The bundled Claude Code version in Desktop may differ from the latest CLI version. Desktop prioritizes stability while the CLI may have newer features.

68</Note>68</Note>

69 69 

70### Enterprise configuration70## Environment configuration

71 

72For local environments, Claude Code on desktop automatically extracts your `$PATH` environment variable from your shell configuration. This allows local sessions to access development tools like `yarn`, `npm`, `node`, and other commands available in your terminal without additional setup.

73 

74### Custom environment variables

75 

76Select "Local" environment, then to the right, select the settings button. This will open a dialog where you can update local environment variables. This is useful for setting project-specific variables or API keys that your development workflows require. Environment variable values are masked in the UI for security reasons.

77 

78<Note>

79 Environment variables must be specified as key-value pairs, in [`.env` format](https://www.dotenv.org/). For example:

80 

81 ```

82 API_KEY=your_api_key

83 DEBUG=true

84 

85 # Multiline values - wrap in quotes

86 CERT="-----BEGIN CERT-----

87 MIIE...

88 -----END CERT-----"

89 ```

90</Note>

91 

92## Enterprise configuration

71 93 

72Organizations can disable local Claude Code use in the desktop application with the `isClaudeCodeForDesktopEnabled` [enterprise policy option](https://support.claude.com/en/articles/12622667-enterprise-configuration#h_003283c7cb). Additionally, Claude Code on the web can be disabled in your [admin settings](https://claude.ai/admin-settings/claude-code).94Organizations can disable local Claude Code use in the desktop application with the `isClaudeCodeForDesktopEnabled` [enterprise policy option](https://support.claude.com/en/articles/12622667-enterprise-configuration#h_003283c7cb). Additionally, Claude Code on the web can be disabled in your [admin settings](https://claude.ai/admin-settings/claude-code).

73 95 

discover-plugins.md +372 −0 added

Details

1# Discover and install prebuilt plugins through marketplaces

2 

3> Find and install plugins from marketplaces to extend Claude Code with new commands, agents, and capabilities.

4 

5Plugins extend Claude Code with custom commands, agents, hooks, and MCP servers. Plugin marketplaces are catalogs that help you discover and install these extensions without building them yourself.

6 

7Looking to create and distribute your own marketplace? See [Create and distribute a plugin marketplace](/en/plugin-marketplaces).

8 

9## How marketplaces work

10 

11A marketplace is a catalog of plugins that someone else has created and shared. Using a marketplace is a two-step process:

12 

13<Steps>

14 <Step title="Add the marketplace">

15 This registers the catalog with Claude Code so you can browse what's available. No plugins are installed yet.

16 </Step>

17 

18 <Step title="Install individual plugins">

19 Browse the catalog and install the plugins you want.

20 </Step>

21</Steps>

22 

23Think of it like adding an app store: adding the store gives you access to browse its collection, but you still choose which apps to download individually.

24 

25## Official Anthropic marketplace

26 

27The official Anthropic marketplace (`claude-plugins-official`) is automatically available when you start Claude Code. Run `/plugin` and go to the **Discover** tab to browse what's available.

28 

29To install a plugin from the official marketplace:

30 

31```shell theme={null}

32/plugin install plugin-name@claude-plugins-official

33```

34 

35<Note>

36 The official marketplace is maintained by Anthropic. To distribute your own plugins, [create your own marketplace](/en/plugin-marketplaces) and share it with users.

37</Note>

38 

39The official marketplace includes several categories of plugins:

40 

41### Code intelligence

42 

43Code intelligence plugins help Claude understand your codebase more deeply. With these plugins installed, Claude can jump to definitions, find references, and see type errors immediately after edits. These plugins use the [Language Server Protocol](https://microsoft.github.io/language-server-protocol/) (LSP), the same technology that powers VS Code's code intelligence.

44 

45These plugins require the language server binary to be installed on your system. If you already have a language server installed, Claude may prompt you to install the corresponding plugin when you open a project.

46 

47| Language | Plugin | Binary required |

48| :--------- | :------------------ | :--------------------------- |

49| C/C++ | `clangd-lsp` | `clangd` |

50| C# | `csharp-lsp` | `csharp-ls` |

51| Go | `gopls-lsp` | `gopls` |

52| Java | `jdtls-lsp` | `jdtls` |

53| Lua | `lua-lsp` | `lua-language-server` |

54| PHP | `php-lsp` | `intelephense` |

55| Python | `pyright-lsp` | `pyright-langserver` |

56| Rust | `rust-analyzer-lsp` | `rust-analyzer` |

57| Swift | `swift-lsp` | `sourcekit-lsp` |

58| TypeScript | `typescript-lsp` | `typescript-language-server` |

59 

60You can also [create your own LSP plugin](/en/plugins-reference#lsp-servers) for other languages.

61 

62<Note>

63 If you see `Executable not found in $PATH` in the `/plugin` Errors tab after installing a plugin, install the required binary from the table above.

64</Note>

65 

66### External integrations

67 

68These plugins bundle pre-configured [MCP servers](/en/mcp) so you can connect Claude to external services without manual setup:

69 

70* **Source control**: `github`, `gitlab`

71* **Project management**: `atlassian` (Jira/Confluence), `asana`, `linear`, `notion`

72* **Design**: `figma`

73* **Infrastructure**: `vercel`, `firebase`, `supabase`

74* **Communication**: `slack`

75* **Monitoring**: `sentry`

76 

77### Development workflows

78 

79Plugins that add commands and agents for common development tasks:

80 

81* **commit-commands**: Git commit workflows including commit, push, and PR creation

82* **pr-review-toolkit**: Specialized agents for reviewing pull requests

83* **agent-sdk-dev**: Tools for building with the Claude Agent SDK

84* **plugin-dev**: Toolkit for creating your own plugins

85 

86### Output styles

87 

88Customize how Claude responds:

89 

90* **explanatory-output-style**: Educational insights about implementation choices

91* **learning-output-style**: Interactive learning mode for skill building

92 

93## Try it: add the demo marketplace

94 

95Anthropic also maintains a [demo plugins marketplace](https://github.com/anthropics/claude-code/tree/main/plugins) (`claude-code-plugins`) with example plugins that show what's possible with the plugin system. Unlike the official marketplace, you need to add this one manually.

96 

97<Steps>

98 <Step title="Add the marketplace">

99 From within Claude Code, run the `plugin marketplace add` command for the `anthropics/claude-code` marketplace:

100 

101 ```shell theme={null}

102 /plugin marketplace add anthropics/claude-code

103 ```

104 

105 This downloads the marketplace catalog and makes its plugins available to you.

106 </Step>

107 

108 <Step title="Browse available plugins">

109 Run `/plugin` to open the plugin manager. This opens a tabbed interface with four tabs you can cycle through using **Tab** (or **Shift+Tab** to go backward):

110 

111 * **Discover**: browse available plugins from all your marketplaces

112 * **Installed**: view and manage your installed plugins

113 * **Marketplaces**: add, remove, or update your added marketplaces

114 * **Errors**: view any plugin loading errors

115 

116 Go to the **Discover** tab to see plugins from the marketplace you just added.

117 </Step>

118 

119 <Step title="Install a plugin">

120 Select a plugin to view its details, then choose an installation scope:

121 

122 * **User scope**: install for yourself across all projects

123 * **Project scope**: install for all collaborators on this repository

124 * **Local scope**: install for yourself in this repository only

125 

126 For example, select **commit-commands** (a plugin that adds git workflow commands) and install it to your user scope.

127 

128 You can also install directly from the command line:

129 

130 ```shell theme={null}

131 /plugin install commit-commands@anthropics-claude-code

132 ```

133 

134 See [Configuration scopes](/en/settings#configuration-scopes) to learn more about scopes.

135 </Step>

136 

137 <Step title="Use your new plugin">

138 After installing, the plugin's commands are immediately available. Plugin commands are namespaced by the plugin name, so **commit-commands** provides commands like `/commit-commands:commit`.

139 

140 Try it out by making a change to a file and running:

141 

142 ```shell theme={null}

143 /commit-commands:commit

144 ```

145 

146 This stages your changes, generates a commit message, and creates the commit.

147 

148 Each plugin works differently. Check the plugin's description in the **Discover** tab or its homepage to learn what commands and capabilities it provides.

149 </Step>

150</Steps>

151 

152The rest of this guide covers all the ways you can add marketplaces, install plugins, and manage your configuration.

153 

154## Add marketplaces

155 

156Use the `/plugin marketplace add` command to add marketplaces from different sources.

157 

158<Tip>

159 **Shortcuts**: You can use `/plugin market` instead of `/plugin marketplace`, and `rm` instead of `remove`.

160</Tip>

161 

162* **GitHub repositories**: `owner/repo` format (for example, `anthropics/claude-code`)

163* **Git URLs**: any git repository URL (GitLab, Bitbucket, self-hosted)

164* **Local paths**: directories or direct paths to `marketplace.json` files

165* **Remote URLs**: direct URLs to hosted `marketplace.json` files

166 

167### Add from GitHub

168 

169Add a GitHub repository that contains a `.claude-plugin/marketplace.json` file using the `owner/repo` format—where `owner` is the GitHub username or organization and `repo` is the repository name.

170 

171For example, `anthropics/claude-code` refers to the `claude-code` repository owned by `anthropics`:

172 

173```shell theme={null}

174/plugin marketplace add anthropics/claude-code

175```

176 

177### Add from other Git hosts

178 

179Add any git repository by providing the full URL. This works with any Git host, including GitLab, Bitbucket, and self-hosted servers:

180 

181Using HTTPS:

182 

183```shell theme={null}

184/plugin marketplace add https://gitlab.com/company/plugins.git

185```

186 

187Using SSH:

188 

189```shell theme={null}

190/plugin marketplace add git@gitlab.com:company/plugins.git

191```

192 

193To add a specific branch or tag, append `#` followed by the ref:

194 

195```shell theme={null}

196/plugin marketplace add https://gitlab.com/company/plugins.git#v1.0.0

197```

198 

199### Add from local paths

200 

201Add a local directory that contains a `.claude-plugin/marketplace.json` file:

202 

203```shell theme={null}

204/plugin marketplace add ./my-marketplace

205```

206 

207You can also add a direct path to a `marketplace.json` file:

208 

209```shell theme={null}

210/plugin marketplace add ./path/to/marketplace.json

211```

212 

213Or add a remote `marketplace.json` file via URL:

214 

215```shell theme={null}

216/plugin marketplace add https://example.com/marketplace.json

217```

218 

219## Install plugins

220 

221Once you've added marketplaces, you can install plugins directly (installs to user scope by default):

222 

223```shell theme={null}

224/plugin install plugin-name@marketplace-name

225```

226 

227To choose a different [installation scope](/en/settings#configuration-scopes), use the interactive UI: run `/plugin`, go to the **Discover** tab, and press **Enter** on a plugin. You'll see options for:

228 

229* **User scope** (default): install for yourself across all projects

230* **Project scope**: install for all collaborators on this repository (adds to `.claude/settings.json`)

231* **Local scope**: install for yourself in this repository only (not shared with collaborators)

232 

233You may also see plugins with **managed** scope—these are installed by administrators via [managed settings](/en/settings#settings-files) and cannot be modified.

234 

235Run `/plugin` and go to the **Installed** tab to see your plugins grouped by scope.

236 

237<Warning>

238 Make sure you trust a plugin before installing it. Anthropic does not control what MCP servers, files, or other software are included in plugins and cannot verify that they work as intended. Check each plugin's homepage for more information.

239</Warning>

240 

241## Manage installed plugins

242 

243Run `/plugin` and go to the **Installed** tab to view, enable, disable, or uninstall your plugins.

244 

245You can also manage plugins with direct commands.

246 

247Disable a plugin without uninstalling:

248 

249```shell theme={null}

250/plugin disable plugin-name@marketplace-name

251```

252 

253Re-enable a disabled plugin:

254 

255```shell theme={null}

256/plugin enable plugin-name@marketplace-name

257```

258 

259Completely remove a plugin:

260 

261```shell theme={null}

262/plugin uninstall plugin-name@marketplace-name

263```

264 

265The `--scope` option lets you target a specific scope with CLI commands:

266 

267```shell theme={null}

268claude plugin install formatter@your-org --scope project

269claude plugin uninstall formatter@your-org --scope project

270```

271 

272## Manage marketplaces

273 

274You can manage marketplaces through the interactive `/plugin` interface or with CLI commands.

275 

276### Use the interactive interface

277 

278Run `/plugin` and go to the **Marketplaces** tab to:

279 

280* View all your added marketplaces with their sources and status

281* Add new marketplaces

282* Update marketplace listings to fetch the latest plugins

283* Remove marketplaces you no longer need

284 

285### Use CLI commands

286 

287You can also manage marketplaces with direct commands.

288 

289List all configured marketplaces:

290 

291```shell theme={null}

292/plugin marketplace list

293```

294 

295Refresh plugin listings from a marketplace:

296 

297```shell theme={null}

298/plugin marketplace update marketplace-name

299```

300 

301Remove a marketplace:

302 

303```shell theme={null}

304/plugin marketplace remove marketplace-name

305```

306 

307<Warning>

308 Removing a marketplace will uninstall any plugins you installed from it.

309</Warning>

310 

311### Configure auto-updates

312 

313Claude Code can automatically update marketplaces and their installed plugins at startup. When auto-update is enabled for a marketplace, Claude Code refreshes the marketplace data and updates installed plugins to their latest versions. If any plugins were updated, you'll see a notification suggesting you restart Claude Code.

314 

315Toggle auto-update for individual marketplaces through the UI:

316 

3171. Run `/plugin` to open the plugin manager

3182. Select **Marketplaces**

3193. Choose a marketplace from the list

3204. Select **Enable auto-update** or **Disable auto-update**

321 

322Official Anthropic marketplaces have auto-update enabled by default. Third-party and local development marketplaces have auto-update disabled by default.

323 

324To disable all automatic updates entirely for both Claude Code and all plugins, set the `DISABLE_AUTOUPDATER` environment variable. See [Auto updates](/en/setup#auto-updates) for details.

325 

326To keep plugin auto-updates enabled while disabling Claude Code auto-updates, set `FORCE_AUTOUPDATE_PLUGINS=true` along with `DISABLE_AUTOUPDATER`:

327 

328```shell theme={null}

329export DISABLE_AUTOUPDATER=true

330export FORCE_AUTOUPDATE_PLUGINS=true

331```

332 

333This is useful when you want to manage Claude Code updates manually but still receive automatic plugin updates.

334 

335## Configure team marketplaces

336 

337Team admins can set up automatic marketplace installation for projects by adding marketplace configuration to `.claude/settings.json`. When team members trust the repository folder, Claude Code prompts them to install these marketplaces and plugins.

338 

339For full configuration options including `extraKnownMarketplaces` and `enabledPlugins`, see [Plugin settings](/en/settings#plugin-settings).

340 

341## Troubleshooting

342 

343### /plugin command not recognized

344 

345If you see "unknown command" or the `/plugin` command doesn't appear:

346 

3471. **Check your version**: Run `claude --version`. Plugins require version 1.0.33 or later.

3482. **Update Claude Code**:

349 * **Homebrew**: `brew upgrade claude-code`

350 * **npm**: `npm update -g @anthropic-ai/claude-code`

351 * **Native installer**: Re-run the install command from [Setup](/en/setup)

3523. **Restart Claude Code**: After updating, restart your terminal and run `claude` again.

353 

354### Common issues

355 

356* **Marketplace not loading**: Verify the URL is accessible and that `.claude-plugin/marketplace.json` exists at the path

357* **Plugin installation failures**: Check that plugin source URLs are accessible and repositories are public (or you have access)

358* **Files not found after installation**: Plugins are copied to a cache, so paths referencing files outside the plugin directory won't work

359* **Plugin Skills not appearing**: Clear the cache with `rm -rf ~/.claude/plugins/cache`, restart Claude Code, and reinstall the plugin. See [Plugin Skills not appearing](/en/skills#plugin-skills-not-appearing-after-installation) for details.

360 

361For detailed troubleshooting with solutions, see [Troubleshooting](/en/plugin-marketplaces#troubleshooting) in the marketplace guide. For debugging tools, see [Debugging and development tools](/en/plugins-reference#debugging-and-development-tools).

362 

363## Next steps

364 

365* **Build your own plugins**: See [Plugins](/en/plugins) to create custom commands, agents, and hooks

366* **Create a marketplace**: See [Create a plugin marketplace](/en/plugin-marketplaces) to distribute plugins to your team or community

367* **Technical reference**: See [Plugins reference](/en/plugins-reference) for complete specifications

368 

369 

370---

371 

372> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt

headless.md +89 −145

Details

1# Headless mode1# Run Claude Code programmatically

2 2 

3> Run Claude Code programmatically without interactive UI3> Use the Agent SDK to run Claude Code programmatically from the CLI, Python, or TypeScript.

4 4 

5## Overview5The [Agent SDK](https://platform.claude.com/docs/en/agent-sdk/overview) gives you the same tools, agent loop, and context management that power Claude Code. It's available as a CLI for scripts and CI/CD, or as [Python](https://platform.claude.com/docs/en/agent-sdk/python) and [TypeScript](https://platform.claude.com/docs/en/agent-sdk/typescript) packages for full programmatic control.

6 6 

7The headless mode allows you to run Claude Code programmatically from command line scripts and automation tools without any interactive UI.7<Note>

8 The CLI was previously called "headless mode." The `-p` flag and all CLI options work the same way.

9</Note>

8 10 

9## Basic usage11To run Claude Code programmatically from the CLI, pass `-p` with your prompt and any [CLI options](/en/cli-reference):

10 

11The primary command-line interface to Claude Code is the `claude` command. Use the `--print` (or `-p`) flag to run in non-interactive mode and print the final result:

12 12 

13```bash theme={null}13```bash theme={null}

14claude -p "Stage my changes and write a set of commits for them" \14claude -p "Find and fix the bug in auth.py" --allowedTools "Read,Edit,Bash"

15 --allowedTools "Bash,Read" \

16 --permission-mode acceptEdits

17```15```

18 16 

19## Configuration Options17This page covers using the Agent SDK via the CLI (`claude -p`). For the Python and TypeScript SDK packages with structured outputs, tool approval callbacks, and native message objects, see the [full Agent SDK documentation](https://platform.claude.com/docs/en/agent-sdk/overview).

20 

21Headless mode leverages all the CLI options available in Claude Code. Here are the key ones for automation and scripting:

22 18 

23| Flag | Description | Example |19## Basic usage

24| :------------------------- | :----------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------ |

25| `--print`, `-p` | Run in non-interactive mode | `claude -p "query"` |

26| `--output-format` | Specify output format (`text`, `json`, `stream-json`) | `claude -p --output-format json` |

27| `--resume`, `-r` | Resume a conversation by session ID | `claude --resume abc123` |

28| `--continue`, `-c` | Continue the most recent conversation | `claude --continue` |

29| `--verbose` | Enable verbose logging | `claude --verbose` |

30| `--append-system-prompt` | Append to system prompt (only with `--print`) | `claude --append-system-prompt "Custom instruction"` |

31| `--allowedTools` | Space-separated list of allowed tools, or <br /><br /> string of comma-separated list of allowed tools | `claude --allowedTools mcp__slack mcp__filesystem`<br /><br />`claude --allowedTools "Bash(npm install),mcp__filesystem"` |

32| `--disallowedTools` | Space-separated list of denied tools, or <br /><br /> string of comma-separated list of denied tools | `claude --disallowedTools mcp__splunk mcp__github`<br /><br />`claude --disallowedTools "Bash(git commit),mcp__github"` |

33| `--mcp-config` | Load MCP servers from a JSON file | `claude --mcp-config servers.json` |

34| `--permission-prompt-tool` | MCP tool for handling permission prompts (only with `--print`) | `claude --permission-prompt-tool mcp__auth__prompt` |

35 20 

36For a complete list of CLI options and features, see the [CLI reference](/en/cli-reference) documentation.21Add the `-p` (or `--print`) flag to any `claude` command to run it non-interactively. All [CLI options](/en/cli-reference) work with `-p`, including:

37 22 

38## Multi-turn conversations23* `--continue` for [continuing conversations](#continue-conversations)

24* `--allowedTools` for [auto-approving tools](#auto-approve-tools)

25* `--output-format` for [structured output](#get-structured-output)

39 26 

40For multi-turn conversations, you can resume conversations or continue from the most recent session:27This example asks Claude a question about your codebase and prints the response:

41 28 

42```bash theme={null}29```bash theme={null}

43# Continue the most recent conversation30claude -p "What does the auth module do?"

44claude --continue "Now refactor this for better performance"

45 

46# Resume a specific conversation by session ID

47claude --resume 550e8400-e29b-41d4-a716-446655440000 "Update the tests"

48 

49# Resume in non-interactive mode

50claude --resume 550e8400-e29b-41d4-a716-446655440000 "Fix all linting issues" --no-interactive

51```31```

52 32 

53## Output Formats33## Examples

54 34 

55### Text Output (Default)35These examples highlight common CLI patterns.

56 36 

57```bash theme={null}37### Get structured output

58claude -p "Explain file src/components/Header.tsx"

59# Output: This is a React component showing...

60```

61 38 

62### JSON Output39Use `--output-format` to control how responses are returned:

63 40 

64Returns structured data including metadata:41* `text` (default): plain text output

42* `json`: structured JSON with result, session ID, and metadata

43* `stream-json`: newline-delimited JSON for real-time streaming

65 44 

66```bash theme={null}45This example returns a project summary as JSON with session metadata, with the text result in the `result` field:

67claude -p "How does the data layer work?" --output-format json

68```

69 46 

70Response format:47```bash theme={null}

71 48claude -p "Summarize this project" --output-format json

72```json theme={null}

73{

74 "type": "result",

75 "subtype": "success",

76 "total_cost_usd": 0.003,

77 "is_error": false,

78 "duration_ms": 1234,

79 "duration_api_ms": 800,

80 "num_turns": 6,

81 "result": "The response text here...",

82 "session_id": "abc123"

83}

84```49```

85 50 

86### Streaming JSON Output51To get output conforming to a specific schema, use `--output-format json` with `--json-schema` and a [JSON Schema](https://json-schema.org/) definition. The response includes metadata about the request (session ID, usage, etc.) with the structured output in the `structured_output` field.

87 52 

88Streams each message as it is received:53This example extracts function names and returns them as an array of strings:

89 54 

90```bash theme={null}55```bash theme={null}

91claude -p "Build an application" --output-format stream-json56claude -p "Extract the main function names from auth.py" \

57 --output-format json \

58 --json-schema '{"type":"object","properties":{"functions":{"type":"array","items":{"type":"string"}}},"required":["functions"]}'

92```59```

93 60 

94Each conversation begins with an initial `init` system message, followed by a list of user and assistant messages, followed by a final `result` system message with stats. Each message is emitted as a separate JSON object.61<Tip>

95 62 Use a tool like [jq](https://jqlang.github.io/jq/) to parse the response and extract specific fields:

96## Input Formats

97 

98### Text Input (Default)

99 

100```bash theme={null}

101# Direct argument

102claude -p "Explain this code"

103 63 

104# From stdin64 ```bash theme={null}

105echo "Explain this code" | claude -p65 # Extract the text result

106```66 claude -p "Summarize this project" --output-format json | jq -r '.result'

107 67 

108### Streaming JSON Input68 # Extract structured output

69 claude -p "Extract function names from auth.py" \

70 --output-format json \

71 --json-schema '{"type":"object","properties":{"functions":{"type":"array","items":{"type":"string"}}},"required":["functions"]}' \

72 | jq '.structured_output'

73 ```

74</Tip>

109 75 

110A stream of messages provided via `stdin` where each message represents a user turn. This allows multiple turns of a conversation without re-launching the `claude` binary and allows providing guidance to the model while it is processing a request.76### Auto-approve tools

111 77 

112Each message is a JSON 'User message' object, following the same format as the output message schema. Messages are formatted using the [`jsonl`](https://jsonlines.org/) format where each line of input is a complete JSON object. Streaming JSON input requires `-p` and `--output-format stream-json`.78Use `--allowedTools` to let Claude use certain tools without prompting. This example runs a test suite and fixes failures, allowing Claude to execute Bash commands and read/edit files without asking for permission:

113 79 

114```bash theme={null}80```bash theme={null}

115echo '{"type":"user","message":{"role":"user","content":[{"type":"text","text":"Explain this code"}]}}' | claude -p --output-format=stream-json --input-format=stream-json --verbose81claude -p "Run the test suite and fix any failures" \

82 --allowedTools "Bash,Read,Edit"

116```83```

117 84 

118## Agent Integration Examples85### Create a commit

119 86 

120### SRE Incident Response Bot87This example reviews staged changes and creates a commit with an appropriate message:

121 88 

122```bash theme={null}89```bash theme={null}

123#!/bin/bash90claude -p "Look at my staged changes and create an appropriate commit" \

91 --allowedTools "Bash(git diff:*),Bash(git log:*),Bash(git status:*),Bash(git commit:*)"

92```

124 93 

125# Automated incident response agent94<Note>

126investigate_incident() {95 [Slash commands](/en/slash-commands) like `/commit` are only available in interactive mode. In `-p` mode, describe the task you want to accomplish instead.

127 local incident_description="$1"96</Note>

128 local severity="${2:-medium}"

129 97 

130 claude -p "Incident: $incident_description (Severity: $severity)" \98### Customize the system prompt

131 --append-system-prompt "You are an SRE expert. Diagnose the issue, assess impact, and provide immediate action items." \

132 --output-format json \

133 --allowedTools "Bash,Read,WebSearch,mcp__datadog" \

134 --mcp-config monitoring-tools.json

135}

136 99 

137# Usage100Use `--append-system-prompt` to add instructions while keeping Claude Code's default behavior. This example pipes a PR diff to Claude and instructs it to review for security vulnerabilities:

138investigate_incident "Payment API returning 500 errors" "high"

139```

140 

141### Automated Security Review

142 101 

143```bash theme={null}102```bash theme={null}

144# Security audit agent for pull requests103gh pr diff "$1" | claude -p \

145audit_pr() {104 --append-system-prompt "You are a security engineer. Review for vulnerabilities." \

146 local pr_number="$1"105 --output-format json

106```

147 107 

148 gh pr diff "$pr_number" | claude -p \108See [system prompt flags](/en/cli-reference#system-prompt-flags) for more options including `--system-prompt` to fully replace the default prompt.

149 --append-system-prompt "You are a security engineer. Review this PR for vulnerabilities, insecure patterns, and compliance issues." \

150 --output-format json \

151 --allowedTools "Read,Grep,WebSearch"

152}

153 109 

154# Usage and save to file110### Continue conversations

155audit_pr 123 > security-report.json

156```

157 111 

158### Multi-turn Legal Assistant112Use `--continue` to continue the most recent conversation, or `--resume` with a session ID to continue a specific conversation. This example runs a review, then sends follow-up prompts:

159 113 

160```bash theme={null}114```bash theme={null}

161# Legal document review with session persistence115# First request

162session_id=$(claude -p "Start legal review session" --output-format json | jq -r '.session_id')116claude -p "Review this codebase for performance issues"

163 117 

164# Review contract in multiple steps118# Continue the most recent conversation

165claude -p --resume "$session_id" "Review contract.pdf for liability clauses"119claude -p "Now focus on the database queries" --continue

166claude -p --resume "$session_id" "Check compliance with GDPR requirements"120claude -p "Generate a summary of all issues found" --continue

167claude -p --resume "$session_id" "Generate executive summary of risks"

168```121```

169 122 

170## Best Practices123If you're running multiple conversations, capture the session ID to resume a specific one:

171 

172* **Use JSON output format** for programmatic parsing of responses:

173 

174 ```bash theme={null}

175 # Parse JSON response with jq

176 result=$(claude -p "Generate code" --output-format json)

177 code=$(echo "$result" | jq -r '.result')

178 cost=$(echo "$result" | jq -r '.cost_usd')

179 ```

180 

181* **Handle errors gracefully** - check exit codes and stderr:

182 

183 ```bash theme={null}

184 if ! claude -p "$prompt" 2>error.log; then

185 echo "Error occurred:" >&2

186 cat error.log >&2

187 exit 1

188 fi

189 ```

190 124 

191* **Use session management** for maintaining context in multi-turn conversations125```bash theme={null}

126session_id=$(claude -p "Start a review" --output-format json | jq -r '.session_id')

127claude -p "Continue that review" --resume "$session_id"

128```

192 129 

193* **Consider timeouts** for long-running operations:130## Next steps

194 131 

195 ```bash theme={null}132<CardGroup cols={2}>

196 timeout 300 claude -p "$complex_prompt" || echo "Timed out after 5 minutes"133 <Card title="Agent SDK quickstart" icon="play" href="https://platform.claude.com/docs/en/agent-sdk/quickstart">

197 ```134 Build your first agent with Python or TypeScript

135 </Card>

198 136 

199* **Respect rate limits** when making multiple requests by adding delays between calls137 <Card title="CLI reference" icon="terminal" href="/en/cli-reference">

138 Explore all CLI flags and options

139 </Card>

200 140 

201## Related Resources141 <Card title="GitHub Actions" icon="github" href="/en/github-actions">

142 Use the Agent SDK in GitHub workflows

143 </Card>

202 144 

203* [CLI usage and controls](/en/cli-reference) - Complete CLI documentation145 <Card title="GitLab CI/CD" icon="gitlab" href="/en/gitlab-ci-cd">

204* [Common workflows](/en/common-workflows) - Step-by-step guides for common use cases146 Use the Agent SDK in GitLab pipelines

147 </Card>

148</CardGroup>

205 149 

206 150 

207---151---

hooks.md +6 −2

Details

13* `~/.claude/settings.json` - User settings13* `~/.claude/settings.json` - User settings

14* `.claude/settings.json` - Project settings14* `.claude/settings.json` - Project settings

15* `.claude/settings.local.json` - Local project settings (not committed)15* `.claude/settings.local.json` - Local project settings (not committed)

16* Enterprise managed policy settings16* Managed policy settings

17 

18<Note>

19 Enterprise administrators can use `allowManagedHooksOnly` to block user, project, and plugin hooks. See [Hook configuration](/en/settings#hook-configuration).

20</Note>

17 21 

18### Structure22### Structure

19 23 


452 session_id: string456 session_id: string

453 transcript_path: string // Path to conversation JSON457 transcript_path: string // Path to conversation JSON

454 cwd: string // The current working directory when the hook is invoked458 cwd: string // The current working directory when the hook is invoked

455 permission_mode: string // Current permission mode: "default", "plan", "acceptEdits", or "bypassPermissions"459 permission_mode: string // Current permission mode: "default", "plan", "acceptEdits", "dontAsk", or "bypassPermissions"

456 460 

457 // Event-specific fields461 // Event-specific fields

458 hook_event_name: string462 hook_event_name: string

iam.md +6 −22

Details

69Claude Code supports several permission modes that can be set as the `defaultMode` in [settings files](/en/settings#settings-files):69Claude Code supports several permission modes that can be set as the `defaultMode` in [settings files](/en/settings#settings-files):

70 70 

71| Mode | Description |71| Mode | Description |

72| :------------------ | :--------------------------------------------------------------------------- |72| :------------------ | :------------------------------------------------------------------------------------------------------------------------ |

73| `default` | Standard behavior - prompts for permission on first use of each tool |73| `default` | Standard behavior - prompts for permission on first use of each tool |

74| `acceptEdits` | Automatically accepts file edit permissions for the session |74| `acceptEdits` | Automatically accepts file edit permissions for the session |

75| `plan` | Plan Mode - Claude can analyze but not modify files or execute commands |75| `plan` | Plan Mode - Claude can analyze but not modify files or execute commands |

76| `dontAsk` | Auto-denies tools unless pre-approved via `/permissions` or [`permissions.allow`](/en/settings#permission-settings) rules |

76| `bypassPermissions` | Skips all permission prompts (requires safe environment - see warning below) |77| `bypassPermissions` | Skips all permission prompts (requires safe environment - see warning below) |

77 78 

78#### Working directories79#### Working directories


147**MCP**148**MCP**

148 149 

149* `mcp__puppeteer` Matches any tool provided by the `puppeteer` server (name configured in Claude Code)150* `mcp__puppeteer` Matches any tool provided by the `puppeteer` server (name configured in Claude Code)

151* `mcp__puppeteer__*` Wildcard syntax that also matches all tools from the `puppeteer` server

150* `mcp__puppeteer__puppeteer_navigate` Matches the `puppeteer_navigate` tool provided by the `puppeteer` server152* `mcp__puppeteer__puppeteer_navigate` Matches the `puppeteer_navigate` tool provided by the `puppeteer` server

151 153 

152<Warning>

153 Unlike other permission types, MCP permissions do NOT support wildcards (`*`).

154 

155 To approve all tools from an MCP server:

156 

157 * ✅ Use: `mcp__github` (approves ALL GitHub tools)

158 * ❌ Don't use: `mcp__github__*` (wildcards are not supported)

159 

160 To approve specific tools only, list each one:

161 

162 * ✅ Use: `mcp__github__get_issue`

163 * ✅ Use: `mcp__github__list_issues`

164</Warning>

165 

166### Additional permission control with hooks154### Additional permission control with hooks

167 155 

168[Claude Code hooks](/en/hooks-guide) provide a way to register custom shell commands to perform permission evaluation at runtime. When Claude Code makes a tool call, PreToolUse hooks run before the permission system runs, and the hook output can determine whether to approve or deny the tool call in place of the permission system.156[Claude Code hooks](/en/hooks-guide) provide a way to register custom shell commands to perform permission evaluation at runtime. When Claude Code makes a tool call, PreToolUse hooks run before the permission system runs, and the hook output can determine whether to approve or deny the tool call in place of the permission system.

169 157 

170### Enterprise managed policy settings158### Managed settings

171 

172For enterprise deployments of Claude Code, we support enterprise managed policy settings that take precedence over user and project settings. This allows system administrators to enforce security policies that users cannot override.

173 

174System administrators can deploy policies to the [managed settings file locations](/en/settings#settings-files).

175 159 

176These policy files follow the same format as regular [settings files](/en/settings#settings-files) but cannot be overridden by user or project settings. This ensures consistent security policies across your organization.160For organizations that need centralized control over Claude Code configuration, administrators can deploy `managed-settings.json` files to [system directories](/en/settings#settings-files). These policy files follow the same format as regular settings files and cannot be overridden by user or project settings.

177 161 

178### Settings precedence162### Settings precedence

179 163 

180When multiple settings sources exist, they are applied in the following order (highest to lowest precedence):164When multiple settings sources exist, they are applied in the following order (highest to lowest precedence):

181 165 

1821. Enterprise policies1661. Managed settings (`managed-settings.json`)

1832. Command line arguments1672. Command line arguments

1843. Local project settings (`.claude/settings.local.json`)1683. Local project settings (`.claude/settings.local.json`)

1854. Shared project settings (`.claude/settings.json`)1694. Shared project settings (`.claude/settings.json`)

Details

5## Keyboard shortcuts5## Keyboard shortcuts

6 6 

7<Note>7<Note>

8 Keyboard shortcuts may vary by platform and terminal. Press `?` to see available shortcuts for your environment.8 Keyboard shortcuts may vary by platform and terminal. Press `?` to see available shortcuts for your environment. For example, Option key combinations on macOS may require configuring your terminal to use Option as a meta/escape key.

9</Note>9</Note>

10 10 

11### General controls11### General controls

12 12 

13| Shortcut | Description | Context |13| Shortcut | Description | Context |

14| :------------------------------------------- | :---------------------------------------------------------------------------------------------- | :---------------------------------------------------------- |14| :-------------------------------------------- | :--------------------------------- | :---------------------------------------------------------- |

15| `Ctrl+C` | Cancel current input or generation | Standard interrupt |15| `Ctrl+C` | Cancel current input or generation | Standard interrupt |

16| `Ctrl+D` | Exit Claude Code session | EOF signal |16| `Ctrl+D` | Exit Claude Code session | EOF signal |

17| `Ctrl+L` | Clear terminal screen | Keeps conversation history |17| `Ctrl+L` | Clear terminal screen | Keeps conversation history |


20| `Ctrl+V` (macOS/Linux) or `Alt+V` (Windows) | Paste image from clipboard | Pastes an image or path to an image file |20| `Ctrl+V` (macOS/Linux) or `Alt+V` (Windows) | Paste image from clipboard | Pastes an image or path to an image file |

21| `Up/Down arrows` | Navigate command history | Recall previous inputs |21| `Up/Down arrows` | Navigate command history | Recall previous inputs |

22| `Esc` + `Esc` | Rewind the code/conversation | Restore the code and/or conversation to a previous point |22| `Esc` + `Esc` | Rewind the code/conversation | Restore the code and/or conversation to a previous point |

23| `Tab` | Toggle [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking) | Switch between Thinking on and Thinking off |

24| `Shift+Tab` or `Alt+M` (some configurations) | Toggle permission modes | Switch between Auto-Accept Mode, Plan Mode, and normal mode |23| `Shift+Tab` or `Alt+M` (some configurations) | Toggle permission modes | Switch between Auto-Accept Mode, Plan Mode, and normal mode |

24| `Option+P` (macOS) or `Alt+P` (Windows/Linux) | Switch model | Switch models without clearing your prompt |

25 25 

26### Multiline input26### Multiline input

27 27 


40### Quick commands40### Quick commands

41 41 

42| Shortcut | Description | Notes |42| Shortcut | Description | Notes |

43| :----------- | :--------------------------------- | :------------------------------------------------------------ |43| :----------- | :---------------- | :------------------------------------------------------------ |

44| `#` at start | Memory shortcut - add to CLAUDE.md | Prompts for file selection |

45| `/` at start | Slash command | See [slash commands](/en/slash-commands) |44| `/` at start | Slash command | See [slash commands](/en/slash-commands) |

46| `!` at start | Bash mode | Run commands directly and add execution output to the session |45| `!` at start | Bash mode | Run commands directly and add execution output to the session |

47| `@` | File path mention | Trigger file path autocomplete |46| `@` | File path mention | Trigger file path autocomplete |

mcp.md +86 −23

Details

77 77 

78```bash theme={null}78```bash theme={null}

79# Basic syntax79# Basic syntax

80claude mcp add --transport stdio <name> <command> [args...]80claude mcp add [options] <name> -- <command> [args...]

81 81 

82# Real example: Add Airtable server82# Real example: Add Airtable server

83claude mcp add --transport stdio airtable --env AIRTABLE_API_KEY=YOUR_KEY \83claude mcp add --transport stdio --env AIRTABLE_API_KEY=YOUR_KEY airtable \

84 -- npx -y airtable-mcp-server84 -- npx -y airtable-mcp-server

85```85```

86 86 

87<Note>87<Note>

88 **Understanding the "--" parameter:**88 **Important: Option ordering**

89 The `--` (double dash) separates Claude's own CLI flags from the command and arguments that get passed to the MCP server. Everything before `--` are options for Claude (like `--env`, `--scope`), and everything after `--` is the actual command to run the MCP server.89 

90 All options (`--transport`, `--env`, `--scope`, `--header`) must come **before** the server name. The `--` (double dash) then separates the server name from the command and arguments that get passed to the MCP server.

90 91 

91 For example:92 For example:

92 93 

93 * `claude mcp add --transport stdio myserver -- npx server` → runs `npx server`94 * `claude mcp add --transport stdio myserver -- npx server` → runs `npx server`

94 * `claude mcp add --transport stdio myserver --env KEY=value -- python server.py --port 8080` → runs `python server.py --port 8080` with `KEY=value` in environment95 * `claude mcp add --transport stdio --env KEY=value myserver -- python server.py --port 8080` → runs `python server.py --port 8080` with `KEY=value` in environment

95 96 

96 This prevents conflicts between Claude's flags and the server's flags.97 This prevents conflicts between Claude's flags and the server's flags.

97</Note>98</Note>


266 267 

267 * **User and local scope**: `~/.claude.json` (in the `mcpServers` field or under project paths)268 * **User and local scope**: `~/.claude.json` (in the `mcpServers` field or under project paths)

268 * **Project scope**: `.mcp.json` in your project root (checked into source control)269 * **Project scope**: `.mcp.json` in your project root (checked into source control)

269 * **Enterprise managed**: `managed-mcp.json` in system directories (see [Enterprise MCP configuration](#enterprise-mcp-configuration))270 * **Managed**: `managed-mcp.json` in system directories (see [Managed MCP configuration](#managed-mcp-configuration))

270</Note>271</Note>

271 272 

272### Scope hierarchy and precedence273### Scope hierarchy and precedence


631 * Server and prompt names are normalized (spaces become underscores)632 * Server and prompt names are normalized (spaces become underscores)

632</Tip>633</Tip>

633 634 

634## Enterprise MCP configuration635## Managed MCP configuration

636 

637For organizations that need centralized control over MCP servers, Claude Code supports two configuration options:

635 638 

636For organizations that need centralized control over MCP servers, Claude Code supports enterprise-managed MCP configurations. This allows IT administrators to:6391. **Exclusive control with `managed-mcp.json`**: Deploy a fixed set of MCP servers that users cannot modify or extend

6402. **Policy-based control with allowlists/denylists**: Allow users to add their own servers, but restrict which ones are permitted

641 

642These options allow IT administrators to:

637 643 

638* **Control which MCP servers employees can access**: Deploy a standardized set of approved MCP servers across the organization644* **Control which MCP servers employees can access**: Deploy a standardized set of approved MCP servers across the organization

639* **Prevent unauthorized MCP servers**: Optionally restrict users from adding their own MCP servers645* **Prevent unauthorized MCP servers**: Restrict users from adding unapproved MCP servers

640* **Disable MCP entirely**: Remove MCP functionality completely if needed646* **Disable MCP entirely**: Remove MCP functionality completely if needed

641 647 

642### Setting up enterprise MCP configuration648### Option 1: Exclusive control with managed-mcp.json

649 

650When you deploy a `managed-mcp.json` file, it takes **exclusive control** over all MCP servers. Users cannot add, modify, or use any MCP servers other than those defined in this file. This is the simplest approach for organizations that want complete control.

643 651 

644System administrators can deploy an enterprise MCP configuration file alongside the managed settings file. See [settings files](/en/settings#settings-files) for the `managed-mcp.json` file locations on each platform.652System administrators deploy the configuration file to a system-wide directory:

653 

654* macOS: `/Library/Application Support/ClaudeCode/managed-mcp.json`

655* Linux and WSL: `/etc/claude-code/managed-mcp.json`

656* Windows: `C:\Program Files\ClaudeCode\managed-mcp.json`

657 

658<Note>

659 These are system-wide paths (not user home directories like `~/Library/...`) that require administrator privileges. They are designed to be deployed by IT administrators.

660</Note>

645 661 

646The `managed-mcp.json` file uses the same format as a standard `.mcp.json` file:662The `managed-mcp.json` file uses the same format as a standard `.mcp.json` file:

647 663 


668}684}

669```685```

670 686 

671### Restricting MCP servers with allowlists and denylists687### Option 2: Policy-based control with allowlists and denylists

672 688 

673In addition to providing enterprise-managed servers, administrators can control which MCP servers users are allowed to configure using `allowedMcpServers` and `deniedMcpServers` in the [managed settings file](/en/settings#settings-files):689Instead of taking exclusive control, administrators can allow users to configure their own MCP servers while enforcing restrictions on which servers are permitted. This approach uses `allowedMcpServers` and `deniedMcpServers` in the [managed settings file](/en/settings#settings-files).

690 

691<Note>

692 **Choosing between options**: Use Option 1 (`managed-mcp.json`) when you want to deploy a fixed set of servers with no user customization. Use Option 2 (allowlists/denylists) when you want to allow users to add their own servers within policy constraints.

693</Note>

674 694 

675#### Restriction options695#### Restriction options

676 696 

677Each entry in the allowlist or denylist can restrict servers in two ways:697Each entry in the allowlist or denylist can restrict servers in three ways:

678 698 

6791. **By server name** (`serverName`): Matches the configured name of the server6991. **By server name** (`serverName`): Matches the configured name of the server

6802. **By command** (`serverCommand`): Matches the exact command and arguments used to start stdio servers7002. **By command** (`serverCommand`): Matches the exact command and arguments used to start stdio servers

7013. **By URL pattern** (`serverUrl`): Matches remote server URLs with wildcard support

681 702 

682**Important**: Each entry must have **either** `serverName` **or** `serverCommand`, not both.703**Important**: Each entry must have exactly one of `serverName`, `serverCommand`, or `serverUrl`.

683 704 

684#### Example configuration705#### Example configuration

685 706 


692 713 

693 // Allow by exact command (for stdio servers)714 // Allow by exact command (for stdio servers)

694 { "serverCommand": ["npx", "-y", "@modelcontextprotocol/server-filesystem"] },715 { "serverCommand": ["npx", "-y", "@modelcontextprotocol/server-filesystem"] },

695 { "serverCommand": ["python", "/usr/local/bin/approved-server.py"] }716 { "serverCommand": ["python", "/usr/local/bin/approved-server.py"] },

717 

718 // Allow by URL pattern (for remote servers)

719 { "serverUrl": "https://mcp.company.com/*" },

720 { "serverUrl": "https://*.internal.corp/*" }

696 ],721 ],

697 "deniedMcpServers": [722 "deniedMcpServers": [

698 // Block by server name723 // Block by server name

699 { "serverName": "dangerous-server" },724 { "serverName": "dangerous-server" },

700 725 

701 // Block by exact command (for stdio servers)726 // Block by exact command (for stdio servers)

702 { "serverCommand": ["npx", "-y", "unapproved-package"] }727 { "serverCommand": ["npx", "-y", "unapproved-package"] },

728 

729 // Block by URL pattern (for remote servers)

730 { "serverUrl": "https://*.untrusted.com/*" }

703 ]731 ]

704}732}

705```733```


719 747 

720**Non-stdio server behavior**:748**Non-stdio server behavior**:

721 749 

722* Remote servers (HTTP, SSE, WebSocket) always match by name only750* Remote servers (HTTP, SSE, WebSocket) use URL-based matching when `serverUrl` entries exist in the allowlist

751* If no URL entries exist, remote servers fall back to name-based matching

723* Command restrictions do not apply to remote servers752* Command restrictions do not apply to remote servers

724 753 

754#### How URL-based restrictions work

755 

756URL patterns support wildcards using `*` to match any sequence of characters. This is useful for allowing entire domains or subdomains.

757 

758**Wildcard examples**:

759 

760* `https://mcp.company.com/*` - Allow all paths on a specific domain

761* `https://*.example.com/*` - Allow any subdomain of example.com

762* `http://localhost:*/*` - Allow any port on localhost

763 

764**Remote server behavior**:

765 

766* When the allowlist contains **any** `serverUrl` entries, remote servers **must** match one of those URL patterns

767* Remote servers cannot pass by name alone when URL restrictions are present

768* This ensures administrators can enforce which remote endpoints are allowed

769 

770<Accordion title="Example: URL-only allowlist">

771 ```json theme={null}

772 {

773 "allowedMcpServers": [

774 { "serverUrl": "https://mcp.company.com/*" },

775 { "serverUrl": "https://*.internal.corp/*" }

776 ]

777 }

778 ```

779 

780 **Result**:

781 

782 * HTTP server at `https://mcp.company.com/api`: ✅ Allowed (matches URL pattern)

783 * HTTP server at `https://api.internal.corp/mcp`: ✅ Allowed (matches wildcard subdomain)

784 * HTTP server at `https://external.com/mcp`: ❌ Blocked (doesn't match any URL pattern)

785 * Stdio server with any command: ❌ Blocked (no name or command entries to match)

786</Accordion>

787 

725<Accordion title="Example: Command-only allowlist">788<Accordion title="Example: Command-only allowlist">

726 ```json theme={null}789 ```json theme={null}

727 {790 {


779 842 

780* `undefined` (default): No restrictions - users can configure any MCP server843* `undefined` (default): No restrictions - users can configure any MCP server

781* Empty array `[]`: Complete lockdown - users cannot configure any MCP servers844* Empty array `[]`: Complete lockdown - users cannot configure any MCP servers

782* List of entries: Users can only configure servers that match by name or command845* List of entries: Users can only configure servers that match by name, command, or URL pattern

783 846 

784#### Denylist behavior (`deniedMcpServers`)847#### Denylist behavior (`deniedMcpServers`)

785 848 


789 852 

790#### Important notes853#### Important notes

791 854 

792* These restrictions apply to all scopes: user, project, local, and even enterprise servers from `managed-mcp.json`855* **Option 1 and Option 2 can be combined**: If `managed-mcp.json` exists, it has exclusive control and users cannot add servers. Allowlists/denylists still apply to the managed servers themselves.

793* **Denylist takes absolute precedence**: If a server matches a denylist entry (by name or command), it will be blocked even if it's on the allowlist856* **Denylist takes absolute precedence**: If a server matches a denylist entry (by name, command, or URL), it will be blocked even if it's on the allowlist

794* Name-based and command-based restrictions work together: a server passes if it matches **either** a name entry **or** a command entry (unless blocked by denylist)857* Name-based, command-based, and URL-based restrictions work together: a server passes if it matches **either** a name entry, a command entry, or a URL pattern (unless blocked by denylist)

795 858 

796<Note>859<Note>

797 **Enterprise configuration precedence**: The enterprise MCP configuration has the highest precedence and cannot be overridden by user, local, or project configurations.860 **When using `managed-mcp.json`**: Users cannot add MCP servers through `claude mcp add` or configuration files. The `allowedMcpServers` and `deniedMcpServers` settings still apply to filter which managed servers are actually loaded.

798</Note>861</Note>

799 862 

800 863 

memory.md +2 −12

Details

54 54 

55Claude will also discover CLAUDE.md nested in subtrees under your current working directory. Instead of loading them at launch, they are only included when Claude reads files in those subtrees.55Claude will also discover CLAUDE.md nested in subtrees under your current working directory. Instead of loading them at launch, they are only included when Claude reads files in those subtrees.

56 56 

57## Quickly add memories with the `#` shortcut

58 

59The fastest way to add a memory is to start your input with the `#` character:

60 

61```

62# Always use descriptive variable names

63```

64 

65You'll be prompted to select which memory file to store this in.

66 

67## Directly edit memories with `/memory`57## Directly edit memories with `/memory`

68 58 

69Use the `/memory` slash command during a session to open any memory file in your system editor for more extensive additions or organization.59Use the `/memory` slash command during a session to open any memory file in your system editor for more extensive additions or organization.


208 198 

209## Organization-level memory management199## Organization-level memory management

210 200 

211Enterprise organizations can deploy centrally managed CLAUDE.md files that apply to all users.201Organizations can deploy centrally managed CLAUDE.md files that apply to all users.

212 202 

213To set up organization-level memory management:203To set up organization-level memory management:

214 204 

2151. Create the enterprise memory file at the **Enterprise policy** location shown in the [memory types table above](#determine-memory-type).2051. Create the managed memory file at the **Managed policy** location shown in the [memory types table above](#determine-memory-type).

216 206 

2172. Deploy via your configuration management system (MDM, Group Policy, Ansible, etc.) to ensure consistent distribution across all developer machines.2072. Deploy via your configuration management system (MDM, Group Policy, Ansible, etc.) to ensure consistent distribution across all developer machines.

218 208 

Details

67### Common configuration variables67### Common configuration variables

68 68 

69| Environment Variable | Description | Example Values |69| Environment Variable | Description | Example Values |

70| ----------------------------------------------- | --------------------------------------------------------- | ------------------------------------ |70| ----------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------ |

71| `CLAUDE_CODE_ENABLE_TELEMETRY` | Enables telemetry collection (required) | `1` |71| `CLAUDE_CODE_ENABLE_TELEMETRY` | Enables telemetry collection (required) | `1` |

72| `OTEL_METRICS_EXPORTER` | Metrics exporter type(s) (comma-separated) | `console`, `otlp`, `prometheus` |72| `OTEL_METRICS_EXPORTER` | Metrics exporter type(s) (comma-separated) | `console`, `otlp`, `prometheus` |

73| `OTEL_LOGS_EXPORTER` | Logs/events exporter type(s) (comma-separated) | `console`, `otlp` |73| `OTEL_LOGS_EXPORTER` | Logs/events exporter type(s) (comma-separated) | `console`, `otlp` |


83| `OTEL_METRIC_EXPORT_INTERVAL` | Export interval in milliseconds (default: 60000) | `5000`, `60000` |83| `OTEL_METRIC_EXPORT_INTERVAL` | Export interval in milliseconds (default: 60000) | `5000`, `60000` |

84| `OTEL_LOGS_EXPORT_INTERVAL` | Logs export interval in milliseconds (default: 5000) | `1000`, `10000` |84| `OTEL_LOGS_EXPORT_INTERVAL` | Logs export interval in milliseconds (default: 5000) | `1000`, `10000` |

85| `OTEL_LOG_USER_PROMPTS` | Enable logging of user prompt content (default: disabled) | `1` to enable |85| `OTEL_LOG_USER_PROMPTS` | Enable logging of user prompt content (default: disabled) | `1` to enable |

86| `CLAUDE_CODE_OTEL_HEADERS_HELPER_DEBOUNCE_MS` | Interval for refreshing dynamic headers (default: 1740000ms / 29 minutes) | `900000` |

86 87 

87### Metrics cardinality control88### Metrics cardinality control

88 89 


120echo "{\"Authorization\": \"Bearer $(get-token.sh)\", \"X-API-Key\": \"$(get-api-key.sh)\"}"121echo "{\"Authorization\": \"Bearer $(get-token.sh)\", \"X-API-Key\": \"$(get-api-key.sh)\"}"

121```122```

122 123 

123#### Important limitations124#### Refresh behavior

124 125 

125**Headers are fetched only at startup, not during runtime.** This is due to OpenTelemetry exporter architecture limitations.126The headers helper script runs at startup and periodically thereafter to support token refresh. By default, the script runs every 29 minutes. Customize the interval with the `CLAUDE_CODE_OTEL_HEADERS_HELPER_DEBOUNCE_MS` environment variable.

126 

127For scenarios requiring frequent token refresh, use an OpenTelemetry Collector as a proxy that can refresh its own headers.

128 127 

129### Multi-team organization support128### Multi-team organization support

130 129 

overview.md +25 −11

Details

10 10 

11**Install Claude Code:**11**Install Claude Code:**

12 12 

13To install Claude Code, use one of the following methods:

14 

13<Tabs>15<Tabs>

14 <Tab title="macOS/Linux">16 <Tab title="Native Install (Recommended)">

17 **macOS, Linux, WSL:**

18 

15 ```bash theme={null}19 ```bash theme={null}

16 curl -fsSL https://claude.ai/install.sh | bash20 curl -fsSL https://claude.ai/install.sh | bash

17 ```21 ```

18 </Tab>

19 22 

20 <Tab title="Homebrew">23 **Windows PowerShell:**

21 ```bash theme={null}

22 brew install --cask claude-code

23 ```

24 </Tab>

25 24 

26 <Tab title="Windows">

27 ```powershell theme={null}25 ```powershell theme={null}

28 irm https://claude.ai/install.ps1 | iex26 irm https://claude.ai/install.ps1 | iex

29 ```27 ```

28 

29 **Windows CMD:**

30 

31 ```batch theme={null}

32 curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd

33 ```

34 </Tab>

35 

36 <Tab title="Homebrew">

37 ```sh theme={null}

38 brew install --cask claude-code

39 ```

30 </Tab>40 </Tab>

31 41 

32 <Tab title="NPM">42 <Tab title="NPM">

33 ```bash theme={null}43 If you have [Node.js 18 or newer installed](https://nodejs.org/en/download/):

44 

45 ```sh theme={null}

34 npm install -g @anthropic-ai/claude-code46 npm install -g @anthropic-ai/claude-code

35 ```47 ```

36 

37 Requires [Node.js 18+](https://nodejs.org/en/download/)

38 </Tab>48 </Tab>

39</Tabs>49</Tabs>

40 50 


88## Additional resources98## Additional resources

89 99 

90<CardGroup>100<CardGroup>

101 <Card title="About Claude Code" icon="sparkles" href="https://claude.com/product/claude-code">

102 Learn more about Claude Code on claude.com

103 </Card>

104 

91 <Card title="Build with the Agent SDK" icon="code-branch" href="https://docs.claude.com/en/docs/agent-sdk/overview">105 <Card title="Build with the Agent SDK" icon="code-branch" href="https://docs.claude.com/en/docs/agent-sdk/overview">

92 Create custom AI agents with the Claude Agent SDK106 Create custom AI agents with the Claude Agent SDK

93 </Card>107 </Card>

Details

1# Plugin marketplaces1# Create and distribute a plugin marketplace

2 2 

3> Create and manage plugin marketplaces to distribute Claude Code extensions across teams and communities.3> Build and host plugin marketplaces to distribute Claude Code extensions across teams and communities.

4 4 

5Plugin marketplaces are catalogs of available plugins that make it easy to discover, install, and manage Claude Code extensions. This guide shows you how to use existing marketplaces and create your own for team distribution.5A plugin marketplace is a catalog that lets you distribute plugins to others. Marketplaces provide centralized discovery, version tracking, automatic updates, and support for multiple source types (git repositories, local paths, and more). This guide shows you how to create your own marketplace to share plugins with your team or community.

6 6 

7## Overview7Looking to install plugins from an existing marketplace? See [Discover and install prebuilt plugins](/en/discover-plugins).

8 

9A marketplace is a JSON file that lists available plugins and describes where to find them. Marketplaces provide:

10 

11* **Centralized discovery**: Browse plugins from multiple sources in one place

12* **Version management**: Track and update plugin versions automatically

13* **Team distribution**: Share required plugins across your organization

14* **Flexible sources**: Support for git repositories, GitHub repos, local paths, and package managers

15 

16### Prerequisites

17 

18* Claude Code installed and running

19* Basic familiarity with JSON file format

20* For creating marketplaces: Git repository or local development environment

21 

22## Add and use marketplaces

23 

24Add marketplaces using the `/plugin marketplace` commands to access plugins from different sources:

25 

26### Add GitHub marketplaces

27 

28```shell Add a GitHub repository containing .claude-plugin/marketplace.json theme={null}

29/plugin marketplace add owner/repo

30```

31 

32### Add Git repositories

33 

34```shell Add any git repository theme={null}

35/plugin marketplace add https://gitlab.com/company/plugins.git

36```

37 8 

38### Add local marketplaces for development9## Overview

39 

40```shell Add local directory containing .claude-plugin/marketplace.json theme={null}

41/plugin marketplace add ./my-marketplace

42```

43 

44```shell Add direct path to marketplace.json file theme={null}

45/plugin marketplace add ./path/to/marketplace.json

46```

47 10 

48```shell Add remote marketplace.json via URL theme={null}11Creating and distributing a marketplace involves:

49/plugin marketplace add https://url.of/marketplace.json

50```

51 12 

52### Install plugins from marketplaces131. **Creating plugins**: build one or more plugins with commands, agents, hooks, MCP servers, or LSP servers. This guide assumes you already have plugins to distribute; see [Create plugins](/en/plugins) for details on how to create them.

142. **Creating a marketplace file**: define a `marketplace.json` that lists your plugins and where to find them (see [Create the marketplace file](#create-the-marketplace-file)).

153. **Host the marketplace**: push to GitHub, GitLab, or another git host (see [Host and distribute marketplaces](#host-and-distribute-marketplaces)).

164. **Share with users**: users add your marketplace with `/plugin marketplace add` and install individual plugins (see [Discover and install plugins](/en/discover-plugins)).

53 17 

54Once you've added marketplaces, install plugins directly:18Once your marketplace is live, you can update it by pushing changes to your repository. Users refresh their local copy with `/plugin marketplace update`.

55 19 

56```shell Install from any known marketplace theme={null}20## Walkthrough: create a local marketplace

57/plugin install plugin-name@marketplace-name

58```

59 21 

60```shell Browse available plugins interactively theme={null}22This example creates a marketplace with one plugin: a `/review` command for code reviews. You'll create the directory structure, add a slash command, create the plugin manifest and marketplace catalog, then install and test it.

61/plugin

62```

63 23 

64### Verify marketplace installation24<Steps>

25 <Step title="Create the directory structure">

26 ```bash theme={null}

27 mkdir -p my-marketplace/.claude-plugin

28 mkdir -p my-marketplace/plugins/review-plugin/.claude-plugin

29 mkdir -p my-marketplace/plugins/review-plugin/commands

30 ```

31 </Step>

65 32 

66After adding a marketplace:33 <Step title="Create the plugin command">

34 Create a Markdown file that defines what the `/review` command does.

67 35 

681. **List marketplaces**: Run `/plugin marketplace list` to confirm it's added36 ```markdown my-marketplace/plugins/review-plugin/commands/review.md theme={null}

692. **Browse plugins**: Use `/plugin` to see available plugins from your marketplace37 Review the code I've selected or the recent changes for:

703. **Test installation**: Try installing a plugin to verify the marketplace works correctly38 - Potential bugs or edge cases

39 - Security concerns

40 - Performance issues

41 - Readability improvements

71 42 

72### Example plugin marketplace43 Be concise and actionable.

44 ```

45 </Step>

73 46 

74Claude Code maintains a marketplace of [demo plugins](https://github.com/anthropics/claude-code/tree/main/plugins). These plugins are examples of what's possible with the plugin system.47 <Step title="Create the plugin manifest">

48 Create a `plugin.json` file that describes the plugin. The manifest goes in the `.claude-plugin/` directory.

75 49 

76```shell Add the marketplace theme={null}50 ```json my-marketplace/plugins/review-plugin/.claude-plugin/plugin.json theme={null}

77/plugin marketplace add anthropics/claude-code51 {

78```52 "name": "review-plugin",

79 53 "description": "Adds a /review command for quick code reviews",

80## Configure team marketplaces54 "version": "1.0.0"

55 }

56 ```

57 </Step>

81 58 

82Set up automatic marketplace installation for team projects by specifying required marketplaces in `.claude/settings.json`:59 <Step title="Create the marketplace file">

60 Create the marketplace catalog that lists your plugin.

83 61 

84```json theme={null}62 ```json my-marketplace/.claude-plugin/marketplace.json theme={null}

85{63 {

86 "extraKnownMarketplaces": {64 "name": "my-plugins",

87 "team-tools": {65 "owner": {

88 "source": {66 "name": "Your Name"

89 "source": "github",

90 "repo": "your-org/claude-plugins"

91 }

92 },67 },

93 "project-specific": {68 "plugins": [

94 "source": {69 {

95 "source": "git",70 "name": "review-plugin",

96 "url": "https://git.company.com/project-plugins.git"71 "source": "./plugins/review-plugin",

97 }72 "description": "Adds a /review command for quick code reviews"

98 }73 }

74 ]

99 }75 }

100}76 ```

101```77 </Step>

78 

79 <Step title="Add and install">

80 Add the marketplace and install the plugin.

81 

82 ```shell theme={null}

83 /plugin marketplace add ./my-marketplace

84 /plugin install review-plugin@my-plugins

85 ```

86 </Step>

102 87 

103When team members trust the repository folder, Claude Code automatically installs these marketplaces and any plugins specified in the `enabledPlugins` field.88 <Step title="Try it out">

89 Select some code in your editor and run your new command.

104 90 

105***91 ```shell theme={null}

92 /review

93 ```

94 </Step>

95</Steps>

106 96 

107## Create your own marketplace97To learn more about what plugins can do, including hooks, agents, MCP servers, and LSP servers, see [Plugins](/en/plugins).

108 98 

109Build and distribute custom plugin collections for your team or community.99<Note>

100 **How plugins are installed**: When users install a plugin, Claude Code copies the plugin directory to a cache location. This means plugins can't reference files outside their directory using paths like `../shared-utils`, because those files won't be copied.

110 101 

111### Prerequisites for marketplace creation102 If you need to share files across plugins, use symlinks (which are followed during copying) or restructure your marketplace so the shared directory is inside the plugin source path. See [Plugin caching and file resolution](/en/plugins-reference#plugin-caching-and-file-resolution) for details.

103</Note>

112 104 

113* Git repository (GitHub, GitLab, or other git hosting)105## Create the marketplace file

114* Understanding of JSON file format

115* One or more plugins to distribute

116 106 

117### Create the marketplace file107Create `.claude-plugin/marketplace.json` in your repository root. This file defines your marketplace's name, owner information, and a list of plugins with their sources.

118 108 

119Create `.claude-plugin/marketplace.json` in your repository root:109Each plugin entry needs at minimum a `name` and `source` (where to fetch it from). See the [full schema](#marketplace-schema) below for all available fields.

120 110 

121```json theme={null}111```json theme={null}

122{112{

123 "name": "company-tools",113 "name": "company-tools",

124 "owner": {114 "owner": {

125 "name": "DevTools Team",115 "name": "DevTools Team",

126 "email": "devtools@company.com"116 "email": "devtools@example.com"

127 },117 },

128 "plugins": [118 "plugins": [

129 {119 {


147}137}

148```138```

149 139 

150### Marketplace schema140## Marketplace schema

151 141 

152#### Required fields142### Required fields

153 143 

154| Field | Type | Description |144| Field | Type | Description | Example |

155| :-------- | :----- | :--------------------------------------------- |145| :-------- | :----- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------- |

156| `name` | string | Marketplace identifier (kebab-case, no spaces) |146| `name` | string | Marketplace identifier (kebab-case, no spaces). This is public-facing: users see it when installing plugins (for example, `/plugin install my-tool@your-marketplace`). | `"acme-tools"` |

157| `owner` | object | Marketplace maintainer information |147| `owner` | object | Marketplace maintainer information ([see fields below](#owner-fields)) | |

158| `plugins` | array | List of available plugins |148| `plugins` | array | List of available plugins | See below |

159 149 

160#### Optional metadata150<Note>

151 **Reserved names**: The following marketplace names are reserved for official Anthropic use and cannot be used by third-party marketplaces: `claude-code-marketplace`, `claude-code-plugins`, `claude-plugins-official`, `anthropic-marketplace`, `anthropic-plugins`, `agent-skills`, `life-sciences`. Names that impersonate official marketplaces (like `official-claude-plugins` or `anthropic-tools-v2`) are also blocked.

152</Note>

153 

154### Owner fields

155 

156| Field | Type | Required | Description |

157| :------ | :----- | :------- | :------------------------------- |

158| `name` | string | Yes | Name of the maintainer or team |

159| `email` | string | No | Contact email for the maintainer |

160 

161### Optional metadata

161 162 

162| Field | Type | Description |163| Field | Type | Description |

163| :--------------------- | :----- | :------------------------------------ |164| :--------------------- | :----- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |

164| `metadata.description` | string | Brief marketplace description |165| `metadata.description` | string | Brief marketplace description |

165| `metadata.version` | string | Marketplace version |166| `metadata.version` | string | Marketplace version |

166| `metadata.pluginRoot` | string | Base path for relative plugin sources |167| `metadata.pluginRoot` | string | Base directory prepended to relative plugin source paths (for example, `"./plugins"` lets you write `"source": "formatter"` instead of `"source": "./plugins/formatter"`) |

167 168 

168### Plugin entries169## Plugin entries

169 170 

170<Note>171Each plugin entry in the `plugins` array describes a plugin and where to find it. You can include any field from the [plugin manifest schema](/en/plugins-reference#plugin-manifest-schema) (like `description`, `version`, `author`, `commands`, `hooks`, etc.), plus these marketplace-specific fields: `source`, `category`, `tags`, and `strict`.

171 Plugin entries are based on the *plugin manifest schema* (with all fields made

172 optional) plus marketplace-specific fields (`source`, `category`, `tags`,

173 `strict`), with `name` being required.

174</Note>

175 172 

176**Required fields:**173### Required fields

177 174 

178| Field | Type | Description |175| Field | Type | Description |

179| :------- | :------------- | :---------------------------------------- |176| :------- | :------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------- |

180| `name` | string | Plugin identifier (kebab-case, no spaces) |177| `name` | string | Plugin identifier (kebab-case, no spaces). This is public-facing: users see it when installing (for example, `/plugin install my-plugin@marketplace`). |

181| `source` | string\|object | Where to fetch the plugin from |178| `source` | string\|object | Where to fetch the plugin from (see [Plugin sources](#plugin-sources) below) |

182 179 

183#### Optional plugin fields180### Optional plugin fields

184 181 

185**Standard metadata fields:**182**Standard metadata fields:**

186 183 

187| Field | Type | Description |184| Field | Type | Description |

188| :------------ | :------ | :---------------------------------------------------------------- |185| :------------ | :------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

189| `description` | string | Brief plugin description |186| `description` | string | Brief plugin description |

190| `version` | string | Plugin version |187| `version` | string | Plugin version |

191| `author` | object | Plugin author information |188| `author` | object | Plugin author information (`name` required, `email` optional) |

192| `homepage` | string | Plugin homepage or documentation URL |189| `homepage` | string | Plugin homepage or documentation URL |

193| `repository` | string | Source code repository URL |190| `repository` | string | Source code repository URL |

194| `license` | string | SPDX license identifier (for example, MIT, Apache-2.0) |191| `license` | string | SPDX license identifier (for example, MIT, Apache-2.0) |

195| `keywords` | array | Tags for plugin discovery and categorization |192| `keywords` | array | Tags for plugin discovery and categorization |

196| `category` | string | Plugin category for organization |193| `category` | string | Plugin category for organization |

197| `tags` | array | Tags for searchability |194| `tags` | array | Tags for searchability |

198| `strict` | boolean | Require plugin.json in plugin folder (default: true) <sup>1</sup> |195| `strict` | boolean | Controls whether plugins need their own `plugin.json` file. When `true` (default), the plugin source must contain a `plugin.json`, and any fields you add here in the marketplace entry get merged with it. When `false`, the plugin doesn't need its own `plugin.json`; the marketplace entry itself defines everything about the plugin. Use `false` when you want to define simple plugins entirely in your marketplace file. |

199 196 

200**Component configuration fields:**197**Component configuration fields:**

201 198 


205| `agents` | string\|array | Custom paths to agent files |202| `agents` | string\|array | Custom paths to agent files |

206| `hooks` | string\|object | Custom hooks configuration or path to hooks file |203| `hooks` | string\|object | Custom hooks configuration or path to hooks file |

207| `mcpServers` | string\|object | MCP server configurations or path to MCP config |204| `mcpServers` | string\|object | MCP server configurations or path to MCP config |

205| `lspServers` | string\|object | LSP server configurations or path to LSP config |

208 206 

209*<sup>1 - When `strict: true` (default), the plugin must include a `plugin.json` manifest file, and marketplace fields supplement those values. When `strict: false`, the plugin.json is optional. If it's missing, the marketplace entry serves as the complete plugin manifest.</sup>*207## Plugin sources

210 

211### Plugin sources

212 208 

213#### Relative paths209### Relative paths

214 210 

215For plugins in the same repository:211For plugins in the same repository:

216 212 


221}217}

222```218```

223 219 

224#### GitHub repositories220### GitHub repositories

225 221 

226```json theme={null}222```json theme={null}

227{223{


233}229}

234```230```

235 231 

236#### Git repositories232### Git repositories

237 233 

238```json theme={null}234```json theme={null}

239{235{


245}241}

246```242```

247 243 

248#### Advanced plugin entries244### Advanced plugin entries

249 245 

250Plugin entries can override default component locations and provide additional metadata. Note that `${CLAUDE_PLUGIN_ROOT}` is an environment variable that resolves to the plugin's installation directory (for details see [Environment variables](/en/plugins-reference#environment-variables)):246This example shows a plugin entry using many of the optional fields, including custom paths for commands, agents, hooks, and MCP servers:

251 247 

252```json theme={null}248```json theme={null}

253{249{


260 "version": "2.1.0",256 "version": "2.1.0",

261 "author": {257 "author": {

262 "name": "Enterprise Team",258 "name": "Enterprise Team",

263 "email": "enterprise@company.com"259 "email": "enterprise@example.com"

264 },260 },

265 "homepage": "https://docs.company.com/plugins/enterprise-tools",261 "homepage": "https://docs.example.com/plugins/enterprise-tools",

266 "repository": "https://github.com/company/enterprise-plugin",262 "repository": "https://github.com/company/enterprise-plugin",

267 "license": "MIT",263 "license": "MIT",

268 "keywords": ["enterprise", "workflow", "automation"],264 "keywords": ["enterprise", "workflow", "automation"],


296}292}

297```293```

298 294 

299<Note>295Key things to notice:

300 **Schema relationship**: Plugin entries use the plugin manifest schema with

301 all fields made optional, plus marketplace-specific fields (`source`,

302 `strict`, `category`, `tags`). This means any field valid in a `plugin.json`

303 file can also be used in a marketplace entry. When `strict: false`, the

304 marketplace entry serves as the complete plugin manifest if no `plugin.json`

305 exists. When `strict: true` (default), marketplace fields supplement the

306 plugin's own manifest file.

307</Note>

308 296 

309***297* **`commands` and `agents`**: You can specify multiple directories or individual files. Paths are relative to the plugin root.

298* **`${CLAUDE_PLUGIN_ROOT}`**: Use this variable in hooks and MCP server configs to reference files within the plugin's installation directory. This is necessary because plugins are copied to a cache location when installed.

299* **`strict: false`**: Since this is set to false, the plugin doesn't need its own `plugin.json`. The marketplace entry defines everything.

310 300 

311## Host and distribute marketplaces301## Host and distribute marketplaces

312 302 

313Choose the best hosting strategy for your plugin distribution needs.

314 

315### Host on GitHub (recommended)303### Host on GitHub (recommended)

316 304 

317GitHub provides the easiest distribution method:305GitHub provides the easiest distribution method:

318 306 

3191. **Create a repository**: Set up a new repository for your marketplace3071. **Create a repository**: Set up a new repository for your marketplace

3202. **Add marketplace file**: Create `.claude-plugin/marketplace.json` with your plugin definitions3082. **Add marketplace file**: Create `.claude-plugin/marketplace.json` with your plugin definitions

3213. **Share with teams**: Team members add with `/plugin marketplace add owner/repo`3093. **Share with teams**: Users add your marketplace with `/plugin marketplace add owner/repo`

322 310 

323**Benefits**: Built-in version control, issue tracking, and team collaboration features.311**Benefits**: Built-in version control, issue tracking, and team collaboration features.

324 312 

325### Host on other git services313### Host on other git services

326 314 

327Any git hosting service works for marketplace distribution, using a URL to an arbitrary git repository.315Any git hosting service works, such as GitLab, Bitbucket, and self-hosted servers. Users add with the full repository URL:

328 

329For example, using GitLab:

330 316 

331```shell theme={null}317```shell theme={null}

332/plugin marketplace add https://gitlab.com/company/plugins.git318/plugin marketplace add https://gitlab.com/company/plugins.git

333```319```

334 320 

335### Use local marketplaces for development321### Test locally before distribution

336 322 

337Test your marketplace locally before distribution:323Test your marketplace locally before sharing:

338 324 

339```shell Add local marketplace for testing theme={null}325```shell theme={null}

340/plugin marketplace add ./my-local-marketplace326/plugin marketplace add ./my-local-marketplace

341```

342 

343```shell Test plugin installation theme={null}

344/plugin install test-plugin@my-local-marketplace327/plugin install test-plugin@my-local-marketplace

345```328```

346 329 

347## Manage marketplace operations330For the full range of add commands (GitHub, Git URLs, local paths, remote URLs), see [Add marketplaces](/en/discover-plugins#add-marketplaces).

348 331 

349### List known marketplaces332### Require marketplaces for your team

350 333 

351```shell List all configured marketplaces theme={null}334You can configure your repository so team members are automatically prompted to install your marketplace when they trust the project folder. Add your marketplace to `.claude/settings.json`:

352/plugin marketplace list

353```

354 335 

355Shows all configured marketplaces with their sources and status.336```json theme={null}

337{

338 "extraKnownMarketplaces": {

339 "company-tools": {

340 "source": {

341 "source": "github",

342 "repo": "your-org/claude-plugins"

343 }

344 }

345 }

346}

347```

356 348 

357### Update marketplace metadata349You can also specify which plugins should be enabled by default:

358 350 

359```shell Refresh marketplace metadata theme={null}351```json theme={null}

360/plugin marketplace update marketplace-name352{

353 "enabledPlugins": {

354 "code-formatter@company-tools": true,

355 "deployment-tools@company-tools": true

356 }

357}

361```358```

362 359 

363Refreshes plugin listings and metadata from the marketplace source.360For full configuration options, see [Plugin settings](/en/settings#plugin-settings).

364 361 

365### Remove a marketplace362### Managed marketplace restrictions

366 363 

367```shell Remove a marketplace theme={null}364For organizations requiring strict control over plugin sources, administrators can restrict which plugin marketplaces users are allowed to add using the [`strictKnownMarketplaces`](/en/settings#strictknownmarketplaces) setting in managed settings.

368/plugin marketplace remove marketplace-name

369```

370 365 

371Removes the marketplace from your configuration.366When `strictKnownMarketplaces` is configured in managed settings, the restriction behavior depends on the value:

372 367 

373<Warning>368| Value | Behavior |

374 Removing a marketplace will uninstall any plugins you installed from it.369| ------------------- | ---------------------------------------------------------------- |

375</Warning>370| Undefined (default) | No restrictions. Users can add any marketplace |

371| Empty array `[]` | Complete lockdown. Users cannot add any new marketplaces |

372| List of sources | Users can only add marketplaces that match the allowlist exactly |

376 373 

377***374#### Common configurations

378 375 

379## Troubleshooting marketplaces376Disable all marketplace additions:

380 377 

381### Common marketplace issues378```json theme={null}

379{

380 "strictKnownMarketplaces": []

381}

382```

382 383 

383#### Marketplace not loading384Allow specific marketplaces only:

384 385 

385**Symptoms**: Can't add marketplace or see plugins from it386```json theme={null}

387{

388 "strictKnownMarketplaces": [

389 {

390 "source": "github",

391 "repo": "acme-corp/approved-plugins"

392 },

393 {

394 "source": "github",

395 "repo": "acme-corp/security-tools",

396 "ref": "v2.0"

397 },

398 {

399 "source": "url",

400 "url": "https://plugins.example.com/marketplace.json"

401 }

402 ]

403}

404```

386 405 

387**Solutions**:406#### How restrictions work

388 407 

389* Verify the marketplace URL is accessible408Restrictions are validated early in the plugin installation process, before any network requests or filesystem operations occur. This prevents unauthorized marketplace access attempts.

390* Check that `.claude-plugin/marketplace.json` exists at the specified path

391* Ensure JSON syntax is valid using `claude plugin validate`

392* For private repositories, confirm you have access permissions

393 409 

394#### Plugin installation failures410The allowlist uses exact matching. For a marketplace to be allowed, all specified fields must match exactly:

395 411 

396**Symptoms**: Marketplace appears but plugin installation fails412* For GitHub sources: `repo` is required, and `ref` or `path` must also match if specified in the allowlist

413* For URL sources: the full URL must match exactly

397 414 

398**Solutions**:415Because `strictKnownMarketplaces` is set in [managed settings](/en/settings#settings-file-locations), individual users and project configurations cannot override these restrictions.

399 416 

400* Verify plugin source URLs are accessible417For complete configuration details including all supported source types and comparison with `extraKnownMarketplaces`, see the [strictKnownMarketplaces reference](/en/settings#strictknownmarketplaces).

401* Check that plugin directories contain required files

402* For GitHub sources, ensure repositories are public or you have access

403* Test plugin sources manually by cloning/downloading

404 418 

405### Validation and testing419## Validation and testing

406 420 

407Test your marketplace before sharing:421Test your marketplace before sharing.

408 422 

409```bash Validate marketplace JSON syntax theme={null}423Validate your marketplace JSON syntax:

424 

425```bash theme={null}

410claude plugin validate .426claude plugin validate .

411```427```

412 428 

413```shell Add marketplace for testing theme={null}429Or from within Claude Code:

430 

431```shell theme={null}

432/plugin validate .

433```

434 

435Add the marketplace for testing:

436 

437```shell theme={null}

414/plugin marketplace add ./path/to/marketplace438/plugin marketplace add ./path/to/marketplace

415```439```

416 440 

417```shell Install test plugin theme={null}441Install a test plugin to verify everything works:

442 

443```shell theme={null}

418/plugin install test-plugin@marketplace-name444/plugin install test-plugin@marketplace-name

419```445```

420 446 

421For complete plugin testing workflows, see [Test your plugins locally](/en/plugins#test-your-plugins-locally). For technical troubleshooting, see [Plugins reference](/en/plugins-reference).447For complete plugin testing workflows, see [Test your plugins locally](/en/plugins#test-your-plugins-locally). For technical troubleshooting, see [Plugins reference](/en/plugins-reference).

422 448 

423***449## Troubleshooting

450 

451### Marketplace not loading

452 

453**Symptoms**: Can't add marketplace or see plugins from it

454 

455**Solutions**:

456 

457* Verify the marketplace URL is accessible

458* Check that `.claude-plugin/marketplace.json` exists at the specified path

459* Ensure JSON syntax is valid using `claude plugin validate` or `/plugin validate`

460* For private repositories, confirm you have access permissions

461 

462### Marketplace validation errors

463 

464Run `claude plugin validate .` or `/plugin validate .` from your marketplace directory to check for issues. Common errors:

465 

466| Error | Cause | Solution |

467| :------------------------------------------------ | :------------------------------ | :------------------------------------------------------------ |

468| `File not found: .claude-plugin/marketplace.json` | Missing manifest | Create `.claude-plugin/marketplace.json` with required fields |

469| `Invalid JSON syntax: Unexpected token...` | JSON syntax error | Check for missing commas, extra commas, or unquoted strings |

470| `Duplicate plugin name "x" found in marketplace` | Two plugins share the same name | Give each plugin a unique `name` value |

471| `plugins[0].source: Path traversal not allowed` | Source path contains `..` | Use paths relative to marketplace root without `..` |

472 

473**Warnings** (non-blocking):

474 

475* `Marketplace has no plugins defined`: add at least one plugin to the `plugins` array

476* `No marketplace description provided`: add `metadata.description` to help users understand your marketplace

477* `Plugin "x" uses npm source which is not yet fully implemented`: use `github` or local path sources instead

424 478 

425## Next steps479### Plugin installation failures

426 480 

427### For marketplace users481**Symptoms**: Marketplace appears but plugin installation fails

482 

483**Solutions**:

484 

485* Verify plugin source URLs are accessible

486* Check that plugin directories contain required files

487* For GitHub sources, ensure repositories are public or you have access

488* Test plugin sources manually by cloning/downloading

428 489 

429* **Discover community marketplaces**: Search GitHub for Claude Code plugin collections490### Files not found after installation

430* **Contribute feedback**: Report issues and suggest improvements to marketplace maintainers

431* **Share useful marketplaces**: Help your team discover valuable plugin collections

432 491 

433### For marketplace creators492**Symptoms**: Plugin installs but references to files fail, especially files outside the plugin directory

434 493 

435* **Build plugin collections**: Create themed marketplace around specific use cases494**Cause**: Plugins are copied to a cache directory rather than used in-place. Paths that reference files outside the plugin's directory (such as `../shared-utils`) won't work because those files aren't copied.

436* **Establish versioning**: Implement clear versioning and update policies

437* **Community engagement**: Gather feedback and maintain active marketplace communities

438* **Documentation**: Provide clear README files explaining your marketplace contents

439 495 

440### For organizations496**Solutions**: See [Plugin caching and file resolution](/en/plugins-reference#plugin-caching-and-file-resolution) for workarounds including symlinks and directory restructuring.

441 497 

442* **Private marketplaces**: Set up internal marketplaces for proprietary tools498For additional debugging tools and common issues, see [Debugging and development tools](/en/plugins-reference#debugging-and-development-tools).

443* **Governance policies**: Establish guidelines for plugin approval and security review

444* **Training resources**: Help teams discover and adopt useful plugins effectively

445 499 

446## See also500## See also

447 501 

448* [Plugins](/en/plugins) - Installing and using plugins502* [Discover and install prebuilt plugins](/en/discover-plugins) - Installing plugins from existing marketplaces

503* [Plugins](/en/plugins) - Creating your own plugins

449* [Plugins reference](/en/plugins-reference) - Complete technical specifications and schemas504* [Plugins reference](/en/plugins-reference) - Complete technical specifications and schemas

450* [Plugin development](/en/plugins#develop-more-complex-plugins) - Creating your own plugins505* [Plugin settings](/en/settings#plugin-settings) - Plugin configuration options

451* [Settings](/en/settings#plugin-configuration) - Plugin configuration options506* [strictKnownMarketplaces reference](/en/settings#strictknownmarketplaces) - Managed marketplace restrictions

452 507 

453 508 

454---509---

plugins.md +268 −251

Details

1# Plugins1# Create plugins

2 2 

3> Extend Claude Code with custom commands, agents, hooks, Skills, and MCP servers through the plugin system.3> Create custom plugins to extend Claude Code with slash commands, agents, hooks, Skills, and MCP servers.

4 

5Plugins let you extend Claude Code with custom functionality that can be shared across projects and teams. This guide covers creating your own plugins with slash commands, agents, Skills, hooks, and MCP servers.

6 

7Looking to install existing plugins? See [Discover and install plugins](/en/discover-plugins). For complete technical specifications, see [Plugins reference](/en/plugins-reference).

8 

9## When to use plugins vs standalone configuration

10 

11Claude Code supports two ways to add custom slash commands, agents, and hooks:

12 

13| Approach | Slash command names | Best for |

14| :---------------------------------------------------------- | :------------------- | :---------------------------------------------------------------------------------------------- |

15| **Standalone** (`.claude/` directory) | `/hello` | Personal workflows, project-specific customizations, quick experiments |

16| **Plugins** (directories with `.claude-plugin/plugin.json`) | `/plugin-name:hello` | Sharing with teammates, distributing to community, versioned releases, reusable across projects |

17 

18**Use standalone configuration when**:

19 

20* You're customizing Claude Code for a single project

21* The configuration is personal and doesn't need to be shared

22* You're experimenting with slash commands or hooks before packaging them

23* You want short slash command names like `/hello` or `/review`

24 

25**Use plugins when**:

26 

27* You want to share functionality with your team or community

28* You need the same slash commands/agents across multiple projects

29* You want version control and easy updates for your extensions

30* You're distributing through a marketplace

31* You're okay with namespaced slash commands like `/my-plugin:hello` (namespacing prevents conflicts between plugins)

4 32 

5<Tip>33<Tip>

6 For complete technical specifications and schemas, see [Plugins reference](/en/plugins-reference). For marketplace management, see [Plugin marketplaces](/en/plugin-marketplaces).34 Start with standalone configuration in `.claude/` for quick iteration, then [convert to a plugin](#convert-existing-configurations-to-plugins) when you're ready to share.

7</Tip>35</Tip>

8 36 

9Plugins let you extend Claude Code with custom functionality that can be shared across projects and teams. Install plugins from [marketplaces](/en/plugin-marketplaces) to add pre-built commands, agents, hooks, Skills, and MCP servers, or create your own to automate your workflows.

10 

11## Quickstart37## Quickstart

12 38 

13Let's create a simple greeting plugin to get you familiar with the plugin system. We'll build a working plugin that adds a custom command, test it locally, and understand the core concepts.39This quickstart walks you through creating a plugin with a custom slash command. You'll create a manifest (the configuration file that defines your plugin), add a slash command, and test it locally using the `--plugin-dir` flag.

14 40 

15### Prerequisites41### Prerequisites

16 42 

17* Claude Code installed on your machine43* Claude Code [installed and authenticated](/en/quickstart#step-1-install-claude-code)

18* Basic familiarity with command-line tools44* Claude Code version 1.0.33 or later (run `claude --version` to check)

45 

46<Note>

47 If you don't see the `/plugin` command, update Claude Code to the latest version. See [Troubleshooting](/en/troubleshooting) for upgrade instructions.

48</Note>

19 49 

20### Create your first plugin50### Create your first plugin

21 51 

22<Steps>52<Steps>

23 <Step title="Create the marketplace structure">

24 ```bash theme={null}

25 mkdir test-marketplace

26 cd test-marketplace

27 ```

28 </Step>

29 

30 <Step title="Create the plugin directory">53 <Step title="Create the plugin directory">

54 Every plugin lives in its own directory containing a manifest and your custom commands, agents, or hooks. Create one now:

55 

31 ```bash theme={null}56 ```bash theme={null}

32 mkdir my-first-plugin57 mkdir my-first-plugin

33 cd my-first-plugin

34 ```58 ```

35 </Step>59 </Step>

36 60 

37 <Step title="Create the plugin manifest">61 <Step title="Create the plugin manifest">

38 ```bash Create .claude-plugin/plugin.json theme={null}62 The manifest file at `.claude-plugin/plugin.json` defines your plugin's identity: its name, description, and version. Claude Code uses this metadata to display your plugin in the plugin manager.

39 mkdir .claude-plugin63 

40 cat > .claude-plugin/plugin.json << 'EOF'64 Create the `.claude-plugin` directory inside your plugin folder:

65 

66 ```bash theme={null}

67 mkdir my-first-plugin/.claude-plugin

68 ```

69 

70 Then create `my-first-plugin/.claude-plugin/plugin.json` with this content:

71 

72 ```json my-first-plugin/.claude-plugin/plugin.json theme={null}

41 {73 {

42 "name": "my-first-plugin",74 "name": "my-first-plugin",

43 "description": "A simple greeting plugin to learn the basics",75 "description": "A greeting plugin to learn the basics",

44 "version": "1.0.0",76 "version": "1.0.0",

45 "author": {77 "author": {

46 "name": "Your Name"78 "name": "Your Name"

47 }79 }

48 }80 }

49 EOF

50 ```81 ```

82 

83 | Field | Purpose |

84 | :------------ | :--------------------------------------------------------------------------------------------------------------------- |

85 | `name` | Unique identifier and slash command namespace. Slash commands are prefixed with this (e.g., `/my-first-plugin:hello`). |

86 | `description` | Shown in the plugin manager when browsing or installing plugins. |

87 | `version` | Track releases using [semantic versioning](/en/plugins-reference#version-management). |

88 | `author` | Optional. Helpful for attribution. |

89 

90 For additional fields like `homepage`, `repository`, and `license`, see the [full manifest schema](/en/plugins-reference#plugin-manifest-schema).

51 </Step>91 </Step>

52 92 

53 <Step title="Add a custom command">93 <Step title="Add a slash command">

54 ```bash Create commands/hello.md theme={null}94 Slash commands are Markdown files in the `commands/` directory. The filename becomes the slash command name, prefixed with the plugin's namespace (`hello.md` in a plugin named `my-first-plugin` creates `/my-first-plugin:hello`). The Markdown content tells Claude how to respond when someone runs the slash command.

55 mkdir commands95 

56 cat > commands/hello.md << 'EOF'96 Create a `commands` directory in your plugin folder:

97 

98 ```bash theme={null}

99 mkdir my-first-plugin/commands

100 ```

101 

102 Then create `my-first-plugin/commands/hello.md` with this content:

103 

104 ```markdown my-first-plugin/commands/hello.md theme={null}

57 ---105 ---

58 description: Greet the user with a personalized message106 description: Greet the user with a friendly message

59 ---107 ---

60 108 

61 # Hello Command109 # Hello Command

62 110 

63 Greet the user warmly and ask how you can help them today. Make the greeting personal and encouraging.111 Greet the user warmly and ask how you can help them today.

64 EOF

65 ```112 ```

66 </Step>113 </Step>

67 114 

68 <Step title="Create the marketplace manifest">115 <Step title="Test your plugin">

69 ```bash Create marketplace.json theme={null}116 Run Claude Code with the `--plugin-dir` flag to load your plugin:

70 cd ..

71 mkdir .claude-plugin

72 cat > .claude-plugin/marketplace.json << 'EOF'

73 {

74 "name": "test-marketplace",

75 "owner": {

76 "name": "Test User"

77 },

78 "plugins": [

79 {

80 "name": "my-first-plugin",

81 "source": "./my-first-plugin",

82 "description": "My first test plugin"

83 }

84 ]

85 }

86 EOF

87 ```

88 </Step>

89 117 

90 <Step title="Install and test your plugin">118 ```bash theme={null}

91 ```bash Start Claude Code from parent directory theme={null}119 claude --plugin-dir ./my-first-plugin

92 cd ..

93 claude

94 ```120 ```

95 121 

96 ```shell Add the test marketplace theme={null}122 Once Claude Code starts, try your new command:

97 /plugin marketplace add ./test-marketplace123 

124 ```shell theme={null}

125 /my-first-plugin:hello

98 ```126 ```

99 127 

100 ```shell Install your plugin theme={null}128 You'll see Claude respond with a greeting. Run `/help` to see your command listed under the plugin namespace.

101 /plugin install my-first-plugin@test-marketplace129 

130 <Note>

131 **Why namespacing?** Plugin slash commands are always namespaced (like `/greet:hello`) to prevent conflicts when multiple plugins have commands with the same name.

132 

133 To change the namespace prefix, update the `name` field in `plugin.json`.

134 </Note>

135 </Step>

136 

137 <Step title="Add slash command arguments">

138 Make your slash command dynamic by accepting user input. The `$ARGUMENTS` placeholder captures any text the user provides after the slash command.

139 

140 Update your `hello.md` file:

141 

142 ```markdown my-first-plugin/commands/hello.md theme={null}

143 ---

144 description: Greet the user with a personalized message

145 ---

146 

147 # Hello Command

148 

149 Greet the user named "$ARGUMENTS" warmly and ask how you can help them today. Make the greeting personal and encouraging.

102 ```150 ```

103 151 

104 Select "Install now". You'll then need to restart Claude Code in order to use the new plugin.152 Restart Claude Code to pick up the changes, then try the command with your name:

105 153 

106 ```shell Try your new command theme={null}154 ```shell theme={null}

107 /hello155 /my-first-plugin:hello Alex

108 ```156 ```

109 157 

110 You'll see Claude use your greeting command! Check `/help` to see your new command listed.158 Claude will greet you by name. For more argument options like `$1`, `$2` for individual parameters, see [Slash commands](/en/slash-commands).

111 </Step>159 </Step>

112</Steps>160</Steps>

113 161 

114You've successfully created and tested a plugin with these key components:162You've successfully created and tested a plugin with these key components:

115 163 

116* **Plugin manifest** (`.claude-plugin/plugin.json`) - Describes your plugin's metadata164* **Plugin manifest** (`.claude-plugin/plugin.json`): describes your plugin's metadata

117* **Commands directory** (`commands/`) - Contains your custom slash commands165* **Commands directory** (`commands/`): contains your custom slash commands

118* **Test marketplace** - Allows you to test your plugin locally166* **Command arguments** (`$ARGUMENTS`): captures user input for dynamic behavior

119 167 

120### Plugin structure overview168<Tip>

169 The `--plugin-dir` flag is useful for development and testing. When you're ready to share your plugin with others, see [Create and distribute a plugin marketplace](/en/plugin-marketplaces).

170</Tip>

121 171 

122Your plugin follows this basic structure:172## Plugin structure overview

123 173 

124```174You've created a plugin with a slash command, but plugins can include much more: custom agents, Skills, hooks, MCP servers, and LSP servers.

125my-first-plugin/

126├── .claude-plugin/

127│ └── plugin.json # Plugin metadata

128├── commands/ # Custom slash commands (optional)

129│ └── hello.md

130├── agents/ # Custom agents (optional)

131│ └── helper.md

132├── skills/ # Agent Skills (optional)

133│ └── my-skill/

134│ └── SKILL.md

135└── hooks/ # Event handlers (optional)

136 └── hooks.json

137```

138 175 

139**Additional components you can add:**176<Warning>

177 **Common mistake**: Don't put `commands/`, `agents/`, `skills/`, or `hooks/` inside the `.claude-plugin/` directory. Only `plugin.json` goes inside `.claude-plugin/`. All other directories must be at the plugin root level.

178</Warning>

140 179 

141* **Commands**: Create markdown files in `commands/` directory180| Directory | Location | Purpose |

142* **Agents**: Create agent definitions in `agents/` directory181| :---------------- | :---------- | :---------------------------------------------- |

143* **Skills**: Create `SKILL.md` files in `skills/` directory182| `.claude-plugin/` | Plugin root | Contains only `plugin.json` manifest (required) |

144* **Hooks**: Create `hooks/hooks.json` for event handling183| `commands/` | Plugin root | Slash commands as Markdown files |

145* **MCP servers**: Create `.mcp.json` for external tool integration184| `agents/` | Plugin root | Custom agent definitions |

185| `skills/` | Plugin root | Agent Skills with `SKILL.md` files |

186| `hooks/` | Plugin root | Event handlers in `hooks.json` |

187| `.mcp.json` | Plugin root | MCP server configurations |

188| `.lsp.json` | Plugin root | LSP server configurations for code intelligence |

146 189 

147<Note>190<Note>

148 **Next steps**: Ready to add more features? Jump to [Develop more complex plugins](#develop-more-complex-plugins) to add agents, hooks, and MCP servers. For complete technical specifications of all plugin components, see [Plugins reference](/en/plugins-reference).191 **Next steps**: Ready to add more features? Jump to [Develop more complex plugins](#develop-more-complex-plugins) to add agents, hooks, MCP servers, and LSP servers. For complete technical specifications of all plugin components, see [Plugins reference](/en/plugins-reference).

149</Note>192</Note>

150 193 

151***194## Develop more complex plugins

152 

153## Install and manage plugins

154 

155Learn how to discover, install, and manage plugins to extend your Claude Code capabilities.

156 195 

157### Prerequisites196Once you're comfortable with basic plugins, you can create more sophisticated extensions.

158 197 

159* Claude Code installed and running198### Add Skills to your plugin

160* Basic familiarity with command-line interfaces

161 199 

162### Add marketplaces200Plugins can include [Agent Skills](/en/skills) to extend Claude's capabilities. Skills are model-invoked: Claude automatically uses them based on the task context.

163 201 

164Marketplaces are catalogs of available plugins. Add them to discover and install plugins:202Add a `skills/` directory at your plugin root with Skill folders containing `SKILL.md` files:

165 203 

166```shell Add a marketplace theme={null}

167/plugin marketplace add your-org/claude-plugins

168```204```

169 205my-plugin/

170```shell Browse available plugins theme={null}206├── .claude-plugin/

171/plugin207│ └── plugin.json

208└── skills/

209 └── code-review/

210 └── SKILL.md

172```211```

173 212 

174For detailed marketplace management including Git repositories, local development, and team distribution, see [Plugin marketplaces](/en/plugin-marketplaces).213Each `SKILL.md` needs frontmatter with `name` and `description` fields, followed by instructions:

175 214 

176### Install plugins215```yaml theme={null}

177 216---

178#### Via interactive menu (recommended for discovery)217name: code-review

218description: Reviews code for best practices and potential issues. Use when reviewing code, checking PRs, or analyzing code quality.

219---

179 220 

180```shell Open the plugin management interface theme={null}221When reviewing code, check for:

181/plugin2221. Code organization and structure

2232. Error handling

2243. Security concerns

2254. Test coverage

182```226```

183 227 

184Select "Browse Plugins" to see available options with descriptions, features, and installation options.228After installing the plugin, restart Claude Code to load the Skills. For complete Skill authoring guidance including progressive disclosure and tool restrictions, see [Agent Skills](/en/skills).

185 229 

186#### Via direct commands (for quick installation)230### Add LSP servers to your plugin

187 231 

188```shell Install a specific plugin theme={null}232<Tip>

189/plugin install formatter@your-org233 For common languages like TypeScript, Python, and Rust, install the pre-built LSP plugins from the official marketplace. Create custom LSP plugins only when you need support for languages not already covered.

190```234</Tip>

191 235 

192```shell Enable a disabled plugin theme={null}236LSP (Language Server Protocol) plugins give Claude real-time code intelligence. If you need to support a language that doesn't have an official LSP plugin, you can create your own by adding an `.lsp.json` file to your plugin:

193/plugin enable plugin-name@marketplace-name

194```

195 237 

196```shell Disable without uninstalling theme={null}238```json .lsp.json theme={null}

197/plugin disable plugin-name@marketplace-name239{

240 "go": {

241 "command": "gopls",

242 "args": ["serve"],

243 "extensionToLanguage": {

244 ".go": "go"

245 }

246 }

247}

198```248```

199 249 

200```shell Completely remove a plugin theme={null}250Users installing your plugin must have the language server binary installed on their machine.

201/plugin uninstall plugin-name@marketplace-name

202```

203 251 

204### Verify installation252For complete LSP configuration options, see [LSP servers](/en/plugins-reference#lsp-servers).

205 253 

206After installing a plugin:254### Organize complex plugins

207 255 

2081. **Check available commands**: Run `/help` to see new commands256For plugins with many components, organize your directory structure by functionality. For complete directory layouts and organization patterns, see [Plugin directory structure](/en/plugins-reference#plugin-directory-structure).

2092. **Test plugin features**: Try the plugin's commands and features

2103. **Review plugin details**: Use `/plugin` → "Manage Plugins" to see what the plugin provides

211 257 

212## Set up team plugin workflows258### Test your plugins locally

213 259 

214Configure plugins at the repository level to ensure consistent tooling across your team. When team members trust your repository folder, Claude Code automatically installs specified marketplaces and plugins.260Use the `--plugin-dir` flag to test plugins during development. This loads your plugin directly without requiring installation.

215 261 

216**To set up team plugins:**262```bash theme={null}

263claude --plugin-dir ./my-plugin

264```

217 265 

2181. Add marketplace and plugin configuration to your repository's `.claude/settings.json`266As you make changes to your plugin, restart Claude Code to pick up the updates. Test your plugin components:

2192. Team members trust the repository folder

2203. Plugins install automatically for all team members

221 267 

222For complete instructions including configuration examples, marketplace setup, and rollout best practices, see [Configure team marketplaces](/en/plugin-marketplaces#how-to-configure-team-marketplaces).268* Try your commands with `/command-name`

269* Check that agents appear in `/agents`

270* Verify hooks work as expected

223 271 

224***272<Tip>

273 You can load multiple plugins at once by specifying the flag multiple times:

225 274 

226## Develop more complex plugins275 ```bash theme={null}

276 claude --plugin-dir ./plugin-one --plugin-dir ./plugin-two

277 ```

278</Tip>

227 279 

228Once you're comfortable with basic plugins, you can create more sophisticated extensions.280### Debug plugin issues

229 281 

230### Add Skills to your plugin282If your plugin isn't working as expected:

231 283 

232Plugins can include [Agent Skills](/en/skills) to extend Claude's capabilities. Skills are model-invoked—Claude autonomously uses them based on the task context.2841. **Check the structure**: Ensure your directories are at the plugin root, not inside `.claude-plugin/`

2852. **Test components individually**: Check each command, agent, and hook separately

2863. **Use validation and debugging tools**: See [Debugging and development tools](/en/plugins-reference#debugging-and-development-tools) for CLI commands and troubleshooting techniques

233 287 

234To add Skills to your plugin, create a `skills/` directory at your plugin root and add Skill folders with `SKILL.md` files. Plugin Skills are automatically available when the plugin is installed.288### Share your plugins

235 289 

236For complete Skill authoring guidance, see [Agent Skills](/en/skills).290When your plugin is ready to share:

237 291 

238### Organize complex plugins2921. **Add documentation**: Include a `README.md` with installation and usage instructions

2932. **Version your plugin**: Use [semantic versioning](/en/plugins-reference#version-management) in your `plugin.json`

2943. **Create or use a marketplace**: Distribute through [plugin marketplaces](/en/plugin-marketplaces) for installation

2954. **Test with others**: Have team members test the plugin before wider distribution

239 296 

240For plugins with many components, organize your directory structure by functionality. For complete directory layouts and organization patterns, see [Plugin directory structure](/en/plugins-reference#plugin-directory-structure).297Once your plugin is in a marketplace, others can install it using the instructions in [Discover and install plugins](/en/discover-plugins).

241 298 

242### Test your plugins locally299<Note>

300 For complete technical specifications, debugging techniques, and distribution strategies, see [Plugins reference](/en/plugins-reference).

301</Note>

243 302 

244When developing plugins, use a local marketplace to test changes iteratively. This workflow builds on the quickstart pattern and works for plugins of any complexity.303## Convert existing configurations to plugins

245 304 

246<Steps>305If you already have custom commands, Skills, or hooks in your `.claude/` directory, you can convert them into a plugin for easier sharing and distribution.

247 <Step title="Set up your development structure">

248 Organize your plugin and marketplace for testing:

249 306 

250 ```bash Create directory structure theme={null}307### Migration steps

251 mkdir dev-marketplace

252 cd dev-marketplace

253 mkdir my-plugin

254 ```

255 308 

256 This creates:309<Steps>

310 <Step title="Create the plugin structure">

311 Create a new plugin directory:

257 312 

313 ```bash theme={null}

314 mkdir -p my-plugin/.claude-plugin

258 ```315 ```

259 dev-marketplace/

260 ├── .claude-plugin/marketplace.json (you'll create this)

261 └── my-plugin/ (your plugin under development)

262 ├── .claude-plugin/plugin.json

263 ├── commands/

264 ├── agents/

265 └── hooks/

266 ```

267 </Step>

268 316 

269 <Step title="Create the marketplace manifest">317 Create the manifest file at `my-plugin/.claude-plugin/plugin.json`:

270 ```bash Create marketplace.json theme={null}318 

271 mkdir .claude-plugin319 ```json my-plugin/.claude-plugin/plugin.json theme={null}

272 cat > .claude-plugin/marketplace.json << 'EOF'

273 {

274 "name": "dev-marketplace",

275 "owner": {

276 "name": "Developer"

277 },

278 "plugins": [

279 {320 {

280 "name": "my-plugin",321 "name": "my-plugin",

281 "source": "./my-plugin",322 "description": "Migrated from standalone configuration",

282 "description": "Plugin under development"323 "version": "1.0.0"

283 }324 }

284 ]

285 }

286 EOF

287 ```325 ```

288 </Step>326 </Step>

289 327 

290 <Step title="Install and test">328 <Step title="Copy your existing files">

291 ```bash Start Claude Code from parent directory theme={null}329 Copy your existing configurations to the plugin directory:

292 cd ..

293 claude

294 ```

295 

296 ```shell Add your development marketplace theme={null}

297 /plugin marketplace add ./dev-marketplace

298 ```

299 330 

300 ```shell Install your plugin theme={null}331 ```bash theme={null}

301 /plugin install my-plugin@dev-marketplace332 # Copy commands

302 ```333 cp -r .claude/commands my-plugin/

303 334 

304 Test your plugin components:335 # Copy agents (if any)

336 cp -r .claude/agents my-plugin/

305 337 

306 * Try your commands with `/command-name`338 # Copy skills (if any)

307 * Check that agents appear in `/agents`339 cp -r .claude/skills my-plugin/

308 * Verify hooks work as expected340 ```

309 </Step>341 </Step>

310 342 

311 <Step title="Iterate on your plugin">343 <Step title="Migrate hooks">

312 After making changes to your plugin code:344 If you have hooks in your settings, create a hooks directory:

313 345 

314 ```shell Uninstall the current version theme={null}346 ```bash theme={null}

315 /plugin uninstall my-plugin@dev-marketplace347 mkdir my-plugin/hooks

316 ```348 ```

317 349 

318 ```shell Reinstall to test changes theme={null}350 Create `my-plugin/hooks/hooks.json` with your hooks configuration. Copy the `hooks` object from your `.claude/settings.json` or `settings.local.json`—the format is the same:

319 /plugin install my-plugin@dev-marketplace

320 ```

321 351 

322 Repeat this cycle as you develop and refine your plugin.352 ```json my-plugin/hooks/hooks.json theme={null}

353 {

354 "hooks": {

355 "PostToolUse": [

356 {

357 "matcher": "Write|Edit",

358 "hooks": [{ "type": "command", "command": "npm run lint:fix $FILE" }]

359 }

360 ]

361 }

362 }

363 ```

323 </Step>364 </Step>

324</Steps>

325 365 

326<Note>366 <Step title="Test your migrated plugin">

327 **For multiple plugins**: Organize plugins in subdirectories like `./plugins/plugin-name` and update your marketplace.json accordingly. See [Plugin sources](/en/plugin-marketplaces#plugin-sources) for organization patterns.367 Load your plugin to verify everything works:

328</Note>

329 368 

330### Debug plugin issues369 ```bash theme={null}

331 370 claude --plugin-dir ./my-plugin

332If your plugin isn't working as expected:371 ```

333 

3341. **Check the structure**: Ensure your directories are at the plugin root, not inside `.claude-plugin/`

3352. **Test components individually**: Check each command, agent, and hook separately

3363. **Use validation and debugging tools**: See [Debugging and development tools](/en/plugins-reference#debugging-and-development-tools) for CLI commands and troubleshooting techniques

337 372 

338### Share your plugins373 Test each component: run your commands, check agents appear in `/agents`, and verify hooks trigger correctly.

374 </Step>

375</Steps>

339 376 

340When your plugin is ready to share:377### What changes when migrating

341 378 

3421. **Add documentation**: Include a README.md with installation and usage instructions379| Standalone (`.claude/`) | Plugin |

3432. **Version your plugin**: Use semantic versioning in your `plugin.json`380| :---------------------------- | :------------------------------- |

3443. **Create or use a marketplace**: Distribute through plugin marketplaces for installation381| Only available in one project | Can be shared via marketplaces |

3454. **Test with others**: Have team members test the plugin before wider distribution382| Files in `.claude/commands/` | Files in `plugin-name/commands/` |

383| Hooks in `settings.json` | Hooks in `hooks/hooks.json` |

384| Must manually copy to share | Install with `/plugin install` |

346 385 

347<Note>386<Note>

348 For complete technical specifications, debugging techniques, and distribution strategies, see [Plugins reference](/en/plugins-reference).387 After migrating, you can remove the original files from `.claude/` to avoid duplicates. The plugin version will take precedence when loaded.

349</Note>388</Note>

350 389 

351***

352 

353## Next steps390## Next steps

354 391 

355Now that you understand Claude Code's plugin system, here are suggested paths for different goals:392Now that you understand Claude Code's plugin system, here are suggested paths for different goals:

356 393 

357### For plugin users394### For plugin users

358 395 

359* **Discover plugins**: Browse community marketplaces for useful tools396* [Discover and install plugins](/en/discover-plugins): browse marketplaces and install plugins

360* **Team adoption**: Set up repository-level plugins for your projects397* [Configure team marketplaces](/en/discover-plugins#configure-team-marketplaces): set up repository-level plugins for your team

361* **Marketplace management**: Learn to manage multiple plugin sources

362* **Advanced usage**: Explore plugin combinations and workflows

363 398 

364### For plugin developers399### For plugin developers

365 400 

366* **Create your first marketplace**: [Plugin marketplaces guide](/en/plugin-marketplaces)401* [Create and distribute a marketplace](/en/plugin-marketplaces): package and share your plugins

367* **Advanced components**: Dive deeper into specific plugin components:402* [Plugins reference](/en/plugins-reference): complete technical specifications

368 * [Slash commands](/en/slash-commands) - Command development details403* Dive deeper into specific plugin components:

369 * [Subagents](/en/sub-agents) - Agent configuration and capabilities404 * [Slash commands](/en/slash-commands): command development details

370 * [Agent Skills](/en/skills) - Extend Claude's capabilities405 * [Subagents](/en/sub-agents): agent configuration and capabilities

371 * [Hooks](/en/hooks) - Event handling and automation406 * [Agent Skills](/en/skills): extend Claude's capabilities

372 * [MCP](/en/mcp) - External tool integration407 * [Hooks](/en/hooks): event handling and automation

373* **Distribution strategies**: Package and share your plugins effectively408 * [MCP](/en/mcp): external tool integration

374* **Community contribution**: Consider contributing to community plugin collections

375 

376### For team leads and administrators

377 

378* **Repository configuration**: Set up automatic plugin installation for team projects

379* **Plugin governance**: Establish guidelines for plugin approval and security review

380* **Marketplace maintenance**: Create and maintain organization-specific plugin catalogs

381* **Training and documentation**: Help team members adopt plugin workflows effectively

382 

383## See also

384 

385* [Plugin marketplaces](/en/plugin-marketplaces) - Creating and managing plugin catalogs

386* [Slash commands](/en/slash-commands) - Understanding custom commands

387* [Subagents](/en/sub-agents) - Creating and using specialized agents

388* [Agent Skills](/en/skills) - Extend Claude's capabilities

389* [Hooks](/en/hooks) - Automating workflows with event handlers

390* [MCP](/en/mcp) - Connecting to external tools and services

391* [Settings](/en/settings) - Configuration options for plugins

392 409 

393 410 

394---411---

Details

3> Complete technical reference for Claude Code plugin system, including schemas, CLI commands, and component specifications.3> Complete technical reference for Claude Code plugin system, including schemas, CLI commands, and component specifications.

4 4 

5<Tip>5<Tip>

6 For hands-on tutorials and practical usage, see [Plugins](/en/plugins). For plugin management across teams and communities, see [Plugin marketplaces](/en/plugin-marketplaces).6 Looking to install plugins? See [Discover and install plugins](/en/discover-plugins). For creating plugins, see [Plugins](/en/plugins). For distributing plugins, see [Plugin marketplaces](/en/plugin-marketplaces).

7</Tip>7</Tip>

8 8 

9This reference provides complete technical specifications for the Claude Code plugin system, including component schemas, CLI commands, and development tools.9This reference provides complete technical specifications for the Claude Code plugin system, including component schemas, CLI commands, and development tools.


120**Available events**:120**Available events**:

121 121 

122* `PreToolUse`: Before Claude uses any tool122* `PreToolUse`: Before Claude uses any tool

123* `PostToolUse`: After Claude successfully uses any tool

124* `PostToolUseFailure`: After Claude tool execution fails

123* `PermissionRequest`: When a permission dialog is shown125* `PermissionRequest`: When a permission dialog is shown

124* `PostToolUse`: After Claude uses any tool

125* `UserPromptSubmit`: When user submits a prompt126* `UserPromptSubmit`: When user submits a prompt

126* `Notification`: When Claude Code sends notifications127* `Notification`: When Claude Code sends notifications

127* `Stop`: When Claude attempts to stop128* `Stop`: When Claude attempts to stop

129* `SubagentStart`: When a subagent is started

128* `SubagentStop`: When a subagent attempts to stop130* `SubagentStop`: When a subagent attempts to stop

129* `SessionStart`: At the beginning of sessions131* `SessionStart`: At the beginning of sessions

130* `SessionEnd`: At the end of sessions132* `SessionEnd`: At the end of sessions


133**Hook types**:135**Hook types**:

134 136 

135* `command`: Execute shell commands or scripts137* `command`: Execute shell commands or scripts

136* `validation`: Validate file contents or project state138* `prompt`: Evaluate a prompt with an LLM (uses `$ARGUMENTS` placeholder for context)

137* `notification`: Send alerts or status updates139* `agent`: Run an agentic verifier with tools for complex verification tasks

138 140 

139### MCP servers141### MCP servers

140 142 


172* Server capabilities integrate seamlessly with Claude's existing tools174* Server capabilities integrate seamlessly with Claude's existing tools

173* Plugin servers can be configured independently of user MCP servers175* Plugin servers can be configured independently of user MCP servers

174 176 

177### LSP servers

178 

179<Tip>

180 Looking to use LSP plugins? Install them from the official marketplace—search for "lsp" in the `/plugin` Discover tab. This section documents how to create LSP plugins for languages not covered by the official marketplace.

181</Tip>

182 

183Plugins can provide [Language Server Protocol](https://microsoft.github.io/language-server-protocol/) (LSP) servers to give Claude real-time code intelligence while working on your codebase.

184 

185LSP integration provides:

186 

187* **Instant diagnostics**: Claude sees errors and warnings immediately after each edit

188* **Code navigation**: go to definition, find references, and hover information

189* **Language awareness**: type information and documentation for code symbols

190 

191**Location**: `.lsp.json` in plugin root, or inline in `plugin.json`

192 

193**Format**: JSON configuration mapping language server names to their configurations

194 

195**`.lsp.json` file format**:

196 

197```json theme={null}

198{

199 "go": {

200 "command": "gopls",

201 "args": ["serve"],

202 "extensionToLanguage": {

203 ".go": "go"

204 }

205 }

206}

207```

208 

209**Inline in `plugin.json`**:

210 

211```json theme={null}

212{

213 "name": "my-plugin",

214 "lspServers": {

215 "go": {

216 "command": "gopls",

217 "args": ["serve"],

218 "extensionToLanguage": {

219 ".go": "go"

220 }

221 }

222 }

223}

224```

225 

226**Required fields:**

227 

228| Field | Description |

229| :-------------------- | :------------------------------------------- |

230| `command` | The LSP binary to execute (must be in PATH) |

231| `extensionToLanguage` | Maps file extensions to language identifiers |

232 

233**Optional fields:**

234 

235| Field | Description |

236| :---------------------- | :-------------------------------------------------------- |

237| `args` | Command-line arguments for the LSP server |

238| `transport` | Communication transport: `stdio` (default) or `socket` |

239| `env` | Environment variables to set when starting the server |

240| `initializationOptions` | Options passed to the server during initialization |

241| `settings` | Settings passed via `workspace/didChangeConfiguration` |

242| `workspaceFolder` | Workspace folder path for the server |

243| `startupTimeout` | Max time to wait for server startup (milliseconds) |

244| `shutdownTimeout` | Max time to wait for graceful shutdown (milliseconds) |

245| `restartOnCrash` | Whether to automatically restart the server if it crashes |

246| `maxRestarts` | Maximum number of restart attempts before giving up |

247| `loggingConfig` | Debug logging configuration (see below) |

248 

249**Debug logging configuration:**

250 

251The `loggingConfig` field enables verbose LSP logging when users pass `--enable-lsp-logging`. This helps debug language server issues without impacting normal operation.

252 

253```json theme={null}

254"loggingConfig": {

255 "args": ["--log-level", "4"],

256 "env": {

257 "TSS_LOG": "-level verbose -file ${CLAUDE_PLUGIN_LSP_LOG_FILE}"

258 }

259}

260```

261 

262| Field | Description |

263| :----- | :----------------------------------------------------------------- |

264| `args` | Additional command-line arguments appended when logging is enabled |

265| `env` | Additional environment variables merged when logging is enabled |

266 

267The `${CLAUDE_PLUGIN_LSP_LOG_FILE}` variable expands to the log file path. Logs are written to `~/.claude/debug/`.

268 

269<Warning>

270 **You must install the language server binary separately.** LSP plugins configure how Claude Code connects to a language server, but they don't include the server itself. If you see `Executable not found in $PATH` in the `/plugin` Errors tab, install the required binary for your language.

271</Warning>

272 

273**Available LSP plugins:**

274 

275| Plugin | Language server | Install command |

276| :--------------- | :------------------------- | :----------------------------------------------------------------------------------------- |

277| `pyright-lsp` | Pyright (Python) | `pip install pyright` or `npm install -g pyright` |

278| `typescript-lsp` | TypeScript Language Server | `npm install -g typescript-language-server typescript` |

279| `rust-lsp` | rust-analyzer | [See rust-analyzer installation](https://rust-analyzer.github.io/manual.html#installation) |

280 

281Install the language server first, then install the plugin from the marketplace.

282 

283***

284 

285## Plugin installation scopes

286 

287When you install a plugin, you choose a **scope** that determines where the plugin is available and who else can use it:

288 

289| Scope | Settings file | Use case |

290| :-------- | :---------------------------- | :------------------------------------------------------- |

291| `user` | `~/.claude/settings.json` | Personal plugins available across all projects (default) |

292| `project` | `.claude/settings.json` | Team plugins shared via version control |

293| `local` | `.claude/settings.local.json` | Project-specific plugins, gitignored |

294| `managed` | `managed-settings.json` | Managed plugins (read-only, update only) |

295 

296Plugins use the same scope system as other Claude Code configurations. For installation instructions and scope flags, see [Install plugins](/en/discover-plugins#install-plugins). For a complete explanation of scopes, see [Configuration scopes](/en/settings#configuration-scopes).

297 

175***298***

176 299 

177## Plugin manifest schema300## Plugin manifest schema


196 "keywords": ["keyword1", "keyword2"],319 "keywords": ["keyword1", "keyword2"],

197 "commands": ["./custom/commands/special.md"],320 "commands": ["./custom/commands/special.md"],

198 "agents": "./custom/agents/",321 "agents": "./custom/agents/",

322 "skills": "./custom/skills/",

199 "hooks": "./config/hooks.json",323 "hooks": "./config/hooks.json",

200 "mcpServers": "./mcp-config.json"324 "mcpServers": "./mcp-config.json",

325 "outputStyles": "./styles/",

326 "lspServers": "./.lsp.json"

201}327}

202```328```

203 329 


222### Component path fields348### Component path fields

223 349 

224| Field | Type | Description | Example |350| Field | Type | Description | Example |

225| :----------- | :------------- | :----------------------------------- | :------------------------------------- |351| :------------- | :------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------- |

226| `commands` | string\|array | Additional command files/directories | `"./custom/cmd.md"` or `["./cmd1.md"]` |352| `commands` | string\|array | Additional command files/directories | `"./custom/cmd.md"` or `["./cmd1.md"]` |

227| `agents` | string\|array | Additional agent files | `"./custom/agents/"` |353| `agents` | string\|array | Additional agent files | `"./custom/agents/"` |

354| `skills` | string\|array | Additional skill directories | `"./custom/skills/"` |

228| `hooks` | string\|object | Hook config path or inline config | `"./hooks.json"` |355| `hooks` | string\|object | Hook config path or inline config | `"./hooks.json"` |

229| `mcpServers` | string\|object | MCP config path or inline config | `"./custom-mcp-config.json"` |356| `mcpServers` | string\|object | MCP config path or inline config | `"./mcp-config.json"` |

357| `outputStyles` | string\|array | Additional output style files/directories | `"./styles/"` |

358| `lspServers` | string\|object | [Language Server Protocol](https://microsoft.github.io/language-server-protocol/) config for code intelligence (go to definition, find references, etc.) | `"./.lsp.json"` |

230 359 

231### Path behavior rules360### Path behavior rules

232 361 


275 404 

276***405***

277 406 

407## Plugin caching and file resolution

408 

409For security and verification purposes, Claude Code copies plugins to a cache directory rather than using them in-place. Understanding this behavior is important when developing plugins that reference external files.

410 

411### How plugin caching works

412 

413When you install a plugin, Claude Code copies the plugin files to a cache directory:

414 

415* **For marketplace plugins with relative paths**: The path specified in the `source` field is copied recursively. For example, if your marketplace entry specifies `"source": "./plugins/my-plugin"`, the entire `./plugins` directory is copied.

416* **For plugins with `.claude-plugin/plugin.json`**: The implicit root directory (the directory containing `.claude-plugin/plugin.json`) is copied recursively.

417 

418### Path traversal limitations

419 

420Plugins cannot reference files outside their copied directory structure. Paths that traverse outside the plugin root (such as `../shared-utils`) will not work after installation because those external files are not copied to the cache.

421 

422### Working with external dependencies

423 

424If your plugin needs to access files outside its directory, you have two options:

425 

426**Option 1: Use symlinks**

427 

428Create symbolic links to external files within your plugin directory. Symlinks are honored during the copy process:

429 

430```bash theme={null}

431# Inside your plugin directory

432ln -s /path/to/shared-utils ./shared-utils

433```

434 

435The symlinked content will be copied into the plugin cache.

436 

437**Option 2: Restructure your marketplace**

438 

439Set the plugin path to a parent directory that contains all required files, then provide the rest of the plugin manifest directly in the marketplace entry:

440 

441```json theme={null}

442{

443 "name": "my-plugin",

444 "source": "./",

445 "description": "Plugin that needs root-level access",

446 "commands": ["./plugins/my-plugin/commands/"],

447 "agents": ["./plugins/my-plugin/agents/"],

448 "strict": false

449}

450```

451 

452This approach copies the entire marketplace root, giving your plugin access to sibling directories.

453 

454<Note>

455 Symlinks that point to locations outside the plugin's logical root are followed during copying. This provides flexibility while maintaining the security benefits of the caching system.

456</Note>

457 

458***

459 

278## Plugin directory structure460## Plugin directory structure

279 461 

280### Standard plugin layout462### Standard plugin layout


302│ ├── hooks.json # Main hook config484│ ├── hooks.json # Main hook config

303│ └── security-hooks.json # Additional hooks485│ └── security-hooks.json # Additional hooks

304├── .mcp.json # MCP server definitions486├── .mcp.json # MCP server definitions

487├── .lsp.json # LSP server configurations

305├── scripts/ # Hook and utility scripts488├── scripts/ # Hook and utility scripts

306│ ├── security-scan.sh489│ ├── security-scan.sh

307│ ├── format-code.py490│ ├── format-code.py


319| Component | Default Location | Purpose |502| Component | Default Location | Purpose |

320| :-------------- | :--------------------------- | :------------------------------- |503| :-------------- | :--------------------------- | :------------------------------- |

321| **Manifest** | `.claude-plugin/plugin.json` | Required metadata file |504| **Manifest** | `.claude-plugin/plugin.json` | Required metadata file |

322| **Commands** | `commands/` | Slash command markdown files |505| **Commands** | `commands/` | Slash command Markdown files |

323| **Agents** | `agents/` | Subagent markdown files |506| **Agents** | `agents/` | Subagent Markdown files |

324| **Skills** | `skills/` | Agent Skills with SKILL.md files |507| **Skills** | `skills/` | Agent Skills with SKILL.md files |

325| **Hooks** | `hooks/hooks.json` | Hook configuration |508| **Hooks** | `hooks/hooks.json` | Hook configuration |

326| **MCP servers** | `.mcp.json` | MCP server definitions |509| **MCP servers** | `.mcp.json` | MCP server definitions |

510| **LSP servers** | `.lsp.json` | Language server configurations |

511 

512***

513 

514## CLI commands reference

515 

516Claude Code provides CLI commands for non-interactive plugin management, useful for scripting and automation.

517 

518### plugin install

519 

520Install a plugin from available marketplaces.

521 

522```bash theme={null}

523claude plugin install <plugin> [options]

524```

525 

526**Arguments:**

527 

528* `<plugin>`: Plugin name or `plugin-name@marketplace-name` for a specific marketplace

529 

530**Options:**

531 

532| Option | Description | Default |

533| :-------------------- | :------------------------------------------------ | :------ |

534| `-s, --scope <scope>` | Installation scope: `user`, `project`, or `local` | `user` |

535| `-h, --help` | Display help for command | |

536 

537**Examples:**

538 

539```bash theme={null}

540# Install to user scope (default)

541claude plugin install formatter@my-marketplace

542 

543# Install to project scope (shared with team)

544claude plugin install formatter@my-marketplace --scope project

545 

546# Install to local scope (gitignored)

547claude plugin install formatter@my-marketplace --scope local

548```

549 

550### plugin uninstall

551 

552Remove an installed plugin.

553 

554```bash theme={null}

555claude plugin uninstall <plugin> [options]

556```

557 

558**Arguments:**

559 

560* `<plugin>`: Plugin name or `plugin-name@marketplace-name`

561 

562**Options:**

563 

564| Option | Description | Default |

565| :-------------------- | :-------------------------------------------------- | :------ |

566| `-s, --scope <scope>` | Uninstall from scope: `user`, `project`, or `local` | `user` |

567| `-h, --help` | Display help for command | |

568 

569**Aliases:** `remove`, `rm`

570 

571### plugin enable

572 

573Enable a disabled plugin.

574 

575```bash theme={null}

576claude plugin enable <plugin> [options]

577```

578 

579**Arguments:**

580 

581* `<plugin>`: Plugin name or `plugin-name@marketplace-name`

582 

583**Options:**

584 

585| Option | Description | Default |

586| :-------------------- | :--------------------------------------------- | :------ |

587| `-s, --scope <scope>` | Scope to enable: `user`, `project`, or `local` | `user` |

588| `-h, --help` | Display help for command | |

589 

590### plugin disable

591 

592Disable a plugin without uninstalling it.

593 

594```bash theme={null}

595claude plugin disable <plugin> [options]

596```

597 

598**Arguments:**

599 

600* `<plugin>`: Plugin name or `plugin-name@marketplace-name`

601 

602**Options:**

603 

604| Option | Description | Default |

605| :-------------------- | :---------------------------------------------- | :------ |

606| `-s, --scope <scope>` | Scope to disable: `user`, `project`, or `local` | `user` |

607| `-h, --help` | Display help for command | |

608 

609### plugin update

610 

611Update a plugin to the latest version.

612 

613```bash theme={null}

614claude plugin update <plugin> [options]

615```

616 

617**Arguments:**

618 

619* `<plugin>`: Plugin name or `plugin-name@marketplace-name`

620 

621**Options:**

622 

623| Option | Description | Default |

624| :-------------------- | :-------------------------------------------------------- | :------ |

625| `-s, --scope <scope>` | Scope to update: `user`, `project`, `local`, or `managed` | `user` |

626| `-h, --help` | Display help for command | |

327 627 

328***628***

329 629 


347### Common issues647### Common issues

348 648 

349| Issue | Cause | Solution |649| Issue | Cause | Solution |

350| :--------------------- | :------------------------------ | :--------------------------------------------------- |650| :---------------------------------- | :------------------------------ | :-------------------------------------------------------------------------------- |

351| Plugin not loading | Invalid `plugin.json` | Validate JSON syntax |651| Plugin not loading | Invalid `plugin.json` | Validate JSON syntax with `claude plugin validate` or `/plugin validate` |

352| Commands not appearing | Wrong directory structure | Ensure `commands/` at root, not in `.claude-plugin/` |652| Commands not appearing | Wrong directory structure | Ensure `commands/` at root, not in `.claude-plugin/` |

353| Hooks not firing | Script not executable | Run `chmod +x script.sh` |653| Hooks not firing | Script not executable | Run `chmod +x script.sh` |

354| MCP server fails | Missing `${CLAUDE_PLUGIN_ROOT}` | Use variable for all plugin paths |654| MCP server fails | Missing `${CLAUDE_PLUGIN_ROOT}` | Use variable for all plugin paths |

355| Path errors | Absolute paths used | All paths must be relative and start with `./` |655| Path errors | Absolute paths used | All paths must be relative and start with `./` |

656| LSP `Executable not found in $PATH` | Language server not installed | Install the binary (e.g., `npm install -g typescript-language-server typescript`) |

657 

658### Example error messages

659 

660**Manifest validation errors**:

661 

662* `Invalid JSON syntax: Unexpected token } in JSON at position 142`: check for missing commas, extra commas, or unquoted strings

663* `Plugin has an invalid manifest file at .claude-plugin/plugin.json. Validation errors: name: Required`: a required field is missing

664* `Plugin has a corrupt manifest file at .claude-plugin/plugin.json. JSON parse error: ...`: JSON syntax error

665 

666**Plugin loading errors**:

667 

668* `Warning: No commands found in plugin my-plugin custom directory: ./cmds. Expected .md files or SKILL.md in subdirectories.`: command path exists but contains no valid command files

669* `Plugin directory not found at path: ./plugins/my-plugin. Check that the marketplace entry has the correct path.`: the `source` path in marketplace.json points to a non-existent directory

670* `Plugin my-plugin has conflicting manifests: both plugin.json and marketplace entry specify components.`: remove duplicate component definitions or set `strict: true` in marketplace entry

671 

672### Hook troubleshooting

673 

674**Hook script not executing**:

675 

6761. Check the script is executable: `chmod +x ./scripts/your-script.sh`

6772. Verify the shebang line: First line should be `#!/bin/bash` or `#!/usr/bin/env bash`

6783. Check the path uses `${CLAUDE_PLUGIN_ROOT}`: `"command": "${CLAUDE_PLUGIN_ROOT}/scripts/your-script.sh"`

6794. Test the script manually: `./scripts/your-script.sh`

680 

681**Hook not triggering on expected events**:

682 

6831. Verify the event name is correct (case-sensitive): `PostToolUse`, not `postToolUse`

6842. Check the matcher pattern matches your tools: `"matcher": "Write|Edit"` for file operations

6853. Confirm the hook type is valid: `command`, `prompt`, or `agent`

686 

687### MCP server troubleshooting

688 

689**Server not starting**:

690 

6911. Check the command exists and is executable

6922. Verify all paths use `${CLAUDE_PLUGIN_ROOT}` variable

6933. Check the MCP server logs: `claude --debug` shows initialization errors

6944. Test the server manually outside of Claude Code

695 

696**Server tools not appearing**:

697 

6981. Ensure the server is properly configured in `.mcp.json` or `plugin.json`

6992. Verify the server implements the MCP protocol correctly

7003. Check for connection timeouts in debug output

701 

702### Directory structure mistakes

703 

704**Symptoms**: Plugin loads but components (commands, agents, hooks) are missing.

705 

706**Correct structure**: Components must be at the plugin root, not inside `.claude-plugin/`. Only `plugin.json` belongs in `.claude-plugin/`.

707 

708```

709my-plugin/

710├── .claude-plugin/

711│ └── plugin.json ← Only manifest here

712├── commands/ ← At root level

713├── agents/ ← At root level

714└── hooks/ ← At root level

715```

716 

717If your components are inside `.claude-plugin/`, move them to the plugin root.

718 

719**Debug checklist**:

720 

7211. Run `claude --debug` and look for "loading plugin" messages

7222. Check that each component directory is listed in the debug output

7233. Verify file permissions allow reading the plugin files

356 724 

357***725***

358 726 


363Follow semantic versioning for plugin releases:731Follow semantic versioning for plugin releases:

364 732 

365```json theme={null}733```json theme={null}

734{

735 "name": "my-plugin",

736 "version": "2.1.0"

737}

738```

739 

740**Version format**: `MAJOR.MINOR.PATCH`

741 

742* **MAJOR**: Breaking changes (incompatible API changes)

743* **MINOR**: New features (backward-compatible additions)

744* **PATCH**: Bug fixes (backward-compatible fixes)

745 

746**Best practices**:

747 

748* Start at `1.0.0` for your first stable release

749* Update the version in `plugin.json` before distributing changes

750* Document changes in a `CHANGELOG.md` file

751* Use pre-release versions like `2.0.0-beta.1` for testing

752 

753***

366 754 

367## See also755## See also

368 756 

369- [Plugins](/en/plugins) - Tutorials and practical usage757* [Plugins](/en/plugins) - Tutorials and practical usage

370- [Plugin marketplaces](/en/plugin-marketplaces) - Creating and managing marketplaces758* [Plugin marketplaces](/en/plugin-marketplaces) - Creating and managing marketplaces

371- [Slash commands](/en/slash-commands) - Command development details759* [Slash commands](/en/slash-commands) - Command development details

372- [Subagents](/en/sub-agents) - Agent configuration and capabilities760* [Subagents](/en/sub-agents) - Agent configuration and capabilities

373- [Agent Skills](/en/skills) - Extend Claude's capabilities761* [Agent Skills](/en/skills) - Extend Claude's capabilities

374- [Hooks](/en/hooks) - Event handling and automation762* [Hooks](/en/hooks) - Event handling and automation

375- [MCP](/en/mcp) - External tool integration763* [MCP](/en/mcp) - External tool integration

376- [Settings](/en/settings) - Configuration options for plugins764* [Settings](/en/settings) - Configuration options for plugins

377```

378 765 

379 766 

380---767---

quickstart.md +16 −12

Details

18 18 

19<Tabs>19<Tabs>

20 <Tab title="Native Install (Recommended)">20 <Tab title="Native Install (Recommended)">

21 **Homebrew (macOS, Linux):**

22 

23 ```sh theme={null}

24 brew install --cask claude-code

25 ```

26 

27 **macOS, Linux, WSL:**21 **macOS, Linux, WSL:**

28 22 

29 ```bash theme={null}23 ```bash theme={null} theme={null}

30 curl -fsSL https://claude.ai/install.sh | bash24 curl -fsSL https://claude.ai/install.sh | bash

31 ```25 ```

32 26 

33 **Windows PowerShell:**27 **Windows PowerShell:**

34 28 

35 ```powershell theme={null}29 ```powershell theme={null} theme={null}

36 irm https://claude.ai/install.ps1 | iex30 irm https://claude.ai/install.ps1 | iex

37 ```31 ```

38 32 

39 **Windows CMD:**33 **Windows CMD:**

40 34 

41 ```batch theme={null}35 ```batch theme={null} theme={null}

42 curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd36 curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd

43 ```37 ```

44 </Tab>38 </Tab>

45 39 

40 <Tab title="Homebrew">

41 ```sh theme={null} theme={null}

42 brew install --cask claude-code

43 ```

44 </Tab>

45 

46 <Tab title="NPM">46 <Tab title="NPM">

47 If you have [Node.js 18 or newer installed](https://nodejs.org/en/download/):47 If you have [Node.js 18 or newer installed](https://nodejs.org/en/download/):

48 48 

49 ```sh theme={null}49 ```sh theme={null} theme={null}

50 npm install -g @anthropic-ai/claude-code50 npm install -g @anthropic-ai/claude-code

51 ```51 ```

52 </Tab>52 </Tab>


241Here are the most important commands for daily use:241Here are the most important commands for daily use:

242 242 

243| Command | What it does | Example |243| Command | What it does | Example |

244| ------------------- | --------------------------------- | ----------------------------------- |244| ------------------- | ------------------------------------------------------ | ----------------------------------- |

245| `claude` | Start interactive mode | `claude` |245| `claude` | Start interactive mode | `claude` |

246| `claude "task"` | Run a one-time task | `claude "fix the build error"` |246| `claude "task"` | Run a one-time task | `claude "fix the build error"` |

247| `claude -p "query"` | Run one-off query, then exit | `claude -p "explain this function"` |247| `claude -p "query"` | Run one-off query, then exit | `claude -p "explain this function"` |

248| `claude -c` | Continue most recent conversation | `claude -c` |248| `claude -c` | Continue most recent conversation in current directory | `claude -c` |

249| `claude -r` | Resume a previous conversation | `claude -r` |249| `claude -r` | Resume a previous conversation | `claude -r` |

250| `claude commit` | Create a Git commit | `claude commit` |250| `claude commit` | Create a Git commit | `claude commit` |

251| `/clear` | Clear conversation history | `> /clear` |251| `/clear` | Clear conversation history | `> /clear` |


319 <Card title="Claude Code on the web" icon="cloud" href="/en/claude-code-on-the-web">319 <Card title="Claude Code on the web" icon="cloud" href="/en/claude-code-on-the-web">

320 Run tasks asynchronously in the cloud320 Run tasks asynchronously in the cloud

321 </Card>321 </Card>

322 

323 <Card title="About Claude Code" icon="sparkles" href="https://claude.com/product/claude-code">

324 Learn more on claude.com

325 </Card>

322</CardGroup>326</CardGroup>

323 327 

324## Getting help328## Getting help

sdk/migration-guide.md +0 −329 deleted

File DeletedView Diff

1# Migrate to Claude Agent SDK

2 

3Guide for migrating the Claude Code TypeScript and Python SDKs to the Claude Agent SDK

4 

5 

6## Overview

7 

8The Claude Code SDK has been renamed to the **Claude Agent SDK** and its documentation has been reorganized. This change reflects the SDK's broader capabilities for building AI agents beyond just coding tasks.

9 

10## What's Changed

11 

12| Aspect | Old | New |

13| :----------------------- | :-------------------------- | :------------------------------- |

14| **Package Name (TS/JS)** | `@anthropic-ai/claude-code` | `@anthropic-ai/claude-agent-sdk` |

15| **Python Package** | `claude-code-sdk` | `claude-agent-sdk` |

16| **Documentation Location** | Claude Code docs | API Guide → Agent SDK section |

17 

18<Note>

19**Documentation Changes:** The Agent SDK documentation has moved from the Claude Code docs to the API Guide under a dedicated [Agent SDK](/docs/en/agent-sdk/overview) section. The Claude Code docs now focus on the CLI tool and automation features.

20</Note>

21 

22## Migration Steps

23 

24### For TypeScript/JavaScript Projects

25 

26**1. Uninstall the old package:**

27 

28```bash

29npm uninstall @anthropic-ai/claude-code

30```

31 

32**2. Install the new package:**

33 

34```bash

35npm install @anthropic-ai/claude-agent-sdk

36```

37 

38**3. Update your imports:**

39 

40Change all imports from `@anthropic-ai/claude-code` to `@anthropic-ai/claude-agent-sdk`:

41 

42```typescript

43// Before

44import { query, tool, createSdkMcpServer } from "@anthropic-ai/claude-code";

45 

46// After

47import {

48 query,

49 tool,

50 createSdkMcpServer,

51} from "@anthropic-ai/claude-agent-sdk";

52```

53 

54**4. Update package.json dependencies:**

55 

56If you have the package listed in your `package.json`, update it:

57 

58```json

59// Before

60{

61 "dependencies": {

62 "@anthropic-ai/claude-code": "^1.0.0"

63 }

64}

65 

66// After

67{

68 "dependencies": {

69 "@anthropic-ai/claude-agent-sdk": "^0.1.0"

70 }

71}

72```

73 

74That's it! No other code changes are required.

75 

76### For Python Projects

77 

78**1. Uninstall the old package:**

79 

80```bash

81pip uninstall claude-code-sdk

82```

83 

84**2. Install the new package:**

85 

86```bash

87pip install claude-agent-sdk

88```

89 

90**3. Update your imports:**

91 

92Change all imports from `claude_code_sdk` to `claude_agent_sdk`:

93 

94```python

95# Before

96from claude_code_sdk import query, ClaudeCodeOptions

97 

98# After

99from claude_agent_sdk import query, ClaudeAgentOptions

100```

101 

102**4. Update type names:**

103 

104Change `ClaudeCodeOptions` to `ClaudeAgentOptions`:

105 

106```python

107# Before

108from claude_agent_sdk import query, ClaudeCodeOptions

109 

110options = ClaudeCodeOptions(

111 model="claude-sonnet-4-5"

112)

113 

114# After

115from claude_agent_sdk import query, ClaudeAgentOptions

116 

117options = ClaudeAgentOptions(

118 model="claude-sonnet-4-5"

119)

120```

121 

122**5. Review [breaking changes](#breaking-changes)**

123 

124Make any code changes needed to complete the migration.

125 

126## Breaking changes

127 

128<Warning>

129To improve isolation and explicit configuration, Claude Agent SDK v0.1.0 introduces breaking changes for users migrating from Claude Code SDK. Review this section carefully before migrating.

130</Warning>

131 

132### Python: ClaudeCodeOptions renamed to ClaudeAgentOptions

133 

134**What changed:** The Python SDK type `ClaudeCodeOptions` has been renamed to `ClaudeAgentOptions`.

135 

136**Migration:**

137 

138```python

139# BEFORE (v0.0.x)

140from claude_agent_sdk import query, ClaudeCodeOptions

141 

142options = ClaudeCodeOptions(

143 model="claude-sonnet-4-5",

144 permission_mode="acceptEdits"

145)

146 

147# AFTER (v0.1.0)

148from claude_agent_sdk import query, ClaudeAgentOptions

149 

150options = ClaudeAgentOptions(

151 model="claude-sonnet-4-5",

152 permission_mode="acceptEdits"

153)

154```

155 

156**Why this changed:** The type name now matches the "Claude Agent SDK" branding and provides consistency across the SDK's naming conventions.

157 

158### System prompt no longer default

159 

160**What changed:** The SDK no longer uses Claude Code's system prompt by default.

161 

162**Migration:**

163 

164<CodeGroup>

165 

166```typescript TypeScript

167// BEFORE (v0.0.x) - Used Claude Code's system prompt by default

168const result = query({ prompt: "Hello" });

169 

170// AFTER (v0.1.0) - Uses empty system prompt by default

171// To get the old behavior, explicitly request Claude Code's preset:

172const result = query({

173 prompt: "Hello",

174 options: {

175 systemPrompt: { type: "preset", preset: "claude_code" }

176 }

177});

178 

179// Or use a custom system prompt:

180const result = query({

181 prompt: "Hello",

182 options: {

183 systemPrompt: "You are a helpful coding assistant"

184 }

185});

186```

187 

188```python Python

189# BEFORE (v0.0.x) - Used Claude Code's system prompt by default

190async for message in query(prompt="Hello"):

191 print(message)

192 

193# AFTER (v0.1.0) - Uses empty system prompt by default

194# To get the old behavior, explicitly request Claude Code's preset:

195from claude_agent_sdk import query, ClaudeAgentOptions

196 

197async for message in query(

198 prompt="Hello",

199 options=ClaudeAgentOptions(

200 system_prompt={"type": "preset", "preset": "claude_code"} # Use the preset

201 )

202):

203 print(message)

204 

205# Or use a custom system prompt:

206async for message in query(

207 prompt="Hello",

208 options=ClaudeAgentOptions(

209 system_prompt="You are a helpful coding assistant"

210 )

211):

212 print(message)

213```

214 

215</CodeGroup>

216 

217**Why this changed:** Provides better control and isolation for SDK applications. You can now build agents with custom behavior without inheriting Claude Code's CLI-focused instructions.

218 

219### Settings Sources No Longer Loaded by Default

220 

221**What changed:** The SDK no longer reads from filesystem settings (CLAUDE.md, settings.json, slash commands, etc.) by default.

222 

223**Migration:**

224 

225<CodeGroup>

226 

227```typescript TypeScript

228// BEFORE (v0.0.x) - Loaded all settings automatically

229const result = query({ prompt: "Hello" });

230// Would read from:

231// - ~/.claude/settings.json (user)

232// - .claude/settings.json (project)

233// - .claude/settings.local.json (local)

234// - CLAUDE.md files

235// - Custom slash commands

236 

237// AFTER (v0.1.0) - No settings loaded by default

238// To get the old behavior:

239const result = query({

240 prompt: "Hello",

241 options: {

242 settingSources: ["user", "project", "local"]

243 }

244});

245 

246// Or load only specific sources:

247const result = query({

248 prompt: "Hello",

249 options: {

250 settingSources: ["project"] // Only project settings

251 }

252});

253```

254 

255```python Python

256# BEFORE (v0.0.x) - Loaded all settings automatically

257async for message in query(prompt="Hello"):

258 print(message)

259# Would read from:

260# - ~/.claude/settings.json (user)

261# - .claude/settings.json (project)

262# - .claude/settings.local.json (local)

263# - CLAUDE.md files

264# - Custom slash commands

265 

266# AFTER (v0.1.0) - No settings loaded by default

267# To get the old behavior:

268from claude_agent_sdk import query, ClaudeAgentOptions

269 

270async for message in query(

271 prompt="Hello",

272 options=ClaudeAgentOptions(

273 setting_sources=["user", "project", "local"]

274 )

275):

276 print(message)

277 

278# Or load only specific sources:

279async for message in query(

280 prompt="Hello",

281 options=ClaudeAgentOptions(

282 setting_sources=["project"] # Only project settings

283 )

284):

285 print(message)

286```

287 

288</CodeGroup>

289 

290**Why this changed:** Ensures SDK applications have predictable behavior independent of local filesystem configurations. This is especially important for:

291- **CI/CD environments** - Consistent behavior without local customizations

292- **Deployed applications** - No dependency on filesystem settings

293- **Testing** - Isolated test environments

294- **Multi-tenant systems** - Prevent settings leakage between users

295 

296<Note>

297**Backward compatibility:** If your application relied on filesystem settings (custom slash commands, CLAUDE.md instructions, etc.), add `settingSources: ['user', 'project', 'local']` to your options.

298</Note>

299 

300## Why the Rename?

301 

302The Claude Code SDK was originally designed for coding tasks, but it has evolved into a powerful framework for building all types of AI agents. The new name "Claude Agent SDK" better reflects its capabilities:

303 

304- Building business agents (legal assistants, finance advisors, customer support)

305- Creating specialized coding agents (SRE bots, security reviewers, code review agents)

306- Developing custom agents for any domain with tool use, MCP integration, and more

307 

308## Getting Help

309 

310If you encounter any issues during migration:

311 

312**For TypeScript/JavaScript:**

313 

3141. Check that all imports are updated to use `@anthropic-ai/claude-agent-sdk`

3152. Verify your package.json has the new package name

3163. Run `npm install` to ensure dependencies are updated

317 

318**For Python:**

319 

3201. Check that all imports are updated to use `claude_agent_sdk`

3212. Verify your requirements.txt or pyproject.toml has the new package name

3223. Run `pip install claude-agent-sdk` to ensure the package is installed

323 

324## Next Steps

325 

326- Explore the [Agent SDK Overview](/docs/en/agent-sdk/overview) to learn about available features

327- Check out the [TypeScript SDK Reference](/docs/en/agent-sdk/typescript) for detailed API documentation

328- Review the [Python SDK Reference](/docs/en/agent-sdk/python) for Python-specific documentation

329- Learn about [Custom Tools](/docs/en/agent-sdk/custom-tools) and [MCP Integration](/docs/en/agent-sdk/mcp)

security.md +1 −1

Details

113 113 

114### Team security114### Team security

115 115 

116* Use [enterprise managed policies](/en/iam#enterprise-managed-policy-settings) to enforce organizational standards116* Use [managed settings](/en/iam#managed-settings) to enforce organizational standards

117* Share approved permission configurations through version control117* Share approved permission configurations through version control

118* Train team members on security best practices118* Train team members on security best practices

119* Monitor Claude Code usage through [OpenTelemetry metrics](/en/monitoring-usage)119* Monitor Claude Code usage through [OpenTelemetry metrics](/en/monitoring-usage)

settings.md +384 −32

Details

4 4 

5Claude Code offers a variety of settings to configure its behavior to meet your needs. You can configure Claude Code by running the `/config` command when using the interactive REPL, which opens a tabbed Settings interface where you can view status information and modify configuration options.5Claude Code offers a variety of settings to configure its behavior to meet your needs. You can configure Claude Code by running the `/config` command when using the interactive REPL, which opens a tabbed Settings interface where you can view status information and modify configuration options.

6 6 

7## Configuration scopes

8 

9Claude Code uses a **scope system** to determine where configurations apply and who they're shared with. Understanding scopes helps you decide how to configure Claude Code for personal use, team collaboration, or enterprise deployment.

10 

11### Available scopes

12 

13| Scope | Location | Who it affects | Shared with team? |

14| :---------- | :----------------------------------- | :----------------------------------- | :--------------------- |

15| **Managed** | System-level `managed-settings.json` | All users on the machine | Yes (deployed by IT) |

16| **User** | `~/.claude/` directory | You, across all projects | No |

17| **Project** | `.claude/` in repository | All collaborators on this repository | Yes (committed to git) |

18| **Local** | `.claude/*.local.*` files | You, in this repository only | No (gitignored) |

19 

20### When to use each scope

21 

22**Managed scope** is for:

23 

24* Security policies that must be enforced organization-wide

25* Compliance requirements that can't be overridden

26* Standardized configurations deployed by IT/DevOps

27 

28**User scope** is best for:

29 

30* Personal preferences you want everywhere (themes, editor settings)

31* Tools and plugins you use across all projects

32* API keys and authentication (stored securely)

33 

34**Project scope** is best for:

35 

36* Team-shared settings (permissions, hooks, MCP servers)

37* Plugins the whole team should have

38* Standardizing tooling across collaborators

39 

40**Local scope** is best for:

41 

42* Personal overrides for a specific project

43* Testing configurations before sharing with the team

44* Machine-specific settings that won't work for others

45 

46### How scopes interact

47 

48When the same setting is configured in multiple scopes, more specific scopes take precedence:

49 

501. **Managed** (highest) - can't be overridden by anything

512. **Command line arguments** - temporary session overrides

523. **Local** - overrides project and user settings

534. **Project** - overrides user settings

545. **User** (lowest) - applies when nothing else specifies the setting

55 

56For example, if a permission is allowed in user settings but denied in project settings, the project setting takes precedence and the permission is blocked.

57 

58### What uses scopes

59 

60Scopes apply to many Claude Code features:

61 

62| Feature | User location | Project location | Local location |

63| :-------------- | :------------------------ | :--------------------------------- | :----------------------------- |

64| **Settings** | `~/.claude/settings.json` | `.claude/settings.json` | `.claude/settings.local.json` |

65| **Subagents** | `~/.claude/agents/` | `.claude/agents/` | — |

66| **MCP servers** | `~/.claude.json` | `.mcp.json` | `~/.claude.json` (per-project) |

67| **Plugins** | `~/.claude/settings.json` | `.claude/settings.json` | `.claude/settings.local.json` |

68| **CLAUDE.md** | `~/.claude/CLAUDE.md` | `CLAUDE.md` or `.claude/CLAUDE.md` | `CLAUDE.local.md` |

69 

70***

71 

7## Settings files72## Settings files

8 73 

9The `settings.json` file is our official mechanism for configuring Claude74The `settings.json` file is our official mechanism for configuring Claude


14* **Project settings** are saved in your project directory:79* **Project settings** are saved in your project directory:

15 * `.claude/settings.json` for settings that are checked into source control and shared with your team80 * `.claude/settings.json` for settings that are checked into source control and shared with your team

16 * `.claude/settings.local.json` for settings that are not checked in, useful for personal preferences and experimentation. Claude Code will configure git to ignore `.claude/settings.local.json` when it is created.81 * `.claude/settings.local.json` for settings that are not checked in, useful for personal preferences and experimentation. Claude Code will configure git to ignore `.claude/settings.local.json` when it is created.

17* For enterprise deployments of Claude Code, we also support **enterprise82* **Managed settings**: For organizations that need centralized control, Claude Code supports `managed-settings.json` and `managed-mcp.json` files that can be deployed to system directories:

18 managed policy settings**. These take precedence over user and project83 

19 settings. System administrators can deploy policies to:84 * macOS: `/Library/Application Support/ClaudeCode/`

20 * macOS: `/Library/Application Support/ClaudeCode/managed-settings.json`85 * Linux and WSL: `/etc/claude-code/`

21 * Linux and WSL: `/etc/claude-code/managed-settings.json`86 * Windows: `C:\Program Files\ClaudeCode\`

22 * Windows: `C:\Program Files\ClaudeCode\managed-settings.json`87 

23 * `C:\ProgramData\ClaudeCode\managed-settings.json` will be deprecated in a future version.88 <Note>

24* Enterprise deployments can also configure **managed MCP servers** that override89 These are system-wide paths (not user home directories like `~/Library/...`) that require administrator privileges. They are designed to be deployed by IT administrators.

25 user-configured servers. See [Enterprise MCP configuration](/en/mcp#enterprise-mcp-configuration):90 </Note>

26 * macOS: `/Library/Application Support/ClaudeCode/managed-mcp.json`91 

27 * Linux and WSL: `/etc/claude-code/managed-mcp.json`92 See [Managed settings](/en/iam#managed-settings) and [Managed MCP configuration](/en/mcp#managed-mcp-configuration) for details.

28 * Windows: `C:\Program Files\ClaudeCode\managed-mcp.json`93 

29 * `C:\ProgramData\ClaudeCode\managed-mcp.json` will be deprecated in a future version.94 <Note>

95 Managed deployments can also restrict **plugin marketplace additions** using

96 `strictKnownMarketplaces`. For more information, see [Managed marketplace restrictions](/en/plugin-marketplaces#managed-marketplace-restrictions).

97 </Note>

30* **Other configuration** is stored in `~/.claude.json`. This file contains your preferences (theme, notification settings, editor mode), OAuth session, [MCP server](/en/mcp) configurations for user and local scopes, per-project state (allowed tools, trust settings), and various caches. Project-scoped MCP servers are stored separately in `.mcp.json`.98* **Other configuration** is stored in `~/.claude.json`. This file contains your preferences (theme, notification settings, editor mode), OAuth session, [MCP server](/en/mcp) configurations for user and local scopes, per-project state (allowed tools, trust settings), and various caches. Project-scoped MCP servers are stored separately in `.mcp.json`.

31 99 

32```JSON Example settings.json theme={null}100```JSON Example settings.json theme={null}


61`settings.json` supports a number of options:129`settings.json` supports a number of options:

62 130 

63| Key | Description | Example |131| Key | Description | Example |

64| :--------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------- |132| :--------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :---------------------------------------------------------------------- |

65| `apiKeyHelper` | Custom script, to be executed in `/bin/sh`, to generate an auth value. This value will be sent as `X-Api-Key` and `Authorization: Bearer` headers for model requests | `/bin/generate_temp_api_key.sh` |133| `apiKeyHelper` | Custom script, to be executed in `/bin/sh`, to generate an auth value. This value will be sent as `X-Api-Key` and `Authorization: Bearer` headers for model requests | `/bin/generate_temp_api_key.sh` |

66| `cleanupPeriodDays` | Sessions inactive for longer than this period are deleted at startup. Setting to `0` immediately deletes all sessions. (default: 30 days) | `20` |134| `cleanupPeriodDays` | Sessions inactive for longer than this period are deleted at startup. Setting to `0` immediately deletes all sessions. (default: 30 days) | `20` |

67| `companyAnnouncements` | Announcement to display to users at startup. If multiple announcements are provided, they will be cycled through at random. | `["Welcome to Acme Corp! Review our code guidelines at docs.acme.com"]` |135| `companyAnnouncements` | Announcement to display to users at startup. If multiple announcements are provided, they will be cycled through at random. | `["Welcome to Acme Corp! Review our code guidelines at docs.acme.com"]` |

68| `env` | Environment variables that will be applied to every session | `{"FOO": "bar"}` |136| `env` | Environment variables that will be applied to every session | `{"FOO": "bar"}` |

69| `includeCoAuthoredBy` | Whether to include the `co-authored-by Claude` byline in git commits and pull requests (default: `true`) | `false` |137| `attribution` | Customize attribution for git commits and pull requests. See [Attribution settings](#attribution-settings) | `{"commit": "🤖 Generated with Claude Code", "pr": ""}` |

138| `includeCoAuthoredBy` | **Deprecated**: Use `attribution` instead. Whether to include the `co-authored-by Claude` byline in git commits and pull requests (default: `true`) | `false` |

70| `permissions` | See table below for structure of permissions. | |139| `permissions` | See table below for structure of permissions. | |

71| `hooks` | Configure custom commands to run before or after tool executions. See [hooks documentation](/en/hooks) | `{"PreToolUse": {"Bash": "echo 'Running command...'"}}` |140| `hooks` | Configure custom commands to run before or after tool executions. See [hooks documentation](/en/hooks) | `{"PreToolUse": {"Bash": "echo 'Running command...'"}}` |

72| `disableAllHooks` | Disable all [hooks](/en/hooks) | `true` |141| `disableAllHooks` | Disable all [hooks](/en/hooks) | `true` |

142| `allowManagedHooksOnly` | (Managed settings only) Prevent loading of user, project, and plugin hooks. Only allows managed hooks and SDK hooks. See [Hook configuration](#hook-configuration) | `true` |

73| `model` | Override the default model to use for Claude Code | `"claude-sonnet-4-5-20250929"` |143| `model` | Override the default model to use for Claude Code | `"claude-sonnet-4-5-20250929"` |

144| `otelHeadersHelper` | Script to generate dynamic OpenTelemetry headers. Runs at startup and periodically (see [Dynamic headers](/en/monitoring-usage#dynamic-headers)) | `/bin/generate_otel_headers.sh` |

74| `statusLine` | Configure a custom status line to display context. See [`statusLine` documentation](/en/statusline) | `{"type": "command", "command": "~/.claude/statusline.sh"}` |145| `statusLine` | Configure a custom status line to display context. See [`statusLine` documentation](/en/statusline) | `{"type": "command", "command": "~/.claude/statusline.sh"}` |

146| `fileSuggestion` | Configure a custom script for `@` file autocomplete. See [File suggestion settings](#file-suggestion-settings) | `{"type": "command", "command": "~/.claude/file-suggestion.sh"}` |

75| `outputStyle` | Configure an output style to adjust the system prompt. See [output styles documentation](/en/output-styles) | `"Explanatory"` |147| `outputStyle` | Configure an output style to adjust the system prompt. See [output styles documentation](/en/output-styles) | `"Explanatory"` |

76| `forceLoginMethod` | Use `claudeai` to restrict login to Claude.ai accounts, `console` to restrict login to Claude Console (API usage billing) accounts | `claudeai` |148| `forceLoginMethod` | Use `claudeai` to restrict login to Claude.ai accounts, `console` to restrict login to Claude Console (API usage billing) accounts | `claudeai` |

77| `forceLoginOrgUUID` | Specify the UUID of an organization to automatically select it during login, bypassing the organization selection step. Requires `forceLoginMethod` to be set | `"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"` |149| `forceLoginOrgUUID` | Specify the UUID of an organization to automatically select it during login, bypassing the organization selection step. Requires `forceLoginMethod` to be set | `"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"` |

78| `enableAllProjectMcpServers` | Automatically approve all MCP servers defined in project `.mcp.json` files | `true` |150| `enableAllProjectMcpServers` | Automatically approve all MCP servers defined in project `.mcp.json` files | `true` |

79| `enabledMcpjsonServers` | List of specific MCP servers from `.mcp.json` files to approve | `["memory", "github"]` |151| `enabledMcpjsonServers` | List of specific MCP servers from `.mcp.json` files to approve | `["memory", "github"]` |

80| `disabledMcpjsonServers` | List of specific MCP servers from `.mcp.json` files to reject | `["filesystem"]` |152| `disabledMcpjsonServers` | List of specific MCP servers from `.mcp.json` files to reject | `["filesystem"]` |

81| `allowedMcpServers` | When set in managed-settings.json, allowlist of MCP servers users can configure. Undefined = no restrictions, empty array = lockdown. Applies to all scopes. Denylist takes precedence. See [Enterprise MCP configuration](/en/mcp#enterprise-mcp-configuration) | `[{ "serverName": "github" }]` |153| `allowedMcpServers` | When set in managed-settings.json, allowlist of MCP servers users can configure. Undefined = no restrictions, empty array = lockdown. Applies to all scopes. Denylist takes precedence. See [Managed MCP configuration](/en/mcp#managed-mcp-configuration) | `[{ "serverName": "github" }]` |

82| `deniedMcpServers` | When set in managed-settings.json, denylist of MCP servers that are explicitly blocked. Applies to all scopes including enterprise servers. Denylist takes precedence over allowlist. See [Enterprise MCP configuration](/en/mcp#enterprise-mcp-configuration) | `[{ "serverName": "filesystem" }]` |154| `deniedMcpServers` | When set in managed-settings.json, denylist of MCP servers that are explicitly blocked. Applies to all scopes including managed servers. Denylist takes precedence over allowlist. See [Managed MCP configuration](/en/mcp#managed-mcp-configuration) | `[{ "serverName": "filesystem" }]` |

155| `strictKnownMarketplaces` | When set in managed-settings.json, allowlist of plugin marketplaces users can add. Undefined = no restrictions, empty array = lockdown. Applies to marketplace additions only. See [Managed marketplace restrictions](/en/plugin-marketplaces#managed-marketplace-restrictions) | `[{ "source": "github", "repo": "acme-corp/plugins" }]` |

83| `awsAuthRefresh` | Custom script that modifies the `.aws` directory (see [advanced credential configuration](/en/amazon-bedrock#advanced-credential-configuration)) | `aws sso login --profile myprofile` |156| `awsAuthRefresh` | Custom script that modifies the `.aws` directory (see [advanced credential configuration](/en/amazon-bedrock#advanced-credential-configuration)) | `aws sso login --profile myprofile` |

84| `awsCredentialExport` | Custom script that outputs JSON with AWS credentials (see [advanced credential configuration](/en/amazon-bedrock#advanced-credential-configuration)) | `/bin/generate_aws_grant.sh` |157| `awsCredentialExport` | Custom script that outputs JSON with AWS credentials (see [advanced credential configuration](/en/amazon-bedrock#advanced-credential-configuration)) | `/bin/generate_aws_grant.sh` |

158| `alwaysThinkingEnabled` | Enable [extended thinking](/en/common-workflows#use-extended-thinking) by default for all sessions. Typically configured via the `/config` command rather than editing directly | `true` |

85 159 

86### Permission settings160### Permission settings

87 161 


92| `deny` | Array of [permission rules](/en/iam#configuring-permissions) to deny tool use. Use this to also exclude sensitive files from Claude Code access. **Note:** Bash patterns are prefix matches and can be bypassed (see [Bash permission limitations](/en/iam#tool-specific-permission-rules)) | `[ "WebFetch", "Bash(curl:*)", "Read(./.env)", "Read(./secrets/**)" ]` |166| `deny` | Array of [permission rules](/en/iam#configuring-permissions) to deny tool use. Use this to also exclude sensitive files from Claude Code access. **Note:** Bash patterns are prefix matches and can be bypassed (see [Bash permission limitations](/en/iam#tool-specific-permission-rules)) | `[ "WebFetch", "Bash(curl:*)", "Read(./.env)", "Read(./secrets/**)" ]` |

93| `additionalDirectories` | Additional [working directories](/en/iam#working-directories) that Claude has access to | `[ "../docs/" ]` |167| `additionalDirectories` | Additional [working directories](/en/iam#working-directories) that Claude has access to | `[ "../docs/" ]` |

94| `defaultMode` | Default [permission mode](/en/iam#permission-modes) when opening Claude Code | `"acceptEdits"` |168| `defaultMode` | Default [permission mode](/en/iam#permission-modes) when opening Claude Code | `"acceptEdits"` |

95| `disableBypassPermissionsMode` | Set to `"disable"` to prevent `bypassPermissions` mode from being activated. This disables the `--dangerously-skip-permissions` command-line flag. See [managed policy settings](/en/iam#enterprise-managed-policy-settings) | `"disable"` |169| `disableBypassPermissionsMode` | Set to `"disable"` to prevent `bypassPermissions` mode from being activated. This disables the `--dangerously-skip-permissions` command-line flag. See [managed settings](/en/iam#managed-settings) | `"disable"` |

96 170 

97### Sandbox settings171### Sandbox settings

98 172 


143* Use `Edit` deny rules to block writes to specific paths217* Use `Edit` deny rules to block writes to specific paths

144* Use `WebFetch` allow/deny rules to control which network domains Claude can access218* Use `WebFetch` allow/deny rules to control which network domains Claude can access

145 219 

220### Attribution settings

221 

222Claude Code adds attribution to git commits and pull requests. These are configured separately:

223 

224* Commits use [git trailers](https://git-scm.com/docs/git-interpret-trailers) (like `Co-Authored-By`) by default, which can be customized or disabled

225* Pull request descriptions are plain text

226 

227| Keys | Description |

228| :------- | :----------------------------------------------------------------------------------------- |

229| `commit` | Attribution for git commits, including any trailers. Empty string hides commit attribution |

230| `pr` | Attribution for pull request descriptions. Empty string hides pull request attribution |

231 

232**Default commit attribution:**

233 

234```

235🤖 Generated with [Claude Code](https://claude.com/claude-code)

236 

237 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

238```

239 

240**Default pull request attribution:**

241 

242```

243🤖 Generated with [Claude Code](https://claude.com/claude-code)

244```

245 

246**Example:**

247 

248```json theme={null}

249{

250 "attribution": {

251 "commit": "Generated with AI\n\nCo-Authored-By: AI <ai@example.com>",

252 "pr": ""

253 }

254}

255```

256 

257<Note>

258 The `attribution` setting takes precedence over the deprecated `includeCoAuthoredBy` setting. To hide all attribution, set `commit` and `pr` to empty strings.

259</Note>

260 

261### File suggestion settings

262 

263Configure a custom command for `@` file path autocomplete. The built-in file suggestion uses fast filesystem traversal, but large monorepos may benefit from project-specific indexing such as a pre-built file index or custom tooling.

264 

265```json theme={null}

266{

267 "fileSuggestion": {

268 "type": "command",

269 "command": "~/.claude/file-suggestion.sh"

270 }

271}

272```

273 

274The command runs with the same environment variables as [hooks](/en/hooks), including `CLAUDE_PROJECT_DIR`. It receives JSON via stdin with a `query` field:

275 

276```json theme={null}

277{"query": "src/comp"}

278```

279 

280Output newline-separated file paths to stdout (currently limited to 15):

281 

282```

283src/components/Button.tsx

284src/components/Modal.tsx

285src/components/Form.tsx

286```

287 

288**Example:**

289 

290```bash theme={null}

291#!/bin/bash

292query=$(cat | jq -r '.query')

293your-repo-file-index --query "$query" | head -20

294```

295 

296### Hook configuration

297 

298**Managed settings only**: Controls which hooks are allowed to run. This setting can only be configured in [managed settings](#settings-files) and provides administrators with strict control over hook execution.

299 

300**Behavior when `allowManagedHooksOnly` is `true`:**

301 

302* Managed hooks and SDK hooks are loaded

303* User hooks, project hooks, and plugin hooks are blocked

304 

305**Configuration:**

306 

307```json theme={null}

308{

309 "allowManagedHooksOnly": true

310}

311```

312 

146### Settings precedence313### Settings precedence

147 314 

148Settings apply in order of precedence. From highest to lowest:315Settings apply in order of precedence. From highest to lowest:

149 316 

1501. **Enterprise managed policies** (`managed-settings.json`)3171. **Managed settings** (`managed-settings.json`)

151 * Deployed by IT/DevOps318 * Policies deployed by IT/DevOps to system directories

152 * Can't be overridden319 * Cannot be overridden by user or project settings

153 320 

1542. **Command line arguments**3212. **Command line arguments**

155 * Temporary overrides for a specific session322 * Temporary overrides for a specific session


1635. **User settings** (`~/.claude/settings.json`)3305. **User settings** (`~/.claude/settings.json`)

164 * Personal global settings331 * Personal global settings

165 332 

166This hierarchy ensures that enterprise security policies are always enforced while still allowing teams and individuals to customize their experience.333This hierarchy ensures that organizational policies are always enforced while still allowing teams and individuals to customize their experience.

167 334 

168For example, if your user settings allow `Bash(npm run:*)` but a project's shared settings deny it, the project setting takes precedence and the command is blocked.335For example, if your user settings allow `Bash(npm run:*)` but a project's shared settings deny it, the project setting takes precedence and the command is blocked.

169 336 


173* **Settings files (JSON)**: Configure permissions, environment variables, and tool behavior340* **Settings files (JSON)**: Configure permissions, environment variables, and tool behavior

174* **Slash commands**: Custom commands that can be invoked during a session with `/command-name`341* **Slash commands**: Custom commands that can be invoked during a session with `/command-name`

175* **MCP servers**: Extend Claude Code with additional tools and integrations342* **MCP servers**: Extend Claude Code with additional tools and integrations

176* **Precedence**: Higher-level configurations (Enterprise) override lower-level ones (User/Project)343* **Precedence**: Higher-level configurations (Managed) override lower-level ones (User/Project)

177* **Inheritance**: Settings are merged, with more specific settings adding to or overriding broader ones344* **Inheritance**: Settings are merged, with more specific settings adding to or overriding broader ones

178 345 

179### System prompt346### System prompt


220```json theme={null}387```json theme={null}

221{388{

222 "enabledPlugins": {389 "enabledPlugins": {

223 "formatter@company-tools": true,390 "formatter@acme-tools": true,

224 "deployer@company-tools": true,391 "deployer@acme-tools": true,

225 "analyzer@security-plugins": false392 "analyzer@security-plugins": false

226 },393 },

227 "extraKnownMarketplaces": {394 "extraKnownMarketplaces": {

228 "company-tools": {395 "acme-tools": {

229 "source": "github",396 "source": "github",

230 "repo": "company/claude-plugins"397 "repo": "acme-corp/claude-plugins"

231 }398 }

232 }399 }

233}400}


271```json theme={null}438```json theme={null}

272{439{

273 "extraKnownMarketplaces": {440 "extraKnownMarketplaces": {

274 "company-tools": {441 "acme-tools": {

275 "source": {442 "source": {

276 "source": "github",443 "source": "github",

277 "repo": "company-org/claude-plugins"444 "repo": "acme-corp/claude-plugins"

278 }445 }

279 },446 },

280 "security-plugins": {447 "security-plugins": {

281 "source": {448 "source": {

282 "source": "git",449 "source": "git",

283 "url": "https://git.company.com/security/plugins.git"450 "url": "https://git.example.com/security/plugins.git"

284 }451 }

285 }452 }

286 }453 }


293* `git`: Any git URL (uses `url`)460* `git`: Any git URL (uses `url`)

294* `directory`: Local filesystem path (uses `path`, for development only)461* `directory`: Local filesystem path (uses `path`, for development only)

295 462 

463#### `strictKnownMarketplaces`

464 

465**Managed settings only**: Controls which plugin marketplaces users are allowed to add. This setting can only be configured in [`managed-settings.json`](/en/iam#managed-settings) and provides administrators with strict control over marketplace sources.

466 

467**Managed settings file locations**:

468 

469* **macOS**: `/Library/Application Support/ClaudeCode/managed-settings.json`

470* **Linux and WSL**: `/etc/claude-code/managed-settings.json`

471* **Windows**: `C:\Program Files\ClaudeCode\managed-settings.json`

472 

473**Key characteristics**:

474 

475* Only available in managed settings (`managed-settings.json`)

476* Cannot be overridden by user or project settings (highest precedence)

477* Enforced BEFORE network/filesystem operations (blocked sources never execute)

478* Uses exact matching for source specifications (including `ref`, `path` for git sources)

479 

480**Allowlist behavior**:

481 

482* `undefined` (default): No restrictions - users can add any marketplace

483* Empty array `[]`: Complete lockdown - users cannot add any new marketplaces

484* List of sources: Users can only add marketplaces that match exactly

485 

486**All supported source types**:

487 

488The allowlist supports six marketplace source types. Each source must match exactly for a user's marketplace addition to be allowed.

489 

4901. **GitHub repositories**:

491 

492```json theme={null}

493{ "source": "github", "repo": "acme-corp/approved-plugins" }

494{ "source": "github", "repo": "acme-corp/security-tools", "ref": "v2.0" }

495{ "source": "github", "repo": "acme-corp/plugins", "ref": "main", "path": "marketplace" }

496```

497 

498Fields: `repo` (required), `ref` (optional: branch/tag/SHA), `path` (optional: subdirectory)

499 

5002. **Git repositories**:

501 

502```json theme={null}

503{ "source": "git", "url": "https://gitlab.example.com/tools/plugins.git" }

504{ "source": "git", "url": "https://bitbucket.org/acme-corp/plugins.git", "ref": "production" }

505{ "source": "git", "url": "ssh://git@git.example.com/plugins.git", "ref": "v3.1", "path": "approved" }

506```

507 

508Fields: `url` (required), `ref` (optional: branch/tag/SHA), `path` (optional: subdirectory)

509 

5103. **URL-based marketplaces**:

511 

512```json theme={null}

513{ "source": "url", "url": "https://plugins.example.com/marketplace.json" }

514{ "source": "url", "url": "https://cdn.example.com/marketplace.json", "headers": { "Authorization": "Bearer ${TOKEN}" } }

515```

516 

517Fields: `url` (required), `headers` (optional: HTTP headers for authenticated access)

518 

5194. **NPM packages**:

520 

521```json theme={null}

522{ "source": "npm", "package": "@acme-corp/claude-plugins" }

523{ "source": "npm", "package": "@acme-corp/approved-marketplace" }

524```

525 

526Fields: `package` (required, supports scoped packages)

527 

5285. **File paths**:

529 

530```json theme={null}

531{ "source": "file", "path": "/usr/local/share/claude/acme-marketplace.json" }

532{ "source": "file", "path": "/opt/acme-corp/plugins/marketplace.json" }

533```

534 

535Fields: `path` (required: absolute path to marketplace.json file)

536 

5376. **Directory paths**:

538 

539```json theme={null}

540{ "source": "directory", "path": "/usr/local/share/claude/acme-plugins" }

541{ "source": "directory", "path": "/opt/acme-corp/approved-marketplaces" }

542```

543 

544Fields: `path` (required: absolute path to directory containing `.claude-plugin/marketplace.json`)

545 

546**Configuration examples**:

547 

548Example - Allow specific marketplaces only:

549 

550```json theme={null}

551{

552 "strictKnownMarketplaces": [

553 {

554 "source": "github",

555 "repo": "acme-corp/approved-plugins"

556 },

557 {

558 "source": "github",

559 "repo": "acme-corp/security-tools",

560 "ref": "v2.0"

561 },

562 {

563 "source": "url",

564 "url": "https://plugins.example.com/marketplace.json"

565 },

566 {

567 "source": "npm",

568 "package": "@acme-corp/compliance-plugins"

569 }

570 ]

571}

572```

573 

574Example - Disable all marketplace additions:

575 

576```json theme={null}

577{

578 "strictKnownMarketplaces": []

579}

580```

581 

582**Exact matching requirements**:

583 

584Marketplace sources must match **exactly** for a user's addition to be allowed. For git-based sources (`github` and `git`), this includes all optional fields:

585 

586* The `repo` or `url` must match exactly

587* The `ref` field must match exactly (or both be undefined)

588* The `path` field must match exactly (or both be undefined)

589 

590Examples of sources that **do NOT match**:

591 

592```json theme={null}

593// These are DIFFERENT sources:

594{ "source": "github", "repo": "acme-corp/plugins" }

595{ "source": "github", "repo": "acme-corp/plugins", "ref": "main" }

596 

597// These are also DIFFERENT:

598{ "source": "github", "repo": "acme-corp/plugins", "path": "marketplace" }

599{ "source": "github", "repo": "acme-corp/plugins" }

600```

601 

602**Comparison with `extraKnownMarketplaces`**:

603 

604| Aspect | `strictKnownMarketplaces` | `extraKnownMarketplaces` |

605| --------------------- | ------------------------------------ | ------------------------------------ |

606| **Purpose** | Organizational policy enforcement | Team convenience |

607| **Settings file** | `managed-settings.json` only | Any settings file |

608| **Behavior** | Blocks non-allowlisted additions | Auto-installs missing marketplaces |

609| **When enforced** | Before network/filesystem operations | After user trust prompt |

610| **Can be overridden** | No (highest precedence) | Yes (by higher precedence settings) |

611| **Source format** | Direct source object | Named marketplace with nested source |

612| **Use case** | Compliance, security restrictions | Onboarding, standardization |

613 

614**Format difference**:

615 

616`strictKnownMarketplaces` uses direct source objects:

617 

618```json theme={null}

619{

620 "strictKnownMarketplaces": [

621 { "source": "github", "repo": "acme-corp/plugins" }

622 ]

623}

624```

625 

626`extraKnownMarketplaces` requires named marketplaces:

627 

628```json theme={null}

629{

630 "extraKnownMarketplaces": {

631 "acme-tools": {

632 "source": { "source": "github", "repo": "acme-corp/plugins" }

633 }

634 }

635}

636```

637 

638**Important notes**:

639 

640* Restrictions are checked BEFORE any network requests or filesystem operations

641* When blocked, users see clear error messages indicating the source is blocked by managed policy

642* The restriction applies only to adding NEW marketplaces; previously installed marketplaces remain accessible

643* Managed settings have the highest precedence and cannot be overridden

644 

645See [Managed marketplace restrictions](/en/plugin-marketplaces#managed-marketplace-restrictions) for user-facing documentation.

646 

296### Managing plugins647### Managing plugins

297 648 

298Use the `/plugin` command to manage plugins interactively:649Use the `/plugin` command to manage plugins interactively:


314</Note>665</Note>

315 666 

316| Variable | Purpose |667| Variable | Purpose |

317| :----------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |668| :-------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

318| `ANTHROPIC_API_KEY` | API key sent as `X-Api-Key` header, typically for the Claude SDK (for interactive usage, run `/login`) |669| `ANTHROPIC_API_KEY` | API key sent as `X-Api-Key` header, typically for the Claude SDK (for interactive usage, run `/login`) |

319| `ANTHROPIC_AUTH_TOKEN` | Custom value for the `Authorization` header (the value you set here will be prefixed with `Bearer `) |670| `ANTHROPIC_AUTH_TOKEN` | Custom value for the `Authorization` header (the value you set here will be prefixed with `Bearer `) |

320| `ANTHROPIC_CUSTOM_HEADERS` | Custom headers you want to add to the request (in `Name: Value` format) |671| `ANTHROPIC_CUSTOM_HEADERS` | Custom headers you want to add to the request (in `Name: Value` format) |


339| `CLAUDE_CODE_DISABLE_TERMINAL_TITLE` | Set to `1` to disable automatic terminal title updates based on conversation context |690| `CLAUDE_CODE_DISABLE_TERMINAL_TITLE` | Set to `1` to disable automatic terminal title updates based on conversation context |

340| `CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL` | Skip auto-installation of IDE extensions |691| `CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL` | Skip auto-installation of IDE extensions |

341| `CLAUDE_CODE_MAX_OUTPUT_TOKENS` | Set the maximum number of output tokens for most requests |692| `CLAUDE_CODE_MAX_OUTPUT_TOKENS` | Set the maximum number of output tokens for most requests |

693| `CLAUDE_CODE_OTEL_HEADERS_HELPER_DEBOUNCE_MS` | Interval for refreshing dynamic OpenTelemetry headers in milliseconds (default: 1740000 / 29 minutes). See [Dynamic headers](/en/monitoring-usage#dynamic-headers) |

342| `CLAUDE_CODE_SHELL_PREFIX` | Command prefix to wrap all bash commands (for example, for logging or auditing). Example: `/path/to/logger.sh` will execute `/path/to/logger.sh <command>` |694| `CLAUDE_CODE_SHELL_PREFIX` | Command prefix to wrap all bash commands (for example, for logging or auditing). Example: `/path/to/logger.sh` will execute `/path/to/logger.sh <command>` |

343| `CLAUDE_CODE_SKIP_BEDROCK_AUTH` | Skip AWS authentication for Bedrock (for example, when using an LLM gateway) |695| `CLAUDE_CODE_SKIP_BEDROCK_AUTH` | Skip AWS authentication for Bedrock (for example, when using an LLM gateway) |

344| `CLAUDE_CODE_SKIP_FOUNDRY_AUTH` | Skip Azure authentication for Microsoft Foundry (for example, when using an LLM gateway) |696| `CLAUDE_CODE_SKIP_FOUNDRY_AUTH` | Skip Azure authentication for Microsoft Foundry (for example, when using an LLM gateway) |


473## See also825## See also

474 826 

475* [Identity and Access Management](/en/iam#configuring-permissions) - Learn about Claude Code's permission system827* [Identity and Access Management](/en/iam#configuring-permissions) - Learn about Claude Code's permission system

476* [IAM and access control](/en/iam#enterprise-managed-policy-settings) - Enterprise policy management828* [IAM and access control](/en/iam#managed-settings) - Managed policy configuration

477* [Troubleshooting](/en/troubleshooting#auto-updater-issues) - Solutions for common configuration issues829* [Troubleshooting](/en/troubleshooting#auto-updater-issues) - Solutions for common configuration issues

478 830 

479 831 

setup.md +16 −20

Details

21 21 

22<Tabs>22<Tabs>

23 <Tab title="Native Install (Recommended)">23 <Tab title="Native Install (Recommended)">

24 **Homebrew (macOS, Linux):**

25 

26 ```sh theme={null} theme={null}

27 brew install --cask claude-code

28 ```

29 

30 **macOS, Linux, WSL:**24 **macOS, Linux, WSL:**

31 25 

32 ```bash theme={null} theme={null}26 ```bash theme={null}

33 curl -fsSL https://claude.ai/install.sh | bash27 curl -fsSL https://claude.ai/install.sh | bash

34 ```28 ```

35 29 

36 **Windows PowerShell:**30 **Windows PowerShell:**

37 31 

38 ```powershell theme={null} theme={null}32 ```powershell theme={null}

39 irm https://claude.ai/install.ps1 | iex33 irm https://claude.ai/install.ps1 | iex

40 ```34 ```

41 35 

42 **Windows CMD:**36 **Windows CMD:**

43 37 

44 ```batch theme={null} theme={null}38 ```batch theme={null}

45 curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd39 curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd

46 ```40 ```

47 </Tab>41 </Tab>

48 42 

43 <Tab title="Homebrew">

44 ```sh theme={null}

45 brew install --cask claude-code

46 ```

47 </Tab>

48 

49 <Tab title="NPM">49 <Tab title="NPM">

50 If you have [Node.js 18 or newer installed](https://nodejs.org/en/download/):50 If you have [Node.js 18 or newer installed](https://nodejs.org/en/download/):

51 51 

52 ```sh theme={null} theme={null}52 ```sh theme={null}

53 npm install -g @anthropic-ai/claude-code53 npm install -g @anthropic-ai/claude-code

54 ```54 ```

55 </Tab>55 </Tab>


129 **Alpine Linux and other musl/uClibc-based distributions**: The native build requires `libgcc`, `libstdc++`, and `ripgrep`. For Alpine: `apk add libgcc libstdc++ ripgrep`. Set `USE_BUILTIN_RIPGREP=0`.129 **Alpine Linux and other musl/uClibc-based distributions**: The native build requires `libgcc`, `libstdc++`, and `ripgrep`. For Alpine: `apk add libgcc libstdc++ ripgrep`. Set `USE_BUILTIN_RIPGREP=0`.

130</Note>130</Note>

131 131 

132<Note>

133 Claude Code installed via Homebrew will auto-update outside of the brew directory unless explicitly disabled with the `DISABLE_AUTOUPDATER` environment variable (see [Auto updates](#auto-updates) section).

134</Note>

135 

136**Windows PowerShell:**132**Windows PowerShell:**

137 133 

138```powershell theme={null}134```powershell theme={null}


220 216 

221### Native installation217### Native installation

222 218 

223Remove the Claude Code binary and symlink:219Remove the Claude Code binary and version files:

224 220 

225**macOS, Linux, WSL:**221**macOS, Linux, WSL:**

226 222 

227```bash theme={null}223```bash theme={null}

228rm -f ~/.local/bin/claude224rm -f ~/.local/bin/claude

229rm -rf ~/.claude-code225rm -rf ~/.local/share/claude

230```226```

231 227 

232**Windows PowerShell:**228**Windows PowerShell:**

233 229 

234```powershell theme={null}230```powershell theme={null}

235Remove-Item -Path "$env:LOCALAPPDATA\Programs\claude-code" -Recurse -Force231Remove-Item -Path "$env:USERPROFILE\.local\bin\claude.exe" -Force

236Remove-Item -Path "$env:LOCALAPPDATA\Microsoft\WindowsApps\claude.exe" -Force232Remove-Item -Path "$env:USERPROFILE\.local\share\claude" -Recurse -Force

237```233```

238 234 

239**Windows CMD:**235**Windows CMD:**

240 236 

241```batch theme={null}237```batch theme={null}

242rmdir /s /q "%LOCALAPPDATA%\Programs\claude-code"238del "%USERPROFILE%\.local\bin\claude.exe"

243del "%LOCALAPPDATA%\Microsoft\WindowsApps\claude.exe"239rmdir /s /q "%USERPROFILE%\.local\share\claude"

244```240```

245 241 

246### Homebrew installation242### Homebrew installation

skills.md +276 −405

Details

2 2 

3> Create, manage, and share Skills to extend Claude's capabilities in Claude Code.3> Create, manage, and share Skills to extend Claude's capabilities in Claude Code.

4 4 

5This guide shows you how to create, use, and manage Agent Skills in Claude Code. Skills are modular capabilities that extend Claude's functionality through organized folders containing instructions, scripts, and resources.5This guide shows you how to create, use, and manage Agent Skills in Claude Code. For background on how Skills work across Claude products, see [What are Skills?](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview).

6 6 

7## Prerequisites7A Skill is a markdown file that teaches Claude how to do something specific: reviewing PRs using your team's standards, generating commit messages in your preferred format, or querying your company's database schema. When you ask Claude something that matches a Skill's purpose, Claude automatically applies it.

8 8 

9* Claude Code version 1.0 or later9## Create your first Skill

10* Basic familiarity with [Claude Code](/en/quickstart)

11 10 

12## What are Agent Skills?11This example creates a personal Skill that teaches Claude to explain code using visual diagrams and analogies. Unlike Claude's default explanations, this Skill ensures every explanation includes an ASCII diagram and a real-world analogy.

13 12 

14Agent Skills package expertise into discoverable capabilities. Each Skill consists of a `SKILL.md` file with instructions that Claude reads when relevant, plus optional supporting files like scripts and templates.13<Steps>

14 <Step title="Check available Skills">

15 Before creating a Skill, see what Skills Claude already has access to:

15 16 

16**How Skills are invoked**: Skills are **model-invoked**—Claude autonomously decides when to use them based on your request and the Skill's description. This is different from slash commands, which are **user-invoked** (you explicitly type `/command` to trigger them).17 ```

18 What Skills are available?

19 ```

17 20 

18**Benefits**:21 Claude will list any Skills currently loaded. You may see none, or you may see Skills from plugins or your organization.

22 </Step>

19 23 

20* Extend Claude's capabilities for your specific workflows24 <Step title="Create the Skill directory">

21* Share expertise across your team via git25 Create a directory for the Skill in your personal Skills folder. Personal Skills are available across all your projects. (You can also create [project Skills](#where-skills-live) in `.claude/skills/` to share with your team.)

22* Reduce repetitive prompting

23* Compose multiple Skills for complex tasks

24 26 

25Learn more in the [Agent Skills overview](https://docs.claude.com/en/docs/agents-and-tools/agent-skills/overview).27 ```bash theme={null}

28 mkdir -p ~/.claude/skills/explaining-code

29 ```

30 </Step>

26 31 

27<Note>32 <Step title="Write SKILL.md">

28 For a deep dive into the architecture and real-world applications of Agent Skills, read our engineering blog: [Equipping agents for the real world with Agent Skills](https://www.anthropic.com/engineering/equipping-agents-for-the-real-world-with-agent-skills).33 Every Skill needs a `SKILL.md` file. The file starts with YAML metadata between `---` markers and must include a `name` and `description`, followed by Markdown instructions that Claude follows when the Skill is active.

29</Note>

30 34 

31## Create a Skill35 The `description` is especially important, because Claude uses it to decide when to apply the Skill.

32 36 

33Skills are stored as directories containing a `SKILL.md` file.37 Create `~/.claude/skills/explaining-code/SKILL.md`:

34 38 

35### Personal Skills39 ```yaml theme={null}

40 ---

41 name: explaining-code

42 description: Explains code with visual diagrams and analogies. Use when explaining how code works, teaching about a codebase, or when the user asks "how does this work?"

43 ---

36 44 

37Personal Skills are available across all your projects. Store them in `~/.claude/skills/`:45 When explaining code, always include:

38 46 

39```bash theme={null}47 1. **Start with an analogy**: Compare the code to something from everyday life

40mkdir -p ~/.claude/skills/my-skill-name48 2. **Draw a diagram**: Use ASCII art to show the flow, structure, or relationships

41```49 3. **Walk through the code**: Explain step-by-step what happens

50 4. **Highlight a gotcha**: What's a common mistake or misconception?

42 51 

43**Use personal Skills for**:52 Keep explanations conversational. For complex concepts, use multiple analogies.

53 ```

54 </Step>

44 55 

45* Your individual workflows and preferences56 <Step title="Load and verify the Skill">

46* Experimental Skills you're developing57 Exit and restart Claude Code to load the new Skill. Then verify it appears in the list:

47* Personal productivity tools

48 58 

49### Project Skills59 ```

60 What Skills are available?

61 ```

50 62 

51Project Skills are shared with your team. Store them in `.claude/skills/` within your project:63 You should see `explaining-code` in the list with its description.

64 </Step>

52 65 

53```bash theme={null}66 <Step title="Test the Skill">

54mkdir -p .claude/skills/my-skill-name67 Open any file in your project and ask Claude a question that matches the Skill's description:

55```

56 68 

57**Use project Skills for**:69 ```

70 How does this code work?

71 ```

58 72 

59* Team workflows and conventions73 Claude should ask to use the `explaining-code` Skill, then include an analogy and ASCII diagram in its explanation. If the Skill doesn't trigger, try rephrasing to include more keywords from the description, like "explain how this works."

60* Project-specific expertise74 </Step>

61* Shared utilities and scripts75</Steps>

62 76 

63Project Skills are checked into git and automatically available to team members.77The rest of this guide covers how Skills work, configuration options, and troubleshooting.

64 78 

65### Plugin Skills79## How Skills work

66 80 

67Skills can also come from [Claude Code plugins](/en/plugins). Plugins may bundle Skills that are automatically available when the plugin is installed. These Skills work the same way as personal and project Skills.81Skills are **model-invoked**: Claude decides which Skills to use based on your request. You don't need to explicitly call a Skill. Claude automatically applies relevant Skills when your request matches their description.

68 82 

69## Write SKILL.md83When you send a request, Claude follows these steps to find and use relevant Skills:

70 84 

71Create a `SKILL.md` file with YAML frontmatter and Markdown content:85<Steps>

86 <Step title="Discovery">

87 At startup, Claude loads only the name and description of each available Skill. This keeps startup fast while giving Claude enough context to know when each Skill might be relevant.

88 </Step>

72 89 

73```yaml theme={null}90 <Step title="Activation">

74name: your-skill-name91 When your request matches a Skill's description, Claude asks to use the Skill. You'll see a confirmation prompt before the full `SKILL.md` is loaded into context. Since Claude reads these descriptions to find relevant Skills, [write descriptions](#skill-not-triggering) that include keywords users would naturally say.

75description: Brief description of what this Skill does and when to use it92 </Step>

76 93 

77# Your Skill Name94 <Step title="Execution">

95 Claude follows the Skill's instructions, loading referenced files or running bundled scripts as needed.

96 </Step>

97</Steps>

78 98 

79## Instructions99### Where Skills live

80Provide clear, step-by-step guidance for Claude.

81 100 

82## Examples101Where you store a Skill determines who can use it:

83Show concrete examples of using this Skill.

84```

85 102 

86**Field requirements**:103| Location | Path | Applies to |

104| :--------- | :----------------------------------------------- | :-------------------------------- |

105| Enterprise | See [managed settings](/en/iam#managed-settings) | All users in your organization |

106| Personal | `~/.claude/skills/` | You, across all projects |

107| Project | `.claude/skills/` | Anyone working in this repository |

108| Plugin | Bundled with [plugins](/en/plugins) | Anyone with the plugin installed |

87 109 

88* `name`: Must use lowercase letters, numbers, and hyphens only (max 64 characters)110If two Skills have the same name, the higher row wins: managed overrides personal, personal overrides project, and project overrides plugin.

89* `description`: Brief description of what the Skill does and when to use it (max 1024 characters)

90 111 

91The `description` field is critical for Claude to discover when to use your Skill. It should include both what the Skill does and when Claude should use it.112### When to use Skills versus other options

92 113 

93See the [best practices guide](https://docs.claude.com/en/docs/agents-and-tools/agent-skills/best-practices) for complete authoring guidance including validation rules.114Claude Code offers several ways to customize behavior. The key difference: **Skills are triggered automatically by Claude** based on your request, while slash commands require you to type `/command` explicitly.

94 

95## Add supporting files

96 115 

97Create additional files alongside SKILL.md:116| Use this | When you want to... | When it runs |

117| :--------------------------------------- | :------------------------------------------------------------------------- | :----------------------------------------- |

118| **Skills** | Give Claude specialized knowledge (e.g., "review PRs using our standards") | Claude chooses when relevant |

119| **[Slash commands](/en/slash-commands)** | Create reusable prompts (e.g., `/deploy staging`) | You type `/command` to run it |

120| **[CLAUDE.md](/en/memory)** | Set project-wide instructions (e.g., "use TypeScript strict mode") | Loaded into every conversation |

121| **[Subagents](/en/sub-agents)** | Delegate tasks to a separate context with its own tools | Claude delegates, or you invoke explicitly |

122| **[Hooks](/en/hooks)** | Run scripts on events (e.g., lint on file save) | Fires on specific tool events |

123| **[MCP servers](/en/mcp)** | Connect Claude to external tools and data sources | Claude calls MCP tools as needed |

98 124 

99```125**Skills vs. subagents**: Skills add knowledge to the current conversation. Subagents run in a separate context with their own tools. Use Skills for guidance and standards; use subagents when you need isolation or different tool access.

100my-skill/

101├── SKILL.md (required)

102├── reference.md (optional documentation)

103├── examples.md (optional examples)

104├── scripts/

105│ └── helper.py (optional utility)

106└── templates/

107 └── template.txt (optional template)

108```

109 126 

110Reference these files from SKILL.md:127**Skills vs. MCP**: Skills tell Claude *how* to use tools; MCP *provides* the tools. For example, an MCP server connects Claude to your database, while a Skill teaches Claude your data model and query patterns.

111 128 

112````markdown theme={null}129<Note>

113For advanced usage, see [reference.md](reference.md).130 For a deep dive into the architecture and real-world applications of Agent Skills, read [Equipping agents for the real world with Agent Skills](https://www.anthropic.com/engineering/equipping-agents-for-the-real-world-with-agent-skills).

131</Note>

114 132 

115Run the helper script:133## Configure Skills

116```bash

117python scripts/helper.py input.txt

118```

119````

120 134 

121Claude reads these files only when needed, using progressive disclosure to manage context efficiently.135This section covers Skill file structure, supporting files, tool restrictions, and distribution options.

122 136 

123## Restrict tool access with allowed-tools137### Write SKILL.md

124 138 

125Use the `allowed-tools` frontmatter field to limit which tools Claude can use when a Skill is active:139The `SKILL.md` file is the only required file in a Skill. It has two parts: YAML metadata (the section between `---` markers) at the top, and Markdown instructions that tell Claude how to use the Skill:

126 140 

127```yaml theme={null}141```yaml theme={null}

128---142---

129name: safe-file-reader143name: your-skill-name

130description: Read files without making changes. Use when you need read-only file access.144description: Brief description of what this Skill does and when to use it

131allowed-tools: Read, Grep, Glob

132---145---

133 146 

134# Safe File Reader147# Your Skill Name

135 

136This Skill provides read-only file access.

137 148 

138## Instructions149## Instructions

1391. Use Read to view file contents150Provide clear, step-by-step guidance for Claude.

1402. Use Grep to search within files

1413. Use Glob to find files by pattern

142```

143 

144When this Skill is active, Claude can only use the specified tools (Read, Grep, Glob) without needing to ask for permission. This is useful for:

145 

146* Read-only Skills that shouldn't modify files

147* Skills with limited scope: for example, only data analysis, no file writing

148* Security-sensitive workflows where you want to restrict capabilities

149 

150If `allowed-tools` isn't specified, Claude will ask for permission to use tools as normal, following the standard permission model.

151 

152<Note>

153 `allowed-tools` is only supported for Skills in Claude Code.

154</Note>

155 

156## View available Skills

157 

158Skills are automatically discovered by Claude from three sources:

159 

160* Personal Skills: `~/.claude/skills/`

161* Project Skills: `.claude/skills/`

162* Plugin Skills: bundled with installed plugins

163 

164**To view all available Skills**, ask Claude directly:

165 

166```

167What Skills are available?

168```

169 

170or

171 

172```

173List all available Skills

174```

175 

176This will show all Skills from all sources, including plugin Skills.

177 

178**To inspect a specific Skill**, you can also check the filesystem:

179 

180```bash theme={null}

181# List personal Skills

182ls ~/.claude/skills/

183 

184# List project Skills (if in a project directory)

185ls .claude/skills/

186 

187# View a specific Skill's content

188cat ~/.claude/skills/my-skill/SKILL.md

189```

190 

191## Test a Skill

192 

193After creating a Skill, test it by asking questions that match your description.

194 

195**Example**: If your description mentions "PDF files":

196 

197```

198Can you help me extract text from this PDF?

199```

200 

201Claude autonomously decides to use your Skill if it matches the request—you don't need to explicitly invoke it. The Skill activates automatically based on the context of your question.

202 

203## Debug a Skill

204 

205If Claude doesn't use your Skill, check these common issues:

206 

207### Make description specific

208 

209**Too vague**:

210 

211```yaml theme={null}

212description: Helps with documents

213```

214 

215**Specific**:

216 

217```yaml theme={null}

218description: Extract text and tables from PDF files, fill forms, merge documents. Use when working with PDF files or when the user mentions PDFs, forms, or document extraction.

219```

220 

221Include both what the Skill does and when to use it in the description.

222 

223### Verify file path

224 

225**Personal Skills**: `~/.claude/skills/skill-name/SKILL.md`

226**Project Skills**: `.claude/skills/skill-name/SKILL.md`

227 

228Check the file exists:

229 

230```bash theme={null}

231# Personal

232ls ~/.claude/skills/my-skill/SKILL.md

233 

234# Project

235ls .claude/skills/my-skill/SKILL.md

236```

237 

238### Check YAML syntax

239 

240Invalid YAML prevents the Skill from loading. Verify the frontmatter:

241 

242```bash theme={null}

243cat SKILL.md | head -n 10

244```

245 

246Ensure:

247 

248* Opening `---` on line 1

249* Closing `---` before Markdown content

250* Valid YAML syntax (no tabs, correct indentation)

251 

252### View errors

253 

254Run Claude Code with debug mode to see Skill loading errors:

255 151 

256```bash theme={null}152## Examples

257claude --debug153Show concrete examples of using this Skill.

258```154```

259 155 

260## Share Skills with your team156#### Available metadata fields

261 

262**Recommended approach**: Distribute Skills through [plugins](/en/plugins).

263 

264To share Skills via plugin:

265 

2661. Create a plugin with Skills in the `skills/` directory

2672. Add the plugin to a marketplace

2683. Team members install the plugin

269 

270For complete instructions, see [Add Skills to your plugin](/en/plugins#add-skills-to-your-plugin).

271 157 

272You can also share Skills directly through project repositories:158You can use the following fields in the YAML frontmatter:

273 159 

274### Step 1: Add Skill to your project160| Field | Required | Description |

161| :-------------- | :------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

162| `name` | Yes | Skill name. Must use lowercase letters, numbers, and hyphens only (max 64 characters). Should match the directory name. |

163| `description` | Yes | What the Skill does and when to use it (max 1024 characters). Claude uses this to decide when to apply the Skill. |

164| `allowed-tools` | No | Tools Claude can use without asking permission when this Skill is active. See [Restrict tool access](#restrict-tool-access-with-allowed-tools). |

165| `model` | No | [Model](https://docs.claude.com/en/docs/about-claude/models/overview) to use when this Skill is active (e.g., `claude-sonnet-4-20250514`). Defaults to the conversation's model. |

275 166 

276Create a project Skill:167See the [best practices guide](https://docs.claude.com/en/docs/agents-and-tools/agent-skills/best-practices) for complete authoring guidance including validation rules.

277 

278```bash theme={null}

279mkdir -p .claude/skills/team-skill

280# Create SKILL.md

281```

282 168 

283### Step 2: Commit to git169### Update or delete a Skill

284 170 

285```bash theme={null}171To update a Skill, edit its `SKILL.md` file directly. To remove a Skill, delete its directory. Exit and restart Claude Code for changes to take effect.

286git add .claude/skills/

287git commit -m "Add team Skill for PDF processing"

288git push

289```

290 172 

291### Step 3: Team members get Skills automatically173### Add supporting files with progressive disclosure

292 174 

293When team members pull the latest changes, Skills are immediately available:175Skills share Claude's context window with conversation history, other Skills, and your request. To keep context focused, use **progressive disclosure**: put essential information in `SKILL.md` and detailed reference material in separate files that Claude reads only when needed.

294 176 

295```bash theme={null}177This approach lets you bundle comprehensive documentation, examples, and scripts without consuming context upfront. Claude loads additional files only when the task requires them.

296git pull

297claude # Skills are now available

298```

299 178 

300## Update a Skill179<Tip>Keep `SKILL.md` under 500 lines for optimal performance. If your content exceeds this, split detailed reference material into separate files.</Tip>

301 180 

302Edit SKILL.md directly:181#### Example: multi-file Skill structure

303 182 

304```bash theme={null}183Claude discovers supporting files through links in your `SKILL.md`. The following example shows a Skill with detailed documentation in separate files and utility scripts that Claude can execute without reading:

305# Personal Skill

306code ~/.claude/skills/my-skill/SKILL.md

307 184 

308# Project Skill

309code .claude/skills/my-skill/SKILL.md

310```185```

311 186my-skill/

312Changes take effect the next time you start Claude Code. If Claude Code is already running, restart it to load the updates.187├── SKILL.md (required - overview and navigation)

313 188├── reference.md (detailed API docs - loaded when needed)

314## Remove a Skill189├── examples.md (usage examples - loaded when needed)

315 190└── scripts/

316Delete the Skill directory:191 └── helper.py (utility script - executed, not loaded)

317 

318```bash theme={null}

319# Personal

320rm -rf ~/.claude/skills/my-skill

321 

322# Project

323rm -rf .claude/skills/my-skill

324git commit -m "Remove unused Skill"

325```192```

326 193 

327## Best practices194The `SKILL.md` file references these supporting files so Claude knows they exist:

328 

329### Keep Skills focused

330 

331One Skill should address one capability:

332 

333**Focused**:

334 195 

335* "PDF form filling"196````markdown theme={null}

336* "Excel data analysis"197## Overview

337* "Git commit messages"

338 

339**Too broad**:

340 198 

341* "Document processing" (split into separate Skills)199[Essential instructions here]

342* "Data tools" (split by data type or operation)

343 200 

344### Write clear descriptions201## Additional resources

345 202 

346Help Claude discover when to use Skills by including specific triggers in your description:203- For complete API details, see [reference.md](reference.md)

204- For usage examples, see [examples.md](examples.md)

347 205 

348**Clear**:206## Utility scripts

349 207 

350```yaml theme={null}208To validate input files, run the helper script. It checks for required fields and returns any validation errors:

351description: Analyze Excel spreadsheets, create pivot tables, and generate charts. Use when working with Excel files, spreadsheets, or analyzing tabular data in .xlsx format.209```bash

352```210python scripts/helper.py input.txt

353 

354**Vague**:

355 

356```yaml theme={null}

357description: For files

358```211```

212````

359 213 

360### Test with your team214<Tip>Keep references one level deep. Link directly from `SKILL.md` to reference files. Deeply nested references (file A links to file B which links to file C) may result in Claude partially reading files.</Tip>

361 

362Have teammates use Skills and provide feedback:

363 215 

364* Does the Skill activate when expected?216**Bundle utility scripts for zero-context execution.** Scripts in your Skill directory can be executed without loading their contents into context. Claude runs the script and only the output consumes tokens. This is useful for:

365* Are the instructions clear?

366* Are there missing examples or edge cases?

367 217 

368### Document Skill versions218* Complex validation logic that would be verbose to describe in prose

219* Data processing that's more reliable as tested code than generated code

220* Operations that benefit from consistency across uses

369 221 

370You can document Skill versions in your SKILL.md content to track changes over time. Add a version history section:222In `SKILL.md`, tell Claude to run the script rather than read it:

371 223 

372```markdown theme={null}224```markdown theme={null}

373# My Skill225Run the validation script to check the form:

374 226python scripts/validate_form.py input.pdf

375## Version History

376- v2.0.0 (2025-10-01): Breaking changes to API

377- v1.1.0 (2025-09-15): Added new features

378- v1.0.0 (2025-09-01): Initial release

379```227```

380 228 

381This helps team members understand what changed between versions.229For complete guidance on structuring Skills, see the [best practices guide](https://docs.claude.com/en/docs/agents-and-tools/agent-skills/best-practices#progressive-disclosure-patterns).

382 230 

383## Troubleshooting231### Restrict tool access with allowed-tools

384 

385### Claude doesn't use my Skill

386 

387**Symptom**: You ask a relevant question but Claude doesn't use your Skill.

388 

389**Check**: Is the description specific enough?

390 

391Vague descriptions make discovery difficult. Include both what the Skill does and when to use it, with key terms users would mention.

392 

393**Too generic**:

394 

395```yaml theme={null}

396description: Helps with data

397```

398 232 

399**Specific**:233Use the `allowed-tools` frontmatter field to limit which tools Claude can use when a Skill is active:

400 234 

401```yaml theme={null}235```yaml theme={null}

402description: Analyze Excel spreadsheets, generate pivot tables, create charts. Use when working with Excel files, spreadsheets, or .xlsx files.236---

403```237name: reading-files-safely

404 238description: Read files without making changes. Use when you need read-only file access.

405**Check**: Is the YAML valid?239allowed-tools: Read, Grep, Glob

240---

406 241 

407Run validation to check for syntax errors:242# Safe File Reader

408 243 

409```bash theme={null}244This Skill provides read-only file access.

410# View frontmatter

411cat .claude/skills/my-skill/SKILL.md | head -n 15

412 245 

413# Check for common issues246## Instructions

414# - Missing opening or closing ---2471. Use Read to view file contents

415# - Tabs instead of spaces2482. Use Grep to search within files

416# - Unquoted strings with special characters2493. Use Glob to find files by pattern

417```250```

418 251 

419**Check**: Is the Skill in the correct location?252When this Skill is active, Claude can only use the specified tools (Read, Grep, Glob) without needing to ask for permission. This is useful for:

420 

421```bash theme={null}

422# Personal Skills

423ls ~/.claude/skills/*/SKILL.md

424 

425# Project Skills

426ls .claude/skills/*/SKILL.md

427```

428 253 

429### Skill has errors254* Read-only Skills that shouldn't modify files

255* Skills with limited scope: for example, only data analysis, no file writing

256* Security-sensitive workflows where you want to restrict capabilities

430 257 

431**Symptom**: The Skill loads but doesn't work correctly.258If `allowed-tools` is omitted, the Skill doesn't restrict tools. Claude uses its standard permission model and may ask you to approve tool usage.

432 259 

433**Check**: Are dependencies available?260<Note>

261 `allowed-tools` is only supported for Skills in Claude Code.

262</Note>

434 263 

435Claude will automatically install required dependencies (or ask for permission to install them) when it needs them.264### Use Skills with subagents

436 265 

437**Check**: Do scripts have execute permissions?266[Subagents](/en/sub-agents) do not automatically inherit Skills from the main conversation. To give a custom subagent access to specific Skills, list them in the subagent's `skills` field in `.claude/agents/`:

438 267 

439```bash theme={null}268```yaml theme={null}

440chmod +x .claude/skills/my-skill/scripts/*.py269# .claude/agents/code-reviewer/AGENT.md

270---

271name: code-reviewer

272description: Review code for quality and best practices

273skills: pr-review, security-check

274---

441```275```

442 276 

443**Check**: Are file paths correct?277The listed Skills are loaded into the subagent's context when it starts. If the `skills` field is omitted, no Skills are preloaded for that subagent.

444 

445Use forward slashes (Unix style) in all paths:

446 

447**Correct**: `scripts/helper.py`

448**Wrong**: `scripts\helper.py` (Windows style)

449 

450### Multiple Skills conflict

451 

452**Symptom**: Claude uses the wrong Skill or seems confused between similar Skills.

453 

454**Be specific in descriptions**: Help Claude choose the right Skill by using distinct trigger terms in your descriptions.

455 

456Instead of:

457 

458```yaml theme={null}

459# Skill 1

460description: For data analysis

461 278 

462# Skill 2279<Note>

463description: For analyzing data280 Built-in agents (Explore, Plan, Verify) and the Task tool do not have access to your Skills. Only custom subagents you define in `.claude/agents/` with an explicit `skills` field can use Skills.

464```281</Note>

465 282 

466Use:283### Distribute Skills

467 284 

468```yaml theme={null}285You can share Skills in several ways:

469# Skill 1

470description: Analyze sales data in Excel files and CRM exports. Use for sales reports, pipeline analysis, and revenue tracking.

471 286 

472# Skill 2287* **Project Skills**: Commit `.claude/skills/` to version control. Anyone who clones the repository gets the Skills.

473description: Analyze log files and system metrics data. Use for performance monitoring, debugging, and system diagnostics.288* **Plugins**: To share Skills across multiple repositories, create a `skills/` directory in your [plugin](/en/plugins) with Skill folders containing `SKILL.md` files. Distribute through a [plugin marketplace](/en/plugin-marketplaces).

474```289* **Managed**: Administrators can deploy Skills organization-wide through [managed settings](/en/iam#managed-settings). See [Where Skills live](#where-skills-live) for managed Skill paths.

475 290 

476## Examples291## Examples

477 292 

293These examples show common Skill patterns, from minimal single-file Skills to multi-file Skills with supporting documentation and scripts.

294 

478### Simple Skill (single file)295### Simple Skill (single file)

479 296 

297A minimal Skill needs only a `SKILL.md` file with frontmatter and instructions. This example helps Claude generate commit messages by examining staged changes:

298 

480```299```

481commit-helper/300commit-helper/

482└── SKILL.md301└── SKILL.md


506- Explain what and why, not how323- Explain what and why, not how

507```324```

508 325 

509### Skill with tool permissions326### Use multiple files

510 

511```

512code-reviewer/

513└── SKILL.md

514```

515 

516```yaml theme={null}

517name: code-reviewer

518description: Review code for best practices and potential issues. Use when reviewing code, checking PRs, or analyzing code quality.

519allowed-tools: Read, Grep, Glob

520 327 

521# Code Reviewer328For complex Skills, use progressive disclosure to keep the main `SKILL.md` focused while providing detailed documentation in supporting files. This PDF processing Skill includes reference docs, utility scripts, and uses `allowed-tools` to restrict Claude to specific tools:

522 

523## Review checklist

524 

5251. Code organization and structure

5262. Error handling

5273. Performance considerations

5284. Security concerns

5295. Test coverage

530 

531## Instructions

532 

5331. Read the target files using Read tool

5342. Search for patterns using Grep

5353. Find related files using Glob

5364. Provide detailed feedback on code quality

537```

538 

539### Multi-file Skill

540 329 

541```330```

542pdf-processing/331pdf-processing/

543├── SKILL.md332├── SKILL.md # Overview and quick start

544├── FORMS.md333├── FORMS.md # Form field mappings and filling instructions

545├── REFERENCE.md334├── REFERENCE.md # API details for pypdf and pdfplumber

546└── scripts/335└── scripts/

547 ├── fill_form.py336 ├── fill_form.py # Utility to populate form fields

548 └── validate.py337 └── validate.py # Checks PDFs for required fields

549```338```

550 339 

551**SKILL.md**:340**`SKILL.md`**:

552 341 

553````yaml theme={null}342````yaml theme={null}

554---343---

555name: pdf-processing344name: pdf-processing

556description: Extract text, fill forms, merge PDFs. Use when working with PDF files, forms, or document extraction. Requires pypdf and pdfplumber packages.345description: Extract text, fill forms, merge PDFs. Use when working with PDF files, forms, or document extraction. Requires pypdf and pdfplumber packages.

346allowed-tools: Read, Bash(python:*)

557---347---

558 348 

559# PDF Processing349# PDF Processing


581````369````

582 370 

583<Note>371<Note>

584 List required packages in the description. Packages must be installed in your environment before Claude can use them.372 If your Skill requires external packages, list them in the description. Packages must be installed in your environment before Claude can use them.

585</Note>373</Note>

586 374 

587Claude loads additional files only when needed.375## Troubleshooting

376 

377### View and test Skills

378 

379To see which Skills Claude has access to, ask Claude a question like "What Skills are available?" Claude loads all available Skill names and descriptions into the context window when a conversation starts, so it can list the Skills it currently has access to.

380 

381To test a specific Skill, ask Claude to do a task that matches the Skill's description. For example, if your Skill has the description "Reviews pull requests for code quality", ask Claude to "Review the changes in my current branch." Claude automatically uses the Skill when the request matches its description.

382 

383### Skill not triggering

384 

385The description field is how Claude decides whether to use your Skill. Vague descriptions like "Helps with documents" don't give Claude enough information to match your Skill to relevant requests.

386 

387A good description answers two questions:

388 

3891. **What does this Skill do?** List the specific capabilities.

3902. **When should Claude use it?** Include trigger terms users would mention.

391 

392```yaml theme={null}

393description: Extract text and tables from PDF files, fill forms, merge documents. Use when working with PDF files or when the user mentions PDFs, forms, or document extraction.

394```

395 

396This description works because it names specific actions (extract, fill, merge) and includes keywords users would say (PDF, forms, document extraction).

397 

398### Skill doesn't load

399 

400**Check the file path.** Skills must be in the correct directory with the exact filename `SKILL.md` (case-sensitive):

401 

402| Type | Path |

403| :--------- | :---------------------------------------------------------------------- |

404| Personal | `~/.claude/skills/my-skill/SKILL.md` |

405| Project | `.claude/skills/my-skill/SKILL.md` |

406| Enterprise | See [Where Skills live](#where-skills-live) for platform-specific paths |

407| Plugin | `skills/my-skill/SKILL.md` inside the plugin directory |

408 

409**Check the YAML syntax.** Invalid YAML in the frontmatter prevents the Skill from loading. The frontmatter must start with `---` on line 1 (no blank lines before it), end with `---` before the Markdown content, and use spaces for indentation (not tabs).

410 

411**Run debug mode.** Use `claude --debug` to see Skill loading errors.

412 

413### Skill has errors

414 

415**Check dependencies are installed.** If your Skill uses external packages, they must be installed in your environment before Claude can use them.

416 

417**Check script permissions.** Scripts need execute permissions: `chmod +x scripts/*.py`

418 

419**Check file paths.** Use forward slashes (Unix style) in all paths. Use `scripts/helper.py`, not `scripts\helper.py`.

420 

421### Multiple Skills conflict

422 

423If Claude uses the wrong Skill or seems confused between similar Skills, the descriptions are probably too similar. Make each description distinct by using specific trigger terms.

424 

425For example, instead of two Skills with "data analysis" in both descriptions, differentiate them: one for "sales data in Excel files and CRM exports" and another for "log files and system metrics". The more specific your trigger terms, the easier it is for Claude to match the right Skill to your request.

426 

427### Plugin Skills not appearing

428 

429**Symptom**: You installed a plugin from a marketplace, but its Skills don't appear when you ask Claude "What Skills are available?"

430 

431**Solution**: Clear the plugin cache and reinstall:

432 

433```bash theme={null}

434rm -rf ~/.claude/plugins/cache

435```

436 

437Then restart Claude Code and reinstall the plugin:

438 

439```shell theme={null}

440/plugin install plugin-name@marketplace-name

441```

442 

443This forces Claude Code to re-download and re-register the plugin's Skills.

444 

445**If Skills still don't appear**, verify the plugin's directory structure is correct. Skills must be in a `skills/` directory at the plugin root:

446 

447```

448my-plugin/

449├── .claude-plugin/

450│ └── plugin.json

451└── skills/

452 └── my-skill/

453 └── SKILL.md

454```

588 455 

589## Next steps456## Next steps

590 457 

Details

30| `/model` | Select or change the AI model |30| `/model` | Select or change the AI model |

31| `/output-style [style]` | Set the output style directly or from a selection menu |31| `/output-style [style]` | Set the output style directly or from a selection menu |

32| `/permissions` | View or update [permissions](/en/iam#configuring-permissions) |32| `/permissions` | View or update [permissions](/en/iam#configuring-permissions) |

33| `/plan` | Enter plan mode directly from the prompt |

33| `/plugin` | Manage Claude Code plugins |34| `/plugin` | Manage Claude Code plugins |

34| `/pr-comments` | View pull request comments |35| `/pr-comments` | View pull request comments |

35| `/privacy-settings` | View and update your privacy settings |36| `/privacy-settings` | View and update your privacy settings |

36| `/release-notes` | View release notes |37| `/release-notes` | View release notes |

37| `/resume` | Resume a conversation |38| `/rename <name>` | Rename the current session for easier identification |

39| `/remote-env` | Configure remote session environment (claude.ai subscribers) |

40| `/resume [session]` | Resume a conversation by ID or name, or open the session picker |

38| `/review` | Request code review |41| `/review` | Request code review |

39| `/rewind` | Rewind the conversation and/or code |42| `/rewind` | Rewind the conversation and/or code |

40| `/sandbox` | Enable sandboxed bash tool with filesystem and network isolation for safer, more autonomous execution |43| `/sandbox` | Enable sandboxed bash tool with filesystem and network isolation for safer, more autonomous execution |

41| `/security-review` | Complete a security review of pending changes on the current branch |44| `/security-review` | Complete a security review of pending changes on the current branch |

45| `/stats` | Visualize daily usage, session history, streaks, and model preferences |

42| `/status` | Open the Settings interface (Status tab) showing version, model, account, and connectivity |46| `/status` | Open the Settings interface (Status tab) showing version, model, account, and connectivity |

43| `/statusline` | Set up Claude Code's status line UI |47| `/statusline` | Set up Claude Code's status line UI |

44| `/terminal-setup` | Install Shift+Enter key binding for newlines (iTerm2 and VSCode only) |48| `/teleport` | Resume a remote session from claude.ai by session ID, or open a picker (claude.ai subscribers) |

49| `/terminal-setup` | Install Shift+Enter key binding for newlines (VS Code, Alacritty, Zed, Warp) |

50| `/theme` | Change the color theme |

45| `/todos` | List current TODO items |51| `/todos` | List current TODO items |

46| `/usage` | For subscription plans only: show plan usage limits and rate limit status |52| `/usage` | For subscription plans only: show plan usage limits and rate limit status |

47| `/vim` | Enter vim mode for alternating insert and command modes |53| `/vim` | Enter vim mode for alternating insert and command modes |


50 56 

51Custom slash commands allow you to define frequently used prompts as Markdown files that Claude Code can execute. Commands are organized by scope (project-specific or personal) and support namespacing through directory structures.57Custom slash commands allow you to define frequently used prompts as Markdown files that Claude Code can execute. Commands are organized by scope (project-specific or personal) and support namespacing through directory structures.

52 58 

59<Tip>

60 Slash command autocomplete works anywhere in your input, not just at the beginning. Type `/` at any position to see available commands.

61</Tip>

62 

53### Syntax63### Syntax

54 64 

55```65```


331 341 

332### MCP permissions and wildcards342### MCP permissions and wildcards

333 343 

334Wildcards aren't supported in [permissions for MCP tools](/en/iam#tool-specific-permission-rules).344To approve all tools from an MCP server, use either the server name alone or wildcard syntax:

335 

336To approve all tools from an MCP server, use the server name alone, without wildcards:

337 345 

338* `mcp__github` (approves all GitHub tools)346* `mcp__github` (approves all GitHub tools)

347* `mcp__github__*` (wildcard syntax, also approves all GitHub tools)

339 348 

340To approve specific tools, list each one explicitly:349To approve specific tools, list each one explicitly:

341 350 

342* `mcp__github__get_issue`351* `mcp__github__get_issue`

343* `mcp__github__list_issues`352* `mcp__github__list_issues`

344 353 

354See [MCP permission rules](/en/iam#tool-specific-permission-rules) for more details.

355 

345## `SlashCommand` tool356## `SlashCommand` tool

346 357 

347The `SlashCommand` tool allows Claude to execute [custom slash commands](/en/slash-commands#custom-slash-commands) programmatically358The `SlashCommand` tool allows Claude to execute [custom slash commands](/en/slash-commands#custom-slash-commands) programmatically

statusline.md +45 −0

Details

58 "total_api_duration_ms": 2300,58 "total_api_duration_ms": 2300,

59 "total_lines_added": 156,59 "total_lines_added": 156,

60 "total_lines_removed": 2360 "total_lines_removed": 23

61 },

62 "context_window": {

63 "total_input_tokens": 15234,

64 "total_output_tokens": 4521,

65 "context_window_size": 200000,

66 "current_usage": {

67 "input_tokens": 8500,

68 "output_tokens": 1200,

69 "cache_creation_input_tokens": 5000,

70 "cache_read_input_tokens": 2000

71 }

61 }72 }

62}73}

63```74```


181get_duration() { echo "$input" | jq -r '.cost.total_duration_ms'; }192get_duration() { echo "$input" | jq -r '.cost.total_duration_ms'; }

182get_lines_added() { echo "$input" | jq -r '.cost.total_lines_added'; }193get_lines_added() { echo "$input" | jq -r '.cost.total_lines_added'; }

183get_lines_removed() { echo "$input" | jq -r '.cost.total_lines_removed'; }194get_lines_removed() { echo "$input" | jq -r '.cost.total_lines_removed'; }

195get_input_tokens() { echo "$input" | jq -r '.context_window.total_input_tokens'; }

196get_output_tokens() { echo "$input" | jq -r '.context_window.total_output_tokens'; }

197get_context_window_size() { echo "$input" | jq -r '.context_window.context_window_size'; }

184 198 

185# Use the helpers199# Use the helpers

186MODEL=$(get_model_name)200MODEL=$(get_model_name)


188echo "[$MODEL] 📁 ${DIR##*/}"202echo "[$MODEL] 📁 ${DIR##*/}"

189```203```

190 204 

205### Context Window Usage

206 

207Display the percentage of context window consumed. The `context_window` object contains:

208 

209* `total_input_tokens` / `total_output_tokens`: Cumulative totals across the entire session

210* `current_usage`: Current context window usage from the last API call (may be `null` if no messages yet)

211 * `input_tokens`: Input tokens in current context

212 * `output_tokens`: Output tokens generated

213 * `cache_creation_input_tokens`: Tokens written to cache

214 * `cache_read_input_tokens`: Tokens read from cache

215 

216For accurate context percentage, use `current_usage` which reflects the actual context window state:

217 

218```bash theme={null}

219#!/bin/bash

220input=$(cat)

221 

222MODEL=$(echo "$input" | jq -r '.model.display_name')

223CONTEXT_SIZE=$(echo "$input" | jq -r '.context_window.context_window_size')

224USAGE=$(echo "$input" | jq '.context_window.current_usage')

225 

226if [ "$USAGE" != "null" ]; then

227 # Calculate current context from current_usage fields

228 CURRENT_TOKENS=$(echo "$USAGE" | jq '.input_tokens + .cache_creation_input_tokens + .cache_read_input_tokens')

229 PERCENT_USED=$((CURRENT_TOKENS * 100 / CONTEXT_SIZE))

230 echo "[$MODEL] Context: ${PERCENT_USED}%"

231else

232 echo "[$MODEL] Context: 0%"

233fi

234```

235 

191## Tips236## Tips

192 237 

193* Keep your status line concise - it should fit on one line238* Keep your status line concise - it should fit on one line

sub-agents.md +2 −2

Details

153| `description` | Yes | Natural language description of the subagent's purpose |153| `description` | Yes | Natural language description of the subagent's purpose |

154| `tools` | No | Comma-separated list of specific tools. If omitted, inherits all tools from the main thread |154| `tools` | No | Comma-separated list of specific tools. If omitted, inherits all tools from the main thread |

155| `model` | No | Model to use for this subagent. Can be a model alias (`sonnet`, `opus`, `haiku`) or `'inherit'` to use the main conversation's model. If omitted, defaults to the [configured subagent model](/en/model-config) |155| `model` | No | Model to use for this subagent. Can be a model alias (`sonnet`, `opus`, `haiku`) or `'inherit'` to use the main conversation's model. If omitted, defaults to the [configured subagent model](/en/model-config) |

156| `permissionMode` | No | Permission mode for the subagent. Valid values: `default`, `acceptEdits`, `bypassPermissions`, `plan`, `ignore`. Controls how the subagent handles permission requests |156| `permissionMode` | No | Permission mode for the subagent. Valid values: `default`, `acceptEdits`, `dontAsk`, `bypassPermissions`, `plan`, `ignore`. Controls how the subagent handles permission requests |

157| `skills` | No | Comma-separated list of skill names to auto-load when the subagent starts. Skills are loaded into the subagent's context automatically |157| `skills` | No | Comma-separated list of skill names to auto-load when the subagent starts. Subagents do not inherit Skills from the parent conversation. If omitted, no Skills are preloaded. |

158 158 

159### Model selection159### Model selection

160 160 

Details

13You have several options for entering line breaks into Claude Code:13You have several options for entering line breaks into Claude Code:

14 14 

15* **Quick escape**: Type `\` followed by Enter to create a newline15* **Quick escape**: Type `\` followed by Enter to create a newline

16* **Keyboard shortcut**: Set up a keybinding to insert a newline16* **Shift+Enter**: Works out of the box in iTerm2, WezTerm, Ghostty, and Kitty

17* **Keyboard shortcut**: Set up a keybinding to insert a newline in other terminals

17 18 

18#### Set up Shift+Enter (VS Code or iTerm2):19**Set up Shift+Enter for other terminals**

19 20 

20Run `/terminal-setup` within Claude Code to automatically configure Shift+Enter.21Run `/terminal-setup` within Claude Code to automatically configure Shift+Enter for VS Code, Alacritty, Zed, and Warp.

21 22 

22#### Set up Option+Enter (VS Code, iTerm2 or macOS Terminal.app):23<Note>

24 The `/terminal-setup` command is only visible in terminals that require manual configuration. If you're using iTerm2, WezTerm, Ghostty, or Kitty, you won't see this command because Shift+Enter already works natively.

25</Note>

26 

27**Set up Option+Enter (VS Code, iTerm2 or macOS Terminal.app)**

23 28 

24**For Mac Terminal.app:**29**For Mac Terminal.app:**

25 30 


65The supported subset includes:70The supported subset includes:

66 71 

67* Mode switching: `Esc` (to NORMAL), `i`/`I`, `a`/`A`, `o`/`O` (to INSERT)72* Mode switching: `Esc` (to NORMAL), `i`/`I`, `a`/`A`, `o`/`O` (to INSERT)

68* Navigation: `h`/`j`/`k`/`l`, `w`/`e`/`b`, `0`/`$`/`^`, `gg`/`G`73* Navigation: `h`/`j`/`k`/`l`, `w`/`e`/`b`, `0`/`$`/`^`, `gg`/`G`, `f`/`F`/`t`/`T` with `;`/`,` repeat

69* Editing: `x`, `dw`/`de`/`db`/`dd`/`D`, `cw`/`ce`/`cb`/`cc`/`C`, `.` (repeat)74* Editing: `x`, `dw`/`de`/`db`/`dd`/`D`, `cw`/`ce`/`cb`/`cc`/`C`, `.` (repeat)

75* Yank/paste: `yy`/`Y`, `yw`/`ye`/`yb`, `p`/`P`

76* Text objects: `iw`/`aw`, `iW`/`aW`, `i"`/`a"`, `i'`/`a'`, `i(`/`a(`, `i[`/`a[`, `i{`/`a{`

77* Indentation: `>>`/`<<`

78* Line operations: `J` (join lines)

79 

80See [Interactive mode](/en/interactive-mode#vim-editor-mode) for the complete reference.

70 81 

71 82 

72---83---

troubleshooting.md +41 −10

Details

62 62 

63Claude Code has a native installation that doesn't depend on npm or Node.js.63Claude Code has a native installation that doesn't depend on npm or Node.js.

64 64 

65<Note>

66 The native Claude Code installer is currently in beta.

67</Note>

68 

69Use the following command to run the native installer.65Use the following command to run the native installer.

70 66 

71**macOS, Linux, WSL:**67**macOS, Linux, WSL:**


95 91 

96```92```

97 93 

98This command installs the appropriate build of Claude Code for your operating system and architecture and adds a symlink to the installation at `~/.local/bin/claude`.94This command installs the appropriate build of Claude Code for your operating system and architecture and adds a symlink to the installation at `~/.local/bin/claude` (or `%USERPROFILE%\.local\bin\claude.exe` on Windows).

99 95 

100<Tip>96<Tip>

101 Make sure that you have the installation directory in your system PATH.97 Make sure that you have the installation directory in your system PATH.

102</Tip>98</Tip>

103 99 

100### Windows: "Claude Code on Windows requires git-bash"

101 

102Claude Code on native Windows requires [Git for Windows](https://git-scm.com/downloads/win) which includes Git Bash. If Git is installed but not detected:

103 

1041. Set the path explicitly in PowerShell before running Claude:

105 ```powershell theme={null}

106 $env:CLAUDE_CODE_GIT_BASH_PATH="C:\Program Files\Git\bin\bash.exe"

107 ```

108 

1092. Or add it to your system environment variables permanently through System Properties → Environment Variables.

110 

111If Git is installed in a non-standard location, adjust the path accordingly.

112 

113### Windows: "installMethod is native, but claude command not found"

114 

115If you see this error after installation, the `claude` command isn't in your PATH. Add it manually:

116 

117<Steps>

118 <Step title="Open Environment Variables">

119 Press `Win + R`, type `sysdm.cpl`, and press Enter. Click **Advanced** → **Environment Variables**.

120 </Step>

121 

122 <Step title="Edit User PATH">

123 Under "User variables", select **Path** and click **Edit**. Click **New** and add:

124 

125 ```

126 %USERPROFILE%\.local\bin

127 ```

128 </Step>

129 

130 <Step title="Restart your terminal">

131 Close and reopen PowerShell or CMD for changes to take effect.

132 </Step>

133</Steps>

134 

104Verify installation:135Verify installation:

105 136 

106```bash theme={null}137```bash theme={null}


136Claude Code stores configuration in several locations:167Claude Code stores configuration in several locations:

137 168 

138| File | Purpose |169| File | Purpose |

139| :---------------------------- | :--------------------------------------------------------------------- |170| :---------------------------- | :------------------------------------------------------- |

140| `~/.claude/settings.json` | User settings (permissions, hooks, model overrides) |171| `~/.claude/settings.json` | User settings (permissions, hooks, model overrides) |

141| `.claude/settings.json` | Project settings (checked into source control) |172| `.claude/settings.json` | Project settings (checked into source control) |

142| `.claude/settings.local.json` | Local project settings (not committed) |173| `.claude/settings.local.json` | Local project settings (not committed) |

143| `~/.claude.json` | Global state (theme, OAuth, MCP servers, allowed tools) |174| `~/.claude.json` | Global state (theme, OAuth, MCP servers, allowed tools) |

144| `.mcp.json` | Project MCP servers (checked into source control) |175| `.mcp.json` | Project MCP servers (checked into source control) |

145| `managed-settings.json` | [Enterprise managed settings](/en/settings#settings-files) |176| `managed-settings.json` | [Managed settings](/en/settings#settings-files) |

146| `managed-mcp.json` | [Enterprise managed MCP servers](/en/mcp#enterprise-mcp-configuration) |177| `managed-mcp.json` | [Managed MCP servers](/en/mcp#managed-mcp-configuration) |

147 178 

148On Windows, `~` refers to your user home directory, such as `C:\Users\YourName`.179On Windows, `~` refers to your user home directory, such as `C:\Users\YourName`.

149 180 

150**Enterprise managed file locations:**181**Managed file locations:**

151 182 

152* macOS: `/Library/Application Support/ClaudeCode/`183* macOS: `/Library/Application Support/ClaudeCode/`

153* Linux/WSL: `/etc/claude-code/`184* Linux/WSL: `/etc/claude-code/`

154* Windows: `C:\ProgramData\ClaudeCode\`185* Windows: `C:\Program Files\ClaudeCode\`

155 186 

156For details on configuring these files, see [Settings](/en/settings) and [MCP](/en/mcp).187For details on configuring these files, see [Settings](/en/settings) and [MCP](/en/mcp).

157 188 

vs-code.md +192 −81

Details

1# Visual Studio Code1# Use Claude Code in VS Code

2 2 

3> Use Claude Code with Visual Studio Code through the native extension or CLI integration3> Install and configure the Claude Code extension for VS Code. Get AI coding assistance with inline diffs, @-mentions, plan review, and keyboard shortcuts.

4 4 

5<img src="https://mintcdn.com/claude-code/-YhHHmtSxwr7W8gy/images/vs-code-extension-interface.jpg?fit=max&auto=format&n=-YhHHmtSxwr7W8gy&q=85&s=300652d5678c63905e6b0ea9e50835f8" alt="Claude Code VS Code Extension Interface" data-og-width="2500" width="2500" data-og-height="1155" height="1155" data-path="images/vs-code-extension-interface.jpg" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/claude-code/-YhHHmtSxwr7W8gy/images/vs-code-extension-interface.jpg?w=280&fit=max&auto=format&n=-YhHHmtSxwr7W8gy&q=85&s=87630c671517a3d52e9aee627041696e 280w, https://mintcdn.com/claude-code/-YhHHmtSxwr7W8gy/images/vs-code-extension-interface.jpg?w=560&fit=max&auto=format&n=-YhHHmtSxwr7W8gy&q=85&s=716b093879204beec8d952649ef75292 560w, https://mintcdn.com/claude-code/-YhHHmtSxwr7W8gy/images/vs-code-extension-interface.jpg?w=840&fit=max&auto=format&n=-YhHHmtSxwr7W8gy&q=85&s=c1525d1a01513acd9d83d8b5a8fe2fc8 840w, https://mintcdn.com/claude-code/-YhHHmtSxwr7W8gy/images/vs-code-extension-interface.jpg?w=1100&fit=max&auto=format&n=-YhHHmtSxwr7W8gy&q=85&s=1d90021d58bbb51f871efec13af955c3 1100w, https://mintcdn.com/claude-code/-YhHHmtSxwr7W8gy/images/vs-code-extension-interface.jpg?w=1650&fit=max&auto=format&n=-YhHHmtSxwr7W8gy&q=85&s=7babdd25440099886f193cfa99af88ae 1650w, https://mintcdn.com/claude-code/-YhHHmtSxwr7W8gy/images/vs-code-extension-interface.jpg?w=2500&fit=max&auto=format&n=-YhHHmtSxwr7W8gy&q=85&s=08c92eedfb56fe61a61e480fb63784b6 2500w" />5<img src="https://mintcdn.com/claude-code/-YhHHmtSxwr7W8gy/images/vs-code-extension-interface.jpg?fit=max&auto=format&n=-YhHHmtSxwr7W8gy&q=85&s=300652d5678c63905e6b0ea9e50835f8" alt="VS Code editor with the Claude Code extension panel open on the right side, showing a conversation with Claude" data-og-width="2500" width="2500" data-og-height="1155" height="1155" data-path="images/vs-code-extension-interface.jpg" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/claude-code/-YhHHmtSxwr7W8gy/images/vs-code-extension-interface.jpg?w=280&fit=max&auto=format&n=-YhHHmtSxwr7W8gy&q=85&s=87630c671517a3d52e9aee627041696e 280w, https://mintcdn.com/claude-code/-YhHHmtSxwr7W8gy/images/vs-code-extension-interface.jpg?w=560&fit=max&auto=format&n=-YhHHmtSxwr7W8gy&q=85&s=716b093879204beec8d952649ef75292 560w, https://mintcdn.com/claude-code/-YhHHmtSxwr7W8gy/images/vs-code-extension-interface.jpg?w=840&fit=max&auto=format&n=-YhHHmtSxwr7W8gy&q=85&s=c1525d1a01513acd9d83d8b5a8fe2fc8 840w, https://mintcdn.com/claude-code/-YhHHmtSxwr7W8gy/images/vs-code-extension-interface.jpg?w=1100&fit=max&auto=format&n=-YhHHmtSxwr7W8gy&q=85&s=1d90021d58bbb51f871efec13af955c3 1100w, https://mintcdn.com/claude-code/-YhHHmtSxwr7W8gy/images/vs-code-extension-interface.jpg?w=1650&fit=max&auto=format&n=-YhHHmtSxwr7W8gy&q=85&s=7babdd25440099886f193cfa99af88ae 1650w, https://mintcdn.com/claude-code/-YhHHmtSxwr7W8gy/images/vs-code-extension-interface.jpg?w=2500&fit=max&auto=format&n=-YhHHmtSxwr7W8gy&q=85&s=08c92eedfb56fe61a61e480fb63784b6 2500w" />

6 6 

7## VS Code Extension (Beta)7The VS Code extension provides a native graphical interface for Claude Code, integrated directly into your IDE. This is the recommended way to use Claude Code in VS Code.

8 8 

9The VS Code extension, available in beta, lets you see Claude's changes in real-time through a native graphical interface integrated directly into your IDE. The VS Code extension makes it easier to access and interact with Claude Code for users who prefer a visual interface over the terminal.9With the extension, you can review and edit Claude's plans before accepting them, auto-accept edits as they're made, @-mention files with specific line ranges from your selection, access conversation history, and open multiple conversations in separate tabs or windows.

10 10 

11### Features11## Prerequisites

12 12 

13The VS Code extension provides:13* VS Code 1.98.0 or higher

14* An Anthropic account (you'll sign in when you first open the extension). If you're using a third-party provider like Amazon Bedrock or Google Vertex AI, see [Use third-party providers](#use-third-party-providers) instead.

14 15 

15* **Native IDE experience**: Dedicated Claude Code sidebar panel accessed via the Spark icon16You don't need to install the Claude Code CLI first. However, some features like MCP server configuration require the CLI. See [VS Code extension vs. Claude Code CLI](#vs-code-extension-vs-claude-code-cli) for details.

16* **Plan mode with editing**: Review and edit Claude's plans before accepting them

17* **Auto-accept edits mode**: Automatically apply Claude's changes as they're made

18* **Extended thinking**: Toggle extended thinking on/off using the Extended Thinking button in the bottom-right corner of the prompt input

19* **File management**: @-mention files or attach files and images using the system file picker

20* **MCP server usage**: Use Model Context Protocol servers configured through the CLI

21* **Conversation history**: Access to past conversations

22* **Multiple sessions**: Run multiple Claude Code sessions simultaneously

23* **Keyboard shortcuts**: Support for most shortcuts from the CLI

24* **Slash commands**: Access most CLI slash commands directly in the extension

25 17 

26### Requirements18## Install the extension

27 19 

28* VS Code 1.98.0 or higher20Click the link for your IDE to install directly:

21 

22* [Install for VS Code](vscode:extension/anthropic.claude-code)

23* [Install for Cursor](cursor:extension/anthropic.claude-code)

29 24 

30### Installation25Or in VS Code, press `Cmd+Shift+X` (Mac) or `Ctrl+Shift+X` (Windows/Linux) to open the Extensions view, search for "Claude Code", and click **Install**.

31 26 

32Download and install the extension from the [Visual Studio Code Extension Marketplace](https://marketplace.visualstudio.com/items?itemName=anthropic.claude-code).27<Note>You may need to restart VS Code or run "Developer: Reload Window" from the Command Palette after installation.</Note>

33 28 

34### How it works29## Get started

35 30 

36Once installed, you can start using Claude Code through the VS Code interface:31Once installed, you can start using Claude Code through the VS Code interface:

37 32 

381. Click the Spark icon in your editor's sidebar to open the Claude Code panel33<Steps>

392. Prompt Claude Code in the same way you would in the terminal34 <Step title="Open the Claude Code panel">

403. Watch as Claude analyzes your code and suggests changes35 Throughout VS Code, the Spark icon indicates Claude Code: <img src="https://mintcdn.com/claude-code/mfM-EyoZGnQv8JTc/images/vs-code-spark-icon.svg?fit=max&auto=format&n=mfM-EyoZGnQv8JTc&q=85&s=a734d84e785140016672f08e0abb236c" alt="Spark icon" style={{display: "inline", height: "0.85em", verticalAlign: "middle"}} data-og-width="16" width="16" data-og-height="16" height="16" data-path="images/vs-code-spark-icon.svg" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/claude-code/mfM-EyoZGnQv8JTc/images/vs-code-spark-icon.svg?w=280&fit=max&auto=format&n=mfM-EyoZGnQv8JTc&q=85&s=9a45aad9a84b9fa1701ac99a1f9aa4e9 280w, https://mintcdn.com/claude-code/mfM-EyoZGnQv8JTc/images/vs-code-spark-icon.svg?w=560&fit=max&auto=format&n=mfM-EyoZGnQv8JTc&q=85&s=3f4cb9254c4d4e93989c4b6bf9292f4b 560w, https://mintcdn.com/claude-code/mfM-EyoZGnQv8JTc/images/vs-code-spark-icon.svg?w=840&fit=max&auto=format&n=mfM-EyoZGnQv8JTc&q=85&s=e75ccc9faa3e572db8f291ceb65bb264 840w, https://mintcdn.com/claude-code/mfM-EyoZGnQv8JTc/images/vs-code-spark-icon.svg?w=1100&fit=max&auto=format&n=mfM-EyoZGnQv8JTc&q=85&s=f147bd81a381a62539a4ce361fac41c7 1100w, https://mintcdn.com/claude-code/mfM-EyoZGnQv8JTc/images/vs-code-spark-icon.svg?w=1650&fit=max&auto=format&n=mfM-EyoZGnQv8JTc&q=85&s=78fe68efaee5d6e844bbacab1b442ed5 1650w, https://mintcdn.com/claude-code/mfM-EyoZGnQv8JTc/images/vs-code-spark-icon.svg?w=2500&fit=max&auto=format&n=mfM-EyoZGnQv8JTc&q=85&s=efb8dbe1dfa722d094edc6ad2ad4bedb 2500w" />

414. Review and accept edits directly in the interface

42 * **Tip**: Drag the sidebar wider to see inline diffs, then click them to expand for full details

43 36 

44### Configuration37 The quickest way to open Claude is to click the Spark icon in the **Editor Toolbar** (top-right corner of the editor). The icon only appears when you have a file open.

45 38 

46The VS Code extension reads the same `settings.json` files as the CLI. See the [settings documentation](/en/settings) for details.39 <img src="https://mintcdn.com/claude-code/mfM-EyoZGnQv8JTc/images/vs-code-editor-icon.png?fit=max&auto=format&n=mfM-EyoZGnQv8JTc&q=85&s=eb4540325d94664c51776dbbfec4cf02" alt="VS Code editor showing the Spark icon in the Editor Toolbar" data-og-width="2796" width="2796" data-og-height="734" height="734" data-path="images/vs-code-editor-icon.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/claude-code/mfM-EyoZGnQv8JTc/images/vs-code-editor-icon.png?w=280&fit=max&auto=format&n=mfM-EyoZGnQv8JTc&q=85&s=56f218d5464359d6480cfe23f70a923e 280w, https://mintcdn.com/claude-code/mfM-EyoZGnQv8JTc/images/vs-code-editor-icon.png?w=560&fit=max&auto=format&n=mfM-EyoZGnQv8JTc&q=85&s=344a8db024b196c795a80dc85cacb8d1 560w, https://mintcdn.com/claude-code/mfM-EyoZGnQv8JTc/images/vs-code-editor-icon.png?w=840&fit=max&auto=format&n=mfM-EyoZGnQv8JTc&q=85&s=f30bf834ee0625b2a4a635d552d87163 840w, https://mintcdn.com/claude-code/mfM-EyoZGnQv8JTc/images/vs-code-editor-icon.png?w=1100&fit=max&auto=format&n=mfM-EyoZGnQv8JTc&q=85&s=81fdf984840e43a9f08ae42729d1484d 1100w, https://mintcdn.com/claude-code/mfM-EyoZGnQv8JTc/images/vs-code-editor-icon.png?w=1650&fit=max&auto=format&n=mfM-EyoZGnQv8JTc&q=85&s=8b60fb32de54717093d512afaa99785c 1650w, https://mintcdn.com/claude-code/mfM-EyoZGnQv8JTc/images/vs-code-editor-icon.png?w=2500&fit=max&auto=format&n=mfM-EyoZGnQv8JTc&q=85&s=893e6bda8f2e9d42c8a294d394f0b736 2500w" />

47 40 

48#### Third-party providers and gateways41 Other ways to open Claude Code:

49 42 

50To use the VS Code extension with third-party providers (Amazon Bedrock, Google Vertex AI, Microsoft Foundry) or gateways that handle authentication:43 * **Command Palette**: `Cmd+Shift+P` (Mac) or `Ctrl+Shift+P` (Windows/Linux), type "Claude Code", and select an option like "Open in New Tab"

44 * **Status Bar**: Click **✱ Claude Code** in the bottom-right corner of the window. This works even when no file is open.

51 45 

521. Add the appropriate environment variables for your provider or gateway to your Claude Code `settings.json`:46 You can drag the Claude panel to reposition it anywhere in VS Code. See [Customize your workflow](#customize-your-workflow) for details.

53 ```json theme={null}47 </Step>

54 {

55 "env": {

56 "CLAUDE_CODE_USE_BEDROCK": "1",

57 "AWS_REGION": "us-east-2",

58 "AWS_PROFILE": "your-profile"

59 }

60 }

61 ```

62 48 

632. Disable the VS Code extension login prompt via [`vscode://settings/claudeCode.disableLoginPrompt`](vscode://settings/claudeCode.disableLoginPrompt) or in VS Code's settings:49 <Step title="Send a prompt">

64 ```json theme={null}50 Ask Claude to help with your code or files, whether that's explaining how something works, debugging an issue, or making changes.

65 {

66 "claudeCode.disableLoginPrompt": true

67 }

68 ```

69 51 

70For detailed setup instructions and additional configuration options, see:52 <Tip>Select text in the editor and press `Alt+K` to insert an @-mention with the file path and line numbers directly into your prompt.</Tip>

71 53 

72* [Claude Code on Amazon Bedrock](/en/amazon-bedrock)54 Here's an example of asking about a particular line in a file:

73* [Claude Code on Google Vertex AI](/en/google-vertex-ai)

74* [Claude Code on Microsoft Foundry](/en/microsoft-foundry)

75 55 

76### Not yet implemented56 <img src="https://mintcdn.com/claude-code/FVYz38sRY-VuoGHA/images/vs-code-send-prompt.png?fit=max&auto=format&n=FVYz38sRY-VuoGHA&q=85&s=ede3ed8d8d5f940e01c5de636d009cfd" alt="VS Code editor with lines 2-3 selected in a Python file, and the Claude Code panel showing a question about those lines with an @-mention reference" data-og-width="3288" width="3288" data-og-height="1876" height="1876" data-path="images/vs-code-send-prompt.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/claude-code/FVYz38sRY-VuoGHA/images/vs-code-send-prompt.png?w=280&fit=max&auto=format&n=FVYz38sRY-VuoGHA&q=85&s=f40bde7b2c245fe8f0f5b784e8106492 280w, https://mintcdn.com/claude-code/FVYz38sRY-VuoGHA/images/vs-code-send-prompt.png?w=560&fit=max&auto=format&n=FVYz38sRY-VuoGHA&q=85&s=fad66a27a9a6faa23b05370aa4f398b2 560w, https://mintcdn.com/claude-code/FVYz38sRY-VuoGHA/images/vs-code-send-prompt.png?w=840&fit=max&auto=format&n=FVYz38sRY-VuoGHA&q=85&s=4539c8a3823ca80a5c8771f6c088ce9e 840w, https://mintcdn.com/claude-code/FVYz38sRY-VuoGHA/images/vs-code-send-prompt.png?w=1100&fit=max&auto=format&n=FVYz38sRY-VuoGHA&q=85&s=fae8ebf300c7853409a562ffa46d9c71 1100w, https://mintcdn.com/claude-code/FVYz38sRY-VuoGHA/images/vs-code-send-prompt.png?w=1650&fit=max&auto=format&n=FVYz38sRY-VuoGHA&q=85&s=22e4462bb8cf0c0ca20f8102bc4c971a 1650w, https://mintcdn.com/claude-code/FVYz38sRY-VuoGHA/images/vs-code-send-prompt.png?w=2500&fit=max&auto=format&n=FVYz38sRY-VuoGHA&q=85&s=739bfd045f70fe7be1a109a53494590e 2500w" />

57 </Step>

77 58 

78The following features aren't yet available in the VS Code extension:59 <Step title="Review changes">

60 When Claude wants to edit a file, it shows you a diff and asks for permission. You can accept, reject, or tell Claude what to do instead.

79 61 

80* **MCP server and Plugin configuration UI**: Type `/mcp` to open the terminal-based MCP server configuration, or `/plugin` for Plugin configuration. Once configured, MCP servers and Plugins work in the extension. You can also [configure MCP servers through the CLI](/en/mcp) first, then the extension will use them.62 <img src="https://mintcdn.com/claude-code/FVYz38sRY-VuoGHA/images/vs-code-edits.png?fit=max&auto=format&n=FVYz38sRY-VuoGHA&q=85&s=e005f9b41c541c5c7c59c082f7c4841c" alt="VS Code showing a diff of Claude's proposed changes with a permission prompt asking whether to make the edit" data-og-width="3292" width="3292" data-og-height="1876" height="1876" data-path="images/vs-code-edits.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/claude-code/FVYz38sRY-VuoGHA/images/vs-code-edits.png?w=280&fit=max&auto=format&n=FVYz38sRY-VuoGHA&q=85&s=cb5d41b81087f79b842a56b5a3304660 280w, https://mintcdn.com/claude-code/FVYz38sRY-VuoGHA/images/vs-code-edits.png?w=560&fit=max&auto=format&n=FVYz38sRY-VuoGHA&q=85&s=90bb691960decdc06393c3c21cd62c75 560w, https://mintcdn.com/claude-code/FVYz38sRY-VuoGHA/images/vs-code-edits.png?w=840&fit=max&auto=format&n=FVYz38sRY-VuoGHA&q=85&s=9a11bf878ba619e850380904ff4f38e8 840w, https://mintcdn.com/claude-code/FVYz38sRY-VuoGHA/images/vs-code-edits.png?w=1100&fit=max&auto=format&n=FVYz38sRY-VuoGHA&q=85&s=6dddbf596b4f69ec6245bdc5eb6dd487 1100w, https://mintcdn.com/claude-code/FVYz38sRY-VuoGHA/images/vs-code-edits.png?w=1650&fit=max&auto=format&n=FVYz38sRY-VuoGHA&q=85&s=ef2713b8cbfd2cee97af817d813d64c7 1650w, https://mintcdn.com/claude-code/FVYz38sRY-VuoGHA/images/vs-code-edits.png?w=2500&fit=max&auto=format&n=FVYz38sRY-VuoGHA&q=85&s=1f7e1c52919cdfddf295f32a2ec7ae59 2500w" />

81* **Subagents configuration**: Configure [subagents through the CLI](/en/sub-agents) to use them in VS Code63 </Step>

82* **Checkpoints**: Save and restore conversation state at specific points64</Steps>

83* **Conversation rewinding**: The `/rewind` command is coming soon

84* **Advanced shortcuts**:

85 * `#` shortcut to add to memory (not supported)

86 * `!` shortcut to run bash commands directly (not supported)

87* **Tab completion**: File path completion with tab key

88* **Model selection UI for older models**: To use older model versions like `claude-sonnet-4-20250514`, open VS Code settings for Claude Code (the `/General Config` command) and insert the model string directly into the 'Selected Model' field

89 65 

90These features are planned for future updates.66For more ideas on what you can do with Claude Code, see [Common workflows](/en/common-workflows).

91 67 

92## Security considerations68## Customize your workflow

69 

70Once you're up and running, you can reposition the Claude panel or switch to terminal mode.

71 

72### Change the layout

73 

74You can drag the Claude panel to reposition it anywhere in VS Code. Grab the panel's tab or title bar and drag it to:

75 

76* **Secondary sidebar** (default): The right side of the window

77* **Primary sidebar**: The left sidebar with icons for Explorer, Search, etc.

78* **Editor area**: Opens Claude as a tab alongside your files

79 

80<Note>

81 The Spark icon only appears in the Activity Bar (left sidebar icons) when the Claude panel is docked to the left. Since Claude defaults to the right side, use the Editor Toolbar icon to open Claude.

82</Note>

83 

84### Switch to terminal mode

85 

86By default, the extension opens a graphical chat panel. If you prefer the CLI-style interface, open the [Use Terminal setting](vscode://settings/claudeCode.useTerminal) and check the box.

87 

88You can also open VS Code settings (`Cmd+,` on Mac or `Ctrl+,` on Windows/Linux), go to Extensions → Claude Code, and check **Use Terminal**.

89 

90## VS Code commands and shortcuts

91 

92Open the Command Palette (`Cmd+Shift+P` on Mac or `Ctrl+Shift+P` on Windows/Linux) and type "Claude Code" to see all available VS Code commands for the Claude Code extension:

93 

94<Note>

95 These are VS Code commands for controlling the extension. For Claude Code slash commands (like `/help` or `/compact`), not all CLI commands are available in the extension yet. See [VS Code extension vs. Claude Code CLI](#vs-code-extension-vs-claude-code-cli) for details.

96</Note>

97 

98| Command | Shortcut | Description |

99| -------------------------- | -------------------------------------------------------- | ---------------------------------------------------------------------------------- |

100| Focus Input | `Cmd+Esc` (Mac) / `Ctrl+Esc` (Windows/Linux) | Toggle focus between editor and Claude |

101| Open in Side Bar | — | Open Claude in the left sidebar |

102| Open in Terminal | — | Open Claude in terminal mode |

103| Open in New Tab | `Cmd+Shift+Esc` (Mac) / `Ctrl+Shift+Esc` (Windows/Linux) | Open a new conversation as an editor tab |

104| Open in New Window | — | Open a new conversation in a separate window |

105| New Conversation | `Cmd+N` (Mac) / `Ctrl+N` (Windows/Linux) | Start a new conversation (when Claude is focused) |

106| Insert @-Mention Reference | `Alt+K` | Insert a reference to the current file (includes line numbers if text is selected) |

107| Show Logs | — | View extension debug logs |

108| Logout | — | Sign out of your Anthropic account |

109 

110Use **Open in New Tab** or **Open in New Window** to run multiple conversations simultaneously. Each tab or window maintains its own conversation history and context.

111 

112## Configure settings

113 

114The extension has two types of settings:

115 

116* **Extension settings**: Open with `Cmd+,` (Mac) or `Ctrl+,` (Windows/Linux), then go to Extensions → Claude Code.

117 

118 | Setting | Description |

119 | ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

120 | Selected Model | Default model for new conversations. Change per-session with `/model`. |

121 | Use Terminal | Launch Claude in terminal mode instead of graphical panel |

122 | Initial Permission Mode | Controls approval prompts for file edits and commands. Defaults to `default` (ask before each action). |

123 | Preferred Location | Default location: sidebar (right) or panel (new tab) |

124 | Autosave | Auto-save files before Claude reads or writes them |

125 | Use Ctrl+Enter to Send | Use Ctrl/Cmd+Enter instead of Enter to send prompts |

126 | Enable New Conversation Shortcut | Enable Cmd/Ctrl+N to start a new conversation |

127 | Respect Git Ignore | Exclude .gitignore patterns from file searches |

128 | Environment Variables | Set environment variables for the Claude process. **Not recommended**—use [Claude Code settings](/en/settings) instead so configuration is shared between extension and CLI. |

129 | Disable Login Prompt | Skip authentication prompts (for third-party provider setups) |

130 | Allow Dangerously Skip Permissions | Bypass all permission prompts. **Use with extreme caution**—recommended only for isolated sandboxes with no internet access. |

131 | Claude Process Wrapper | Executable path used to launch the Claude process |

132 

133* **Claude Code settings** (`~/.claude/settings.json`): These settings are shared between the VS Code extension and the CLI. Use this file for allowed commands and directories, environment variables, hooks, and MCP servers. See the [settings documentation](/en/settings) for details.

134 

135## Use third-party providers

136 

137By default, Claude Code connects directly to Anthropic's API. If your organization uses Amazon Bedrock, Google Vertex AI, or Microsoft Foundry to access Claude, configure the extension to use your provider instead:

93 138 

94When Claude Code runs in VS Code with auto-edit permissions enabled, it may be able to modify IDE configuration files that can be automatically executed by your IDE. This may increase the risk of running Claude Code in auto-edit mode and allow bypassing Claude Code's permission prompts for bash execution.139<Steps>

140 <Step title="Disable login prompt">

141 Open the [Disable Login Prompt setting](vscode://settings/claudeCode.disableLoginPrompt) and check the box.

95 142 

96When running in VS Code, consider:143 You can also open VS Code settings (`Cmd+,` on Mac or `Ctrl+,` on Windows/Linux), search for "Claude Code login", and check **Disable Login Prompt**.

144 </Step>

97 145 

98* Enabling [VS Code Restricted Mode](https://code.visualstudio.com/docs/editor/workspace-trust#_restricted-mode) for untrusted workspaces146 <Step title="Configure your provider">

99* Using manual approval mode for edits147 Follow the setup guide for your provider:

100* Taking extra care to ensure Claude is only used with trusted prompts

101 148 

102## Legacy CLI integration149 * [Claude Code on Amazon Bedrock](/en/amazon-bedrock)

150 * [Claude Code on Google Vertex AI](/en/google-vertex-ai)

151 * [Claude Code on Microsoft Foundry](/en/microsoft-foundry)

103 152 

104The original VS Code integration allows Claude Code running in the terminal to interact with your IDE. It provides selection context sharing (current selection/tab is automatically shared with Claude Code), diff viewing in the IDE instead of terminal, file reference shortcuts (`Cmd+Option+K` on Mac or `Alt+Ctrl+K` on Windows/Linux to insert file references like @File#L1-99), and automatic diagnostic sharing (lint and syntax errors).153 These guides cover configuring your provider in `~/.claude/settings.json`, which ensures your settings are shared between the VS Code extension and the CLI.

154 </Step>

155</Steps>

105 156 

106The legacy integration auto-installs when you run `claude` from VS Code's integrated terminal. Run `claude` from the terminal and all features activate. For external terminals, use the `/ide` command to connect Claude Code to your VS Code instance. To configure, run `claude`, enter `/config`, and set the diff tool to `auto` for automatic IDE detection.157## VS Code extension vs. Claude Code CLI

107 158 

108Both the extension and CLI integration work with Visual Studio Code, Cursor, Windsurf, and VSCodium.159The extension doesn't yet have full feature parity with the CLI. If you need CLI-only features, you can run `claude` directly in VS Code's integrated terminal.

109 160 

110## Troubleshooting161| Feature | CLI | VS Code Extension |

162| ----------------- | ------------------------------ | ---------------------------------------- |

163| Slash commands | [Full set](/en/slash-commands) | Subset (type `/` to see available) |

164| MCP server config | Yes | No (configure via CLI, use in extension) |

165| Checkpoints | Yes | Coming soon |

166| `!` bash shortcut | Yes | No |

167| Tab completion | Yes | No |

111 168 

112### Extension not installing169### Run CLI in VS Code

113 170 

114* Ensure you have a compatible version of VS Code (1.85.0 or later)171To use the CLI while staying in VS Code, open the integrated terminal (`` Ctrl+` `` on Windows/Linux or `` Cmd+` `` on Mac) and run `claude`. The CLI automatically integrates with your IDE for features like diff viewing and diagnostic sharing.

172 

173If using an external terminal, run `/ide` inside Claude Code to connect it to VS Code.

174 

175### Switch between extension and CLI

176 

177The extension and CLI share the same conversation history. To continue an extension conversation in the CLI, run `claude --resume` in the terminal. This opens an interactive picker where you can search for and select your conversation.

178 

179## Security considerations

180 

181With auto-edit permissions enabled, Claude Code can modify VS Code configuration files (like `settings.json` or `tasks.json`) that VS Code may execute automatically. This could potentially bypass Claude Code's normal permission prompts.

182 

183To reduce risk when working with untrusted code:

184 

185* Enable [VS Code Restricted Mode](https://code.visualstudio.com/docs/editor/workspace-trust#_restricted-mode) for untrusted workspaces

186* Use manual approval mode instead of auto-accept for edits

187* Review changes carefully before accepting them

188 

189## Fix common issues

190 

191### Extension won't install

192 

193* Ensure you have a compatible version of VS Code (1.98.0 or later)

115* Check that VS Code has permission to install extensions194* Check that VS Code has permission to install extensions

116* Try installing directly from the Marketplace website195* Try installing directly from the Marketplace website

117 196 

197### Spark icon not visible

198 

199The Spark icon appears in the **Editor Toolbar** (top-right of editor) when you have a file open. If you don't see it:

200 

2011. **Open a file**: The icon requires a file to be open—having just a folder open isn't enough

2022. **Check VS Code version**: Requires 1.98.0 or higher (Help → About)

2033. **Restart VS Code**: Run "Developer: Reload Window" from the Command Palette

2044. **Disable conflicting extensions**: Temporarily disable other AI extensions (Cline, Continue, etc.)

2055. **Check workspace trust**: The extension doesn't work in Restricted Mode

206 

207Alternatively, click "✱ Claude Code" in the **Status Bar** (bottom-right corner)—this works even without a file open. You can also use the **Command Palette** (`Cmd+Shift+P` / `Ctrl+Shift+P`) and type "Claude Code".

208 

118### Claude Code never responds209### Claude Code never responds

119 210 

120If Claude Code isn't responding to your prompts:211If Claude Code isn't responding to your prompts:


1243. **Try the CLI**: Run `claude` from the terminal to see if you get more detailed error messages2153. **Try the CLI**: Run `claude` from the terminal to see if you get more detailed error messages

1254. **File a bug report**: If the problem continues, [file an issue on GitHub](https://github.com/anthropics/claude-code/issues) with details about the error2164. **File a bug report**: If the problem continues, [file an issue on GitHub](https://github.com/anthropics/claude-code/issues) with details about the error

126 217 

127### Legacy integration not working218### Standalone CLI not connecting to IDE

128 219 

129* Ensure you're running Claude Code from VS Code's integrated terminal220* Ensure you're running Claude Code from VS Code's integrated terminal (not an external terminal)

130* Ensure the CLI for your IDE variant is installed:221* Ensure the CLI for your IDE variant is installed:

131 * VS Code: `code` command should be available222 * VS Code: `code` command should be available

132 * Cursor: `cursor` command should be available223 * Cursor: `cursor` command should be available

133 * Windsurf: `windsurf` command should be available224 * Windsurf: `windsurf` command should be available

134 * VSCodium: `codium` command should be available225 * VSCodium: `codium` command should be available

135* If the command isn't installed:226* If the command isn't available, install it from the Command Palette → "Shell Command: Install 'code' command in PATH"

136 1. Open command palette with `Cmd+Shift+P` (Mac) or `Ctrl+Shift+P` (Windows/Linux)227 

137 2. Search for `Shell Command: Install 'code' command in PATH` (or equivalent for your IDE)228## Uninstall the extension

229 

230To uninstall the Claude Code extension:

231 

2321. Open the Extensions view (`Cmd+Shift+X` on Mac or `Ctrl+Shift+X` on Windows/Linux)

2332. Search for "Claude Code"

2343. Click **Uninstall**

235 

236To also remove extension data and reset all settings:

237 

238```bash theme={null}

239rm -rf ~/.vscode/globalStorage/anthropic.claude-code

240```

138 241 

139For additional help, see the [troubleshooting guide](/en/troubleshooting).242For additional help, see the [troubleshooting guide](/en/troubleshooting).

140 243 

244## Next steps

245 

246Now that you have Claude Code set up in VS Code:

247 

248* [Explore common workflows](/en/common-workflows) to get the most out of Claude Code

249* [Set up MCP servers](/en/mcp) to extend Claude's capabilities with external tools. Configure servers using the CLI, then use them in the extension.

250* [Configure Claude Code settings](/en/settings) to customize allowed commands, hooks, and more. These settings are shared between the extension and CLI.

251 

141 252 

142---253---

143 254