claude-mpm 4.15.2__py3-none-any.whl → 4.20.3__py3-none-any.whl
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.
- claude_mpm/VERSION +1 -1
- claude_mpm/agents/BASE_ENGINEER.md +286 -0
- claude_mpm/agents/BASE_PM.md +255 -23
- claude_mpm/agents/PM_INSTRUCTIONS.md +40 -0
- claude_mpm/agents/agent_loader.py +4 -4
- claude_mpm/agents/templates/agentic-coder-optimizer.json +9 -2
- claude_mpm/agents/templates/api_qa.json +7 -1
- claude_mpm/agents/templates/clerk-ops.json +8 -1
- claude_mpm/agents/templates/code_analyzer.json +4 -1
- claude_mpm/agents/templates/dart_engineer.json +11 -1
- claude_mpm/agents/templates/data_engineer.json +11 -1
- claude_mpm/agents/templates/documentation.json +6 -1
- claude_mpm/agents/templates/engineer.json +18 -1
- claude_mpm/agents/templates/gcp_ops_agent.json +8 -1
- claude_mpm/agents/templates/golang_engineer.json +11 -1
- claude_mpm/agents/templates/java_engineer.json +12 -2
- claude_mpm/agents/templates/local_ops_agent.json +216 -37
- claude_mpm/agents/templates/nextjs_engineer.json +11 -1
- claude_mpm/agents/templates/ops.json +8 -1
- claude_mpm/agents/templates/php-engineer.json +11 -1
- claude_mpm/agents/templates/project_organizer.json +9 -2
- claude_mpm/agents/templates/prompt-engineer.json +5 -1
- claude_mpm/agents/templates/python_engineer.json +19 -4
- claude_mpm/agents/templates/qa.json +7 -1
- claude_mpm/agents/templates/react_engineer.json +11 -1
- claude_mpm/agents/templates/refactoring_engineer.json +8 -1
- claude_mpm/agents/templates/research.json +4 -1
- claude_mpm/agents/templates/ruby-engineer.json +11 -1
- claude_mpm/agents/templates/rust_engineer.json +23 -8
- claude_mpm/agents/templates/security.json +6 -1
- claude_mpm/agents/templates/svelte-engineer.json +225 -0
- claude_mpm/agents/templates/ticketing.json +6 -1
- claude_mpm/agents/templates/typescript_engineer.json +11 -1
- claude_mpm/agents/templates/vercel_ops_agent.json +8 -1
- claude_mpm/agents/templates/version_control.json +8 -1
- claude_mpm/agents/templates/web_qa.json +7 -1
- claude_mpm/agents/templates/web_ui.json +11 -1
- claude_mpm/cli/commands/__init__.py +2 -0
- claude_mpm/cli/commands/configure.py +164 -16
- claude_mpm/cli/commands/configure_agent_display.py +6 -6
- claude_mpm/cli/commands/configure_behavior_manager.py +8 -8
- claude_mpm/cli/commands/configure_navigation.py +20 -18
- claude_mpm/cli/commands/configure_startup_manager.py +14 -14
- claude_mpm/cli/commands/configure_template_editor.py +8 -8
- claude_mpm/cli/commands/mpm_init.py +109 -24
- claude_mpm/cli/commands/skills.py +434 -0
- claude_mpm/cli/executor.py +2 -0
- claude_mpm/cli/interactive/__init__.py +3 -0
- claude_mpm/cli/interactive/skills_wizard.py +491 -0
- claude_mpm/cli/parsers/base_parser.py +7 -0
- claude_mpm/cli/parsers/skills_parser.py +137 -0
- claude_mpm/cli/startup.py +83 -0
- claude_mpm/commands/mpm-auto-configure.md +52 -0
- claude_mpm/commands/mpm-help.md +3 -0
- claude_mpm/commands/mpm-init.md +112 -6
- claude_mpm/commands/mpm-version.md +113 -0
- claude_mpm/commands/mpm.md +1 -0
- claude_mpm/config/agent_config.py +2 -2
- claude_mpm/constants.py +12 -0
- claude_mpm/core/config.py +42 -0
- claude_mpm/core/enums.py +18 -0
- claude_mpm/core/factories.py +1 -1
- claude_mpm/core/optimized_agent_loader.py +3 -3
- claude_mpm/core/types.py +2 -9
- claude_mpm/dashboard/static/js/dashboard.js +0 -14
- claude_mpm/dashboard/templates/index.html +3 -41
- claude_mpm/hooks/__init__.py +8 -0
- claude_mpm/hooks/claude_hooks/response_tracking.py +35 -1
- claude_mpm/hooks/session_resume_hook.py +121 -0
- claude_mpm/models/resume_log.py +340 -0
- claude_mpm/services/agents/auto_config_manager.py +1 -1
- claude_mpm/services/agents/deployment/agent_configuration_manager.py +1 -1
- claude_mpm/services/agents/deployment/agent_record_service.py +1 -1
- claude_mpm/services/agents/deployment/agent_validator.py +17 -1
- claude_mpm/services/agents/deployment/async_agent_deployment.py +1 -1
- claude_mpm/services/agents/deployment/local_template_deployment.py +1 -1
- claude_mpm/services/agents/deployment/validation/__init__.py +3 -1
- claude_mpm/services/agents/deployment/validation/validation_result.py +1 -9
- claude_mpm/services/agents/local_template_manager.py +1 -1
- claude_mpm/services/agents/recommender.py +47 -0
- claude_mpm/services/cli/resume_service.py +617 -0
- claude_mpm/services/cli/session_manager.py +87 -0
- claude_mpm/services/cli/session_resume_helper.py +352 -0
- claude_mpm/services/core/models/health.py +1 -28
- claude_mpm/services/core/path_resolver.py +1 -1
- claude_mpm/services/infrastructure/monitoring/__init__.py +1 -1
- claude_mpm/services/infrastructure/monitoring/aggregator.py +12 -12
- claude_mpm/services/infrastructure/monitoring/base.py +5 -13
- claude_mpm/services/infrastructure/monitoring/network.py +7 -6
- claude_mpm/services/infrastructure/monitoring/process.py +13 -12
- claude_mpm/services/infrastructure/monitoring/resources.py +7 -6
- claude_mpm/services/infrastructure/monitoring/service.py +16 -15
- claude_mpm/services/infrastructure/resume_log_generator.py +439 -0
- claude_mpm/services/local_ops/__init__.py +1 -1
- claude_mpm/services/local_ops/crash_detector.py +1 -1
- claude_mpm/services/local_ops/health_checks/http_check.py +2 -1
- claude_mpm/services/local_ops/health_checks/process_check.py +2 -1
- claude_mpm/services/local_ops/health_checks/resource_check.py +2 -1
- claude_mpm/services/local_ops/health_manager.py +1 -1
- claude_mpm/services/local_ops/restart_manager.py +1 -1
- claude_mpm/services/mcp_config_manager.py +7 -131
- claude_mpm/services/session_manager.py +205 -1
- claude_mpm/services/shared/async_service_base.py +16 -27
- claude_mpm/services/shared/lifecycle_service_base.py +1 -14
- claude_mpm/services/socketio/handlers/__init__.py +5 -2
- claude_mpm/services/socketio/handlers/hook.py +10 -0
- claude_mpm/services/socketio/handlers/registry.py +4 -2
- claude_mpm/services/socketio/server/main.py +7 -7
- claude_mpm/services/unified/deployment_strategies/local.py +1 -1
- claude_mpm/services/version_service.py +104 -1
- claude_mpm/skills/__init__.py +42 -0
- claude_mpm/skills/agent_skills_injector.py +331 -0
- claude_mpm/skills/bundled/LICENSE_ATTRIBUTIONS.md +79 -0
- claude_mpm/skills/bundled/__init__.py +6 -0
- claude_mpm/skills/bundled/api-documentation.md +393 -0
- claude_mpm/skills/bundled/async-testing.md +571 -0
- claude_mpm/skills/bundled/code-review.md +143 -0
- claude_mpm/skills/bundled/collaboration/brainstorming/SKILL.md +75 -0
- claude_mpm/skills/bundled/collaboration/dispatching-parallel-agents/SKILL.md +184 -0
- claude_mpm/skills/bundled/collaboration/requesting-code-review/SKILL.md +107 -0
- claude_mpm/skills/bundled/collaboration/requesting-code-review/code-reviewer.md +146 -0
- claude_mpm/skills/bundled/collaboration/writing-plans/SKILL.md +118 -0
- claude_mpm/skills/bundled/database-migration.md +199 -0
- claude_mpm/skills/bundled/debugging/root-cause-tracing/SKILL.md +177 -0
- claude_mpm/skills/bundled/debugging/systematic-debugging/CREATION-LOG.md +119 -0
- claude_mpm/skills/bundled/debugging/systematic-debugging/SKILL.md +148 -0
- claude_mpm/skills/bundled/debugging/systematic-debugging/references/anti-patterns.md +483 -0
- claude_mpm/skills/bundled/debugging/systematic-debugging/references/examples.md +452 -0
- claude_mpm/skills/bundled/debugging/systematic-debugging/references/troubleshooting.md +449 -0
- claude_mpm/skills/bundled/debugging/systematic-debugging/references/workflow.md +411 -0
- claude_mpm/skills/bundled/debugging/systematic-debugging/test-academic.md +14 -0
- claude_mpm/skills/bundled/debugging/systematic-debugging/test-pressure-1.md +58 -0
- claude_mpm/skills/bundled/debugging/systematic-debugging/test-pressure-2.md +68 -0
- claude_mpm/skills/bundled/debugging/systematic-debugging/test-pressure-3.md +69 -0
- claude_mpm/skills/bundled/debugging/verification-before-completion/SKILL.md +175 -0
- claude_mpm/skills/bundled/debugging/verification-before-completion/references/common-failures.md +213 -0
- claude_mpm/skills/bundled/debugging/verification-before-completion/references/gate-function.md +314 -0
- claude_mpm/skills/bundled/debugging/verification-before-completion/references/verification-patterns.md +227 -0
- claude_mpm/skills/bundled/docker-containerization.md +194 -0
- claude_mpm/skills/bundled/express-local-dev.md +1429 -0
- claude_mpm/skills/bundled/fastapi-local-dev.md +1199 -0
- claude_mpm/skills/bundled/git-workflow.md +414 -0
- claude_mpm/skills/bundled/imagemagick.md +204 -0
- claude_mpm/skills/bundled/json-data-handling.md +223 -0
- claude_mpm/skills/bundled/main/artifacts-builder/SKILL.md +74 -0
- claude_mpm/skills/bundled/main/internal-comms/SKILL.md +32 -0
- claude_mpm/skills/bundled/main/internal-comms/examples/3p-updates.md +47 -0
- claude_mpm/skills/bundled/main/internal-comms/examples/company-newsletter.md +65 -0
- claude_mpm/skills/bundled/main/internal-comms/examples/faq-answers.md +30 -0
- claude_mpm/skills/bundled/main/internal-comms/examples/general-comms.md +16 -0
- claude_mpm/skills/bundled/main/mcp-builder/SKILL.md +328 -0
- claude_mpm/skills/bundled/main/mcp-builder/reference/evaluation.md +602 -0
- claude_mpm/skills/bundled/main/mcp-builder/reference/mcp_best_practices.md +915 -0
- claude_mpm/skills/bundled/main/mcp-builder/reference/node_mcp_server.md +916 -0
- claude_mpm/skills/bundled/main/mcp-builder/reference/python_mcp_server.md +752 -0
- claude_mpm/skills/bundled/main/mcp-builder/scripts/connections.py +150 -0
- claude_mpm/skills/bundled/main/mcp-builder/scripts/evaluation.py +372 -0
- claude_mpm/skills/bundled/main/skill-creator/SKILL.md +209 -0
- claude_mpm/skills/bundled/main/skill-creator/scripts/init_skill.py +302 -0
- claude_mpm/skills/bundled/main/skill-creator/scripts/package_skill.py +111 -0
- claude_mpm/skills/bundled/main/skill-creator/scripts/quick_validate.py +65 -0
- claude_mpm/skills/bundled/nextjs-local-dev.md +807 -0
- claude_mpm/skills/bundled/pdf.md +141 -0
- claude_mpm/skills/bundled/performance-profiling.md +567 -0
- claude_mpm/skills/bundled/refactoring-patterns.md +180 -0
- claude_mpm/skills/bundled/security-scanning.md +327 -0
- claude_mpm/skills/bundled/systematic-debugging.md +473 -0
- claude_mpm/skills/bundled/test-driven-development.md +378 -0
- claude_mpm/skills/bundled/testing/condition-based-waiting/SKILL.md +123 -0
- claude_mpm/skills/bundled/testing/test-driven-development/SKILL.md +145 -0
- claude_mpm/skills/bundled/testing/test-driven-development/references/anti-patterns.md +543 -0
- claude_mpm/skills/bundled/testing/test-driven-development/references/examples.md +741 -0
- claude_mpm/skills/bundled/testing/test-driven-development/references/integration.md +470 -0
- claude_mpm/skills/bundled/testing/test-driven-development/references/philosophy.md +458 -0
- claude_mpm/skills/bundled/testing/test-driven-development/references/workflow.md +639 -0
- claude_mpm/skills/bundled/testing/testing-anti-patterns/SKILL.md +304 -0
- claude_mpm/skills/bundled/testing/webapp-testing/SKILL.md +96 -0
- claude_mpm/skills/bundled/testing/webapp-testing/examples/console_logging.py +35 -0
- claude_mpm/skills/bundled/testing/webapp-testing/examples/element_discovery.py +40 -0
- claude_mpm/skills/bundled/testing/webapp-testing/examples/static_html_automation.py +34 -0
- claude_mpm/skills/bundled/testing/webapp-testing/scripts/with_server.py +107 -0
- claude_mpm/skills/bundled/vite-local-dev.md +1061 -0
- claude_mpm/skills/bundled/web-performance-optimization.md +2305 -0
- claude_mpm/skills/bundled/xlsx.md +157 -0
- claude_mpm/skills/registry.py +286 -0
- claude_mpm/skills/skill_manager.py +310 -0
- claude_mpm/skills/skills_registry.py +351 -0
- claude_mpm/skills/skills_service.py +730 -0
- claude_mpm/utils/agent_dependency_loader.py +2 -2
- {claude_mpm-4.15.2.dist-info → claude_mpm-4.20.3.dist-info}/METADATA +211 -33
- {claude_mpm-4.15.2.dist-info → claude_mpm-4.20.3.dist-info}/RECORD +195 -115
- claude_mpm/agents/INSTRUCTIONS_OLD_DEPRECATED.md +0 -602
- claude_mpm/dashboard/static/css/code-tree.css +0 -1639
- claude_mpm/dashboard/static/js/components/code-tree/tree-breadcrumb.js +0 -353
- claude_mpm/dashboard/static/js/components/code-tree/tree-constants.js +0 -235
- claude_mpm/dashboard/static/js/components/code-tree/tree-search.js +0 -409
- claude_mpm/dashboard/static/js/components/code-tree/tree-utils.js +0 -435
- claude_mpm/dashboard/static/js/components/code-tree.js +0 -5869
- claude_mpm/dashboard/static/js/components/code-viewer.js +0 -1386
- {claude_mpm-4.15.2.dist-info → claude_mpm-4.20.3.dist-info}/WHEEL +0 -0
- {claude_mpm-4.15.2.dist-info → claude_mpm-4.20.3.dist-info}/entry_points.txt +0 -0
- {claude_mpm-4.15.2.dist-info → claude_mpm-4.20.3.dist-info}/licenses/LICENSE +0 -0
- {claude_mpm-4.15.2.dist-info → claude_mpm-4.20.3.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
---
|
|
2
|
+
skill_id: json-data-handling
|
|
3
|
+
skill_version: 0.1.0
|
|
4
|
+
description: Working effectively with JSON data structures.
|
|
5
|
+
updated_at: 2025-10-30T17:00:00Z
|
|
6
|
+
tags: [json, data, parsing, serialization]
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# JSON Data Handling
|
|
10
|
+
|
|
11
|
+
Working effectively with JSON data structures.
|
|
12
|
+
|
|
13
|
+
## Python
|
|
14
|
+
|
|
15
|
+
### Basic Operations
|
|
16
|
+
|
|
17
|
+
```python
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
# Parse JSON string
|
|
21
|
+
data = json.loads('{"name": "John", "age": 30}')
|
|
22
|
+
|
|
23
|
+
# Convert to JSON string
|
|
24
|
+
json_str = json.dumps(data)
|
|
25
|
+
|
|
26
|
+
# Pretty print
|
|
27
|
+
json_str = json.dumps(data, indent=2)
|
|
28
|
+
|
|
29
|
+
# Read from file
|
|
30
|
+
with open('data.json', 'r') as f:
|
|
31
|
+
data = json.load(f)
|
|
32
|
+
|
|
33
|
+
# Write to file
|
|
34
|
+
with open('output.json', 'w') as f:
|
|
35
|
+
json.dump(data, f, indent=2)
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Advanced
|
|
39
|
+
|
|
40
|
+
```python
|
|
41
|
+
# Custom encoder for datetime
|
|
42
|
+
from datetime import datetime
|
|
43
|
+
|
|
44
|
+
class DateTimeEncoder(json.JSONEncoder):
|
|
45
|
+
def default(self, obj):
|
|
46
|
+
if isinstance(obj, datetime):
|
|
47
|
+
return obj.isoformat()
|
|
48
|
+
return super().default(obj)
|
|
49
|
+
|
|
50
|
+
json_str = json.dumps({'date': datetime.now()}, cls=DateTimeEncoder)
|
|
51
|
+
|
|
52
|
+
# Handle None values
|
|
53
|
+
json.dumps(data, skipkeys=True)
|
|
54
|
+
|
|
55
|
+
# Sort keys
|
|
56
|
+
json.dumps(data, sort_keys=True)
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## JavaScript
|
|
60
|
+
|
|
61
|
+
### Basic Operations
|
|
62
|
+
|
|
63
|
+
```javascript
|
|
64
|
+
// Parse JSON string
|
|
65
|
+
const data = JSON.parse('{"name": "John", "age": 30}');
|
|
66
|
+
|
|
67
|
+
// Convert to JSON string
|
|
68
|
+
const jsonStr = JSON.stringify(data);
|
|
69
|
+
|
|
70
|
+
// Pretty print
|
|
71
|
+
const jsonStr = JSON.stringify(data, null, 2);
|
|
72
|
+
|
|
73
|
+
// Read from file (Node.js)
|
|
74
|
+
const fs = require('fs');
|
|
75
|
+
const data = JSON.parse(fs.readFileSync('data.json', 'utf8'));
|
|
76
|
+
|
|
77
|
+
// Write to file
|
|
78
|
+
fs.writeFileSync('output.json', JSON.stringify(data, null, 2));
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Advanced
|
|
82
|
+
|
|
83
|
+
```javascript
|
|
84
|
+
// Custom replacer
|
|
85
|
+
const jsonStr = JSON.stringify(data, (key, value) => {
|
|
86
|
+
if (typeof value === 'bigint') {
|
|
87
|
+
return value.toString();
|
|
88
|
+
}
|
|
89
|
+
return value;
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
// Filter properties
|
|
93
|
+
const filtered = JSON.stringify(data, ['name', 'age']);
|
|
94
|
+
|
|
95
|
+
// Handle circular references
|
|
96
|
+
const getCircularReplacer = () => {
|
|
97
|
+
const seen = new WeakSet();
|
|
98
|
+
return (key, value) => {
|
|
99
|
+
if (typeof value === 'object' && value !== null) {
|
|
100
|
+
if (seen.has(value)) return;
|
|
101
|
+
seen.add(value);
|
|
102
|
+
}
|
|
103
|
+
return value;
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
JSON.stringify(circularObj, getCircularReplacer());
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Common Patterns
|
|
110
|
+
|
|
111
|
+
### Validation
|
|
112
|
+
|
|
113
|
+
```python
|
|
114
|
+
from jsonschema import validate
|
|
115
|
+
|
|
116
|
+
schema = {
|
|
117
|
+
"type": "object",
|
|
118
|
+
"properties": {
|
|
119
|
+
"name": {"type": "string"},
|
|
120
|
+
"age": {"type": "number", "minimum": 0}
|
|
121
|
+
},
|
|
122
|
+
"required": ["name", "age"]
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
# Validate
|
|
126
|
+
validate(instance=data, schema=schema)
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Deep Merge
|
|
130
|
+
|
|
131
|
+
```python
|
|
132
|
+
def deep_merge(dict1, dict2):
|
|
133
|
+
result = dict1.copy()
|
|
134
|
+
for key, value in dict2.items():
|
|
135
|
+
if key in result and isinstance(result[key], dict) and isinstance(value, dict):
|
|
136
|
+
result[key] = deep_merge(result[key], value)
|
|
137
|
+
else:
|
|
138
|
+
result[key] = value
|
|
139
|
+
return result
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### Nested Access
|
|
143
|
+
|
|
144
|
+
```python
|
|
145
|
+
# Safe nested access
|
|
146
|
+
def get_nested(data, *keys, default=None):
|
|
147
|
+
for key in keys:
|
|
148
|
+
try:
|
|
149
|
+
data = data[key]
|
|
150
|
+
except (KeyError, TypeError, IndexError):
|
|
151
|
+
return default
|
|
152
|
+
return data
|
|
153
|
+
|
|
154
|
+
# Usage
|
|
155
|
+
value = get_nested(data, 'user', 'address', 'city', default='Unknown')
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### Transform Keys
|
|
159
|
+
|
|
160
|
+
```python
|
|
161
|
+
# Convert snake_case to camelCase
|
|
162
|
+
def to_camel_case(snake_str):
|
|
163
|
+
components = snake_str.split('_')
|
|
164
|
+
return components[0] + ''.join(x.title() for x in components[1:])
|
|
165
|
+
|
|
166
|
+
def transform_keys(obj):
|
|
167
|
+
if isinstance(obj, dict):
|
|
168
|
+
return {to_camel_case(k): transform_keys(v) for k, v in obj.items()}
|
|
169
|
+
elif isinstance(obj, list):
|
|
170
|
+
return [transform_keys(item) for item in obj]
|
|
171
|
+
return obj
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
## Best Practices
|
|
175
|
+
|
|
176
|
+
### ✅ DO
|
|
177
|
+
|
|
178
|
+
```python
|
|
179
|
+
# Use context managers for files
|
|
180
|
+
with open('data.json', 'r') as f:
|
|
181
|
+
data = json.load(f)
|
|
182
|
+
|
|
183
|
+
# Handle exceptions
|
|
184
|
+
try:
|
|
185
|
+
data = json.loads(json_str)
|
|
186
|
+
except json.JSONDecodeError as e:
|
|
187
|
+
print(f"Invalid JSON: {e}")
|
|
188
|
+
|
|
189
|
+
# Validate structure
|
|
190
|
+
assert 'required_field' in data
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### ❌ DON'T
|
|
194
|
+
|
|
195
|
+
```python
|
|
196
|
+
# Don't parse untrusted JSON without validation
|
|
197
|
+
data = json.loads(user_input) # Validate first!
|
|
198
|
+
|
|
199
|
+
# Don't load huge files at once
|
|
200
|
+
# Use streaming for large files
|
|
201
|
+
|
|
202
|
+
# Don't use eval() as alternative to json.loads()
|
|
203
|
+
data = eval(json_str) # NEVER DO THIS!
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
## Streaming Large JSON
|
|
207
|
+
|
|
208
|
+
```python
|
|
209
|
+
import ijson
|
|
210
|
+
|
|
211
|
+
# Stream large JSON file
|
|
212
|
+
with open('large_data.json', 'rb') as f:
|
|
213
|
+
objects = ijson.items(f, 'item')
|
|
214
|
+
for obj in objects:
|
|
215
|
+
process(obj)
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
## Remember
|
|
219
|
+
- Always validate JSON structure
|
|
220
|
+
- Handle parse errors gracefully
|
|
221
|
+
- Use schemas for complex structures
|
|
222
|
+
- Stream large JSON files
|
|
223
|
+
- Pretty print for debugging
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: artifacts-builder
|
|
3
|
+
description: Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.
|
|
4
|
+
license: Complete terms in LICENSE.txt
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Artifacts Builder
|
|
8
|
+
|
|
9
|
+
To build powerful frontend claude.ai artifacts, follow these steps:
|
|
10
|
+
1. Initialize the frontend repo using `scripts/init-artifact.sh`
|
|
11
|
+
2. Develop your artifact by editing the generated code
|
|
12
|
+
3. Bundle all code into a single HTML file using `scripts/bundle-artifact.sh`
|
|
13
|
+
4. Display artifact to user
|
|
14
|
+
5. (Optional) Test the artifact
|
|
15
|
+
|
|
16
|
+
**Stack**: React 18 + TypeScript + Vite + Parcel (bundling) + Tailwind CSS + shadcn/ui
|
|
17
|
+
|
|
18
|
+
## Design & Style Guidelines
|
|
19
|
+
|
|
20
|
+
VERY IMPORTANT: To avoid what is often referred to as "AI slop", avoid using excessive centered layouts, purple gradients, uniform rounded corners, and Inter font.
|
|
21
|
+
|
|
22
|
+
## Quick Start
|
|
23
|
+
|
|
24
|
+
### Step 1: Initialize Project
|
|
25
|
+
|
|
26
|
+
Run the initialization script to create a new React project:
|
|
27
|
+
```bash
|
|
28
|
+
bash scripts/init-artifact.sh <project-name>
|
|
29
|
+
cd <project-name>
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
This creates a fully configured project with:
|
|
33
|
+
- ✅ React + TypeScript (via Vite)
|
|
34
|
+
- ✅ Tailwind CSS 3.4.1 with shadcn/ui theming system
|
|
35
|
+
- ✅ Path aliases (`@/`) configured
|
|
36
|
+
- ✅ 40+ shadcn/ui components pre-installed
|
|
37
|
+
- ✅ All Radix UI dependencies included
|
|
38
|
+
- ✅ Parcel configured for bundling (via .parcelrc)
|
|
39
|
+
- ✅ Node 18+ compatibility (auto-detects and pins Vite version)
|
|
40
|
+
|
|
41
|
+
### Step 2: Develop Your Artifact
|
|
42
|
+
|
|
43
|
+
To build the artifact, edit the generated files. See **Common Development Tasks** below for guidance.
|
|
44
|
+
|
|
45
|
+
### Step 3: Bundle to Single HTML File
|
|
46
|
+
|
|
47
|
+
To bundle the React app into a single HTML artifact:
|
|
48
|
+
```bash
|
|
49
|
+
bash scripts/bundle-artifact.sh
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
This creates `bundle.html` - a self-contained artifact with all JavaScript, CSS, and dependencies inlined. This file can be directly shared in Claude conversations as an artifact.
|
|
53
|
+
|
|
54
|
+
**Requirements**: Your project must have an `index.html` in the root directory.
|
|
55
|
+
|
|
56
|
+
**What the script does**:
|
|
57
|
+
- Installs bundling dependencies (parcel, @parcel/config-default, parcel-resolver-tspaths, html-inline)
|
|
58
|
+
- Creates `.parcelrc` config with path alias support
|
|
59
|
+
- Builds with Parcel (no source maps)
|
|
60
|
+
- Inlines all assets into single HTML using html-inline
|
|
61
|
+
|
|
62
|
+
### Step 4: Share Artifact with User
|
|
63
|
+
|
|
64
|
+
Finally, share the bundled HTML file in conversation with the user so they can view it as an artifact.
|
|
65
|
+
|
|
66
|
+
### Step 5: Testing/Visualizing the Artifact (Optional)
|
|
67
|
+
|
|
68
|
+
Note: This is a completely optional step. Only perform if necessary or requested.
|
|
69
|
+
|
|
70
|
+
To test/visualize the artifact, use available tools (including other Skills or built-in tools like Playwright or Puppeteer). In general, avoid testing the artifact upfront as it adds latency between the request and when the finished artifact can be seen. Test later, after presenting the artifact, if requested or if issues arise.
|
|
71
|
+
|
|
72
|
+
## Reference
|
|
73
|
+
|
|
74
|
+
- **shadcn/ui components**: https://ui.shadcn.com/docs/components
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: internal-comms
|
|
3
|
+
description: A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).
|
|
4
|
+
license: Complete terms in LICENSE.txt
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## When to use this skill
|
|
8
|
+
To write internal communications, use this skill for:
|
|
9
|
+
- 3P updates (Progress, Plans, Problems)
|
|
10
|
+
- Company newsletters
|
|
11
|
+
- FAQ responses
|
|
12
|
+
- Status reports
|
|
13
|
+
- Leadership updates
|
|
14
|
+
- Project updates
|
|
15
|
+
- Incident reports
|
|
16
|
+
|
|
17
|
+
## How to use this skill
|
|
18
|
+
|
|
19
|
+
To write any internal communication:
|
|
20
|
+
|
|
21
|
+
1. **Identify the communication type** from the request
|
|
22
|
+
2. **Load the appropriate guideline file** from the `examples/` directory:
|
|
23
|
+
- `examples/3p-updates.md` - For Progress/Plans/Problems team updates
|
|
24
|
+
- `examples/company-newsletter.md` - For company-wide newsletters
|
|
25
|
+
- `examples/faq-answers.md` - For answering frequently asked questions
|
|
26
|
+
- `examples/general-comms.md` - For anything else that doesn't explicitly match one of the above
|
|
27
|
+
3. **Follow the specific instructions** in that file for formatting, tone, and content gathering
|
|
28
|
+
|
|
29
|
+
If the communication type doesn't match any existing guideline, ask for clarification or more context about the desired format.
|
|
30
|
+
|
|
31
|
+
## Keywords
|
|
32
|
+
3P updates, company newsletter, company comms, weekly update, faqs, common questions, updates, internal comms
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
## Instructions
|
|
2
|
+
You are being asked to write a 3P update. 3P updates stand for "Progress, Plans, Problems." The main audience is for executives, leadership, other teammates, etc. They're meant to be very succinct and to-the-point: think something you can read in 30-60sec or less. They're also for people with some, but not a lot of context on what the team does.
|
|
3
|
+
|
|
4
|
+
3Ps can cover a team of any size, ranging all the way up to the entire company. The bigger the team, the less granular the tasks should be. For example, "mobile team" might have "shipped feature" or "fixed bugs," whereas the company might have really meaty 3Ps, like "hired 20 new people" or "closed 10 new deals."
|
|
5
|
+
|
|
6
|
+
They represent the work of the team across a time period, almost always one week. They include three sections:
|
|
7
|
+
1) Progress: what the team has accomplished over the next time period. Focus mainly on things shipped, milestones achieved, tasks created, etc.
|
|
8
|
+
2) Plans: what the team plans to do over the next time period. Focus on what things are top-of-mind, really high priority, etc. for the team.
|
|
9
|
+
3) Problems: anything that is slowing the team down. This could be things like too few people, bugs or blockers that are preventing the team from moving forward, some deal that fell through, etc.
|
|
10
|
+
|
|
11
|
+
Before writing them, make sure that you know the team name. If it's not specified, you can ask explicitly what the team name you're writing for is.
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## Tools Available
|
|
15
|
+
Whenever possible, try to pull from available sources to get the information you need:
|
|
16
|
+
- Slack: posts from team members with their updates - ideally look for posts in large channels with lots of reactions
|
|
17
|
+
- Google Drive: docs written from critical team members with lots of views
|
|
18
|
+
- Email: emails with lots of responses of lots of content that seems relevant
|
|
19
|
+
- Calendar: non-recurring meetings that have a lot of importance, like product reviews, etc.
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
Try to gather as much context as you can, focusing on the things that covered the time period you're writing for:
|
|
23
|
+
- Progress: anything between a week ago and today
|
|
24
|
+
- Plans: anything from today to the next week
|
|
25
|
+
- Problems: anything between a week ago and today
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
If you don't have access, you can ask the user for things they want to cover. They might also include these things to you directly, in which case you're mostly just formatting for this particular format.
|
|
29
|
+
|
|
30
|
+
## Workflow
|
|
31
|
+
|
|
32
|
+
1. **Clarify scope**: Confirm the team name and time period (usually past week for Progress/Problems, next
|
|
33
|
+
week for Plans)
|
|
34
|
+
2. **Gather information**: Use available tools or ask the user directly
|
|
35
|
+
3. **Draft the update**: Follow the strict formatting guidelines
|
|
36
|
+
4. **Review**: Ensure it's concise (30-60 seconds to read) and data-driven
|
|
37
|
+
|
|
38
|
+
## Formatting
|
|
39
|
+
|
|
40
|
+
The format is always the same, very strict formatting. Never use any formatting other than this. Pick an emoji that is fun and captures the vibe of the team and update.
|
|
41
|
+
|
|
42
|
+
[pick an emoji] [Team Name] (Dates Covered, usually a week)
|
|
43
|
+
Progress: [1-3 sentences of content]
|
|
44
|
+
Plans: [1-3 sentences of content]
|
|
45
|
+
Problems: [1-3 sentences of content]
|
|
46
|
+
|
|
47
|
+
Each section should be no more than 1-3 sentences: clear, to the point. It should be data-driven, and generally include metrics where possible. The tone should be very matter-of-fact, not super prose-heavy.
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
## Instructions
|
|
2
|
+
You are being asked to write a company-wide newsletter update. You are meant to summarize the past week/month of a company in the form of a newsletter that the entire company will read. It should be maybe ~20-25 bullet points long. It will be sent via Slack and email, so make it consumable for that.
|
|
3
|
+
|
|
4
|
+
Ideally it includes the following attributes:
|
|
5
|
+
- Lots of links: pulling documents from Google Drive that are very relevant, linking to prominent Slack messages in announce channels and from executives, perhgaps referencing emails that went company-wide, highlighting significant things that have happened in the company.
|
|
6
|
+
- Short and to-the-point: each bullet should probably be no longer than ~1-2 sentences
|
|
7
|
+
- Use the "we" tense, as you are part of the company. Many of the bullets should say "we did this" or "we did that"
|
|
8
|
+
|
|
9
|
+
## Tools to use
|
|
10
|
+
If you have access to the following tools, please try to use them. If not, you can also let the user know directly that their responses would be better if they gave them access.
|
|
11
|
+
|
|
12
|
+
- Slack: look for messages in channels with lots of people, with lots of reactions or lots of responses within the thread
|
|
13
|
+
- Email: look for things from executives that discuss company-wide announcements
|
|
14
|
+
- Calendar: if there were meetings with large attendee lists, particularly things like All-Hands meetings, big company announcements, etc. If there were documents attached to those meetings, those are great links to include.
|
|
15
|
+
- Documents: if there were new docs published in the last week or two that got a lot of attention, you can link them. These should be things like company-wide vision docs, plans for the upcoming quarter or half, things authored by critical executives, etc.
|
|
16
|
+
- External press: if you see references to articles or press we've received over the past week, that could be really cool too.
|
|
17
|
+
|
|
18
|
+
If you don't have access to any of these things, you can ask the user for things they want to cover. In this case, you'll mostly just be polishing up and fitting to this format more directly.
|
|
19
|
+
|
|
20
|
+
## Sections
|
|
21
|
+
The company is pretty big: 1000+ people. There are a variety of different teams and initiatives going on across the company. To make sure the update works well, try breaking it into sections of similar things. You might break into clusters like {product development, go to market, finance} or {recruiting, execution, vision}, or {external news, internal news} etc. Try to make sure the different areas of the company are highlighted well.
|
|
22
|
+
|
|
23
|
+
## Prioritization
|
|
24
|
+
Focus on:
|
|
25
|
+
- Company-wide impact (not team-specific details)
|
|
26
|
+
- Announcements from leadership
|
|
27
|
+
- Major milestones and achievements
|
|
28
|
+
- Information that affects most employees
|
|
29
|
+
- External recognition or press
|
|
30
|
+
|
|
31
|
+
Avoid:
|
|
32
|
+
- Overly granular team updates (save those for 3Ps)
|
|
33
|
+
- Information only relevant to small groups
|
|
34
|
+
- Duplicate information already communicated
|
|
35
|
+
|
|
36
|
+
## Example Formats
|
|
37
|
+
|
|
38
|
+
:megaphone: Company Announcements
|
|
39
|
+
- Announcement 1
|
|
40
|
+
- Announcement 2
|
|
41
|
+
- Announcement 3
|
|
42
|
+
|
|
43
|
+
:dart: Progress on Priorities
|
|
44
|
+
- Area 1
|
|
45
|
+
- Sub-area 1
|
|
46
|
+
- Sub-area 2
|
|
47
|
+
- Sub-area 3
|
|
48
|
+
- Area 2
|
|
49
|
+
- Sub-area 1
|
|
50
|
+
- Sub-area 2
|
|
51
|
+
- Sub-area 3
|
|
52
|
+
- Area 3
|
|
53
|
+
- Sub-area 1
|
|
54
|
+
- Sub-area 2
|
|
55
|
+
- Sub-area 3
|
|
56
|
+
|
|
57
|
+
:pillar: Leadership Updates
|
|
58
|
+
- Post 1
|
|
59
|
+
- Post 2
|
|
60
|
+
- Post 3
|
|
61
|
+
|
|
62
|
+
:thread: Social Updates
|
|
63
|
+
- Update 1
|
|
64
|
+
- Update 2
|
|
65
|
+
- Update 3
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
## Instructions
|
|
2
|
+
You are an assistant for answering questions that are being asked across the company. Every week, there are lots of questions that get asked across the company, and your goal is to try to summarize what those questions are. We want our company to be well-informed and on the same page, so your job is to produce a set of frequently asked questions that our employees are asking and attempt to answer them. Your singular job is to do two things:
|
|
3
|
+
|
|
4
|
+
- Find questions that are big sources of confusion for lots of employees at the company, generally about things that affect a large portion of the employee base
|
|
5
|
+
- Attempt to give a nice summarized answer to that question in order to minimize confusion.
|
|
6
|
+
|
|
7
|
+
Some examples of areas that may be interesting to folks: recent corporate events (fundraising, new executives, etc.), upcoming launches, hiring progress, changes to vision or focus, etc.
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## Tools Available
|
|
11
|
+
You should use the company's available tools, where communication and work happens. For most companies, it looks something like this:
|
|
12
|
+
- Slack: questions being asked across the company - it could be questions in response to posts with lots of responses, questions being asked with lots of reactions or thumbs up to show support, or anything else to show that a large number of employees want to ask the same things
|
|
13
|
+
- Email: emails with FAQs written directly in them can be a good source as well
|
|
14
|
+
- Documents: docs in places like Google Drive, linked on calendar events, etc. can also be a good source of FAQs, either directly added or inferred based on the contents of the doc
|
|
15
|
+
|
|
16
|
+
## Formatting
|
|
17
|
+
The formatting should be pretty basic:
|
|
18
|
+
|
|
19
|
+
- *Question*: [insert question - 1 sentence]
|
|
20
|
+
- *Answer*: [insert answer - 1-2 sentence]
|
|
21
|
+
|
|
22
|
+
## Guidance
|
|
23
|
+
Make sure you're being holistic in your questions. Don't focus too much on just the user in question or the team they are a part of, but try to capture the entire company. Try to be as holistic as you can in reading all the tools available, producing responses that are relevant to all at the company.
|
|
24
|
+
|
|
25
|
+
## Answer Guidelines
|
|
26
|
+
- Base answers on official company communications when possible
|
|
27
|
+
- If information is uncertain, indicate that clearly
|
|
28
|
+
- Link to authoritative sources (docs, announcements, emails)
|
|
29
|
+
- Keep tone professional but approachable
|
|
30
|
+
- Flag if a question requires executive input or official response
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
## Instructions
|
|
2
|
+
You are being asked to write internal company communication that doesn't fit into the standard formats (3P
|
|
3
|
+
updates, newsletters, or FAQs).
|
|
4
|
+
|
|
5
|
+
Before proceeding:
|
|
6
|
+
1. Ask the user about their target audience
|
|
7
|
+
2. Understand the communication's purpose
|
|
8
|
+
3. Clarify the desired tone (formal, casual, urgent, informational)
|
|
9
|
+
4. Confirm any specific formatting requirements
|
|
10
|
+
|
|
11
|
+
Use these general principles:
|
|
12
|
+
- Be clear and concise
|
|
13
|
+
- Use active voice
|
|
14
|
+
- Put the most important information first
|
|
15
|
+
- Include relevant links and references
|
|
16
|
+
- Match the company's communication style
|