claude-pro-minmax 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.
- package/.claude/CLAUDE.md +60 -0
- package/.claude/agents/README.ko.md +210 -0
- package/.claude/agents/README.md +210 -0
- package/.claude/agents/builder.md +96 -0
- package/.claude/agents/dplanner.md +58 -0
- package/.claude/agents/planner.md +52 -0
- package/.claude/agents/reviewer.md +69 -0
- package/.claude/commands/README.ko.md +381 -0
- package/.claude/commands/README.md +381 -0
- package/.claude/commands/analyze-failures.md +49 -0
- package/.claude/commands/compact-phase.md +75 -0
- package/.claude/commands/do-opus.md +43 -0
- package/.claude/commands/do-sonnet.md +43 -0
- package/.claude/commands/do.md +56 -0
- package/.claude/commands/dplan.md +36 -0
- package/.claude/commands/learn.md +64 -0
- package/.claude/commands/llms-txt.md +50 -0
- package/.claude/commands/load-context.md +46 -0
- package/.claude/commands/plan.md +62 -0
- package/.claude/commands/review.md +55 -0
- package/.claude/commands/session-load.md +61 -0
- package/.claude/commands/session-save.md +79 -0
- package/.claude/commands/watch.md +58 -0
- package/.claude/contexts/README.ko.md +94 -0
- package/.claude/contexts/README.md +94 -0
- package/.claude/contexts/backend-context.md +23 -0
- package/.claude/contexts/frontend-context.md +24 -0
- package/.claude/rules/README.ko.md +98 -0
- package/.claude/rules/README.md +98 -0
- package/.claude/rules/code-style.md +21 -0
- package/.claude/rules/critical-actions.md +34 -0
- package/.claude/rules/security.md +13 -0
- package/.claude/sessions/2025-01-27-auth-jwt-refresh.md +32 -0
- package/.claude/sessions/README.ko.md +195 -0
- package/.claude/sessions/README.md +195 -0
- package/.claude/settings.json +167 -0
- package/.claude/settings.local.example.json +3 -0
- package/.claude/skills/README.ko.md +60 -0
- package/.claude/skills/README.md +60 -0
- package/.claude/skills/cli-wrappers/SKILL.md +38 -0
- package/.claude/skills/cli-wrappers/references/github-cli.md +18 -0
- package/.claude/skills/cli-wrappers/references/mgrep.md +18 -0
- package/.claude/skills/learned/README.ko.md +64 -0
- package/.claude/skills/learned/README.md +64 -0
- package/.claude.json +28 -0
- package/.claudeignore +17 -0
- package/LICENSE +21 -0
- package/README.ko.md +441 -0
- package/README.md +441 -0
- package/bin/cpmm.js +171 -0
- package/install.sh +154 -0
- package/package.json +59 -0
- package/scripts/README.ko.md +150 -0
- package/scripts/README.md +150 -0
- package/scripts/analyze-failures.sh +145 -0
- package/scripts/build.sh +34 -0
- package/scripts/claude_command_smoke.sh +116 -0
- package/scripts/commit.sh +7 -0
- package/scripts/create-branch.sh +14 -0
- package/scripts/hooks/README.ko.md +117 -0
- package/scripts/hooks/README.md +118 -0
- package/scripts/hooks/compact-suggest.sh +52 -0
- package/scripts/hooks/critical-action-check.sh +68 -0
- package/scripts/hooks/notification.sh +47 -0
- package/scripts/hooks/post-edit-format.sh +39 -0
- package/scripts/hooks/pre-compact.sh +55 -0
- package/scripts/hooks/readonly-check.sh +19 -0
- package/scripts/hooks/retry-check.sh +32 -0
- package/scripts/hooks/session-cleanup.sh +83 -0
- package/scripts/hooks/session-start.sh +70 -0
- package/scripts/hooks/stop-collect-context.sh +39 -0
- package/scripts/hooks/tool-failure-log.sh +46 -0
- package/scripts/lint.sh +34 -0
- package/scripts/runtime/README.ko.md +60 -0
- package/scripts/runtime/README.md +60 -0
- package/scripts/runtime/adapters/README.ko.md +68 -0
- package/scripts/runtime/adapters/README.md +68 -0
- package/scripts/runtime/adapters/_interface.sh +53 -0
- package/scripts/runtime/adapters/_template.sh +67 -0
- package/scripts/runtime/adapters/generic.sh +78 -0
- package/scripts/runtime/adapters/go.sh +51 -0
- package/scripts/runtime/adapters/jvm.sh +97 -0
- package/scripts/runtime/adapters/node.sh +104 -0
- package/scripts/runtime/adapters/python.sh +116 -0
- package/scripts/runtime/adapters/rust.sh +49 -0
- package/scripts/runtime/detect.sh +52 -0
- package/scripts/scrub-secrets.js +48 -0
- package/scripts/snapshot.sh +45 -0
- package/scripts/test.sh +34 -0
- package/scripts/verify.sh +35 -0
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
> **[한국어 버전](README.ko.md)**
|
|
2
|
+
|
|
3
|
+
# Sessions Directory
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
Stores session state files created by `/session-save`. Enables continuity across sessions.
|
|
7
|
+
|
|
8
|
+
> **Path note:** Examples include installed paths (`~/.claude/...`). In this repository, source paths are `./.claude/...` and `./scripts/...`.
|
|
9
|
+
|
|
10
|
+
## Session Lifecycle
|
|
11
|
+
|
|
12
|
+
```mermaid
|
|
13
|
+
flowchart TB
|
|
14
|
+
%% Style definitions %%
|
|
15
|
+
classDef command fill:#e8f5e9,stroke:#43a047,stroke-width:2px;
|
|
16
|
+
classDef file fill:#fff3e0,stroke:#fb8c00,stroke-width:2px;
|
|
17
|
+
classDef process fill:#e3f2fd,stroke:#1e88e5,stroke-width:2px;
|
|
18
|
+
classDef hook fill:#ffebee,stroke:#e53935,stroke-width:2px;
|
|
19
|
+
classDef builtin fill:#f3e5f5,stroke:#8e24aa,stroke-width:2px;
|
|
20
|
+
classDef note fill:#fffde7,stroke:#fdd835,stroke-width:1px,stroke-dasharray: 3 3;
|
|
21
|
+
|
|
22
|
+
%% Main Session Flow %%
|
|
23
|
+
Start((🚀 Session Start)):::process
|
|
24
|
+
Start --> Work[🔨 Working on Tasks]:::process
|
|
25
|
+
|
|
26
|
+
Work --> Decision{Save Session?}:::process
|
|
27
|
+
Decision -->|Yes| SaveCmd[/"💾 /session-save auth-feature"/]:::command
|
|
28
|
+
Decision -->|No| Continue[Continue Working]:::process
|
|
29
|
+
Continue --> Work
|
|
30
|
+
|
|
31
|
+
%% Save Process %%
|
|
32
|
+
SaveCmd --> Collect["📋 Collect State<br/>• Completed tasks<br/>• Current state<br/>• Next actions<br/>• Key files"]:::process
|
|
33
|
+
Collect --> Scrub{{"🔐 scrub-secrets.js<br/>Remove 15+ secret patterns"}}:::hook
|
|
34
|
+
Scrub --> Write["✍️ Write to<br/>.claude/sessions/<br/>2025-01-28-auth-feature.md"]:::file
|
|
35
|
+
Write --> Notify["✅ Session saved!<br/>Scrubbed: N secrets"]:::note
|
|
36
|
+
|
|
37
|
+
%% Load Process %%
|
|
38
|
+
Notify -.->|"Later..."| LoadStart((📂 New Session)):::process
|
|
39
|
+
LoadStart --> LoadCmd[/"📂 /session-load auth-feature"/]:::command
|
|
40
|
+
LoadCmd --> Read["📖 Read session file"]:::process
|
|
41
|
+
Read --> Restore["🔄 Restore Context<br/>• Set completed tasks<br/>• Load next actions<br/>• Reference key files"]:::process
|
|
42
|
+
Restore --> Ready["✅ Ready to continue!"]:::note
|
|
43
|
+
|
|
44
|
+
%% Built-in Alternative %%
|
|
45
|
+
subgraph BuiltInCLI["🔧 Alternative: Built-in CLI"]
|
|
46
|
+
direction TB
|
|
47
|
+
BuiltinNote["For exact conversation replay<br/>(not human-readable summary)"]:::note
|
|
48
|
+
CLI1["claude -c / --continue<br/>→ Resume most recent"]:::builtin
|
|
49
|
+
CLI2["claude -r abc123 / --resume abc123<br/>→ Resume specific session"]:::builtin
|
|
50
|
+
JSONL["~/.claude/projects/*.jsonl<br/>(raw conversation history)"]:::file
|
|
51
|
+
CLI1 --> JSONL
|
|
52
|
+
CLI2 --> JSONL
|
|
53
|
+
end
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Custom vs Built-in Sessions
|
|
57
|
+
|
|
58
|
+
| Feature | `/session-save` + `/session-load` | `claude --continue` |
|
|
59
|
+
|---------|-----------------------------------|---------------------|
|
|
60
|
+
| **Format** | Human-readable `.md` | Raw `.jsonl` |
|
|
61
|
+
| **Location** | `.claude/sessions/` (project) | `~/.claude/projects/` (global) |
|
|
62
|
+
| **Content** | Summary (tasks, decisions, next steps) | Full conversation transcript |
|
|
63
|
+
| **Secret Scrubbing** | ✅ Automatic | ❌ Not scrubbed |
|
|
64
|
+
| **Best For** | Sharing context, documentation | Exact conversation replay |
|
|
65
|
+
|
|
66
|
+
### When to Use What?
|
|
67
|
+
|
|
68
|
+
| Situation | Recommended | Why |
|
|
69
|
+
|-----------|-------------|-----|
|
|
70
|
+
| Short break (same day) | `claude -c` | Fast, exact conversation resume |
|
|
71
|
+
| Long break (next day) | `/session-load` | Load only key context, reduce cost |
|
|
72
|
+
| Share context with team | `/session-save` | Human-readable `.md` for sharing |
|
|
73
|
+
| After working with secrets | `/session-save` | Auto-scrubbing for safety |
|
|
74
|
+
| Need exact conversation | `claude --resume` | Full transcript replay |
|
|
75
|
+
|
|
76
|
+
### Recommended Workflow
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
📅 Day 1 Morning: Start new task
|
|
80
|
+
📅 Day 1 Afternoon: After lunch → claude -c (quick resume with built-in CLI)
|
|
81
|
+
📅 Day 1 Evening: /session-save feature-v1 (save work summary)
|
|
82
|
+
|
|
83
|
+
📅 Day 2: /session-load feature-v1 (start fresh with clean context)
|
|
84
|
+
📅 Day 2 Afternoon: claude -c (quick resume same day)
|
|
85
|
+
📅 Day 2 Evening: /session-save feature-v2 (save progress)
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
> **💡 Tip**: These two systems are **complementary, not competing**. Use both based on the situation!
|
|
89
|
+
|
|
90
|
+
## File Naming
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
YYYY-MM-DD-[name].md
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Examples:
|
|
97
|
+
- `2025-01-27-auth-jwt.md`
|
|
98
|
+
- `2025-01-27-payment-integration.md`
|
|
99
|
+
|
|
100
|
+
## Security
|
|
101
|
+
|
|
102
|
+
**All session files are automatically scrubbed before writing.**
|
|
103
|
+
|
|
104
|
+
Scrubbed patterns include:
|
|
105
|
+
- API keys (OpenAI, Anthropic, Stripe, GitHub, AWS)
|
|
106
|
+
- Database URLs with credentials
|
|
107
|
+
- JWT tokens
|
|
108
|
+
- Password fields
|
|
109
|
+
- Private keys
|
|
110
|
+
|
|
111
|
+
## Usage
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
# Save current session
|
|
115
|
+
/session-save auth-feature
|
|
116
|
+
|
|
117
|
+
# Load most recent
|
|
118
|
+
/session-load
|
|
119
|
+
|
|
120
|
+
# Load specific session
|
|
121
|
+
/session-load auth-feature
|
|
122
|
+
|
|
123
|
+
# List available sessions
|
|
124
|
+
/session-load --list
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## Session File Format
|
|
128
|
+
|
|
129
|
+
```markdown
|
|
130
|
+
# Session: [name]
|
|
131
|
+
Date: [timestamp]
|
|
132
|
+
Duration: [messages]
|
|
133
|
+
Security: [items scrubbed]
|
|
134
|
+
|
|
135
|
+
## Context
|
|
136
|
+
- Project: [name]
|
|
137
|
+
- Branch: [branch]
|
|
138
|
+
- Focus: [description]
|
|
139
|
+
|
|
140
|
+
## Completed
|
|
141
|
+
- [x] [task]
|
|
142
|
+
|
|
143
|
+
## In Progress
|
|
144
|
+
- [ ] [task] - [status]
|
|
145
|
+
|
|
146
|
+
## Decisions Made
|
|
147
|
+
- [decision]: [reasoning]
|
|
148
|
+
|
|
149
|
+
## Next Steps
|
|
150
|
+
1. [action]
|
|
151
|
+
|
|
152
|
+
## Key Files
|
|
153
|
+
- [file]: [why relevant]
|
|
154
|
+
|
|
155
|
+
## Loaded Contexts
|
|
156
|
+
- [type]: [status]
|
|
157
|
+
|
|
158
|
+
## Learned Patterns
|
|
159
|
+
- [pattern]
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
## Maintenance
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
# List sessions
|
|
166
|
+
ls -la .claude/sessions/
|
|
167
|
+
|
|
168
|
+
# Delete old sessions (>30 days)
|
|
169
|
+
find .claude/sessions/ -mtime +30 -delete
|
|
170
|
+
|
|
171
|
+
# Manual scrub (if needed)
|
|
172
|
+
node scripts/scrub-secrets.js < session.md > clean.md
|
|
173
|
+
# Installed path: node ~/.claude/scripts/scrub-secrets.js < session.md > clean.md
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
## Claude Built-in Session Commands
|
|
177
|
+
|
|
178
|
+
In addition to custom `/session-save` and `/session-load`, Claude Code has built-in session features:
|
|
179
|
+
|
|
180
|
+
| Command | Purpose |
|
|
181
|
+
|---------|---------|
|
|
182
|
+
| `claude -c` / `--continue` | Resume most recent session |
|
|
183
|
+
| `claude -r "id"` / `--resume "id"` | Resume specific session by ID |
|
|
184
|
+
| `claude --resume` | Show recent sessions to select |
|
|
185
|
+
|
|
186
|
+
> **Note:** Built-in sessions are stored in `~/.claude/projects/.../*.jsonl`. Custom `/session-save` creates human-readable `.md` summaries in `.claude/sessions/`.
|
|
187
|
+
|
|
188
|
+
## Best Practices
|
|
189
|
+
|
|
190
|
+
1. Save after completing logical phases
|
|
191
|
+
2. Save before long breaks (>4 hours)
|
|
192
|
+
3. Use descriptive names
|
|
193
|
+
4. Prune old sessions periodically
|
|
194
|
+
5. **Ensure scripts are executable**: `chmod +x scripts/hooks/*.sh`
|
|
195
|
+
(Installed path: `chmod +x ~/.claude/scripts/hooks/*.sh`)
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/claude-code-settings.json",
|
|
3
|
+
"env": {
|
|
4
|
+
"CLAUDE_AUTOCOMPACT_PCT_OVERRIDE": "75",
|
|
5
|
+
"CLAUDE_FAILURE_NOTIFY": "0"
|
|
6
|
+
},
|
|
7
|
+
"permissions": {
|
|
8
|
+
"allow": [
|
|
9
|
+
"Read",
|
|
10
|
+
"Glob",
|
|
11
|
+
"Grep",
|
|
12
|
+
"WebFetch(domain:platform.claude.com)",
|
|
13
|
+
"WebFetch(domain:code.claude.com)",
|
|
14
|
+
"WebFetch(domain:docs.anthropic.com)",
|
|
15
|
+
"WebFetch(domain:github.com)",
|
|
16
|
+
"WebFetch(domain:support.anthropic.com)",
|
|
17
|
+
"Bash(git log *)",
|
|
18
|
+
"Bash(git status *)",
|
|
19
|
+
"Bash(git diff *)",
|
|
20
|
+
"Bash(git add *)",
|
|
21
|
+
"Bash(git commit *)",
|
|
22
|
+
"Bash(git checkout *)",
|
|
23
|
+
"Bash(git branch *)",
|
|
24
|
+
"Bash(git fetch *)",
|
|
25
|
+
"Bash(git pull *)",
|
|
26
|
+
"Bash(git merge *)",
|
|
27
|
+
"Bash(git stash *)",
|
|
28
|
+
"Bash(gh *)",
|
|
29
|
+
"Bash(npm *)",
|
|
30
|
+
"Bash(pnpm *)",
|
|
31
|
+
"Bash(yarn *)",
|
|
32
|
+
"Bash(bun *)",
|
|
33
|
+
"Bash(mgrep *)",
|
|
34
|
+
"Bash(grep *)",
|
|
35
|
+
"Bash(find *)",
|
|
36
|
+
"Bash(cat *)",
|
|
37
|
+
"Bash(head *)",
|
|
38
|
+
"Bash(tail *)",
|
|
39
|
+
"Bash(wc *)",
|
|
40
|
+
"Bash(ls *)",
|
|
41
|
+
"Bash(mkdir *)",
|
|
42
|
+
"Bash(cp *)",
|
|
43
|
+
"Bash(mv *)",
|
|
44
|
+
"Bash(node *)",
|
|
45
|
+
"Bash(npx *)",
|
|
46
|
+
"Bash(tsc *)",
|
|
47
|
+
"Bash(jest *)",
|
|
48
|
+
"Bash(vitest *)",
|
|
49
|
+
"Bash(prettier *)",
|
|
50
|
+
"Bash(eslint *)",
|
|
51
|
+
"Bash(jq *)",
|
|
52
|
+
"Bash(tmux *)",
|
|
53
|
+
"Bash(./gradlew *)",
|
|
54
|
+
"Bash(gradle *)",
|
|
55
|
+
"Bash(mvn *)",
|
|
56
|
+
"Bash(cargo *)",
|
|
57
|
+
"Bash(go *)",
|
|
58
|
+
"Bash(poetry *)",
|
|
59
|
+
"Bash(pip *)",
|
|
60
|
+
"Bash(uv *)",
|
|
61
|
+
"Bash(mix *)",
|
|
62
|
+
"Bash(make *)"
|
|
63
|
+
],
|
|
64
|
+
"ask": [
|
|
65
|
+
"Write",
|
|
66
|
+
"Edit",
|
|
67
|
+
"Bash(git push *)",
|
|
68
|
+
"Bash(curl *)"
|
|
69
|
+
],
|
|
70
|
+
"deny": [
|
|
71
|
+
"Bash(sudo *)",
|
|
72
|
+
"Bash(rm -rf /)",
|
|
73
|
+
"Bash(rm -rf ~)",
|
|
74
|
+
"Bash(rm -rf .git)",
|
|
75
|
+
"Read(./.env)",
|
|
76
|
+
"Read(./.env.*)",
|
|
77
|
+
"Read(./secrets/**)"
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
"hooks": {
|
|
81
|
+
"PreToolUse": [
|
|
82
|
+
{
|
|
83
|
+
"matcher": "Bash",
|
|
84
|
+
"hooks": [
|
|
85
|
+
{
|
|
86
|
+
"type": "command",
|
|
87
|
+
"command": "~/.claude/scripts/hooks/critical-action-check.sh",
|
|
88
|
+
"timeout": 5
|
|
89
|
+
}
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
],
|
|
93
|
+
"PostToolUse": [
|
|
94
|
+
{
|
|
95
|
+
"matcher": "Write|Edit",
|
|
96
|
+
"hooks": [
|
|
97
|
+
{
|
|
98
|
+
"type": "command",
|
|
99
|
+
"command": "~/.claude/scripts/hooks/post-edit-format.sh",
|
|
100
|
+
"timeout": 10
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"type": "command",
|
|
104
|
+
"command": "~/.claude/scripts/hooks/compact-suggest.sh",
|
|
105
|
+
"timeout": 5
|
|
106
|
+
}
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
],
|
|
110
|
+
"Notification": [
|
|
111
|
+
{
|
|
112
|
+
"matcher": "permission_prompt|idle_prompt",
|
|
113
|
+
"hooks": [
|
|
114
|
+
{
|
|
115
|
+
"type": "command",
|
|
116
|
+
"command": "~/.claude/scripts/hooks/notification.sh",
|
|
117
|
+
"timeout": 3
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
],
|
|
122
|
+
"SessionStart": [
|
|
123
|
+
{
|
|
124
|
+
"hooks": [
|
|
125
|
+
{
|
|
126
|
+
"type": "command",
|
|
127
|
+
"command": "~/.claude/scripts/hooks/session-start.sh",
|
|
128
|
+
"timeout": 5
|
|
129
|
+
}
|
|
130
|
+
]
|
|
131
|
+
}
|
|
132
|
+
],
|
|
133
|
+
"SessionEnd": [
|
|
134
|
+
{
|
|
135
|
+
"hooks": [
|
|
136
|
+
{
|
|
137
|
+
"type": "command",
|
|
138
|
+
"command": "~/.claude/scripts/hooks/session-cleanup.sh",
|
|
139
|
+
"timeout": 30
|
|
140
|
+
}
|
|
141
|
+
]
|
|
142
|
+
}
|
|
143
|
+
],
|
|
144
|
+
"PreCompact": [
|
|
145
|
+
{
|
|
146
|
+
"hooks": [
|
|
147
|
+
{
|
|
148
|
+
"type": "command",
|
|
149
|
+
"command": "~/.claude/scripts/hooks/pre-compact.sh",
|
|
150
|
+
"timeout": 10
|
|
151
|
+
}
|
|
152
|
+
]
|
|
153
|
+
}
|
|
154
|
+
],
|
|
155
|
+
"PostToolUseFailure": [
|
|
156
|
+
{
|
|
157
|
+
"hooks": [
|
|
158
|
+
{
|
|
159
|
+
"type": "command",
|
|
160
|
+
"command": "~/.claude/scripts/hooks/tool-failure-log.sh",
|
|
161
|
+
"timeout": 5
|
|
162
|
+
}
|
|
163
|
+
]
|
|
164
|
+
}
|
|
165
|
+
]
|
|
166
|
+
}
|
|
167
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# 스킬 디렉토리 (퍼사드 패턴 최적화)
|
|
2
|
+
|
|
3
|
+
> **[English Version](README.md)**
|
|
4
|
+
|
|
5
|
+
## 목적
|
|
6
|
+
이 디렉토리는 **메시지당 최대 가치 (Maximum Value Per Message)**를 위해 퍼사드 패턴(Facade Pattern)으로 설계된 재사용 가능한 스킬 정의를 포함합니다. 방대한 기술 세부 정보를 인터페이스와 분리하여 과도한 컨텍스트 로딩을 방지합니다.
|
|
7
|
+
|
|
8
|
+
## 구조 (퍼사드 패턴)
|
|
9
|
+
|
|
10
|
+
```text
|
|
11
|
+
skills/
|
|
12
|
+
└── 스킬이름/
|
|
13
|
+
├── SKILL.md # 인터페이스 (경량: 약 30-50줄)
|
|
14
|
+
└── references/ # 세부 구현 (중량: 필요 시에만 로드)
|
|
15
|
+
├── api-docs.md
|
|
16
|
+
└── cli-patterns.md
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## 작동 원리: "온디맨드(On-Demand)" 전략
|
|
20
|
+
|
|
21
|
+
매번 방대한 문서를 로드하는 대신, Claude는 처음에 **인터페이스(SKILL.md)**만 로드합니다.
|
|
22
|
+
|
|
23
|
+
1. **1단계 (경량화)**: Claude가 간결한 `SKILL.md` 인터페이스를 읽습니다.
|
|
24
|
+
2. **2단계 (트리거)**: 인터페이스에 정의된 "트리거 조건"에 맞는 작업이 발생하면, Claude가 명시적으로 참조 파일을 로드합니다.
|
|
25
|
+
3. **3단계 (실행)**: 해당 턴에서만 상세 정보를 사용하고, 이후 `/compact` 시점에서 제거될 수 있도록 관리합니다.
|
|
26
|
+
|
|
27
|
+
## 스킬 목록
|
|
28
|
+
|
|
29
|
+
| 스킬 | 용도 | 주요 이점 |
|
|
30
|
+
| :--- | :--- | :--- |
|
|
31
|
+
| `cli-wrappers` | 무거운 MCP 서버를 가벼운 CLI 패턴으로 대체 | 출력을 상당히 줄임 |
|
|
32
|
+
| `learned` | `/learn` 명령어를 통해 학습된 패턴 저장 | 재작업 및 반복 질문 방지 |
|
|
33
|
+
|
|
34
|
+
## 커스텀 스킬 추가 방법
|
|
35
|
+
|
|
36
|
+
### 1. 파일 템플릿: `SKILL.md`
|
|
37
|
+
```markdown
|
|
38
|
+
# [스킬 이름] 인터페이스
|
|
39
|
+
|
|
40
|
+
## 목적
|
|
41
|
+
이 스킬이 제공하는 기능에 대한 짧은 설명.
|
|
42
|
+
|
|
43
|
+
## 빠른 참조
|
|
44
|
+
- 핵심 사실 1
|
|
45
|
+
- 핵심 사실 2
|
|
46
|
+
|
|
47
|
+
## 참조 로드 프로토콜 (Reference Loading Protocol)
|
|
48
|
+
Claude는 아래 조건이 충족될 때만 `read_file` 도구를 사용하여 참조 파일을 로드해야 합니다:
|
|
49
|
+
|
|
50
|
+
- **로직 세부 사항**: 핵심 로직 작성 시 `.claude/skills/[스킬]/references/logic.md` 로드.
|
|
51
|
+
- **CLI 패턴**: 셸 명령어 실행 시 `.claude/skills/[스킬]/references/cli.md` 로드.
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### 2. 파일 템플릿: `references/*.md`
|
|
55
|
+
방대한 API 문서, 긴 코드 예제, 에러 메시지 테이블 등 무거운 내용을 여기에 작성합니다.
|
|
56
|
+
|
|
57
|
+
## 권장 사항
|
|
58
|
+
1. **50줄 규칙**: `SKILL.md`가 50줄을 넘어가면 세부 내용을 `references/`로 옮기세요.
|
|
59
|
+
2. **명시적 트리거**: **"Claude는 반드시 ...을 로드해야 합니다"**와 같은 강조 문구를 사용하여 모델이 패턴을 따르게 하세요.
|
|
60
|
+
3. **상대 경로**: 도구 실행 실패를 방지하기 위해 항상 프로젝트 루트부터의 전체 경로(`.claude/skills/...`)를 제공하세요.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Skills Directory (Facade Pattern Optimization)
|
|
2
|
+
|
|
3
|
+
> **[한국어 버전](README.ko.md)**
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
This directory contains reusable skill definitions designed for **Maximum Value Per Message** using the Facade Pattern. It prevents excessive context loading by separating high-level interfaces from verbose technical details.
|
|
7
|
+
|
|
8
|
+
## Structure (Facade Pattern)
|
|
9
|
+
|
|
10
|
+
```text
|
|
11
|
+
skills/
|
|
12
|
+
└── skill-name/
|
|
13
|
+
├── SKILL.md # Interface (Thin: ~30-50 lines)
|
|
14
|
+
└── references/ # Implementation (Verbose: Loaded on-demand)
|
|
15
|
+
├── api-docs.md
|
|
16
|
+
└── cli-patterns.md
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## How It Works: The "On-Demand" Strategy
|
|
20
|
+
|
|
21
|
+
Instead of loading extensive documentation every time, Claude starts with only the **Interface (SKILL.md)**.
|
|
22
|
+
|
|
23
|
+
1. **Phase 1 (Lightweight)**: Claude reads the compact `SKILL.md` interface.
|
|
24
|
+
2. **Phase 2 (Trigger)**: When a specific task matches a "Trigger Condition" defined in the interface, Claude explicitly loads the reference file.
|
|
25
|
+
3. **Phase 3 (Execution)**: Claude uses the detailed info only for that specific turn, then it can be discarded during `/compact`.
|
|
26
|
+
|
|
27
|
+
## Skill Inventory
|
|
28
|
+
|
|
29
|
+
| Skill | Purpose | Key Benefit |
|
|
30
|
+
| :--- | :--- | :--- |
|
|
31
|
+
| `cli-wrappers` | Replaces heavy MCP servers with slim CLI patterns. | Significantly reduces output tokens. |
|
|
32
|
+
| `learned` | Stores project-specific patterns via `/learn`. | Prevents rework & repeat questions. |
|
|
33
|
+
|
|
34
|
+
## Adding a Custom Skill
|
|
35
|
+
|
|
36
|
+
### 1. File Template: `SKILL.md`
|
|
37
|
+
```markdown
|
|
38
|
+
# [Skill Name] Interface
|
|
39
|
+
|
|
40
|
+
## Purpose
|
|
41
|
+
Short description of what this skill does.
|
|
42
|
+
|
|
43
|
+
## Quick Reference
|
|
44
|
+
- Fast fact 1
|
|
45
|
+
- Fast fact 2
|
|
46
|
+
|
|
47
|
+
## Reference Loading Protocol
|
|
48
|
+
Claude **MUST** use the `read_file` tool to load these files ONLY when the conditions are met:
|
|
49
|
+
|
|
50
|
+
- **Logic Details**: Load `.claude/skills/[skill]/references/logic.md` when writing core logic.
|
|
51
|
+
- **CLI Patterns**: Load `.claude/skills/[skill]/references/cli.md` when running shell commands.
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### 2. File Template: `references/*.md`
|
|
55
|
+
Contains the heavy stuff: Full API docs, long code examples, error message tables.
|
|
56
|
+
|
|
57
|
+
## Best Practices
|
|
58
|
+
1. **The 50-Line Rule**: If `SKILL.md` exceeds 50 lines, move details to `references/`.
|
|
59
|
+
2. **Explicit Triggers**: Use bold text like **"Claude MUST load..."** to ensure the model follows the pattern.
|
|
60
|
+
3. **Relative Paths**: Always provide the full path from the project root (e.g., `.claude/skills/...`) to avoid tool failures.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cli-wrappers
|
|
3
|
+
description: Use CLI tools instead of MCP to reduce cost. Provides JSON output patterns for gh, mgrep, psql, etc.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# CLI Wrappers Skill
|
|
7
|
+
|
|
8
|
+
## Purpose
|
|
9
|
+
Replace MCPs with CLI. ALWAYS use JSON output + jq.
|
|
10
|
+
|
|
11
|
+
## GitHub (gh)
|
|
12
|
+
```bash
|
|
13
|
+
gh pr list --json number,title | jq -c '.[]'
|
|
14
|
+
gh pr create --title "feat: X" --body "desc"
|
|
15
|
+
gh issue list --json number,title | jq -c '.[]'
|
|
16
|
+
```
|
|
17
|
+
Full reference: `@references/github-cli.md`
|
|
18
|
+
|
|
19
|
+
## Search (mgrep)
|
|
20
|
+
```bash
|
|
21
|
+
mgrep "pattern" src/
|
|
22
|
+
mgrep -t py "class" # Python
|
|
23
|
+
mgrep -t java "public" # Java
|
|
24
|
+
mgrep -t go "func" # Go
|
|
25
|
+
mgrep --web "docs query"
|
|
26
|
+
```
|
|
27
|
+
Full reference: `@references/mgrep.md`
|
|
28
|
+
|
|
29
|
+
## Database
|
|
30
|
+
```bash
|
|
31
|
+
psql -t -A -F',' -c "SELECT..."
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Benefits
|
|
35
|
+
| Tool | Benefit |
|
|
36
|
+
|------|---------|
|
|
37
|
+
| gh pr list | JSON output reduces verbosity significantly |
|
|
38
|
+
| psql | CSV format eliminates table formatting overhead |
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# GitHub CLI Reference
|
|
2
|
+
|
|
3
|
+
## Pull Requests
|
|
4
|
+
```bash
|
|
5
|
+
gh pr list --json number,title,state | jq -c '.[]'
|
|
6
|
+
gh pr create --title "feat: X" --body "desc"
|
|
7
|
+
gh pr view 123 --json title,body | jq '.'
|
|
8
|
+
gh pr merge 123 --squash
|
|
9
|
+
gh pr checks 123 --json name,state | jq -c '.[]'
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Issues
|
|
13
|
+
```bash
|
|
14
|
+
gh issue list --json number,title | jq -c '.[]'
|
|
15
|
+
gh issue create --title "X" --body "desc"
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Key: Always --json | jq, never raw output
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# mgrep Reference
|
|
2
|
+
|
|
3
|
+
## Why mgrep?
|
|
4
|
+
50% less output than grep/ripgrep
|
|
5
|
+
|
|
6
|
+
## Usage
|
|
7
|
+
```bash
|
|
8
|
+
mgrep "pattern" src/ # Local
|
|
9
|
+
mgrep -t ts "interface" # Type filter
|
|
10
|
+
mgrep --web "Next.js docs" # Web search
|
|
11
|
+
mgrep "TODO|FIXME" --include "*.ts"
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## vs grep
|
|
15
|
+
| Tool | Output |
|
|
16
|
+
|------|--------|
|
|
17
|
+
| grep | ~2000 |
|
|
18
|
+
| mgrep | ~1000 |
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# 학습된 패턴 데이터베이스 (Learned Patterns)
|
|
2
|
+
|
|
3
|
+
이 디렉토리는 Claude Code 환경의 **장기 기억(Long-Term Memory)** 저장소입니다. `/learn` 명령어를 통해 추출된 반복적인 코딩 패턴, 아키텍처 결정 사항, 그리고 개인적인 코딩 스타일 선호도를 보관합니다.
|
|
4
|
+
|
|
5
|
+
## 핵심 개념: 지식 순환 아키텍처
|
|
6
|
+
|
|
7
|
+
1. **감지 (Detection)**: 작업 도중 반복되는 패턴이나 중요한 규칙을 발견합니다.
|
|
8
|
+
2. **추출 (Extraction)**: `/learn` 명령어를 실행하여 해당 지식을 정형화합니다.
|
|
9
|
+
3. **저장 (Persistence)**: 메타데이터가 포함된 마크다운 파일로 이 폴더에 저장됩니다.
|
|
10
|
+
4. **부활 (Resurrection)**: 다음 세션이 시작될 때 Claude는 이 폴더를 인덱싱하여, **과거의 실수를 반복하지 않고 이미 결정된 규칙을 다시 묻지 않습니다.**
|
|
11
|
+
|
|
12
|
+
## 사용 방법 및 실행
|
|
13
|
+
|
|
14
|
+
### 1. 명시적 학습 (Manual Learning)
|
|
15
|
+
기억해야 할 규칙이 생겼을 때 직접 입력합니다:
|
|
16
|
+
`> /learn "API 에러 핸들링 시 항상 try-catch와 전역 로거를 사용해줘"`
|
|
17
|
+
|
|
18
|
+
### 2. 세션 분석 (Session Analysis)
|
|
19
|
+
복잡한 작업을 마친 후, Claude에게 패턴을 찾아내라고 시킵니다:
|
|
20
|
+
`> /learn`
|
|
21
|
+
Claude가 전체 대화 기록을 분석하여 저장할만한 패턴을 제안합니다.
|
|
22
|
+
|
|
23
|
+
### 3. 목록 확인 (Management)
|
|
24
|
+
`> /learn --show` (현재 저장된 모든 패턴 목록을 확인합니다.)
|
|
25
|
+
|
|
26
|
+
## 분류 체계 및 저장 위치
|
|
27
|
+
|
|
28
|
+
| 카테고리 | 저장 위치 | 용도 |
|
|
29
|
+
| :--- | :--- | :--- |
|
|
30
|
+
| **CONVENTION** | `.claude/rules/` | 구조적 규칙 (예: 폴더 구조, 네이밍 컨벤션) |
|
|
31
|
+
| **PATTERN** | **이 폴더 (learned/)** | 재사용 가능한 로직 블록 (예: 인증 흐름, 에러 처리 패턴) |
|
|
32
|
+
| **PREFERENCE** | `.claude/rules/` | 개인적 취향 (예: "나는 trailing comma를 선호함") |
|
|
33
|
+
|
|
34
|
+
## 패턴 파일 구조
|
|
35
|
+
|
|
36
|
+
모든 패턴 파일은 Claude가 읽기 최적화된 아래 형식을 따릅니다:
|
|
37
|
+
|
|
38
|
+
```markdown
|
|
39
|
+
---
|
|
40
|
+
name: api-response-format
|
|
41
|
+
category: PATTERN
|
|
42
|
+
tags: [api, nodejs, json]
|
|
43
|
+
---
|
|
44
|
+
# 패턴: 표준 API 응답 형식
|
|
45
|
+
|
|
46
|
+
## 문제점
|
|
47
|
+
API 응답 형식이 일관되지 않아 프론트엔드에서 파싱 에러가 자주 발생함.
|
|
48
|
+
|
|
49
|
+
## 해결책
|
|
50
|
+
`src/types/api.ts`에 정의된 `BaseResponse` 인터페이스를 반드시 사용함.
|
|
51
|
+
|
|
52
|
+
## 예시
|
|
53
|
+
```typescript
|
|
54
|
+
res.json({
|
|
55
|
+
success: true,
|
|
56
|
+
data: result,
|
|
57
|
+
error: null
|
|
58
|
+
});
|
|
59
|
+
```
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## ⚠️ 주의 사항
|
|
63
|
+
- **비밀번호/키 제외**: `/learn` 명령어 실행 시 `scrub-secrets.js`가 자동으로 작동하여 API 키나 토큰이 저장되지 않도록 검열합니다.
|
|
64
|
+
- **프로젝트 컨텍스트**: 패턴은 사용자 홈 디렉토리에 저장되지만, Claude는 현재 프로젝트와 연관된 패턴을 우선적으로 인덱싱합니다.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Learned Patterns Database
|
|
2
|
+
|
|
3
|
+
This directory serves as the **Long-Term Memory** for your Claude Code environment. It stores recurring patterns, specific architectural decisions, and coding style preferences extracted through the `/learn` command.
|
|
4
|
+
|
|
5
|
+
## Core Concept: The Knowledge Cycle
|
|
6
|
+
|
|
7
|
+
1. **Detection**: During a session, you (or the `Stop hook`) identify a reusable pattern.
|
|
8
|
+
2. **Extraction**: You run `/learn` to formalize that insight.
|
|
9
|
+
3. **Persistence**: The pattern is saved as a Markdown file with specific metadata.
|
|
10
|
+
4. **Resurrection**: In future sessions, Claude automatically indexes these files, ensuring it doesn't repeat past mistakes or ask the same questions.
|
|
11
|
+
|
|
12
|
+
## Usage & Implementation
|
|
13
|
+
|
|
14
|
+
### 1. Manual Learning
|
|
15
|
+
If you notice a convention you want to keep:
|
|
16
|
+
`> /learn "Always use useServerSideProps for data fetching in /pages"`
|
|
17
|
+
|
|
18
|
+
### 2. Session Analysis
|
|
19
|
+
If you've just finished a complex task and want to extract the "how-to":
|
|
20
|
+
`> /learn`
|
|
21
|
+
Claude will analyze the transcript and propose patterns to save.
|
|
22
|
+
|
|
23
|
+
### 3. Management
|
|
24
|
+
`> /learn --show` (Lists all active patterns)
|
|
25
|
+
|
|
26
|
+
## Categorization Logic
|
|
27
|
+
|
|
28
|
+
| Category | Storage Target | Purpose |
|
|
29
|
+
| :--- | :--- | :--- |
|
|
30
|
+
| **CONVENTION** | `.claude/rules/` | Structural rules (e.g., Folder structure, Naming). |
|
|
31
|
+
| **PATTERN** | **This folder** | Reusable logic blocks (e.g., Auth flow, Error handling). |
|
|
32
|
+
| **PREFERENCE** | `.claude/rules/` | Personal taste (e.g., "I prefer trailing commas"). |
|
|
33
|
+
|
|
34
|
+
## Pattern File Structure
|
|
35
|
+
|
|
36
|
+
Every learned file follows this high-efficiency schema for LLM ingestion:
|
|
37
|
+
|
|
38
|
+
```markdown
|
|
39
|
+
---
|
|
40
|
+
name: auth-error-handling
|
|
41
|
+
category: PATTERN
|
|
42
|
+
tags: [auth, nextjs, security]
|
|
43
|
+
---
|
|
44
|
+
# Pattern: Centralized Auth Error Handling
|
|
45
|
+
|
|
46
|
+
## Problem
|
|
47
|
+
Auth errors were being handled inconsistently across different API routes.
|
|
48
|
+
|
|
49
|
+
## Solution
|
|
50
|
+
Use the `handleAuthError` utility located in `src/utils/auth`.
|
|
51
|
+
|
|
52
|
+
## Example
|
|
53
|
+
```typescript
|
|
54
|
+
try {
|
|
55
|
+
// ... auth logic
|
|
56
|
+
} catch (e) {
|
|
57
|
+
return handleAuthError(e);
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## ⚠️ Important Notes
|
|
63
|
+
- **No Secrets**: The `/learn` command automatically triggers `scrub-secrets.js` to ensure no API keys or tokens are stored in the patterns.
|
|
64
|
+
- **Project Specific**: While saved in your user home, these patterns are indexed based on project context.
|