$npx -y skills add sabahattink/antigravity-fullstack-hq --skill skill-creatorHow to create new skills for this HQ — format, frontmatter, content structure. Use when you need to add a new skill to this repository, or when reviewing whether an existing skill is well-formed.
| 1 | # Skill Creator |
| 2 | |
| 3 | ## What is a Skill? |
| 4 | |
| 5 | A skill is a reference document that gives an AI agent (or a developer) deep, actionable knowledge for a specific domain. It is **not** a README, a tutorial, or a one-liner tip. It contains real patterns, real code, and clear guidance on what NOT to do. |
| 6 | |
| 7 | ## File Location |
| 8 | |
| 9 | ``` |
| 10 | skills/ |
| 11 | └── <skill-name>/ |
| 12 | └── SKILL.md |
| 13 | ``` |
| 14 | |
| 15 | Skill names are lowercase, hyphenated: `api-design-patterns`, `auth-patterns`, `docker-patterns`. |
| 16 | |
| 17 | ## Required Structure |
| 18 | |
| 19 | ```markdown |
| 20 | --- |
| 21 | name: skill-name |
| 22 | description: One-line description. Use when [specific trigger condition]. |
| 23 | --- |
| 24 | |
| 25 | # Title |
| 26 | |
| 27 | ## [Section 1] |
| 28 | [Content with real code examples] |
| 29 | |
| 30 | ## [Section 2] |
| 31 | ... |
| 32 | |
| 33 | ## Forbidden Patterns |
| 34 | [What NOT to do — these are as important as the positive guidance] |
| 35 | ``` |
| 36 | |
| 37 | ## Frontmatter Rules |
| 38 | |
| 39 | ```yaml |
| 40 | --- |
| 41 | name: skill-name # must match the directory name |
| 42 | description: > # one line: what it does + when to trigger |
| 43 | Generates Excel files with ExcelJS. Use when creating .xlsx exports |
| 44 | from database data in a NestJS app. |
| 45 | --- |
| 46 | ``` |
| 47 | |
| 48 | The `description` field is what an AI uses to decide whether to load this skill. Make the trigger condition specific: |
| 49 | |
| 50 | ``` |
| 51 | # Good — specific trigger |
| 52 | description: JWT access/refresh tokens, Passport.js strategies. Use when implementing auth in a NestJS + Next.js app. |
| 53 | |
| 54 | # Bad — too vague |
| 55 | description: Authentication patterns. Use when building auth. |
| 56 | ``` |
| 57 | |
| 58 | ## Content Rules |
| 59 | |
| 60 | ### 1. Real code, not pseudocode |
| 61 | Every code block must be runnable with the imports shown. Never use `...` to hide required setup. |
| 62 | |
| 63 | ```typescript |
| 64 | // Good — complete, runnable snippet |
| 65 | import { Injectable } from '@nestjs/common' |
| 66 | import { InjectRepository } from '@nestjs/typeorm' |
| 67 | import { Repository } from 'typeorm' |
| 68 | import { User } from './user.entity' |
| 69 | |
| 70 | @Injectable() |
| 71 | export class UsersRepository { |
| 72 | constructor( |
| 73 | @InjectRepository(User) |
| 74 | private readonly repo: Repository<User> |
| 75 | ) {} |
| 76 | |
| 77 | findById(id: number) { |
| 78 | return this.repo.findOne({ where: { id } }) |
| 79 | } |
| 80 | } |
| 81 | |
| 82 | // Bad — too abstract |
| 83 | class MyRepo { |
| 84 | // inject the repo here |
| 85 | findById(id) { ... } |
| 86 | } |
| 87 | ``` |
| 88 | |
| 89 | ### 2. Forbidden Patterns section is mandatory |
| 90 | The "Forbidden Patterns" section must be the last section. List 5-10 concrete things that cause real bugs, security issues, or maintenance problems. |
| 91 | |
| 92 | ```markdown |
| 93 | ## Forbidden Patterns |
| 94 | |
| 95 | - Never store access tokens in localStorage — XSS can steal them |
| 96 | - Never use the same JWT secret for access and refresh tokens |
| 97 | - Never skip `@IsEmail()` validation on email fields |
| 98 | ``` |
| 99 | |
| 100 | ### 3. Aim for 200-400 lines |
| 101 | - Under 200 lines: too shallow, not useful as a reference |
| 102 | - Over 400 lines: likely covering too many topics, should be split |
| 103 | |
| 104 | ### 4. One topic per skill |
| 105 | Don't mix unrelated concerns. If you're writing a `testing` skill, don't include deployment. If the topic is naturally broad, split it: |
| 106 | |
| 107 | ``` |
| 108 | # Too broad: |
| 109 | skills/backend/SKILL.md ← covers NestJS + TypeORM + auth + caching |
| 110 | |
| 111 | # Better: |
| 112 | skills/backend-dev-guidelines/SKILL.md ← NestJS layering |
| 113 | skills/auth-patterns/SKILL.md ← JWT + Passport |
| 114 | skills/docker-patterns/SKILL.md ← Containerization |
| 115 | ``` |
| 116 | |
| 117 | ## Section Patterns to Follow |
| 118 | |
| 119 | ### Command blocks for setup |
| 120 | ```bash |
| 121 | npm install exceljs |
| 122 | npm install -D @types/node |
| 123 | ``` |
| 124 | |
| 125 | ### Configuration files |
| 126 | Show actual config files, not fragments. |
| 127 | |
| 128 | ### Patterns with comparison (good vs bad) |
| 129 | ```typescript |
| 130 | // Bad: explanation of why it's bad |
| 131 | const bad = doWrongThing() |
| 132 | |
| 133 | // Good: explanation of why it's better |
| 134 | const good = doRightThing() |
| 135 | ``` |
| 136 | |
| 137 | ### Checklists for pre-flight checks |
| 138 | ``` |
| 139 | Production Deployment Checklist: |
| 140 | □ NODE_ENV=production set |
| 141 | □ Secrets validated at startup |
| 142 | □ Health checks responding |
| 143 | □ Rate limiting enabled |
| 144 | ``` |
| 145 | |
| 146 | ## Quality Checklist |
| 147 | |
| 148 | Before merging a new skill: |
| 149 | |
| 150 | ``` |
| 151 | □ Frontmatter has name + description |
| 152 | □ name matches directory name |
| 153 | □ Description includes "Use when [specific condition]" |
| 154 | □ Code examples are complete (have imports, no ellipsis hiding setup) |
| 155 | □ At least 3 major sections with real content |
| 156 | □ "Forbidden Patterns" section exists and has 5+ entries |
| 157 | □ 200-400 lines total |
| 158 | □ No tutorial prose — reference-style only |
| 159 | □ TypeScript/language specifics match the project stack |
| 160 | ``` |
| 161 | |
| 162 | ## Example: Creating a New Skill |
| 163 | |
| 164 | ```bash |
| 165 | # 1. Create the directory and file |
| 166 | mkdir skills/redis-patterns |
| 167 | touch skills/redis-patterns/SKILL.md |
| 168 | |
| 169 | # 2. Write the skill following the template above |
| 170 | |
| 171 | # 3. Commit |
| 172 | git add skills/redis-patterns/SKILL.md |
| 173 | git commit -m "feat: add redis-patterns skill" |
| 174 | ``` |
| 175 | |
| 176 | ## Forbidden Patterns |
| 177 | |
| 178 | - Never write a skill that's just a list of links — content must be here, not linked |
| 179 | - Never use placeholders like `[your code here]` — write the actual code |
| 180 | - Never mix two unrelated domains in one skill — split instead |
| 181 | - Never skip the "Forbidden Patterns" section — negative examples are the most |