anchi-kit 1.2.0 → 1.2.1

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.
Files changed (80) hide show
  1. package/.antigravity/skills/article-extractor/SKILL.md +52 -0
  2. package/.antigravity/skills/artifacts-builder/SKILL.md +63 -0
  3. package/.antigravity/skills/aws-deployment/SKILL.md +85 -0
  4. package/.antigravity/skills/brainstorming/SKILL.md +73 -0
  5. package/.antigravity/skills/canvas-design/SKILL.md +62 -0
  6. package/.antigravity/skills/changelog-generator/SKILL.md +149 -0
  7. package/.antigravity/skills/changelog-generator/assets/changelog-template.md +60 -0
  8. package/.antigravity/skills/changelog-generator/scripts/generate-changelog.js +181 -0
  9. package/.antigravity/skills/claude-code/references/advanced-features.md +399 -0
  10. package/.antigravity/skills/claude-code/references/agent-skills.md +399 -0
  11. package/.antigravity/skills/claude-code/references/api-reference.md +498 -0
  12. package/.antigravity/skills/claude-code/references/best-practices.md +447 -0
  13. package/.antigravity/skills/claude-code/references/cicd-integration.md +428 -0
  14. package/.antigravity/skills/claude-code/references/common-workflows.md +119 -0
  15. package/.antigravity/skills/claude-code/references/configuration.md +480 -0
  16. package/.antigravity/skills/claude-code/references/enterprise-features.md +472 -0
  17. package/.antigravity/skills/claude-code/references/getting-started.md +252 -0
  18. package/.antigravity/skills/claude-code/references/hooks-and-plugins.md +444 -0
  19. package/.antigravity/skills/claude-code/references/hooks-comprehensive.md +622 -0
  20. package/.antigravity/skills/claude-code/references/ide-integration.md +316 -0
  21. package/.antigravity/skills/claude-code/references/mcp-integration.md +386 -0
  22. package/.antigravity/skills/claude-code/references/slash-commands.md +489 -0
  23. package/.antigravity/skills/claude-code/references/troubleshooting.md +456 -0
  24. package/.antigravity/skills/claude-code/skill.md +60 -0
  25. package/.antigravity/skills/code-quality/SKILL.md +273 -0
  26. package/.antigravity/skills/comprehensive-review/complexity.md +11 -0
  27. package/.antigravity/skills/comprehensive-review/index.yaml +19 -0
  28. package/.antigravity/skills/comprehensive-review/maintainability.md +12 -0
  29. package/.antigravity/skills/comprehensive-review/readability.md +12 -0
  30. package/.antigravity/skills/content-research-writer/SKILL.md +65 -0
  31. package/.antigravity/skills/csv-data-analyzer/SKILL.md +91 -0
  32. package/.antigravity/skills/d3-visualization/SKILL.md +65 -0
  33. package/.antigravity/skills/debugging/references/root-cause-analysis-methods.md +140 -0
  34. package/.antigravity/skills/engineering-discipline/incremental-change.md +15 -0
  35. package/.antigravity/skills/engineering-discipline/index.yaml +30 -0
  36. package/.antigravity/skills/engineering-discipline/planning-first.md +18 -0
  37. package/.antigravity/skills/engineering-discipline/reasoning-clarity.md +19 -0
  38. package/.antigravity/skills/engineering-discipline/verify-before-commit.md +17 -0
  39. package/.antigravity/skills/file-organizer/SKILL.md +64 -0
  40. package/.antigravity/skills/git-automation/SKILL.md +68 -0
  41. package/.antigravity/skills/git-automation/references/branch-finishing.md +64 -0
  42. package/.antigravity/skills/impact-scoring/SKILL.md +219 -0
  43. package/.antigravity/skills/kaizen/SKILL.md +94 -0
  44. package/.antigravity/skills/performance-patterns/SKILL.md +209 -0
  45. package/.antigravity/skills/playwright-testing/SKILL.md +115 -0
  46. package/.antigravity/skills/playwright-testing/references/playwright-patterns.md +122 -0
  47. package/.antigravity/skills/prompt-engineering/SKILL.md +126 -0
  48. package/.antigravity/skills/prompt-engineering/references/anthropic-best-practices.md +160 -0
  49. package/.antigravity/skills/pypict-testing/SKILL.md +79 -0
  50. package/.antigravity/skills/review-implementing/SKILL.md +287 -0
  51. package/.antigravity/skills/security-audit/SKILL.md +263 -0
  52. package/.antigravity/skills/software-architecture/SKILL.md +91 -0
  53. package/.antigravity/skills/software-architecture/references/solid-principles.md +293 -0
  54. package/.antigravity/skills/subagent-driven-development/SKILL.md +237 -0
  55. package/.antigravity/skills/test-driven-development/SKILL.md +130 -0
  56. package/.antigravity/skills/test-driven-development/references/tdd-patterns.md +124 -0
  57. package/.antigravity/skills/test-driven-development/references/testing-strategies.md +131 -0
  58. package/.antigravity/skills/test-fixing/SKILL.md +256 -0
  59. package/.antigravity/skills/theme-factory/SKILL.md +63 -0
  60. package/.antigravity/workflows/clean.md +333 -0
  61. package/.antigravity/workflows/health.md +228 -0
  62. package/.cursor/skills/_packs/common/pack-architecture.md +40 -0
  63. package/.cursor/skills/_packs/common/pack-devops.md +43 -0
  64. package/.cursor/skills/_packs/common/pack-productivity.md +37 -0
  65. package/.cursor/skills/_packs/common/pack-quality.md +41 -0
  66. package/.cursor/skills/_packs/data/pack-ai.md +41 -0
  67. package/.cursor/skills/_packs/data/pack-data-science.md +36 -0
  68. package/.cursor/skills/_packs/mobile/pack-mobile.md +40 -0
  69. package/.cursor/skills/_packs/web/pack-backend.md +61 -0
  70. package/.cursor/skills/_packs/web/pack-frontend.md +66 -0
  71. package/.cursor/skills/_packs/web3/pack-blockchain.md +37 -0
  72. package/.cursor/skills/advanced-coding/references/getting-started.md +93 -0
  73. package/.cursor/skills/advanced-coding/skill.md +34 -0
  74. package/.cursor/skills/template-skill/SKILL.md +6 -0
  75. package/README.md +1 -1
  76. package/docs/reference/SECURITY.md +1 -1
  77. package/package.json +2 -2
  78. package/src/cli.js +5 -5
  79. package/src/commands/dashboard.js +3 -3
  80. package/src/commands/init.js +15 -3
