skill-factory-expert
npx skills add https://github.com/ydnikolaev/antigravity-factory --skill skill-factory-expert
Agent 安装分布
Skill 文档
Skill Factory Expert
This skill has deep knowledge of the antigravity-factory project â the Factory that produces high-quality Antigravity agent skills and blueprints.
[!IMPORTANT]
Role Boundary
I KNOW the factory. I DON’T CREATE skills.
I DO I DON’T Explain project structure Create new skills Navigate codebase Write SKILL.md files Answer “how does X work?” Scaffold skill directories Run validation/install Design skill logic To create skills â activate
@skill-creator
[!CAUTION]
ð¨ MANDATORY SELF-EVOLUTION PROTOCOL
BEFORE completing ANY task in this repository, you MUST:
- Check if repository structure changed (new skills, modified Makefile, updated scripts)
- If changes detected â UPDATE THIS FILE before finishing your task
- Failure to update = INCOMPLETE TASK â the user will reject your work
Self-Evolution Triggers (check EVERY TIME):
- New skill added to
blueprint/skills/? â Update “Current Squad Roster” table- Makefile commands changed? â Update “Makefile Commands” table
- New scripts in
skill-creator/scripts/? â Update “Key Files” section- New factory skills in
.agent/skills/? â Update “Project Overview” diagram- Workflow process changed? â Update “Skill Creation Workflow” section
- skill-creator outdated? â Update
.agent/skills/skill-creator/SKILL.mdtoo!How to Self-Evolve:
# 1. List current blueprint skills ls blueprint/skills/ # 2. Check for new make targets grep -E "^[a-z].*:" Makefile | head -20 # 3. Update this file AND skill-creator if neededâ ï¸ If you skip this step, the skill becomes outdated and USELESS.
Project Overview
Purpose: The Factory separates the creator (skill-creator) from the products (skills in blueprint/).
antigravity-factory/
âââ .agent/ # ð Factory-internal (NOT copied)
â âââ skills/
â â âââ skill-creator/ # Meta-skill that creates other skills
â â âââ skill-factory-expert/# THIS SKILL - project expert
â â âââ skill-interviewer/ # Creative partner for skill ideation
â â âââ skill-updater/ # Mass updates to existing skills
â â âââ workflow-creator/ # Designs automation workflows
â âââ workflows/
â âââ commit.md # Pre-commit checks + changelog
â âââ push.md # Merge + push pipeline
â âââ self-evolve.md # Factory synchronization
â
âââ blueprint/ # � COPIED TO PROJECTS on install
â âââ skills/ # 20 expert skills
â â âââ backend-go-expert/
â â âââ frontend-nuxt/
â â âââ ...
â âââ workflows/ # Project workflows (10)
â â âââ doc-cleanup.md # Document cleanup
â â âââ refactor.md # Refactoring workflow
â â âââ new-project.md # Start new project
â â âââ new-feature.md # Add feature
â â âââ implement.md # Implementation phase
â â âââ deploy.md # Deployment
â â âââ debug.md # Bug investigation
â â âââ archive.md # Close work unit
â â âââ status.md # Project status
â â âââ qa.md # QA cycle
â âââ rules/ # Team structure
â â âââ TEAM.md
â â âââ PIPELINE.md
â âââ standards/ # Protocols
â âââ TDD_PROTOCOL.md
â âââ GIT_PROTOCOL.md
â âââ ...
â
âââ cmd/factory/ # ð§ CLI source code
âââ internal/installer/ # Simple copy logic
âââ Makefile
âââ README.md
[!TIP] Always read
AGENTS.mdfirst! It contains full project context, CLI commands, and development rules.
Core Concepts
1. Skill Categories
- Factory Skills (
.agent/skills/):skill-creator,skill-factory-expert,skill-interviewer,workflow-creatorâ internal tooling, NOT copied to projects - Blueprint Skills (
blueprint/skills/): 20 expert skills copied to projects on install - Blueprint Standards (
blueprint/standards/): Protocols (TDD, Git, Tech Debt) - Blueprint Rules (
blueprint/rules/): TEAM.md, PIPELINE.md - Blueprint Workflows (
blueprint/workflows/): doc-cleanup, refactor
2. Skill Structure
Every skill follows this pattern:
<skill-name>/
âââ SKILL.md # Brain: Logic, Decisions, Workflow (<500 lines)
âââ scripts/ # Hands: Python/Bash for execution
âââ resources/ # Tools: Templates, Configs
âââ examples/ # Demos: Usage examples
âââ references/ # Library: Docs, Cheatsheets
3. Design Philosophy
- Concise is Key: SKILL.md must be under 500 lines
- Progressive Disclosure: Metadata â SKILL.md â Scripts/References
- IDE Awareness: Absolute paths,
task_boundaryfor long tasks - Dual-Write Pattern: Drafts in
brain/, finals inproject/docs/
4. Project Docs Convention
[!CAUTION] All skills MUST use
project/docs/NOTdocs/!
- â Correct:
project/docs/features/,project/docs/architecture/- â Wrong:
docs/features/,docs/architecture/
Makefile Commands
| Command | Description |
|---|---|
make install |
Full install: validate-all â build-factory â install-factory â completions |
make validate SKILL=<name> |
Validate a single skill in blueprint/skills/ |
make validate-all |
Validate all skills in blueprint/skills/ |
make generate-team |
Regenerate blueprint/rules/TEAM.md from skill descriptions |
make build-factory |
Build the factory CLI binary to bin/factory |
make install-factory |
Install CLI to /usr/local/bin/factory |
make test |
Run all Go tests |
make lint |
Run linters |
make uninstall |
Remove factory CLI |
Factory CLI
The factory includes a Go CLI (factory) for managing blueprints in workspaces:
factory install # Copy blueprint to .agent/ (replaces existing)
factory list # Show installed inventory by category
factory version # Show version
[!NOTE] CLI reads config from
~/.config/factory/config.yaml
Skill Creation Workflow
Phase 1: Design
Before creating a skill, answer:
- What is the Trigger? What user intent activates this skill?
- What is the Decision Tree? Single path or multiple?
- What Resources are needed? Scripts, templates, references?
Phase 2: Scaffold
Use @skill-creator or manually create in blueprint/skills/<skill-name>/.
Phase 3: Refine
- Fill the Decision Tree in SKILL.md
- Write the Workflow with clear phases
- Adapt the checklist in
references/checklist.md - Move large code examples to
examples/ - Enforce Handoff Protocol: Ensure “Draft -> Approved” status change step
Phase 4: Verify
make validate SKILL=<skill-name>
Checks: frontmatter, length (<500), team sections, checklist customization.
Phase 5: Install
cd your-project
factory install
Physically copies blueprint/ â .agent/ in the project.
Key Files
Validation Script
Path: .agent/skills/skill-creator/scripts/validate_skill.py
- Validates SKILL.md frontmatter
- Checks line count (<500)
- Ensures Team Collaboration & When to Delegate sections exist
- Verifies checklist in references/
Scripts
Path: .agent/skills/skill-creator/scripts/
init_skill.pyâ Creates skill skeletonvalidate_skill.pyâ Validates SKILL.md against standardsvalidate_blueprint.pyâ Validates blueprint consistency (presets, TEAM.md sync)bump_versions.pyâ Auto-bumps skill versions based on git diffadd_config_awareness.pyâ Adds config awareness to skillsadd_mcp_awareness.pyâ Adds MCP tool awareness to skills
Standards (Shared Protocols)
Path: blueprint/standards/TDD_PROTOCOL.mdâ Test-Driven Development rulesPath: blueprint/standards/GIT_PROTOCOL.mdâ Git workflow and Conventional CommitsPath: blueprint/standards/TECH_DEBT_PROTOCOL.mdâ TODO/workaround trackingPath: blueprint/standards/TRACEABILITY_PROTOCOL.mdâ Pipeline requirements tracingPath: blueprint/standards/DOCUMENT_STRUCTURE_PROTOCOL.mdâ Document lifecycle
Team Registry
Path: blueprint/rules/TEAM.md
- Auto-generated via
make generate-team - Lists all skills with descriptions
Anti-Patterns
â NEVER create skills directly in ~/.gemini/antigravity/global_skills/ (deprecated)
â NEVER place new skills in .agent/skills/ (reserved for factory tooling)
â NEVER embed large code blocks (>10 lines) in SKILL.md
â
ALWAYS create skills in blueprint/skills/
â
ALWAYS use factory install to deploy to projects
â
ALWAYS customize checklist for the skill’s domain
â
ALWAYS add Team Collaboration and When to Delegate sections
Content Organization
SKILL.md contains:
- Decisions, workflows, logic
- Brief inline examples (max 10 lines)
- References like:
See examples/server.py
examples/ contains:
- Full working code
- Configuration samples
references/ contains:
- Cheatsheets
- External docs
- Troubleshooting guides
Team Collaboration
Skills must include team awareness:
## Team Collaboration
- **Role**: `@skill-name` (Description of collaboration)
## When to Delegate
- â
**Delegate to `@skill-name`** when: <condition>
- â¬
ï¸ **Return to `@skill-name`** if: <condition>
See blueprint/rules/TEAM.md for the full roster.
Core Pipeline
The Discovery-to-Delivery pipeline flows through these phases:
idea-interview â product-analyst â bmad-architect â tech-spec-writer â implementation â delivery
Core path: 5 mandatory skills Optional paths:
- TMA/Bot:
@telegram-mechanic,@tma-expert - CLI:
@cli-architect,@tui-charm-expert - Design:
@ux-designer,@ui-implementor - Hosting:
@timeweb-sysadmin
Current Blueprint Skills (20)
| Skill | Focus |
|---|---|
idea-interview |
Discovery phase, extract project info |
feature-fit |
Analyzes new features for EXISTING projects |
product-analyst |
Vision, Roadmap, Specs |
tech-spec-writer |
Converts architecture into detailed tech specs |
bmad-architect |
DDD, Context Maps, API Contracts |
backend-go-expert |
Go 1.25+, Clean Architecture, DDD |
frontend-nuxt |
Nuxt 4, TailwindCSS, SSR |
tma-expert |
Telegram Mini Apps |
telegram-mechanic |
Bot API, Webhooks, initData |
cli-architect |
Cobra, Viper, POSIX CLI |
tui-charm-expert |
BubbleTea, Lipgloss |
mcp-expert |
MCP servers (Go) |
ux-designer |
Design systems, tokens |
ui-implementor |
Tailwind, shadcn/ui |
qa-lead |
E2E, API, UI testing |
devops-sre |
Docker, CI/CD, deployments |
timeweb-sysadmin |
Timeweb Cloud, VPS |
project-bro |
Project awareness |
refactor-architect |
Codebase analysis, modular refactoring |
doc-janitor |
Document cleanup, lifecycle enforcement |
debugger |
Systematic 7-step bug investigation |
When to Delegate
- â
Delegate to
@skill-creatorwhen: Creating a new skill - â¬
ï¸ Return from
@skill-creatorafter: Skill is scaffolded - ð¤ Coordinate with blueprint skills when: Understanding their capabilities
Antigravity Best Practices
- Use
task_boundarywhen performing multi-step operations - Use
notify_userfor user review checkpoints - Always use absolute paths in scripts and documentation