重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
update-graft-inventory by autumnsgrove/groveengine
npx skills add https://github.com/autumnsgrove/groveengine --skill update-graft-inventory在以下情况下激活此技能:
| 文件 | 用途 |
|---|---|
.github/graft-inventory.json | graft 数量和元数据的唯一真实来源 |
libs/engine/migrations/*.sql | 定义 grafts 的迁移文件 |
libs/engine/src/lib/feature-flags/grafts.ts | 类型定义 (KnownGraftId) |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
docs/guides/adding-grafts-and-flags.md| 开发者指南 |
清单使用完整的元数据跟踪 grafts:
{
"grafts": {
"total": 10,
"breakdown": {
"platform": 8,
"greenhouse": 2
},
"byType": {
"boolean": 9,
"number": 1
}
},
"flags": [
{
"id": "fireside_mode",
"name": "Fireside Mode",
"type": "boolean",
"greenhouseOnly": true,
"migration": "040_fireside_scribe_grafts.sql",
"description": "AI-assisted writing prompts"
}
]
}
# 从迁移的 INSERT 语句中提取所有标志 ID
grep -hoP "INSERT OR IGNORE INTO feature_flags.*?VALUES\s*\(\s*'\K[a-z_]+" libs/engine/migrations/*.sql | sort -u
# 从生产数据库获取实际的标志
npx wrangler d1 execute grove-engine-db --remote --command="SELECT id, name, flag_type, greenhouse_only, enabled FROM feature_flags ORDER BY id;"
# 读取当前清单
cat .github/graft-inventory.json | jq '.flags[].id' | sort
查找以下情况:
编辑 .github/graft-inventory.json:
更新计数:
"grafts": {
"total": <new count>,
"breakdown": {
"platform": <non-greenhouse count>,
"greenhouse": <greenhouse_only count>
}
}
添加/移除标志条目:
"flags": [
{
"id": "new_flag_id",
"name": "Human Readable Name",
"type": "boolean",
"greenhouseOnly": false,
"migration": "XXX_migration_name.sql",
"description": "What this flag controls"
}
]
更新元数据:
"lastUpdated": "YYYY-MM-DD",
"lastAuditedBy": "claude/<context>"
编辑 libs/engine/src/lib/feature-flags/grafts.ts:
export type KnownGraftId =
| "fireside_mode"
| "scribe_mode"
| "meadow_access"
| "jxl_encoding"
| "jxl_kill_switch"
| "new_flag_id"; // 添加新标志
git add .github/graft-inventory.json libs/engine/src/lib/feature-flags/grafts.ts
git commit -m "docs: update graft inventory
- Add <flag_id> to inventory
- Update total: X -> Y
- Update KnownGraftId type"
# 统计迁移文件中的 grafts 数量
grep -c "INSERT OR IGNORE INTO feature_flags" libs/engine/migrations/*.sql | awk -F: '{sum+=$2} END {print sum}'
# 列出所有标志 ID
grep -hoP "INSERT OR IGNORE INTO feature_flags.*?VALUES\s*\(\s*'\K[a-z_]+" libs/engine/migrations/*.sql | sort -u
# 统计仅限 greenhouse 的 grafts 数量
npx wrangler d1 execute grove-engine-db --remote --command="SELECT COUNT(*) FROM feature_flags WHERE greenhouse_only = 1;"
# 从生产环境获取完整的标志详情
npx wrangler d1 execute grove-engine-db --remote --command="SELECT * FROM feature_flags ORDER BY id;"
# 检查哪些迁移尚未应用
# 比较迁移文件中的标志 ID 与生产环境 D1 中的标志 ID
添加新 graft 时:
libs/engine/migrations/XXX_name.sqlnpx wrangler d1 execute grove-engine-db --remote --file=...grafts.ts 中将标志添加到 KnownGraftId 类型.github/graft-inventory.json 的 flags 数组中添加条目lastUpdated 和 lastAuditedBy更新后,验证生产环境是否匹配:
# 预期数量
jq '.grafts.total' .github/graft-inventory.json
# 生产环境中的实际数量
npx wrangler d1 execute grove-engine-db --remote --command="SELECT COUNT(*) as count FROM feature_flags;"
如果不匹配,可能需要应用迁移:
# 应用特定迁移
npx wrangler d1 execute grove-engine-db --remote --file=libs/engine/migrations/XXX_name.sql
.github/workflows/graft-inventory.yml 工作流:
libs/engine/migrations/*.sql 的 PR 上运行libs/engine/src/lib/feature-flags/** 的 PR 上运行当 CI 失败时,运行此技能来修复不匹配。
完成前请确认:
total 匹配flags 数组中都有对应条目KnownGraftId 类型包含所有标志 IDlastUpdated 日期是今天total = platform + greenhouse每周安装次数
50
仓库
GitHub Stars
2
首次出现
2026年2月5日
安全审计
安装于
codex50
gemini-cli50
opencode50
cline49
github-copilot49
kimi-cli49
Activate this skill when:
| File | Purpose |
|---|---|
.github/graft-inventory.json | Source of truth for graft counts and metadata |
libs/engine/migrations/*.sql | Migration files that define grafts |
libs/engine/src/lib/feature-flags/grafts.ts | Type definitions (KnownGraftId) |
docs/guides/adding-grafts-and-flags.md | Developer guide |
The inventory tracks grafts with full metadata:
{
"grafts": {
"total": 10,
"breakdown": {
"platform": 8,
"greenhouse": 2
},
"byType": {
"boolean": 9,
"number": 1
}
},
"flags": [
{
"id": "fireside_mode",
"name": "Fireside Mode",
"type": "boolean",
"greenhouseOnly": true,
"migration": "040_fireside_scribe_grafts.sql",
"description": "AI-assisted writing prompts"
}
]
}
# Extract all flag IDs from migration INSERT statements
grep -hoP "INSERT OR IGNORE INTO feature_flags.*?VALUES\s*\(\s*'\K[a-z_]+" libs/engine/migrations/*.sql | sort -u
# Get actual flags from production database
npx wrangler d1 execute grove-engine-db --remote --command="SELECT id, name, flag_type, greenhouse_only, enabled FROM feature_flags ORDER BY id;"
# Read current inventory
cat .github/graft-inventory.json | jq '.flags[].id' | sort
Look for:
Edit .github/graft-inventory.json:
Update counts :
"grafts": {
"total": <new count>,
"breakdown": {
"platform": <non-greenhouse count>,
"greenhouse": <greenhouse_only count>
}
}
Add/remove flag entries :
"flags": [
{
"id": "new_flag_id",
"name": "Human Readable Name",
"type": "boolean",
"greenhouseOnly": false,
"migration": "XXX_migration_name.sql",
"description": "What this flag controls"
}
]
Update metadata :
"lastUpdated": "YYYY-MM-DD",
"lastAuditedBy": "claude/<context>"
Edit libs/engine/src/lib/feature-flags/grafts.ts:
export type KnownGraftId =
| "fireside_mode"
| "scribe_mode"
| "meadow_access"
| "jxl_encoding"
| "jxl_kill_switch"
| "new_flag_id"; // Add new flag
git add .github/graft-inventory.json libs/engine/src/lib/feature-flags/grafts.ts
git commit -m "docs: update graft inventory
- Add <flag_id> to inventory
- Update total: X -> Y
- Update KnownGraftId type"
# Count grafts in migrations
grep -c "INSERT OR IGNORE INTO feature_flags" libs/engine/migrations/*.sql | awk -F: '{sum+=$2} END {print sum}'
# List all flag IDs
grep -hoP "INSERT OR IGNORE INTO feature_flags.*?VALUES\s*\(\s*'\K[a-z_]+" libs/engine/migrations/*.sql | sort -u
# Count greenhouse-only grafts
npx wrangler d1 execute grove-engine-db --remote --command="SELECT COUNT(*) FROM feature_flags WHERE greenhouse_only = 1;"
# Full flag details from production
npx wrangler d1 execute grove-engine-db --remote --command="SELECT * FROM feature_flags ORDER BY id;"
# Check which migrations haven't been applied
# Compare migration file flag IDs vs production D1 flag IDs
When adding a new graft:
libs/engine/migrations/XXX_name.sqlnpx wrangler d1 execute grove-engine-db --remote --file=...KnownGraftId type in grafts.ts.github/graft-inventory.json flags arraylastUpdated and lastAuditedByAfter updating, verify production matches:
# Expected count
jq '.grafts.total' .github/graft-inventory.json
# Actual count in production
npx wrangler d1 execute grove-engine-db --remote --command="SELECT COUNT(*) as count FROM feature_flags;"
If they don't match, migrations may need to be applied:
# Apply a specific migration
npx wrangler d1 execute grove-engine-db --remote --file=libs/engine/migrations/XXX_name.sql
The .github/workflows/graft-inventory.yml workflow:
libs/engine/migrations/*.sqllibs/engine/src/lib/feature-flags/**When CI fails, run this skill to fix the mismatch.
Before finishing:
totalflags arrayKnownGraftId type includes all flag IDslastUpdated date is todaytotal = platform + greenhouseWeekly Installs
50
Repository
GitHub Stars
2
First Seen
Feb 5, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
codex50
gemini-cli50
opencode50
cline49
github-copilot49
kimi-cli49
网站设计审查工具 - 自动检测并修复HTML/CSS/JS、React、Vue等框架的视觉与布局问题
9,300 周安装
UnoCSS 即时原子化 CSS 引擎:灵活可扩展,Tailwind CSS 超集,前端开发必备
9,300 周安装
网站性能优化指南:Lighthouse审计、核心Web指标与性能预算实践
9,300 周安装
.NET/C# 最佳实践指南:代码规范、设计模式、依赖注入与AI集成
9,400 周安装
VideoAgent AI视频生成器:文生视频/图生视频,支持7大模型一键制作短视频
9,300 周安装
Google Workspace CLI Keep 命令:管理 Google Keep 笔记和附件的命令行工具
9,800 周安装