@@ -0,0 +1,447 @@
1
+ # Best Practices
2
+
3
+ Guidelines for project organization, security, performance, collaboration, and cost management.
4
+
5
+ ## Project Organization
6
+
7
+ ### Directory Structure
8
+
9
+ Keep `.cursor/` directory in version control:
10
+
11
+ ```
12
+ project/
13
+ ├── .cursor/
14
+ │ ├── settings.json # Project settings
15
+ │ ├── commands/ # Custom slash commands
16
+ │ │ ├── test-all.md
17
+ │ │ └── deploy.md
18
+ │ ├── skills/ # Project-specific skills
19
+ │ │ └── api-testing/
20
+ │ ├── hooks.json # Hooks configuration
21
+ │ ├── mcp.json # MCP servers (no secrets!)
22
+ │ └── .env.example # Environment template
23
+ ├── .gitignore # Ignore .cursor/.env
24
+ └── README.md
25
+ ```
26
+
27
+ ### Documentation
28
+
29
+ Document custom extensions:
30
+
31
+ **README.md:**
32
+ ```markdown
33
+ ## Cursor Setup
34
+
35
+ ### Custom Commands
36
+ - `/test-all`: Run full test suite
37
+ - `/deploy`: Deploy to staging
38
+
39
+ ### Skills
40
+ - `api-testing`: REST API testing utilities
41
+
42
+ ### MCP Servers
43
+ - `postgres`: Database access
44
+ - `github`: Repository integration
45
+
46
+ ### Environment Variables
47
+ Copy `.cursor/.env.example` to `.cursor/.env` and fill in:
48
+ - GITHUB_TOKEN
49
+ - DATABASE_URL
50
+ ```
51
+
52
+ ### Team Sharing
53
+
54
+ **What to commit:**
55
+ - `.cursor/settings.json`
56
+ - `.cursor/commands/`
57
+ - `.cursor/skills/`
58
+ - `.cursor/hooks.json`
59
+ - `.cursor/mcp.json` (without secrets)
60
+ - `.cursor/.env.example`
61
+
62
+ **What NOT to commit:**
63
+ - `.cursor/.env` (contains secrets)
64
+ - `.cursor/memory/` (optional)
65
+ - `.cursor/cache/`
66
+ - API keys or tokens
67
+
68
+ **.gitignore:**
69
+ ```
70
+ .cursor/.env
71
+ .cursor/memory/
72
+ .cursor/cache/
73
+ .cursor/logs/
74
+ ```
75
+
76
+ ## Security
77
+
78
+ ### API Key Management
79
+
80
+ **Never commit API keys:**
81
+ ```bash
82
+ # Use environment variables
83
+ export ANTHROPIC_API_KEY=sk-ant-xxxxx
84
+
85
+ # Or .env file (gitignored)
86
+ echo 'ANTHROPIC_API_KEY=sk-ant-xxxxx' > .cursor/.env
87
+ ```
88
+
89
+ **Rotate keys regularly:**
90
+ ```bash
91
+ # Generate new key
92
+ # Update in all environments
93
+ # Revoke old key
94
+ ```
95
+
96
+ **Use workspace keys:**
97
+ ```bash
98
+ # For team projects, use workspace API keys
99
+ # Easier to manage and rotate
100
+ # Better access control
101
+ ```
102
+
103
+ ### Sandboxing
104
+
105
+ Enable sandboxing in production:
106
+
107
+ ```json
108
+ {
109
+ "sandboxing": {
110
+ "enabled": true,
111
+ "allowedPaths": ["/workspace"],
112
+ "networkAccess": "restricted",
113
+ "allowedDomains": ["api.company.com"]
114
+ }
115
+ }
116
+ ```
117
+
118
+ ### Hook Security
119
+
120
+ Review hook scripts before execution:
121
+
122
+ ```bash
123
+ # Check hooks.json
124
+ cat .cursor/hooks.json | jq .
125
+
126
+ # Review scripts
127
+ cat .cursor/scripts/hook.sh
128
+
129
+ # Validate inputs in hooks
130
+ #!/bin/bash
131
+ if [[ ! "$TOOL_ARGS" =~ ^[a-zA-Z0-9_-]+$ ]]; then
132
+ echo "Invalid input"
133
+ exit 1
134
+ fi
135
+ ```
136
+
137
+ ### Plugin Security
138
+
139
+ Audit plugins before installation:
140
+
141
+ ```bash
142
+ # Review plugin source
143
+ gh repo view username/plugin
144
+
145
+ # Check plugin.json
146
+ tar -xzf plugin.tar.gz
147
+ cat plugin.json
148
+
149
+ # Install from trusted sources only
150
+ claude plugin install gh:anthropics/official-plugin
151
+ ```
152
+
153
+ ## Performance Optimization
154
+
155
+ ### Model Selection
156
+
157
+ Choose appropriate model for task:
158
+
159
+ **Haiku** - Fast, cost-effective:
160
+ ```bash
161
+ claude --model haiku "fix typo in README"
162
+ claude --model haiku "format code"
163
+ ```
164
+
165
+ **Sonnet** - Balanced (default):
166
+ ```bash
167
+ claude "implement user authentication"
168
+ claude "review this PR"
169
+ ```
170
+
171
+ **Opus** - Complex tasks:
172
+ ```bash
173
+ claude --model opus "architect microservices system"
174
+ claude --model opus "optimize algorithm performance"
175
+ ```
176
+
177
+ ### Prompt Caching
178
+
179
+ Cache repeated context:
180
+
181
+ ```typescript
182
+ // Cache large codebase
183
+ const response = await client.messages.create({
184
+ model: 'claude-sonnet-4-5-20250929',
185
+ system: [
186
+ {
187
+ type: 'text',
188
+ text: largeCodebase,
189
+ cache_control: { type: 'ephemeral' }
190
+ }
191
+ ],
192
+ messages: [...]
193
+ });
194
+ ```
195
+
196
+ **Benefits:**
197
+ - 90% cost reduction on cached tokens
198
+ - Faster responses
199
+ - Better for iterative development
200
+
201
+ ### Rate Limiting
202
+
203
+ Implement rate limiting in hooks:
204
+
205
+ ```bash
206
+ #!/bin/bash
207
+ # .cursor/scripts/rate-limit.sh
208
+
209
+ REQUESTS_FILE=".cursor/requests.log"
210
+ MAX_REQUESTS=100
211
+ WINDOW=3600 # 1 hour
212
+
213
+ # Count recent requests
214
+ RECENT=$(find $REQUESTS_FILE -mmin -60 | wc -l)
215
+
216
+ if [ $RECENT -ge $MAX_REQUESTS ]; then
217
+ echo "Rate limit exceeded"
218
+ exit 1
219
+ fi
220
+
221
+ echo $(date) >> $REQUESTS_FILE
222
+ ```
223
+
224
+ ### Token Management
225
+
226
+ Monitor token usage:
227
+
228
+ ```bash
229
+ # Check usage
230
+ claude usage show
231
+
232
+ # Set limits
233
+ claude config set maxTokens 8192
234
+
235
+ # Track costs
236
+ claude analytics cost --group-by project
237
+ ```
238
+
239
+ ## Team Collaboration
240
+
241
+ ### Standardize Commands
242
+
243
+ Create consistent slash commands:
244
+
245
+ ```markdown
246
+ # .cursor/commands/test.md
247
+ Run test suite with coverage report.
248
+
249
+ Options:
250
+ - {{suite}}: Specific test suite (optional)
251
+ ```
252
+
253
+ **Usage:**
254
+ ```bash
255
+ /test
256
+ /test unit
257
+ /test integration
258
+ ```
259
+
260
+ ### Share Skills
261
+
262
+ Create team skills via plugins:
263
+
264
+ ```bash
265
+ # Create team plugin
266
+ cd .cursor/plugins/team-plugin
267
+ cat > plugin.json <<EOF
268
+ {
269
+ "name": "team-plugin",
270
+ "skills": ["skills/*/"],
271
+ "commands": ["commands/*.md"]
272
+ }
273
+ EOF
274
+
275
+ # Package and share
276
+ tar -czf team-plugin.tar.gz .
277
+ ```
278
+
279
+ ### Consistent Settings
280
+
281
+ Use project settings for consistency:
282
+
283
+ **.cursor/settings.json:**
284
+ ```json
285
+ {
286
+ "model": "claude-sonnet-4-5-20250929",
287
+ "maxTokens": 8192,
288
+ "outputStyle": "technical-writer",
289
+ "thinking": {
290
+ "enabled": true,
291
+ "budget": 10000
292
+ }
293
+ }
294
+ ```
295
+
296
+ ### Memory Settings
297
+
298
+ Use project memory for shared context:
299
+
300
+ ```json
301
+ {
302
+ "memory": {
303
+ "enabled": true,
304
+ "location": "project"
305
+ }
306
+ }
307
+ ```
308
+
309
+ **Benefits:**
310
+ - Shared project knowledge
311
+ - Consistent behavior across team
312
+ - Reduced onboarding time
313
+
314
+ ## Cost Management
315
+
316
+ ### Budget Limits
317
+
318
+ Set budget limits in hooks:
319
+
320
+ ```bash
321
+ #!/bin/bash
322
+ # .cursor/scripts/budget-check.sh
323
+
324
+ MONTHLY_BUDGET=1000
325
+ CURRENT_SPEND=$(claude analytics cost --format json | jq '.total')
326
+
327
+ if (( $(echo "$CURRENT_SPEND > $MONTHLY_BUDGET" | bc -l) )); then
328
+ echo "⚠️ Monthly budget exceeded: \$$CURRENT_SPEND / \$$MONTHLY_BUDGET"
329
+ exit 1
330
+ fi
331
+ ```
332
+
333
+ ### Usage Monitoring
334
+
335
+ Monitor via analytics API:
336
+
337
+ ```bash
338
+ # Daily usage report
339
+ claude analytics usage --start $(date -d '1 day ago' +%Y-%m-%d)
340
+
341
+ # Cost by user
342
+ claude analytics cost --group-by user
343
+
344
+ # Export to CSV
345
+ claude analytics export --format csv > usage.csv
346
+ ```
347
+
348
+ ### Cost Optimization
349
+
350
+ **Use Haiku for simple tasks:**
351
+ ```bash
352
+ # Expensive (Sonnet)
353
+ claude "fix typo in README"
354
+
355
+ # Cheap (Haiku)
356
+ claude --model haiku "fix typo in README"
357
+ ```
358
+
359
+ **Enable caching:**
360
+ ```json
361
+ {
362
+ "caching": {
363
+ "enabled": true,
364
+ "ttl": 300
365
+ }
366
+ }
367
+ ```
368
+
369
+ **Batch operations:**
370
+ ```bash
371
+ # Instead of multiple requests
372
+ claude "fix file1.js"
373
+ claude "fix file2.js"
374
+ claude "fix file3.js"
375
+
376
+ # Batch them
377
+ claude "fix all files: file1.js file2.js file3.js"
378
+ ```
379
+
380
+ **Track per-project costs:**
381
+ ```bash
382
+ # Tag projects
383
+ claude --project my-project "implement feature"
384
+
385
+ # View project costs
386
+ claude analytics cost --project my-project
387
+ ```
388
+
389
+ ## Development Workflows
390
+
391
+ ### Feature Development
392
+
393
+ ```bash
394
+ # 1. Plan feature
395
+ claude /plan "implement user authentication"
396
+
397
+ # 2. Create checkpoint
398
+ claude checkpoint create "before auth implementation"
399
+
400
+ # 3. Implement
401
+ claude /cook "implement user authentication"
402
+
403
+ # 4. Test
404
+ claude /test
405
+
406
+ # 5. Review
407
+ claude "review authentication implementation"
408
+
409
+ # 6. Commit
410
+ claude /git:cm
411
+ ```
412
+
413
+ ### Bug Fixing
414
+
415
+ ```bash
416
+ # 1. Debug
417
+ claude /debug "login button not working"
418
+
419
+ # 2. Fix
420
+ claude /fix:fast "fix login button issue"
421
+
422
+ # 3. Test
423
+ claude /test
424
+
425
+ # 4. Commit
426
+ claude /git:cm
427
+ ```
428
+
429
+ ### Code Review
430
+
431
+ ```bash
432
+ # Review PR
433
+ claude "review PR #123"
434
+
435
+ # Check security
436
+ claude "review for security vulnerabilities"
437
+
438
+ # Verify tests
439
+ claude "check test coverage"
440
+ ```
441
+
442
+ ## See Also
443
+
444
+ - Security guide: https://docs.cursor.com/claude-code/security
445
+ - Cost tracking: https://docs.cursor.com/claude-code/costs
446
+ - Team setup: https://docs.cursor.com/claude-code/overview
447
+ - API usage: `references/api-reference.md`