ag-cortex 0.1.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/.agent/commands/test-browser.md +339 -0
- package/.agent/rules/00-constitution.md +46 -0
- package/.agent/rules/project-rules.md +49 -0
- package/.agent/skills/agent-browser/SKILL.md +223 -0
- package/.agent/skills/agent-native-architecture/SKILL.md +435 -0
- package/.agent/skills/agent-native-architecture/references/action-parity-discipline.md +409 -0
- package/.agent/skills/agent-native-architecture/references/agent-execution-patterns.md +467 -0
- package/.agent/skills/agent-native-architecture/references/agent-native-testing.md +582 -0
- package/.agent/skills/agent-native-architecture/references/architecture-patterns.md +478 -0
- package/.agent/skills/agent-native-architecture/references/dynamic-context-injection.md +338 -0
- package/.agent/skills/agent-native-architecture/references/files-universal-interface.md +301 -0
- package/.agent/skills/agent-native-architecture/references/from-primitives-to-domain-tools.md +359 -0
- package/.agent/skills/agent-native-architecture/references/mcp-tool-design.md +506 -0
- package/.agent/skills/agent-native-architecture/references/mobile-patterns.md +871 -0
- package/.agent/skills/agent-native-architecture/references/product-implications.md +443 -0
- package/.agent/skills/agent-native-architecture/references/refactoring-to-prompt-native.md +317 -0
- package/.agent/skills/agent-native-architecture/references/self-modification.md +269 -0
- package/.agent/skills/agent-native-architecture/references/shared-workspace-architecture.md +680 -0
- package/.agent/skills/agent-native-architecture/references/system-prompt-design.md +250 -0
- package/.agent/skills/agent-native-reviewer/SKILL.md +246 -0
- package/.agent/skills/andrew-kane-gem-writer/SKILL.md +184 -0
- package/.agent/skills/andrew-kane-gem-writer/references/database-adapters.md +231 -0
- package/.agent/skills/andrew-kane-gem-writer/references/module-organization.md +121 -0
- package/.agent/skills/andrew-kane-gem-writer/references/rails-integration.md +183 -0
- package/.agent/skills/andrew-kane-gem-writer/references/resources.md +119 -0
- package/.agent/skills/andrew-kane-gem-writer/references/testing-patterns.md +261 -0
- package/.agent/skills/ankane-readme-writer/SKILL.md +50 -0
- package/.agent/skills/architecture-strategist/SKILL.md +52 -0
- package/.agent/skills/best-practices-researcher/SKILL.md +100 -0
- package/.agent/skills/bug-reproduction-validator/SKILL.md +67 -0
- package/.agent/skills/code-simplicity-reviewer/SKILL.md +85 -0
- package/.agent/skills/coding-tutor/.claude-plugin/plugin.json +9 -0
- package/.agent/skills/coding-tutor/README.md +37 -0
- package/.agent/skills/coding-tutor/commands/quiz-me.md +1 -0
- package/.agent/skills/coding-tutor/commands/sync-tutorials.md +25 -0
- package/.agent/skills/coding-tutor/commands/teach-me.md +1 -0
- package/.agent/skills/coding-tutor/skills/coding-tutor/SKILL.md +214 -0
- package/.agent/skills/coding-tutor/skills/coding-tutor/scripts/create_tutorial.py +202 -0
- package/.agent/skills/coding-tutor/skills/coding-tutor/scripts/index_tutorials.py +203 -0
- package/.agent/skills/coding-tutor/skills/coding-tutor/scripts/quiz_priority.py +190 -0
- package/.agent/skills/coding-tutor/skills/coding-tutor/scripts/setup_tutorials.py +132 -0
- package/.agent/skills/compound-docs/SKILL.md +510 -0
- package/.agent/skills/compound-docs/assets/critical-pattern-template.md +34 -0
- package/.agent/skills/compound-docs/assets/resolution-template.md +93 -0
- package/.agent/skills/compound-docs/references/yaml-schema.md +65 -0
- package/.agent/skills/compound-docs/schema.yaml +176 -0
- package/.agent/skills/create-agent-skills/SKILL.md +299 -0
- package/.agent/skills/create-agent-skills/references/api-security.md +226 -0
- package/.agent/skills/create-agent-skills/references/be-clear-and-direct.md +531 -0
- package/.agent/skills/create-agent-skills/references/best-practices.md +404 -0
- package/.agent/skills/create-agent-skills/references/common-patterns.md +595 -0
- package/.agent/skills/create-agent-skills/references/core-principles.md +437 -0
- package/.agent/skills/create-agent-skills/references/executable-code.md +175 -0
- package/.agent/skills/create-agent-skills/references/iteration-and-testing.md +474 -0
- package/.agent/skills/create-agent-skills/references/official-spec.md +185 -0
- package/.agent/skills/create-agent-skills/references/recommended-structure.md +168 -0
- package/.agent/skills/create-agent-skills/references/skill-structure.md +372 -0
- package/.agent/skills/create-agent-skills/references/using-scripts.md +113 -0
- package/.agent/skills/create-agent-skills/references/using-templates.md +112 -0
- package/.agent/skills/create-agent-skills/references/workflows-and-validation.md +510 -0
- package/.agent/skills/create-agent-skills/templates/router-skill.md +73 -0
- package/.agent/skills/create-agent-skills/templates/simple-skill.md +33 -0
- package/.agent/skills/create-agent-skills/workflows/add-reference.md +96 -0
- package/.agent/skills/create-agent-skills/workflows/add-script.md +93 -0
- package/.agent/skills/create-agent-skills/workflows/add-template.md +74 -0
- package/.agent/skills/create-agent-skills/workflows/add-workflow.md +120 -0
- package/.agent/skills/create-agent-skills/workflows/audit-skill.md +138 -0
- package/.agent/skills/create-agent-skills/workflows/create-domain-expertise-skill.md +605 -0
- package/.agent/skills/create-agent-skills/workflows/create-new-skill.md +191 -0
- package/.agent/skills/create-agent-skills/workflows/get-guidance.md +121 -0
- package/.agent/skills/create-agent-skills/workflows/upgrade-to-router.md +161 -0
- package/.agent/skills/create-agent-skills/workflows/verify-skill.md +204 -0
- package/.agent/skills/data-integrity-guardian/SKILL.md +70 -0
- package/.agent/skills/data-migration-expert/SKILL.md +97 -0
- package/.agent/skills/deployment-verification-agent/SKILL.md +159 -0
- package/.agent/skills/design-implementation-reviewer/SKILL.md +85 -0
- package/.agent/skills/design-iterator/SKILL.md +197 -0
- package/.agent/skills/dhh-rails-reviewer/SKILL.md +45 -0
- package/.agent/skills/dhh-rails-style/SKILL.md +184 -0
- package/.agent/skills/dhh-rails-style/references/architecture.md +653 -0
- package/.agent/skills/dhh-rails-style/references/controllers.md +303 -0
- package/.agent/skills/dhh-rails-style/references/frontend.md +510 -0
- package/.agent/skills/dhh-rails-style/references/gems.md +266 -0
- package/.agent/skills/dhh-rails-style/references/models.md +359 -0
- package/.agent/skills/dhh-rails-style/references/testing.md +338 -0
- package/.agent/skills/dspy-ruby/SKILL.md +594 -0
- package/.agent/skills/dspy-ruby/assets/config-template.rb +359 -0
- package/.agent/skills/dspy-ruby/assets/module-template.rb +326 -0
- package/.agent/skills/dspy-ruby/assets/signature-template.rb +143 -0
- package/.agent/skills/dspy-ruby/references/core-concepts.md +265 -0
- package/.agent/skills/dspy-ruby/references/optimization.md +623 -0
- package/.agent/skills/dspy-ruby/references/providers.md +305 -0
- package/.agent/skills/every-style-editor/SKILL.md +134 -0
- package/.agent/skills/every-style-editor/references/EVERY_WRITE_STYLE.md +529 -0
- package/.agent/skills/figma-design-sync/SKILL.md +166 -0
- package/.agent/skills/file-todos/SKILL.md +251 -0
- package/.agent/skills/file-todos/assets/todo-template.md +155 -0
- package/.agent/skills/framework-docs-researcher/SKILL.md +83 -0
- package/.agent/skills/frontend-design/SKILL.md +42 -0
- package/.agent/skills/gemini-imagegen/SKILL.md +237 -0
- package/.agent/skills/gemini-imagegen/requirements.txt +2 -0
- package/.agent/skills/gemini-imagegen/scripts/compose_images.py +168 -0
- package/.agent/skills/gemini-imagegen/scripts/edit_image.py +157 -0
- package/.agent/skills/gemini-imagegen/scripts/gemini_images.py +265 -0
- package/.agent/skills/gemini-imagegen/scripts/generate_image.py +147 -0
- package/.agent/skills/gemini-imagegen/scripts/multi_turn_chat.py +215 -0
- package/.agent/skills/git-history-analyzer/SKILL.md +42 -0
- package/.agent/skills/git-worktree/SKILL.md +302 -0
- package/.agent/skills/git-worktree/scripts/worktree-manager.sh +345 -0
- package/.agent/skills/julik-frontend-races-reviewer/SKILL.md +222 -0
- package/.agent/skills/kieran-python-reviewer/SKILL.md +104 -0
- package/.agent/skills/kieran-rails-reviewer/SKILL.md +86 -0
- package/.agent/skills/kieran-typescript-reviewer/SKILL.md +95 -0
- package/.agent/skills/lint/SKILL.md +16 -0
- package/.agent/skills/pattern-recognition-specialist/SKILL.md +57 -0
- package/.agent/skills/performance-oracle/SKILL.md +110 -0
- package/.agent/skills/pr-comment-resolver/SKILL.md +69 -0
- package/.agent/skills/rclone/SKILL.md +150 -0
- package/.agent/skills/rclone/scripts/check_setup.sh +60 -0
- package/.agent/skills/repo-research-analyst/SKILL.md +113 -0
- package/.agent/skills/security-sentinel/SKILL.md +93 -0
- package/.agent/skills/skill-creator/SKILL.md +209 -0
- package/.agent/skills/skill-creator/scripts/init_skill.py +304 -0
- package/.agent/skills/skill-creator/scripts/package_skill.py +112 -0
- package/.agent/skills/skill-creator/scripts/quick_validate.py +72 -0
- package/.agent/skills/spec-flow-analyzer/SKILL.md +113 -0
- package/.agent/skills/test-agent/SKILL.md +4 -0
- package/.agent/workflows/agent-native-audit.md +277 -0
- package/.agent/workflows/ask-user-question.md +21 -0
- package/.agent/workflows/changelog.md +137 -0
- package/.agent/workflows/compound.md +202 -0
- package/.agent/workflows/create-agent-skill.md +8 -0
- package/.agent/workflows/deepen-plan-research.md +334 -0
- package/.agent/workflows/deepen-plan-synthesis.md +182 -0
- package/.agent/workflows/deepen-plan.md +79 -0
- package/.agent/workflows/feature-video.md +342 -0
- package/.agent/workflows/generate-command.md +162 -0
- package/.agent/workflows/heal-skill.md +142 -0
- package/.agent/workflows/lfg.md +20 -0
- package/.agent/workflows/plan-analysis.md +67 -0
- package/.agent/workflows/plan-next-steps.md +63 -0
- package/.agent/workflows/plan-review.md +33 -0
- package/.agent/workflows/plan-synthesis.md +106 -0
- package/.agent/workflows/plan.md +49 -0
- package/.agent/workflows/report-bug.md +150 -0
- package/.agent/workflows/reproduce-bug.md +99 -0
- package/.agent/workflows/resolve-parallel.md +34 -0
- package/.agent/workflows/resolve-pr-parallel.md +49 -0
- package/.agent/workflows/resolve-todo-parallel.md +35 -0
- package/.agent/workflows/review-analysis.md +145 -0
- package/.agent/workflows/review-synthesis.md +262 -0
- package/.agent/workflows/review.md +64 -0
- package/.agent/workflows/ship.md +90 -0
- package/.agent/workflows/test-command.md +3 -0
- package/.agent/workflows/triage.md +310 -0
- package/.agent/workflows/work.md +157 -0
- package/.agent/workflows/xcode-test.md +332 -0
- package/LICENSE +22 -0
- package/README.md +49 -0
- package/bin/ag-cortex.js +54 -0
- package/lib/core.js +165 -0
- package/package.json +31 -0
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
# CORA Documentation Schema
|
|
2
|
+
# This schema MUST be validated before writing any documentation file
|
|
3
|
+
|
|
4
|
+
required_fields:
|
|
5
|
+
module:
|
|
6
|
+
type: string
|
|
7
|
+
description: "Module/area of CORA (e.g., 'Email Processing', 'Brief System', 'Authentication')"
|
|
8
|
+
examples:
|
|
9
|
+
- "Email Processing"
|
|
10
|
+
- "Brief System"
|
|
11
|
+
- "Assistant"
|
|
12
|
+
- "Authentication"
|
|
13
|
+
|
|
14
|
+
date:
|
|
15
|
+
type: string
|
|
16
|
+
pattern: '^\d{4}-\d{2}-\d{2}$'
|
|
17
|
+
description: "Date when this problem was solved (YYYY-MM-DD)"
|
|
18
|
+
|
|
19
|
+
problem_type:
|
|
20
|
+
type: enum
|
|
21
|
+
values:
|
|
22
|
+
- build_error # Rails, bundle, compilation errors
|
|
23
|
+
- test_failure # Test failures, flaky tests
|
|
24
|
+
- runtime_error # Exceptions, crashes during execution
|
|
25
|
+
- performance_issue # Slow queries, memory issues, N+1 queries
|
|
26
|
+
- database_issue # Migration, query, schema problems
|
|
27
|
+
- security_issue # Authentication, authorization, XSS, SQL injection
|
|
28
|
+
- ui_bug # Frontend, Stimulus, Turbo issues
|
|
29
|
+
- integration_issue # External service, API integration problems
|
|
30
|
+
- logic_error # Business logic bugs
|
|
31
|
+
- developer_experience # DX issues: workflow, tooling, seed data, dev setup
|
|
32
|
+
- workflow_issue # Development process, missing steps, unclear practices
|
|
33
|
+
- best_practice # Documenting patterns and practices to follow
|
|
34
|
+
- documentation_gap # Missing or inadequate documentation
|
|
35
|
+
description: "Primary category of the problem"
|
|
36
|
+
|
|
37
|
+
component:
|
|
38
|
+
type: enum
|
|
39
|
+
values:
|
|
40
|
+
- rails_model # ActiveRecord models
|
|
41
|
+
- rails_controller # ActionController
|
|
42
|
+
- rails_view # ERB templates, ViewComponent
|
|
43
|
+
- service_object # Custom service classes
|
|
44
|
+
- background_job # Sidekiq, Active Job
|
|
45
|
+
- database # PostgreSQL, migrations, schema
|
|
46
|
+
- frontend_stimulus # Stimulus JS controllers
|
|
47
|
+
- hotwire_turbo # Turbo Streams, Turbo Drive
|
|
48
|
+
- email_processing # Email handling, mailers
|
|
49
|
+
- brief_system # Brief generation, summarization
|
|
50
|
+
- assistant # AI assistant, prompts
|
|
51
|
+
- authentication # Devise, user auth
|
|
52
|
+
- payments # Stripe, billing
|
|
53
|
+
- development_workflow # Dev process, seed data, tooling
|
|
54
|
+
- testing_framework # Test setup, fixtures, VCR
|
|
55
|
+
- documentation # README, guides, inline docs
|
|
56
|
+
- tooling # Scripts, generators, CLI tools
|
|
57
|
+
description: "CORA component involved"
|
|
58
|
+
|
|
59
|
+
symptoms:
|
|
60
|
+
type: array[string]
|
|
61
|
+
min_items: 1
|
|
62
|
+
max_items: 5
|
|
63
|
+
description: "Observable symptoms (error messages, visual issues, crashes)"
|
|
64
|
+
examples:
|
|
65
|
+
- "N+1 query detected in brief generation"
|
|
66
|
+
- "Brief emails not appearing in summary"
|
|
67
|
+
- "Turbo Stream response returns 404"
|
|
68
|
+
|
|
69
|
+
root_cause:
|
|
70
|
+
type: enum
|
|
71
|
+
values:
|
|
72
|
+
- missing_association # Incorrect Rails associations
|
|
73
|
+
- missing_include # Missing eager loading (N+1)
|
|
74
|
+
- missing_index # Database performance issue
|
|
75
|
+
- wrong_api # Using deprecated/incorrect Rails API
|
|
76
|
+
- scope_issue # Incorrect query scope or filtering
|
|
77
|
+
- thread_violation # Real-time unsafe operation
|
|
78
|
+
- async_timing # Async/background job timing
|
|
79
|
+
- memory_leak # Memory leak or excessive allocation
|
|
80
|
+
- config_error # Configuration or environment issue
|
|
81
|
+
- logic_error # Algorithm/business logic bug
|
|
82
|
+
- test_isolation # Test isolation or fixture issue
|
|
83
|
+
- missing_validation # Missing model validation
|
|
84
|
+
- missing_permission # Authorization check missing
|
|
85
|
+
- missing_workflow_step # Skipped or undocumented workflow step
|
|
86
|
+
- inadequate_documentation # Missing or unclear documentation
|
|
87
|
+
- missing_tooling # Lacking helper scripts or automation
|
|
88
|
+
- incomplete_setup # Missing seed data, fixtures, or config
|
|
89
|
+
description: "Fundamental cause of the problem"
|
|
90
|
+
|
|
91
|
+
resolution_type:
|
|
92
|
+
type: enum
|
|
93
|
+
values:
|
|
94
|
+
- code_fix # Fixed by changing source code
|
|
95
|
+
- migration # Fixed by database migration
|
|
96
|
+
- config_change # Fixed by changing configuration
|
|
97
|
+
- test_fix # Fixed by correcting tests
|
|
98
|
+
- dependency_update # Fixed by updating gem/dependency
|
|
99
|
+
- environment_setup # Fixed by environment configuration
|
|
100
|
+
- workflow_improvement # Improved development workflow or process
|
|
101
|
+
- documentation_update # Added or updated documentation
|
|
102
|
+
- tooling_addition # Added helper script or automation
|
|
103
|
+
- seed_data_update # Updated db/seeds.rb or fixtures
|
|
104
|
+
description: "Type of fix applied"
|
|
105
|
+
|
|
106
|
+
severity:
|
|
107
|
+
type: enum
|
|
108
|
+
values:
|
|
109
|
+
- critical # Blocks production or development (build fails, data loss)
|
|
110
|
+
- high # Impairs core functionality (feature broken, security issue)
|
|
111
|
+
- medium # Affects specific feature (UI broken, performance impact)
|
|
112
|
+
- low # Minor issue or edge case
|
|
113
|
+
description: "Impact severity"
|
|
114
|
+
|
|
115
|
+
optional_fields:
|
|
116
|
+
rails_version:
|
|
117
|
+
type: string
|
|
118
|
+
pattern: '^\d+\.\d+\.\d+$'
|
|
119
|
+
description: "Rails version where this was encountered (e.g., '7.1.0')"
|
|
120
|
+
|
|
121
|
+
related_components:
|
|
122
|
+
type: array[string]
|
|
123
|
+
description: "Other components that interact with this issue"
|
|
124
|
+
|
|
125
|
+
tags:
|
|
126
|
+
type: array[string]
|
|
127
|
+
max_items: 8
|
|
128
|
+
description: "Searchable keywords (lowercase, hyphen-separated)"
|
|
129
|
+
examples:
|
|
130
|
+
- "n-plus-one"
|
|
131
|
+
- "eager-loading"
|
|
132
|
+
- "test-isolation"
|
|
133
|
+
- "turbo-stream"
|
|
134
|
+
|
|
135
|
+
validation_rules:
|
|
136
|
+
- "module must be a valid CORA module name"
|
|
137
|
+
- "date must be in YYYY-MM-DD format"
|
|
138
|
+
- "problem_type must match one of the enum values"
|
|
139
|
+
- "component must match one of the enum values"
|
|
140
|
+
- "symptoms must be specific and observable (not vague)"
|
|
141
|
+
- "root_cause must be the ACTUAL cause, not a symptom"
|
|
142
|
+
- "resolution_type must match one of the enum values"
|
|
143
|
+
- "severity must match one of the enum values"
|
|
144
|
+
- "tags should be lowercase, hyphen-separated"
|
|
145
|
+
|
|
146
|
+
# Example valid front matter:
|
|
147
|
+
# ---
|
|
148
|
+
# module: Email Processing
|
|
149
|
+
# date: 2025-11-12
|
|
150
|
+
# problem_type: performance_issue
|
|
151
|
+
# component: rails_model
|
|
152
|
+
# symptoms:
|
|
153
|
+
# - N+1 query when loading email threads
|
|
154
|
+
# - Brief generation taking >5 seconds
|
|
155
|
+
# root_cause: missing_include
|
|
156
|
+
# rails_version: 7.1.2
|
|
157
|
+
# resolution_type: code_fix
|
|
158
|
+
# severity: high
|
|
159
|
+
# tags: [n-plus-one, eager-loading, performance]
|
|
160
|
+
# ---
|
|
161
|
+
#
|
|
162
|
+
# Example DX issue front matter:
|
|
163
|
+
# ---
|
|
164
|
+
# module: Development Workflow
|
|
165
|
+
# date: 2025-11-13
|
|
166
|
+
# problem_type: developer_experience
|
|
167
|
+
# component: development_workflow
|
|
168
|
+
# symptoms:
|
|
169
|
+
# - No example data for new feature in development
|
|
170
|
+
# - Rails db:seed doesn't demonstrate new capabilities
|
|
171
|
+
# root_cause: incomplete_setup
|
|
172
|
+
# rails_version: 7.1.2
|
|
173
|
+
# resolution_type: seed_data_update
|
|
174
|
+
# severity: low
|
|
175
|
+
# tags: [seed-data, dx, workflow]
|
|
176
|
+
# ---
|
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: creating-agent-skills
|
|
3
|
+
description: Expert guidance for creating, writing, and refining Antigravity Skills. Use when working with SKILL.md files, authoring new skills, improving existing skills, or understanding skill structure and best practices.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Creating Agent Skills
|
|
7
|
+
|
|
8
|
+
This skill teaches how to create effective Antigravity Skills following Antigravity's official specification.
|
|
9
|
+
|
|
10
|
+
## Core Principles
|
|
11
|
+
|
|
12
|
+
### 1. Skills Are Prompts
|
|
13
|
+
|
|
14
|
+
All prompting best practices apply. Be clear, be direct. Assume Antigravity is smart - only add context Antigravity doesn't have.
|
|
15
|
+
|
|
16
|
+
### 2. Standard Markdown Format
|
|
17
|
+
|
|
18
|
+
Use YAML frontmatter + markdown body. **No XML tags** - use standard markdown headings.
|
|
19
|
+
|
|
20
|
+
```markdown
|
|
21
|
+
---
|
|
22
|
+
name: my-skill-name
|
|
23
|
+
description: What it does and when to use it
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
# My Skill Name
|
|
27
|
+
|
|
28
|
+
## Quick Start
|
|
29
|
+
Immediate actionable guidance...
|
|
30
|
+
|
|
31
|
+
## Instructions
|
|
32
|
+
Step-by-step procedures...
|
|
33
|
+
|
|
34
|
+
## Examples
|
|
35
|
+
Concrete usage examples...
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### 3. Progressive Disclosure
|
|
39
|
+
|
|
40
|
+
Keep SKILL.md under 500 lines. Split detailed content into reference files. Load only what's needed.
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
my-skill/
|
|
44
|
+
├── SKILL.md # Entry point (required)
|
|
45
|
+
├── reference.md # Detailed docs (loaded when needed)
|
|
46
|
+
├── examples.md # Usage examples
|
|
47
|
+
└── scripts/ # Utility scripts (executed, not loaded)
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### 4. Effective Descriptions
|
|
51
|
+
|
|
52
|
+
The description field enables skill discovery. Include both what the skill does AND when to use it. Write in third person.
|
|
53
|
+
|
|
54
|
+
**Good:**
|
|
55
|
+
```yaml
|
|
56
|
+
description: Extracts text and tables from PDF files, fills forms, merges documents. Use when working with PDF files or when the user mentions PDFs, forms, or document extraction.
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**Bad:**
|
|
60
|
+
```yaml
|
|
61
|
+
description: Helps with documents
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Skill Structure
|
|
65
|
+
|
|
66
|
+
### Required Frontmatter
|
|
67
|
+
|
|
68
|
+
| Field | Required | Max Length | Description |
|
|
69
|
+
|-------|----------|------------|-------------|
|
|
70
|
+
| `name` | Yes | 64 chars | Lowercase letters, numbers, hyphens only |
|
|
71
|
+
| `description` | Yes | 1024 chars | What it does AND when to use it |
|
|
72
|
+
| `allowed-tools` | No | - | Tools Antigravity can use without asking |
|
|
73
|
+
| `model` | No | - | Specific model to use |
|
|
74
|
+
|
|
75
|
+
### Naming Conventions
|
|
76
|
+
|
|
77
|
+
Use **gerund form** (verb + -ing) for skill names:
|
|
78
|
+
|
|
79
|
+
- `processing-pdfs`
|
|
80
|
+
- `analyzing-spreadsheets`
|
|
81
|
+
- `generating-commit-messages`
|
|
82
|
+
- `reviewing-code`
|
|
83
|
+
|
|
84
|
+
Avoid: `helper`, `utils`, `tools`, `antigravity-*`, `agent-*`
|
|
85
|
+
|
|
86
|
+
### Body Structure
|
|
87
|
+
|
|
88
|
+
Use standard markdown headings:
|
|
89
|
+
|
|
90
|
+
```markdown
|
|
91
|
+
# Skill Name
|
|
92
|
+
|
|
93
|
+
## Quick Start
|
|
94
|
+
Fastest path to value...
|
|
95
|
+
|
|
96
|
+
## Instructions
|
|
97
|
+
Core guidance Antigravity follows...
|
|
98
|
+
|
|
99
|
+
## Examples
|
|
100
|
+
Input/output pairs showing expected behavior...
|
|
101
|
+
|
|
102
|
+
## Advanced Features
|
|
103
|
+
Additional capabilities (link to reference files)...
|
|
104
|
+
|
|
105
|
+
## Guidelines
|
|
106
|
+
Rules and constraints...
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## What Would You Like To Do?
|
|
110
|
+
|
|
111
|
+
1. **Create new skill** - Build from scratch
|
|
112
|
+
2. **Audit existing skill** - Check against best practices
|
|
113
|
+
3. **Add component** - Add workflow/reference/example
|
|
114
|
+
4. **Get guidance** - Understand skill design
|
|
115
|
+
|
|
116
|
+
## Creating a New Skill
|
|
117
|
+
|
|
118
|
+
### Step 1: Choose Type
|
|
119
|
+
|
|
120
|
+
**Simple skill (single file):**
|
|
121
|
+
- Under 500 lines
|
|
122
|
+
- Self-contained guidance
|
|
123
|
+
- No complex workflows
|
|
124
|
+
|
|
125
|
+
**Progressive disclosure skill (multiple files):**
|
|
126
|
+
- SKILL.md as overview
|
|
127
|
+
- Reference files for detailed docs
|
|
128
|
+
- Scripts for utilities
|
|
129
|
+
|
|
130
|
+
### Step 2: Create SKILL.md
|
|
131
|
+
|
|
132
|
+
```markdown
|
|
133
|
+
---
|
|
134
|
+
name: your-skill-name
|
|
135
|
+
description: [What it does]. Use when [trigger conditions].
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
# Your Skill Name
|
|
139
|
+
|
|
140
|
+
## Quick Start
|
|
141
|
+
|
|
142
|
+
[Immediate actionable example]
|
|
143
|
+
|
|
144
|
+
```[language]
|
|
145
|
+
[Code example]
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## Instructions
|
|
149
|
+
|
|
150
|
+
[Core guidance]
|
|
151
|
+
|
|
152
|
+
## Examples
|
|
153
|
+
|
|
154
|
+
**Example 1:**
|
|
155
|
+
Input: [description]
|
|
156
|
+
Output:
|
|
157
|
+
```
|
|
158
|
+
[result]
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
## Guidelines
|
|
162
|
+
|
|
163
|
+
- [Constraint 1]
|
|
164
|
+
- [Constraint 2]
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### Step 3: Add Reference Files (If Needed)
|
|
168
|
+
|
|
169
|
+
Link from SKILL.md to detailed content:
|
|
170
|
+
|
|
171
|
+
```markdown
|
|
172
|
+
For API reference, see [REFERENCE.md](REFERENCE.md).
|
|
173
|
+
For form filling guide, see [FORMS.md](FORMS.md).
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
Keep references **one level deep** from SKILL.md.
|
|
177
|
+
|
|
178
|
+
### Step 4: Add Scripts (If Needed)
|
|
179
|
+
|
|
180
|
+
Scripts execute without loading into context:
|
|
181
|
+
|
|
182
|
+
```markdown
|
|
183
|
+
## Utility Scripts
|
|
184
|
+
|
|
185
|
+
Extract fields:
|
|
186
|
+
```bash
|
|
187
|
+
python scripts/analyze.py input.pdf > fields.json
|
|
188
|
+
```
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### Step 5: Test With Real Usage
|
|
192
|
+
|
|
193
|
+
1. Test with actual tasks, not test scenarios
|
|
194
|
+
2. Observe where Antigravity struggles
|
|
195
|
+
3. Refine based on real behavior
|
|
196
|
+
4. Test with Haiku, Sonnet, and Opus
|
|
197
|
+
|
|
198
|
+
## Auditing Existing Skills
|
|
199
|
+
|
|
200
|
+
Check against this rubric:
|
|
201
|
+
|
|
202
|
+
- [ ] Valid YAML frontmatter (name + description)
|
|
203
|
+
- [ ] Description includes trigger keywords
|
|
204
|
+
- [ ] Uses standard markdown headings (not XML tags)
|
|
205
|
+
- [ ] SKILL.md under 500 lines
|
|
206
|
+
- [ ] References one level deep
|
|
207
|
+
- [ ] Examples are concrete, not abstract
|
|
208
|
+
- [ ] Consistent terminology
|
|
209
|
+
- [ ] No time-sensitive information
|
|
210
|
+
- [ ] Scripts handle errors explicitly
|
|
211
|
+
|
|
212
|
+
## Common Patterns
|
|
213
|
+
|
|
214
|
+
### Template Pattern
|
|
215
|
+
|
|
216
|
+
Provide output templates for consistent results:
|
|
217
|
+
|
|
218
|
+
```markdown
|
|
219
|
+
## Report Template
|
|
220
|
+
|
|
221
|
+
```markdown
|
|
222
|
+
# [Analysis Title]
|
|
223
|
+
|
|
224
|
+
## Executive Summary
|
|
225
|
+
[One paragraph overview]
|
|
226
|
+
|
|
227
|
+
## Key Findings
|
|
228
|
+
- Finding 1
|
|
229
|
+
- Finding 2
|
|
230
|
+
|
|
231
|
+
## Recommendations
|
|
232
|
+
1. [Action item]
|
|
233
|
+
2. [Action item]
|
|
234
|
+
```
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
### Workflow Pattern
|
|
238
|
+
|
|
239
|
+
For complex multi-step tasks:
|
|
240
|
+
|
|
241
|
+
```markdown
|
|
242
|
+
## Migration Workflow
|
|
243
|
+
|
|
244
|
+
Copy this checklist:
|
|
245
|
+
|
|
246
|
+
```
|
|
247
|
+
- [ ] Step 1: Backup database
|
|
248
|
+
- [ ] Step 2: Run migration script
|
|
249
|
+
- [ ] Step 3: Validate output
|
|
250
|
+
- [ ] Step 4: Update configuration
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
**Step 1: Backup database**
|
|
254
|
+
Run: `./scripts/backup.sh`
|
|
255
|
+
...
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
### Conditional Pattern
|
|
259
|
+
|
|
260
|
+
Guide through decision points:
|
|
261
|
+
|
|
262
|
+
```markdown
|
|
263
|
+
## Choose Your Approach
|
|
264
|
+
|
|
265
|
+
**Creating new content?** Follow "Creation workflow" below.
|
|
266
|
+
**Editing existing?** Follow "Editing workflow" below.
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
## Anti-Patterns to Avoid
|
|
270
|
+
|
|
271
|
+
- **XML tags in body** - Use markdown headings instead
|
|
272
|
+
- **Vague descriptions** - Be specific with trigger keywords
|
|
273
|
+
- **Deep nesting** - Keep references one level from SKILL.md
|
|
274
|
+
- **Too many options** - Provide a default with escape hatch
|
|
275
|
+
- **Windows paths** - Always use forward slashes
|
|
276
|
+
- **Punting to Antigravity** - Scripts should handle errors
|
|
277
|
+
- **Time-sensitive info** - Use "old patterns" section instead
|
|
278
|
+
|
|
279
|
+
## Reference Files
|
|
280
|
+
|
|
281
|
+
For detailed guidance, see:
|
|
282
|
+
|
|
283
|
+
- [official-spec.md](references/official-spec.md) - Antigravity's official skill specification
|
|
284
|
+
- [best-practices.md](references/best-practices.md) - Skill authoring best practices
|
|
285
|
+
|
|
286
|
+
## Success Criteria
|
|
287
|
+
|
|
288
|
+
A well-structured skill:
|
|
289
|
+
- Has valid YAML frontmatter with descriptive name and description
|
|
290
|
+
- Uses standard markdown headings (not XML tags)
|
|
291
|
+
- Keeps SKILL.md under 500 lines
|
|
292
|
+
- Links to reference files for detailed content
|
|
293
|
+
- Includes concrete examples with input/output pairs
|
|
294
|
+
- Has been tested with real usage
|
|
295
|
+
|
|
296
|
+
Sources:
|
|
297
|
+
- [Agent Skills - Antigravity Docs](https://code.agent.com/docs/en/skills)
|
|
298
|
+
- [Skill authoring best practices](https://platform.agent.com/docs/en/agents-and-tools/agent-skills/best-practices)
|
|
299
|
+
- [GitHub - anthropics/skills](https://github.com/anthropics/skills)
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
<overview>
|
|
2
|
+
When building skills that make API calls requiring credentials (API keys, tokens, secrets), follow this protocol to prevent credentials from appearing in chat.
|
|
3
|
+
</overview>
|
|
4
|
+
|
|
5
|
+
<the_problem>
|
|
6
|
+
Raw curl commands with environment variables expose credentials:
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
# ❌ BAD - API key visible in chat
|
|
10
|
+
curl -H "Authorization: Bearer $API_KEY" https://api.example.com/data
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
When Antigravity executes this, the full command with expanded `$API_KEY` appears in the conversation.
|
|
14
|
+
</the_problem>
|
|
15
|
+
|
|
16
|
+
<the_solution>
|
|
17
|
+
Use `~/.antigravity/scripts/secure-api.sh` - a wrapper that loads credentials internally.
|
|
18
|
+
|
|
19
|
+
<for_supported_services>
|
|
20
|
+
```bash
|
|
21
|
+
# ✅ GOOD - No credentials visible
|
|
22
|
+
~/.antigravity/scripts/secure-api.sh <service> <operation> [args]
|
|
23
|
+
|
|
24
|
+
# Examples:
|
|
25
|
+
~/.antigravity/scripts/secure-api.sh facebook list-campaigns
|
|
26
|
+
~/.antigravity/scripts/secure-api.sh ghl search-contact "email@example.com"
|
|
27
|
+
```
|
|
28
|
+
</for_supported_services>
|
|
29
|
+
|
|
30
|
+
<adding_new_services>
|
|
31
|
+
When building a new skill that requires API calls:
|
|
32
|
+
|
|
33
|
+
1. **Add operations to the wrapper** (`~/.antigravity/scripts/secure-api.sh`):
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
case "$SERVICE" in
|
|
37
|
+
yourservice)
|
|
38
|
+
case "$OPERATION" in
|
|
39
|
+
list-items)
|
|
40
|
+
curl -s -G \
|
|
41
|
+
-H "Authorization: Bearer $YOUR_API_KEY" \
|
|
42
|
+
"https://api.yourservice.com/items"
|
|
43
|
+
;;
|
|
44
|
+
get-item)
|
|
45
|
+
ITEM_ID=$1
|
|
46
|
+
curl -s -G \
|
|
47
|
+
-H "Authorization: Bearer $YOUR_API_KEY" \
|
|
48
|
+
"https://api.yourservice.com/items/$ITEM_ID"
|
|
49
|
+
;;
|
|
50
|
+
*)
|
|
51
|
+
echo "Unknown operation: $OPERATION" >&2
|
|
52
|
+
exit 1
|
|
53
|
+
;;
|
|
54
|
+
esac
|
|
55
|
+
;;
|
|
56
|
+
esac
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
2. **Add profile support to the wrapper** (if service needs multiple accounts):
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
# In secure-api.sh, add to profile remapping section:
|
|
63
|
+
yourservice)
|
|
64
|
+
SERVICE_UPPER="YOURSERVICE"
|
|
65
|
+
YOURSERVICE_API_KEY=$(eval echo \$${SERVICE_UPPER}_${PROFILE_UPPER}_API_KEY)
|
|
66
|
+
YOURSERVICE_ACCOUNT_ID=$(eval echo \$${SERVICE_UPPER}_${PROFILE_UPPER}_ACCOUNT_ID)
|
|
67
|
+
;;
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
3. **Add credential placeholders to `~/.antigravity/.env`** using profile naming:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
# Check if entries already exist
|
|
74
|
+
grep -q "YOURSERVICE_MAIN_API_KEY=" ~/.antigravity/.env 2>/dev/null || \
|
|
75
|
+
echo -e "\n# Your Service - Main profile\nYOURSERVICE_MAIN_API_KEY=\nYOURSERVICE_MAIN_ACCOUNT_ID=" >> ~/.antigravity/.env
|
|
76
|
+
|
|
77
|
+
echo "Added credential placeholders to ~/.antigravity/.env - user needs to fill them in"
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
4. **Document profile workflow in your SKILL.md**:
|
|
81
|
+
|
|
82
|
+
```markdown
|
|
83
|
+
## Profile Selection Workflow
|
|
84
|
+
|
|
85
|
+
**CRITICAL:** Always use profile selection to prevent using wrong account credentials.
|
|
86
|
+
|
|
87
|
+
### When user requests YourService operation:
|
|
88
|
+
|
|
89
|
+
1. **Check for saved profile:**
|
|
90
|
+
```bash
|
|
91
|
+
~/.antigravity/scripts/profile-state get yourservice
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
2. **If no profile saved, discover available profiles:**
|
|
95
|
+
```bash
|
|
96
|
+
~/.antigravity/scripts/list-profiles yourservice
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
3. **If only ONE profile:** Use it automatically and announce:
|
|
100
|
+
```
|
|
101
|
+
"Using YourService profile 'main' to list items..."
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
4. **If MULTIPLE profiles:** Ask user which one:
|
|
105
|
+
```
|
|
106
|
+
"Which YourService profile: main, clienta, or clientb?"
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
5. **Save user's selection:**
|
|
110
|
+
```bash
|
|
111
|
+
~/.antigravity/scripts/profile-state set yourservice <selected_profile>
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
6. **Always announce which profile before calling API:**
|
|
115
|
+
```
|
|
116
|
+
"Using YourService profile 'main' to list items..."
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
7. **Make API call with profile:**
|
|
120
|
+
```bash
|
|
121
|
+
~/.antigravity/scripts/secure-api.sh yourservice:<profile> list-items
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Secure API Calls
|
|
125
|
+
|
|
126
|
+
All API calls use profile syntax:
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
~/.antigravity/scripts/secure-api.sh yourservice:<profile> <operation> [args]
|
|
130
|
+
|
|
131
|
+
# Examples:
|
|
132
|
+
~/.antigravity/scripts/secure-api.sh yourservice:main list-items
|
|
133
|
+
~/.antigravity/scripts/secure-api.sh yourservice:main get-item <ITEM_ID>
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
**Profile persists for session:** Once selected, use same profile for subsequent operations unless user explicitly changes it.
|
|
137
|
+
```
|
|
138
|
+
</adding_new_services>
|
|
139
|
+
</the_solution>
|
|
140
|
+
|
|
141
|
+
<pattern_guidelines>
|
|
142
|
+
<simple_get_requests>
|
|
143
|
+
```bash
|
|
144
|
+
curl -s -G \
|
|
145
|
+
-H "Authorization: Bearer $API_KEY" \
|
|
146
|
+
"https://api.example.com/endpoint"
|
|
147
|
+
```
|
|
148
|
+
</simple_get_requests>
|
|
149
|
+
|
|
150
|
+
<post_with_json_body>
|
|
151
|
+
```bash
|
|
152
|
+
ITEM_ID=$1
|
|
153
|
+
curl -s -X POST \
|
|
154
|
+
-H "Authorization: Bearer $API_KEY" \
|
|
155
|
+
-H "Content-Type: application/json" \
|
|
156
|
+
-d @- \
|
|
157
|
+
"https://api.example.com/items/$ITEM_ID"
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Usage:
|
|
161
|
+
```bash
|
|
162
|
+
echo '{"name":"value"}' | ~/.antigravity/scripts/secure-api.sh service create-item
|
|
163
|
+
```
|
|
164
|
+
</post_with_json_body>
|
|
165
|
+
|
|
166
|
+
<post_with_form_data>
|
|
167
|
+
```bash
|
|
168
|
+
curl -s -X POST \
|
|
169
|
+
-F "field1=value1" \
|
|
170
|
+
-F "field2=value2" \
|
|
171
|
+
-F "access_token=$API_TOKEN" \
|
|
172
|
+
"https://api.example.com/endpoint"
|
|
173
|
+
```
|
|
174
|
+
</post_with_form_data>
|
|
175
|
+
</pattern_guidelines>
|
|
176
|
+
|
|
177
|
+
<credential_storage>
|
|
178
|
+
**Location:** `~/.antigravity/.env` (global for all skills, accessible from any directory)
|
|
179
|
+
|
|
180
|
+
**Format:**
|
|
181
|
+
```bash
|
|
182
|
+
# Service credentials
|
|
183
|
+
SERVICE_API_KEY=your-key-here
|
|
184
|
+
SERVICE_ACCOUNT_ID=account-id-here
|
|
185
|
+
|
|
186
|
+
# Another service
|
|
187
|
+
OTHER_API_TOKEN=token-here
|
|
188
|
+
OTHER_BASE_URL=https://api.other.com
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
**Loading in script:**
|
|
192
|
+
```bash
|
|
193
|
+
set -a
|
|
194
|
+
source ~/.antigravity/.env 2>/dev/null || { echo "Error: ~/.antigravity/.env not found" >&2; exit 1; }
|
|
195
|
+
set +a
|
|
196
|
+
```
|
|
197
|
+
</credential_storage>
|
|
198
|
+
|
|
199
|
+
<best_practices>
|
|
200
|
+
1. **Never use raw curl with `$VARIABLE` in skill examples** - always use the wrapper
|
|
201
|
+
2. **Add all operations to the wrapper** - don't make users figure out curl syntax
|
|
202
|
+
3. **Auto-create credential placeholders** - add empty fields to `~/.antigravity/.env` immediately when creating the skill
|
|
203
|
+
4. **Keep credentials in `~/.antigravity/.env`** - one central location, works everywhere
|
|
204
|
+
5. **Document each operation** - show examples in SKILL.md
|
|
205
|
+
6. **Handle errors gracefully** - check for missing env vars, show helpful error messages
|
|
206
|
+
</best_practices>
|
|
207
|
+
|
|
208
|
+
<testing>
|
|
209
|
+
Test the wrapper without exposing credentials:
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
# This command appears in chat
|
|
213
|
+
~/.antigravity/scripts/secure-api.sh facebook list-campaigns
|
|
214
|
+
|
|
215
|
+
# But API keys never appear - they're loaded inside the script
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
Verify credentials are loaded:
|
|
219
|
+
```bash
|
|
220
|
+
# Check .env exists
|
|
221
|
+
ls -la ~/.antigravity/.env
|
|
222
|
+
|
|
223
|
+
# Check specific variables (without showing values)
|
|
224
|
+
grep -q "YOUR_API_KEY=" ~/.antigravity/.env && echo "API key configured" || echo "API key missing"
|
|
225
|
+
```
|
|
226
|
+
</testing>
|