claude-all-config 2.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/LICENSE +21 -0
- package/LICENSE.md +70 -0
- package/README.md +133 -0
- package/VERSION +1 -0
- package/agents/accessibility-reviewer.md +96 -0
- package/agents/ai-prompt-optimizer.md +94 -0
- package/agents/api-tester.md +102 -0
- package/agents/code-generator.md +94 -0
- package/agents/code-reviewer.md +47 -0
- package/agents/component-generator.md +102 -0
- package/agents/doc-generator.md +91 -0
- package/agents/migration-generator.md +94 -0
- package/agents/performance-analyzer.md +90 -0
- package/agents/proactive-mode.md +91 -0
- package/agents/readme-generator.md +101 -0
- package/agents/security-auditor.md +86 -0
- package/agents/terraform-generator.md +94 -0
- package/agents/test-generator.md +76 -0
- package/bin/agentrouter.json +36 -0
- package/bin/ai-chat +20 -0
- package/bin/antigravity.json +76 -0
- package/bin/api-manager +340 -0
- package/bin/claude-launcher +19 -0
- package/bin/claude-master +15 -0
- package/bin/claude_master.py +295 -0
- package/bin/cohere.json +7 -0
- package/bin/deepseek.json +44 -0
- package/bin/gemini.json +56 -0
- package/bin/glm.json +21 -0
- package/bin/groq.json +41 -0
- package/bin/minimax.json +26 -0
- package/bin/mistral.json +7 -0
- package/bin/moonshot.json +7 -0
- package/bin/ollama.json +36 -0
- package/bin/openai.json +46 -0
- package/bin/openrouter.json +38 -0
- package/bin/perplexity.json +12 -0
- package/bin/qwen.json +7 -0
- package/bin/switch-provider +73 -0
- package/bin/test.json +7 -0
- package/bin/xai.json +41 -0
- package/claude-all +2707 -0
- package/claude-config.json +340 -0
- package/claude-suite/REFACTORING_SUMMARY.md +88 -0
- package/claude-suite/auth/.antigravity_proxy.py +78 -0
- package/claude-suite/auth/__pycache__/openai_auth.cpython-312.pyc +0 -0
- package/claude-suite/auth/gemini_auth.py +80 -0
- package/claude-suite/auth/openai_auth.py +138 -0
- package/claude-suite/backups/claude-all-before-refactor +1075 -0
- package/claude-suite/backups/claude-all.backup +840 -0
- package/claude-suite/backups/claude-all.original +840 -0
- package/claude-suite/models/add-model-manual.sh +588 -0
- package/claude-suite/models/add-model.sh +114 -0
- package/claude-suite/models/model-switcher.sh +69 -0
- package/claude-suite/providers/claude-glm +89 -0
- package/claude-suite/providers/claude-glm-wrapper.sh +55 -0
- package/claude-suite/providers/claude-minimax +12 -0
- package/claude-suite/providers/claude-smart +132 -0
- package/claude-suite/providers/xai_chat.sh +56 -0
- package/claude-suite/utils/__pycache__/claude_master.cpython-312.pyc +0 -0
- package/claude-suite/utils/antigravity_proxy_server.py +168 -0
- package/claude-suite/utils/claude-all-help.txt +83 -0
- package/claude-suite/utils/claude_master.py +408 -0
- package/commands/brainstorm.md +5 -0
- package/commands/execute-plan.md +5 -0
- package/commands/write-plan.md +5 -0
- package/docs/ANTIGRAVITY-SETUP.md +176 -0
- package/docs/AUTH_CREDENTIALS.md +54 -0
- package/docs/NPM-INSTALLATION.md +166 -0
- package/hooks/hooks.json +15 -0
- package/hooks/run-hook.cmd +19 -0
- package/hooks/session-start.sh +52 -0
- package/install.sh +155 -0
- package/mcp.json +34 -0
- package/model/perplexity.json +12 -0
- package/package.json +69 -0
- package/plugins/README.md +47 -0
- package/plugins/installed_plugins.json +317 -0
- package/plugins/known_marketplaces.json +10 -0
- package/plugins/marketplace-info/marketplace.json +517 -0
- package/postinstall.js +100 -0
- package/scripts/antigravity_proxy_server.py +168 -0
- package/scripts/get_gemini_api_key.py +96 -0
- package/scripts/setup_antigravity_auth.py +171 -0
- package/skills/api-development/SKILL.md +11 -0
- package/skills/api-development/openapi/api-documentation.yaml +108 -0
- package/skills/brainstorming/SKILL.md +54 -0
- package/skills/code-quality/SKILL.md +196 -0
- package/skills/condition-based-waiting/SKILL.md +120 -0
- package/skills/condition-based-waiting/example.ts +158 -0
- package/skills/database-development/SKILL.md +11 -0
- package/skills/database-development/migrations/migration.template.sql +49 -0
- package/skills/defense-in-depth/SKILL.md +127 -0
- package/skills/deployment/SKILL.md +11 -0
- package/skills/deployment/ci-cd/github-actions.yml +95 -0
- package/skills/deployment/docker/Dockerfile.template +39 -0
- package/skills/dispatching-parallel-agents/SKILL.md +180 -0
- package/skills/documentation-generation/SKILL.md +8 -0
- package/skills/documentation-generation/templates/README.template.md +60 -0
- package/skills/error-handling/SKILL.md +267 -0
- package/skills/executing-plans/SKILL.md +76 -0
- package/skills/finishing-a-development-branch/SKILL.md +200 -0
- package/skills/frontend-design/frontend-design/SKILL.md +42 -0
- package/skills/integration-testing/SKILL.md +13 -0
- package/skills/integration-testing/examples/contract-test.py +317 -0
- package/skills/integration-testing/examples/e2e-test.js +147 -0
- package/skills/integration-testing/examples/test-isolation.md +94 -0
- package/skills/logging-monitoring/SKILL.md +66 -0
- package/skills/mobile-development/SKILL.md +11 -0
- package/skills/mobile-development/responsive/responsive.css +80 -0
- package/skills/performance-optimization/SKILL.md +9 -0
- package/skills/performance-optimization/profiling/profile.template.js +21 -0
- package/skills/receiving-code-review/SKILL.md +209 -0
- package/skills/refactoring/SKILL.md +11 -0
- package/skills/refactoring/code-smells/common-smells.md +115 -0
- package/skills/requesting-code-review/SKILL.md +105 -0
- package/skills/requesting-code-review/code-reviewer.md +146 -0
- package/skills/root-cause-tracing/SKILL.md +174 -0
- package/skills/root-cause-tracing/find-polluter.sh +63 -0
- package/skills/security-review/SKILL.md +11 -0
- package/skills/security-review/checklists/owasp-checklist.md +31 -0
- package/skills/sharing-skills/SKILL.md +194 -0
- package/skills/subagent-driven-development/SKILL.md +240 -0
- package/skills/subagent-driven-development/code-quality-reviewer-prompt.md +20 -0
- package/skills/subagent-driven-development/implementer-prompt.md +78 -0
- package/skills/subagent-driven-development/spec-reviewer-prompt.md +61 -0
- package/skills/systematic-debugging/CREATION-LOG.md +119 -0
- package/skills/systematic-debugging/SKILL.md +295 -0
- package/skills/systematic-debugging/test-academic.md +14 -0
- package/skills/systematic-debugging/test-pressure-1.md +58 -0
- package/skills/systematic-debugging/test-pressure-2.md +68 -0
- package/skills/systematic-debugging/test-pressure-3.md +69 -0
- package/skills/test-driven-development/SKILL.md +364 -0
- package/skills/testing-anti-patterns/SKILL.md +302 -0
- package/skills/testing-skills-with-subagents/SKILL.md +387 -0
- package/skills/testing-skills-with-subagents/examples/CLAUDE_MD_TESTING.md +189 -0
- package/skills/ui-ux-review/SKILL.md +13 -0
- package/skills/ui-ux-review/checklists/ux-heuristics.md +61 -0
- package/skills/using-git-worktrees/SKILL.md +213 -0
- package/skills/using-superpowers/SKILL.md +101 -0
- package/skills/verification-before-completion/SKILL.md +139 -0
- package/skills/writing-plans/SKILL.md +116 -0
- package/skills/writing-skills/SKILL.md +622 -0
- package/skills/writing-skills/anthropic-best-practices.md +1150 -0
- package/skills/writing-skills/graphviz-conventions.dot +172 -0
- package/skills/writing-skills/persuasion-principles.md +187 -0
- package/update.sh +36 -0
- package/utils/check-superpowers.sh +114 -0
- package/utils/claude-branding.md +166 -0
- package/utils/config.js +185 -0
- package/utils/custom-claude-config.sh +89 -0
- package/utils/custom-claude-hooks.md +129 -0
- package/utils/custom-claude-lib.js +222 -0
- package/utils/customize-claude-ui.sh +162 -0
- package/utils/fix-claude-integration.sh +133 -0
- package/utils/help.js +125 -0
- package/utils/install-curl.ps1 +135 -0
- package/utils/install-curl.sh +525 -0
- package/utils/install-superpowers.js +411 -0
- package/utils/install.js +298 -0
- package/utils/install.sh +182 -0
- package/utils/postinstall.js +63 -0
- package/utils/rename-claude.sh +96 -0
- package/utils/uninstall-superpowers.js +273 -0
- package/utils/uninstall.ps1 +136 -0
- package/utils/uninstall.sh +163 -0
- package/utils/update.sh +160 -0
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
AntiGravity Proxy Server
|
|
4
|
+
Simple proxy to handle Google internal authentication
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import json
|
|
8
|
+
import os
|
|
9
|
+
import sys
|
|
10
|
+
import http.server
|
|
11
|
+
import socketserver
|
|
12
|
+
import urllib.parse
|
|
13
|
+
import urllib.request
|
|
14
|
+
from datetime import datetime
|
|
15
|
+
|
|
16
|
+
class AntiGravityProxyHandler(http.server.BaseHTTPRequestHandler):
|
|
17
|
+
def do_GET(self):
|
|
18
|
+
self.send_response(200)
|
|
19
|
+
self.send_header('Content-type', 'application/json')
|
|
20
|
+
self.end_headers()
|
|
21
|
+
|
|
22
|
+
if self.path == '/health':
|
|
23
|
+
response = {"status": "ok", "service": "antigravity-proxy"}
|
|
24
|
+
self.wfile.write(json.dumps(response).encode())
|
|
25
|
+
elif self.path == '/':
|
|
26
|
+
# Simple UI
|
|
27
|
+
html = """
|
|
28
|
+
<!DOCTYPE html>
|
|
29
|
+
<html>
|
|
30
|
+
<head>
|
|
31
|
+
<title>AntiGravity Proxy</title>
|
|
32
|
+
<style>
|
|
33
|
+
body { font-family: Arial, sans-serif; padding: 20px; }
|
|
34
|
+
.container { max-width: 800px; margin: 0 auto; }
|
|
35
|
+
.auth-section { background: #f5f5f5; padding: 20px; margin: 20px 0; }
|
|
36
|
+
input { padding: 10px; margin: 5px; }
|
|
37
|
+
button { padding: 10px 20px; background: #4285f4; color: white; border: none; cursor: pointer; }
|
|
38
|
+
</style>
|
|
39
|
+
</head>
|
|
40
|
+
<body>
|
|
41
|
+
<div class="container">
|
|
42
|
+
<h1>AntiGravity Proxy Server</h1>
|
|
43
|
+
<div class="auth-section">
|
|
44
|
+
<h2>Google Authentication</h2>
|
|
45
|
+
<p>This proxy handles authentication for Google Internal AI models.</p>
|
|
46
|
+
<p>Status: <span id="status">Not authenticated</span></p>
|
|
47
|
+
</div>
|
|
48
|
+
<div class="auth-section">
|
|
49
|
+
<h2>Usage</h2>
|
|
50
|
+
<p>API Endpoint: <code>http://localhost:8080/v1</code></p>
|
|
51
|
+
<p>Compatible with OpenAI/Anthropic API format.</p>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
</body>
|
|
55
|
+
</html>
|
|
56
|
+
"""
|
|
57
|
+
self.wfile.write(html.encode())
|
|
58
|
+
else:
|
|
59
|
+
self.send_error(404)
|
|
60
|
+
|
|
61
|
+
def do_POST(self):
|
|
62
|
+
if self.path.startswith('/v1/'):
|
|
63
|
+
self.handle_anthropic_api()
|
|
64
|
+
else:
|
|
65
|
+
self.send_error(404)
|
|
66
|
+
|
|
67
|
+
def do_OPTIONS(self):
|
|
68
|
+
self.send_response(200)
|
|
69
|
+
self.send_header('Access-Control-Allow-Origin', '*')
|
|
70
|
+
self.send_header('Access-Control-Allow-Methods', 'POST, OPTIONS')
|
|
71
|
+
self.send_header('Access-Control-Allow-Headers', 'Content-Type, Authorization')
|
|
72
|
+
self.end_headers()
|
|
73
|
+
|
|
74
|
+
def handle_anthropic_api(self):
|
|
75
|
+
# Handle Anthropic-compatible API
|
|
76
|
+
content_length = int(self.headers.get('Content-Length', 0))
|
|
77
|
+
post_data = self.rfile.read(content_length)
|
|
78
|
+
|
|
79
|
+
try:
|
|
80
|
+
request_data = json.loads(post_data.decode())
|
|
81
|
+
messages = request_data.get('messages', [])
|
|
82
|
+
model = request_data.get('model', 'gemini-2.0-flash')
|
|
83
|
+
|
|
84
|
+
# Set CORS headers
|
|
85
|
+
self.send_response(200)
|
|
86
|
+
self.send_header('Access-Control-Allow-Origin', '*')
|
|
87
|
+
self.send_header('Content-Type', 'application/json')
|
|
88
|
+
self.end_headers()
|
|
89
|
+
|
|
90
|
+
# For now, return a mock response
|
|
91
|
+
# In production, this would call the actual AntiGravity API
|
|
92
|
+
response = {
|
|
93
|
+
"id": f"msg_{datetime.now().timestamp()}",
|
|
94
|
+
"type": "message",
|
|
95
|
+
"role": "assistant",
|
|
96
|
+
"content": [
|
|
97
|
+
{
|
|
98
|
+
"type": "text",
|
|
99
|
+
"text": f"[AntiGravity Proxy] Received request for model: {model}\n\nThis is a proxy response. The actual implementation would:\n1. Authenticate with Google internal systems\n2. Route to AntiGravity API\n3. Return the real model response\n\nYour message: {messages[-1]['content'] if messages else 'No message'}"
|
|
100
|
+
}
|
|
101
|
+
],
|
|
102
|
+
"model": model,
|
|
103
|
+
"stop_reason": "end_turn",
|
|
104
|
+
"stop_sequence": None,
|
|
105
|
+
"usage": {
|
|
106
|
+
"input_tokens": 10,
|
|
107
|
+
"output_tokens": 50
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
self.wfile.write(json.dumps(response).encode())
|
|
112
|
+
|
|
113
|
+
except Exception as e:
|
|
114
|
+
self.send_response(500)
|
|
115
|
+
self.send_header('Content-Type', 'application/json')
|
|
116
|
+
self.end_headers()
|
|
117
|
+
error_response = {
|
|
118
|
+
"error": {
|
|
119
|
+
"type": "api_error",
|
|
120
|
+
"message": str(e)
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
self.wfile.write(json.dumps(error_response).encode())
|
|
124
|
+
|
|
125
|
+
def log_message(self, format, *args):
|
|
126
|
+
# Suppress logs for cleaner output
|
|
127
|
+
pass
|
|
128
|
+
|
|
129
|
+
def main():
|
|
130
|
+
PORT = 8080
|
|
131
|
+
|
|
132
|
+
# Check if auth exists
|
|
133
|
+
auth_dir = os.path.expanduser("~/.config/claude-all/antigravity")
|
|
134
|
+
auth_files = []
|
|
135
|
+
if os.path.exists(auth_dir):
|
|
136
|
+
auth_files = [f for f in os.listdir(auth_dir) if f.endswith('.json')]
|
|
137
|
+
|
|
138
|
+
print("=" * 60)
|
|
139
|
+
print("AntiGravity Proxy Server")
|
|
140
|
+
print("=" * 60)
|
|
141
|
+
print(f"Port: {PORT}")
|
|
142
|
+
print(f"Auth files found: {len(auth_files)}")
|
|
143
|
+
|
|
144
|
+
if auth_files:
|
|
145
|
+
print("✓ Authentication files available")
|
|
146
|
+
for f in auth_files:
|
|
147
|
+
print(f" - {f}")
|
|
148
|
+
else:
|
|
149
|
+
print("⚠️ No authentication files found")
|
|
150
|
+
print(" Run: python3 setup_google_internal_auth.py")
|
|
151
|
+
|
|
152
|
+
print()
|
|
153
|
+
print("Starting server...")
|
|
154
|
+
print(f"URL: http://localhost:{PORT}")
|
|
155
|
+
print(f"API: http://localhost:{PORT}/v1")
|
|
156
|
+
print()
|
|
157
|
+
print("Press Ctrl+C to stop")
|
|
158
|
+
print("=" * 60)
|
|
159
|
+
|
|
160
|
+
with socketserver.TCPServer(("", PORT), AntiGravityProxyHandler) as httpd:
|
|
161
|
+
try:
|
|
162
|
+
httpd.serve_forever()
|
|
163
|
+
except KeyboardInterrupt:
|
|
164
|
+
print("\nShutting down...")
|
|
165
|
+
httpd.shutdown()
|
|
166
|
+
|
|
167
|
+
if __name__ == "__main__":
|
|
168
|
+
main()
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Panduan lengkap mendapatkan Google Gemini API Key
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
import webbrowser
|
|
7
|
+
|
|
8
|
+
def show_instructions():
|
|
9
|
+
print("=" * 70)
|
|
10
|
+
print("GOOGLE GEMINI API KEY - PANDUAN LENGKAP")
|
|
11
|
+
print("=" * 70)
|
|
12
|
+
print()
|
|
13
|
+
|
|
14
|
+
print("CARA 1: Dapatkan API Key (Paling Mudah)")
|
|
15
|
+
print("-" * 50)
|
|
16
|
+
print("1. Buka link ini di browser:")
|
|
17
|
+
print(" 👉 https://aistudio.google.com/app/apikey")
|
|
18
|
+
print()
|
|
19
|
+
print("2. Login dengan akun Google Anda")
|
|
20
|
+
print()
|
|
21
|
+
print("3. Klik 'Create API Key'")
|
|
22
|
+
print()
|
|
23
|
+
print("4. Beri nama API key (misal: 'My Key')")
|
|
24
|
+
print()
|
|
25
|
+
print("5. Copy API key yang muncul")
|
|
26
|
+
print(" Format: AIzaSyCxxxxxxxxxxxxxxx")
|
|
27
|
+
print()
|
|
28
|
+
|
|
29
|
+
print("CARA 2: Via Google Cloud Console")
|
|
30
|
+
print("-" * 50)
|
|
31
|
+
print("1. Buka: https://console.cloud.google.com")
|
|
32
|
+
print("2. Pilih project atau buat baru")
|
|
33
|
+
print("3. Cari 'Generative Language API'")
|
|
34
|
+
print("4. Enable API")
|
|
35
|
+
print("5. Buat Credentials > API Key")
|
|
36
|
+
print()
|
|
37
|
+
|
|
38
|
+
print("SETELAH DAPET API KEY:")
|
|
39
|
+
print("-" * 50)
|
|
40
|
+
print("✓ API key sudah disimpan otomatis di script")
|
|
41
|
+
print("✓ Langsung bisa pakai opsi 2 di claude-all")
|
|
42
|
+
print()
|
|
43
|
+
|
|
44
|
+
return input("Masukkan API Key Anda (tekan Enter jika sudah ada): ").strip()
|
|
45
|
+
|
|
46
|
+
def save_api_key(api_key):
|
|
47
|
+
"""Save API key to file"""
|
|
48
|
+
if not api_key:
|
|
49
|
+
# Check if already exists
|
|
50
|
+
import os
|
|
51
|
+
if os.path.exists("/tmp/gemini_key.txt"):
|
|
52
|
+
with open("/tmp/gemini_key.txt", "r") as f:
|
|
53
|
+
return f.read().strip()
|
|
54
|
+
return None
|
|
55
|
+
|
|
56
|
+
# Validate format
|
|
57
|
+
if not api_key.startswith("AIza"):
|
|
58
|
+
print("❌ Format API key salah!")
|
|
59
|
+
print(" Harus dimulai dengan 'AIza'")
|
|
60
|
+
return None
|
|
61
|
+
|
|
62
|
+
# Save to temporary file for claude-all
|
|
63
|
+
with open("/tmp/gemini_key.txt", "w") as f:
|
|
64
|
+
f.write(api_key)
|
|
65
|
+
|
|
66
|
+
print(f"✅ API Key disimpan: {api_key[:20]}...")
|
|
67
|
+
return api_key
|
|
68
|
+
|
|
69
|
+
def main():
|
|
70
|
+
# Try to open browser
|
|
71
|
+
try:
|
|
72
|
+
print("Membuka browser...")
|
|
73
|
+
webbrowser.open("https://aistudio.google.com/app/apikey")
|
|
74
|
+
except:
|
|
75
|
+
pass
|
|
76
|
+
|
|
77
|
+
# Get API key
|
|
78
|
+
api_key = show_instructions()
|
|
79
|
+
|
|
80
|
+
if api_key:
|
|
81
|
+
saved_key = save_api_key(api_key)
|
|
82
|
+
if saved_key:
|
|
83
|
+
print("\n" + "=" * 70)
|
|
84
|
+
print("✅ SETUP SELESAI!")
|
|
85
|
+
print("=" * 70)
|
|
86
|
+
print()
|
|
87
|
+
print("Sekarang langsung bisa pakai:")
|
|
88
|
+
print("1. Jalankan: claude-all")
|
|
89
|
+
print("2. Pilih opsi 2 (Gemini AI Studio)")
|
|
90
|
+
print("3. Mulai chat!")
|
|
91
|
+
print()
|
|
92
|
+
print("API Key Anda:", saved_key[:20] + "...")
|
|
93
|
+
print("=" * 70)
|
|
94
|
+
|
|
95
|
+
if __name__ == "__main__":
|
|
96
|
+
main()
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Setup Google Internal AntiGravity Authentication
|
|
4
|
+
REPLACE YOUR_CLIENT_ID and YOUR_CLIENT_SECRET below before use!
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import os
|
|
8
|
+
import json
|
|
9
|
+
import webbrowser
|
|
10
|
+
from http.server import HTTPServer, BaseHTTPRequestHandler
|
|
11
|
+
import threading
|
|
12
|
+
import time
|
|
13
|
+
import urllib.parse
|
|
14
|
+
import urllib.request
|
|
15
|
+
|
|
16
|
+
class AuthHandler(BaseHTTPRequestHandler):
|
|
17
|
+
def do_GET(self):
|
|
18
|
+
if '/callback' in self.path:
|
|
19
|
+
query = urllib.parse.urlparse(self.path).query
|
|
20
|
+
params = urllib.parse.parse_qs(query)
|
|
21
|
+
|
|
22
|
+
self.send_response(200)
|
|
23
|
+
self.send_header('Content-type', 'text/html')
|
|
24
|
+
self.end_headers()
|
|
25
|
+
|
|
26
|
+
if 'code' in params:
|
|
27
|
+
with open('/tmp/antigravity_auth_code.txt', 'w') as f:
|
|
28
|
+
f.write(params['code'][0])
|
|
29
|
+
|
|
30
|
+
response = """
|
|
31
|
+
<html>
|
|
32
|
+
<body style='font-family: Arial; padding: 40px; text-align: center;'>
|
|
33
|
+
<h1 style='color: #4285f4;'>✅ Authentication Successful!</h1>
|
|
34
|
+
<p>You can close this window.</p>
|
|
35
|
+
<p>AntiGravity is now configured.</p>
|
|
36
|
+
</body>
|
|
37
|
+
</html>
|
|
38
|
+
"""
|
|
39
|
+
else:
|
|
40
|
+
response = """
|
|
41
|
+
<html>
|
|
42
|
+
<body style='font-family: Arial; padding: 40px; text-align: center;'>
|
|
43
|
+
<h1 style='color: red;'>❌ Authentication Failed</h1>
|
|
44
|
+
<p>Please try again.</p>
|
|
45
|
+
</body>
|
|
46
|
+
</html>
|
|
47
|
+
"""
|
|
48
|
+
|
|
49
|
+
self.wfile.write(response.encode())
|
|
50
|
+
|
|
51
|
+
def main():
|
|
52
|
+
print("=" * 70)
|
|
53
|
+
print("GOOGLE INTERNAL - ANTIGRAVITY SETUP")
|
|
54
|
+
print("=" * 70)
|
|
55
|
+
print()
|
|
56
|
+
|
|
57
|
+
print("📍 CONFIGURATION REQUIRED:")
|
|
58
|
+
print("1. Open this script and replace YOUR_CLIENT_ID")
|
|
59
|
+
print("2. Replace YOUR_CLIENT_SECRET")
|
|
60
|
+
print("3. You must be a Google employee")
|
|
61
|
+
print("4. Connected to Google VPN/Network")
|
|
62
|
+
print()
|
|
63
|
+
|
|
64
|
+
# Configuration - REPLACE THESE!
|
|
65
|
+
client_id = "YOUR_CLIENT_ID" # REPLACE THIS!
|
|
66
|
+
client_secret = "YOUR_CLIENT_SECRET" # REPLACE THIS!
|
|
67
|
+
|
|
68
|
+
if "YOUR_" in client_id or "YOUR_" in client_secret:
|
|
69
|
+
print("❌ Please configure client_id and client_secret in this script!")
|
|
70
|
+
print(" Edit this file and replace the placeholder values")
|
|
71
|
+
return
|
|
72
|
+
|
|
73
|
+
print("🔗 STEP 1 - Opening Google Internal OAuth:")
|
|
74
|
+
|
|
75
|
+
auth_url = (
|
|
76
|
+
"https://accounts.google.com/o/oauth2/v2/auth?"
|
|
77
|
+
f"client_id={client_id}&"
|
|
78
|
+
"redirect_uri=http://localhost:8080/callback&"
|
|
79
|
+
"scope=https://www.googleapis.com/auth/cloud-platform+https://www.googleapis.com/auth/generative-language&"
|
|
80
|
+
"response_type=code&"
|
|
81
|
+
"access_type=offline"
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
print(f"👉 {auth_url}")
|
|
85
|
+
print()
|
|
86
|
+
|
|
87
|
+
try:
|
|
88
|
+
webbrowser.open(auth_url)
|
|
89
|
+
print("✅ Browser opened automatically")
|
|
90
|
+
except:
|
|
91
|
+
print("❌ Could not open browser automatically")
|
|
92
|
+
|
|
93
|
+
print()
|
|
94
|
+
print("🔄 STEP 2 - Starting local callback server...")
|
|
95
|
+
|
|
96
|
+
server = HTTPServer(('localhost', 8080), AuthHandler)
|
|
97
|
+
server_thread = threading.Thread(target=server.serve_forever)
|
|
98
|
+
server_thread.daemon = True
|
|
99
|
+
server_thread.start()
|
|
100
|
+
|
|
101
|
+
print("⏳ Waiting for authentication...")
|
|
102
|
+
|
|
103
|
+
for i in range(60):
|
|
104
|
+
if os.path.exists('/tmp/antigravity_auth_code.txt'):
|
|
105
|
+
break
|
|
106
|
+
time.sleep(1)
|
|
107
|
+
if i % 5 == 0:
|
|
108
|
+
print(f" Waiting... ({i}s)")
|
|
109
|
+
|
|
110
|
+
server.shutdown()
|
|
111
|
+
|
|
112
|
+
if os.path.exists('/tmp/antigravity_auth_code.txt'):
|
|
113
|
+
with open('/tmp/antigravity_auth_code.txt', 'r') as f:
|
|
114
|
+
auth_code = f.read()
|
|
115
|
+
|
|
116
|
+
os.remove('/tmp/antigravity_auth_code.txt')
|
|
117
|
+
|
|
118
|
+
print()
|
|
119
|
+
print("🔄 STEP 3 - Exchanging for access token...")
|
|
120
|
+
|
|
121
|
+
token_data = {
|
|
122
|
+
'client_id': client_id,
|
|
123
|
+
'client_secret': client_secret,
|
|
124
|
+
'code': auth_code,
|
|
125
|
+
'grant_type': 'authorization_code',
|
|
126
|
+
'redirect_uri': 'http://localhost:8080/callback'
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
try:
|
|
130
|
+
req = urllib.request.Request(
|
|
131
|
+
'https://oauth2.googleapis.com/token',
|
|
132
|
+
data=urllib.parse.urlencode(token_data).encode(),
|
|
133
|
+
headers={'Content-Type': 'application/x-www-form-urlencoded'}
|
|
134
|
+
)
|
|
135
|
+
|
|
136
|
+
with urllib.request.urlopen(req) as response:
|
|
137
|
+
token_info = json.loads(response.read().decode())
|
|
138
|
+
|
|
139
|
+
auth_dir = os.path.expanduser("~/.config/claude-all/antigravity")
|
|
140
|
+
os.makedirs(auth_dir, exist_ok=True)
|
|
141
|
+
|
|
142
|
+
auth_file = os.path.join(auth_dir, "google_internal_auth.json")
|
|
143
|
+
|
|
144
|
+
credentials = {
|
|
145
|
+
"type": "authorized_user",
|
|
146
|
+
"client_id": client_id,
|
|
147
|
+
"client_secret": client_secret,
|
|
148
|
+
"access_token": token_info.get('access_token'),
|
|
149
|
+
"refresh_token": token_info.get('refresh_token', ''),
|
|
150
|
+
"expiry_date": token_info.get('expires_in', 3600),
|
|
151
|
+
"label": "Google Internal AntiGravity",
|
|
152
|
+
"token_uri": "https://oauth2.googleapis.com/token"
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
with open(auth_file, 'w') as f:
|
|
156
|
+
json.dump(credentials, f, indent=2)
|
|
157
|
+
|
|
158
|
+
print()
|
|
159
|
+
print("✅ SUCCESS! AntiGravity configured!")
|
|
160
|
+
print("=" * 70)
|
|
161
|
+
|
|
162
|
+
except Exception as e:
|
|
163
|
+
print(f"❌ Error getting token: {e}")
|
|
164
|
+
|
|
165
|
+
if __name__ == "__main__":
|
|
166
|
+
print("Note: This script only works for Google employees")
|
|
167
|
+
print(" connected to Google internal network.")
|
|
168
|
+
print(" You MUST configure client_id and client_secret first!")
|
|
169
|
+
print()
|
|
170
|
+
input("Press Enter to continue...")
|
|
171
|
+
main()
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
api-development skill helps design and implement robust APIs following RESTful principles and GraphQL best practices.
|
|
2
|
+
|
|
3
|
+
For code review, check that:
|
|
4
|
+
1. API follows RESTful conventions (for REST APIs)
|
|
5
|
+
2. Proper HTTP status codes are used
|
|
6
|
+
3. Request/response validation is implemented
|
|
7
|
+
4. API documentation is complete (OpenAPI/Swagger)
|
|
8
|
+
5. Rate limiting is implemented
|
|
9
|
+
6. Versioning strategy is in place
|
|
10
|
+
7. Authentication and authorization are secure
|
|
11
|
+
8. Error handling is consistent and informative
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
openapi: 3.0.0
|
|
2
|
+
info:
|
|
3
|
+
title: API Documentation
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
description: API documentation for [Project Name]
|
|
6
|
+
contact:
|
|
7
|
+
name: [Contact Name]
|
|
8
|
+
email: [contact@domain.com]
|
|
9
|
+
license:
|
|
10
|
+
name: MIT
|
|
11
|
+
|
|
12
|
+
servers:
|
|
13
|
+
- url: https://api.example.com/v1
|
|
14
|
+
description: Production server
|
|
15
|
+
- url: https://staging-api.example.com/v1
|
|
16
|
+
description: Staging server
|
|
17
|
+
|
|
18
|
+
paths:
|
|
19
|
+
/users:
|
|
20
|
+
get:
|
|
21
|
+
summary: List all users
|
|
22
|
+
tags:
|
|
23
|
+
- Users
|
|
24
|
+
parameters:
|
|
25
|
+
- name: limit
|
|
26
|
+
in: query
|
|
27
|
+
schema:
|
|
28
|
+
type: integer
|
|
29
|
+
default: 10
|
|
30
|
+
- name: offset
|
|
31
|
+
in: query
|
|
32
|
+
schema:
|
|
33
|
+
type: integer
|
|
34
|
+
default: 0
|
|
35
|
+
responses:
|
|
36
|
+
'200':
|
|
37
|
+
description: List of users
|
|
38
|
+
content:
|
|
39
|
+
application/json:
|
|
40
|
+
schema:
|
|
41
|
+
type: object
|
|
42
|
+
properties:
|
|
43
|
+
users:
|
|
44
|
+
type: array
|
|
45
|
+
items:
|
|
46
|
+
$ref: '#/components/schemas/User'
|
|
47
|
+
total:
|
|
48
|
+
type: integer
|
|
49
|
+
'401':
|
|
50
|
+
$ref: '#/components/responses/Unauthorized'
|
|
51
|
+
|
|
52
|
+
/users/{id}:
|
|
53
|
+
get:
|
|
54
|
+
summary: Get user by ID
|
|
55
|
+
tags:
|
|
56
|
+
- Users
|
|
57
|
+
parameters:
|
|
58
|
+
- name: id
|
|
59
|
+
in: path
|
|
60
|
+
required: true
|
|
61
|
+
schema:
|
|
62
|
+
type: integer
|
|
63
|
+
responses:
|
|
64
|
+
'200':
|
|
65
|
+
description: User details
|
|
66
|
+
content:
|
|
67
|
+
application/json:
|
|
68
|
+
schema:
|
|
69
|
+
$ref: '#/components/schemas/User'
|
|
70
|
+
'404':
|
|
71
|
+
$ref: '#/components/responses/NotFound'
|
|
72
|
+
|
|
73
|
+
components:
|
|
74
|
+
schemas:
|
|
75
|
+
User:
|
|
76
|
+
type: object
|
|
77
|
+
required:
|
|
78
|
+
- id
|
|
79
|
+
- email
|
|
80
|
+
- name
|
|
81
|
+
properties:
|
|
82
|
+
id:
|
|
83
|
+
type: integer
|
|
84
|
+
example: 1
|
|
85
|
+
email:
|
|
86
|
+
type: string
|
|
87
|
+
format: email
|
|
88
|
+
example: user@example.com
|
|
89
|
+
name:
|
|
90
|
+
type: string
|
|
91
|
+
example: John Doe
|
|
92
|
+
created_at:
|
|
93
|
+
type: string
|
|
94
|
+
format: date-time
|
|
95
|
+
|
|
96
|
+
responses:
|
|
97
|
+
Unauthorized:
|
|
98
|
+
type: object
|
|
99
|
+
properties:
|
|
100
|
+
error:
|
|
101
|
+
type: string
|
|
102
|
+
example: Unauthorized
|
|
103
|
+
NotFound:
|
|
104
|
+
type: object
|
|
105
|
+
properties:
|
|
106
|
+
error:
|
|
107
|
+
type: string
|
|
108
|
+
example: Not Found
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: brainstorming
|
|
3
|
+
description: Use when creating or developing, before writing code or implementation plans - refines rough ideas into fully-formed designs through collaborative questioning, alternative exploration, and incremental validation. Don't use during clear 'mechanical' processes
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Brainstorming Ideas Into Designs
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Help turn ideas into fully formed designs and specs through natural collaborative dialogue.
|
|
11
|
+
|
|
12
|
+
Start by understanding the current project context, then ask questions one at a time to refine the idea. Once you understand what you're building, present the design in small sections (200-300 words), checking after each section whether it looks right so far.
|
|
13
|
+
|
|
14
|
+
## The Process
|
|
15
|
+
|
|
16
|
+
**Understanding the idea:**
|
|
17
|
+
- Check out the current project state first (files, docs, recent commits)
|
|
18
|
+
- Ask questions one at a time to refine the idea
|
|
19
|
+
- Prefer multiple choice questions when possible, but open-ended is fine too
|
|
20
|
+
- Only one question per message - if a topic needs more exploration, break it into multiple questions
|
|
21
|
+
- Focus on understanding: purpose, constraints, success criteria
|
|
22
|
+
|
|
23
|
+
**Exploring approaches:**
|
|
24
|
+
- Propose 2-3 different approaches with trade-offs
|
|
25
|
+
- Present options conversationally with your recommendation and reasoning
|
|
26
|
+
- Lead with your recommended option and explain why
|
|
27
|
+
|
|
28
|
+
**Presenting the design:**
|
|
29
|
+
- Once you believe you understand what you're building, present the design
|
|
30
|
+
- Break it into sections of 200-300 words
|
|
31
|
+
- Ask after each section whether it looks right so far
|
|
32
|
+
- Cover: architecture, components, data flow, error handling, testing
|
|
33
|
+
- Be ready to go back and clarify if something doesn't make sense
|
|
34
|
+
|
|
35
|
+
## After the Design
|
|
36
|
+
|
|
37
|
+
**Documentation:**
|
|
38
|
+
- Write the validated design to `docs/plans/YYYY-MM-DD-<topic>-design.md`
|
|
39
|
+
- Use elements-of-style:writing-clearly-and-concisely skill if available
|
|
40
|
+
- Commit the design document to git
|
|
41
|
+
|
|
42
|
+
**Implementation (if continuing):**
|
|
43
|
+
- Ask: "Ready to set up for implementation?"
|
|
44
|
+
- Use superpowers:using-git-worktrees to create isolated workspace
|
|
45
|
+
- Use superpowers:writing-plans to create detailed implementation plan
|
|
46
|
+
|
|
47
|
+
## Key Principles
|
|
48
|
+
|
|
49
|
+
- **One question at a time** - Don't overwhelm with multiple questions
|
|
50
|
+
- **Multiple choice preferred** - Easier to answer than open-ended when possible
|
|
51
|
+
- **YAGNI ruthlessly** - Remove unnecessary features from all designs
|
|
52
|
+
- **Explore alternatives** - Always propose 2-3 approaches before settling
|
|
53
|
+
- **Incremental validation** - Present design in sections, validate each
|
|
54
|
+
- **Be flexible** - Go back and clarify when something doesn't make sense
|