claude-setup 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,53 @@
1
+ <!-- Generated by claude-setup {{VERSION}} on {{DATE}} -->
2
+ <!-- Run /stack-init in Claude Code -->
3
+
4
+ This is a new project with no source files yet.
5
+
6
+ Before setting up anything, ask the developer these three questions in ONE message:
7
+
8
+ 1. What are you building? (describe the product in one sentence — not the tech)
9
+ 2. Do you have a preferred language or runtime? (completely fine if not)
10
+ 3. Are there external services you know you'll use? (fine to say "not sure yet")
11
+
12
+ Wait for their reply. Then immediately set up the full Claude Code environment.
13
+
14
+ ---
15
+
16
+ ## After they reply
17
+
18
+ Use exactly what they said. Do not invent requirements they did not mention.
19
+
20
+ **CLAUDE.md**
21
+ Write it for the product they described. Reference their exact words.
22
+ If they gave no language: write a language-agnostic CLAUDE.md about the product itself.
23
+
24
+ **.mcp.json**
25
+ Only for services they explicitly mentioned or obviously required for their product type.
26
+ If they said "not sure": do not create this file.
27
+
28
+ **.claude/settings.json**
29
+ Only if the product type they described has clear patterns that benefit from hooks.
30
+
31
+ **.claude/skills/**
32
+ Only if the product domain has patterns worth capturing. Empty is fine for a fresh start.
33
+
34
+ **.github/workflows/**
35
+ Only if they mentioned CI, deployment, or a specific hosting platform.
36
+
37
+ ---
38
+
39
+ ## Rules
40
+
41
+ - Trace every file you create back to something they said
42
+ - If they were vague: write a minimal setup and tell them:
43
+ "As the project grows, run npx claude-setup sync — it reads what changed and updates
44
+ this setup automatically."
45
+ - No generic boilerplate. Two different product descriptions must produce two different setups.
46
+
47
+ ---
48
+
49
+ ## Output
50
+
51
+ After writing, tell them:
52
+ - What you created and why (one sentence per file)
53
+ - That sync exists: "Run npx claude-setup sync as you add dependencies and code."
@@ -0,0 +1,132 @@
1
+ <!-- Generated by claude-setup {{VERSION}} on {{DATE}} — DO NOT hand-edit -->
2
+ <!-- Run /stack-init in Claude Code -->
3
+
4
+ You are setting up this project for Claude Code.
5
+ Read everything below. Understand the project yourself. Then act.
6
+ Do not ask clarifying questions — reason from what you see.
7
+
8
+ ---
9
+
10
+ ## Project files
11
+
12
+ ### Configuration and manifest files
13
+
14
+ {{CONFIG_FILES}}
15
+
16
+ ### Source files sampled
17
+
18
+ {{SOURCE_FILES}}
19
+
20
+ {{#if HAS_SKIPPED}}
21
+ ### Files skipped (too large or filtered)
22
+
23
+ {{SKIPPED_LIST}}
24
+ {{/if}}
25
+
26
+ ---
27
+
28
+ ## Existing Claude Code setup — READ EVERY LINE BEFORE TOUCHING ANYTHING
29
+
30
+ {{#if HAS_CLAUDE_MD}}
31
+ ### CLAUDE.md — EXISTS — append only, never rewrite, never remove
32
+ {{CLAUDE_MD_CONTENT}}
33
+ {{else}}
34
+ CLAUDE.md → does not exist (create it)
35
+ {{/if}}
36
+
37
+ {{#if HAS_MCP_JSON}}
38
+ ### .mcp.json — EXISTS — merge only, never remove existing entries
39
+ {{MCP_JSON_CONTENT}}
40
+ {{else}}
41
+ .mcp.json → does not exist (create only if you find evidence of external services)
42
+ {{/if}}
43
+
44
+ {{#if HAS_SETTINGS}}
45
+ ### .claude/settings.json — EXISTS — merge only, never remove existing hooks
46
+ {{SETTINGS_CONTENT}}
47
+ {{else}}
48
+ .claude/settings.json → does not exist (create only if hooks are warranted)
49
+ {{/if}}
50
+
51
+ Skills installed: {{SKILLS_LIST}}
52
+ Commands installed: {{COMMANDS_LIST}}
53
+ Workflows installed: {{WORKFLOWS_LIST}}
54
+ .github/ exists: {{HAS_GITHUB_DIR}}
55
+
56
+ ---
57
+
58
+ ## Your job
59
+
60
+ Read the files above. Figure out the project from what you see — language, runtime,
61
+ dependencies, structure, conventions. Do not assume anything not visible in the files.
62
+
63
+ Then write the Claude Code setup for THIS specific project.
64
+
65
+ ### CLAUDE.md
66
+
67
+ Always write or update this. It is the most valuable artifact.
68
+ Make it specific: reference actual file paths from the project, actual patterns you saw
69
+ in the source, actual conventions the code follows.
70
+ Generic advice that could apply to any project belongs in documentation, not here.
71
+
72
+ If it exists: read it fully above first. Add only what is genuinely missing. Never remove.
73
+
74
+ ### .mcp.json
75
+
76
+ Only if you found evidence of external services in the config files, dependencies,
77
+ or environment template. Evidence means it appears in the files above.
78
+ No evidence = no server. Do not invent services that were not in scope.
79
+ If it exists: add to it. Never remove existing entries. Produce valid JSON.
80
+
81
+ ### .claude/settings.json
82
+
83
+ Only if hooks genuinely earn their cost for this specific project.
84
+ Every hook adds overhead on every Claude Code action.
85
+ If it exists: add to it. Never remove existing hooks. Never modify existing values.
86
+
87
+ ### .claude/skills/
88
+
89
+ Only for patterns that recur across this codebase and benefit from automatic loading.
90
+ Use `applies-when` frontmatter so skills load only when relevant — not on every message.
91
+ If a similar skill already exists: extend it. Do not create a parallel one.
92
+
93
+ ### .github/workflows/
94
+
95
+ Only if `.github/` exists ({{HAS_GITHUB_DIR}}).
96
+ Only workflows warranted by what you found.
97
+ If workflows already exist: do not touch them.
98
+
99
+ ---
100
+
101
+ ## Absolute rules
102
+
103
+ 1. You have the full content of every existing Claude config file above.
104
+ Read it before writing. Never write blind.
105
+
106
+ 2. Append and merge only. Never rewrite a file in full. Never remove existing content.
107
+
108
+ 3. Write only what is evidenced by the project files. No evidence = skip it.
109
+
110
+ 4. Every line in CLAUDE.md must reference something you actually saw.
111
+ No generic boilerplate. No advice identical for every project.
112
+
113
+ 5. MCP servers, skills, and hooks add cost on every Claude Code session.
114
+ Only add them if they clearly earn their keep for THIS project.
115
+
116
+ ---
117
+
118
+ ## Output format — hard constraint, no exceptions
119
+
120
+ After completing all work, output ONLY:
121
+
122
+ Created:
123
+ ✅ [path] — [one clause: what you saw that justified it]
124
+
125
+ Updated:
126
+ ✅ [path] — [one clause: what was added]
127
+
128
+ Skipped:
129
+ ⏭ [path] — [one clause: why not needed]
130
+
131
+ No summaries. No file contents. No "here's what I built."
132
+ One line per file. Then stop.
@@ -0,0 +1,53 @@
1
+ <!-- Generated by claude-setup remove — {{DATE}} -->
2
+ <!-- Run /stack-remove in Claude Code -->
3
+
4
+ Remove this from the Claude Code setup:
5
+ "{{USER_INPUT}}"
6
+
7
+ ---
8
+
9
+ ## Current setup — read everything before touching any file
10
+
11
+ {{#if HAS_CLAUDE_MD}}
12
+ ### CLAUDE.md
13
+ {{CLAUDE_MD_CONTENT}}
14
+ {{/if}}
15
+
16
+ {{#if HAS_MCP_JSON}}
17
+ ### .mcp.json
18
+ {{MCP_JSON_CONTENT}}
19
+ {{/if}}
20
+
21
+ {{#if HAS_SETTINGS}}
22
+ ### .claude/settings.json
23
+ {{SETTINGS_CONTENT}}
24
+ {{/if}}
25
+
26
+ Skills: {{SKILLS_LIST}}
27
+ Commands: {{COMMANDS_LIST}}
28
+ Workflows: {{WORKFLOWS_LIST}}
29
+
30
+ ---
31
+
32
+ ## Your job
33
+
34
+ Find everything related to the removal request across all files above.
35
+ Remove surgically — section by section, key by key.
36
+
37
+ Rules:
38
+ - Never delete an entire file. Remove only the relevant section.
39
+ - Never remove content unrelated to the request.
40
+ - After every edit, the file must remain valid (JSON stays valid JSON, etc.)
41
+ - If not found anywhere: say so and stop.
42
+
43
+ ---
44
+
45
+ ## Output format — strict
46
+
47
+ Removed from:
48
+ ✅ [path] — [what was removed]
49
+
50
+ Not found:
51
+ ⏭ [path] — not referenced
52
+
53
+ One line per file. Nothing else.
@@ -0,0 +1,70 @@
1
+ <!-- Generated by claude-setup sync — {{DATE}} -->
2
+ <!-- Last setup: {{LAST_RUN_DATE}} -->
3
+ <!-- Run /stack-sync in Claude Code -->
4
+
5
+ The project has changed since Claude Code was last set up.
6
+ Your job: update the setup to reflect what changed. Nothing more.
7
+
8
+ ---
9
+
10
+ ## What changed since last setup
11
+
12
+ ### Added files
13
+ {{ADDED_FILES}}
14
+
15
+ ### Modified files
16
+ {{MODIFIED_FILES}}
17
+
18
+ ### Deleted files
19
+ {{DELETED_FILES}}
20
+
21
+ ---
22
+
23
+ ## Current setup — read before touching
24
+
25
+ {{#if HAS_CLAUDE_MD}}
26
+ ### CLAUDE.md
27
+ {{CLAUDE_MD_CONTENT}}
28
+ {{/if}}
29
+
30
+ {{#if HAS_MCP_JSON}}
31
+ ### .mcp.json
32
+ {{MCP_JSON_CONTENT}}
33
+ {{/if}}
34
+
35
+ {{#if HAS_SETTINGS}}
36
+ ### .claude/settings.json
37
+ {{SETTINGS_CONTENT}}
38
+ {{/if}}
39
+
40
+ Skills: {{SKILLS_LIST}}
41
+ Commands: {{COMMANDS_LIST}}
42
+
43
+ ---
44
+
45
+ ## Your job
46
+
47
+ For each changed file: does this change have any implication for the Claude Code setup?
48
+
49
+ Reason about the signal: a new dependency, a new directory, a deleted file that was
50
+ referenced somewhere. Update only what the change demands.
51
+
52
+ Do not update things that did not change.
53
+ Do not rewrite files — surgical edits only.
54
+ If a change has no implication for the setup: skip it and say why.
55
+ If you are unsure: flag it for the developer rather than guessing.
56
+
57
+ ---
58
+
59
+ ## Output format — strict
60
+
61
+ Updated:
62
+ ✅ [path] — triggered by: [which changed file and why]
63
+
64
+ Skipped:
65
+ ⏭ [path] — [why this change has no setup implication]
66
+
67
+ Flagged:
68
+ ⚠️ [something that needs the developer's decision]
69
+
70
+ One line per file. Nothing else.