Manifest Generator by daffy0208/ai-dev-standards
npx skills add https://github.com/daffy0208/ai-dev-standards --skill 'Manifest Generator'使用 Codex 从技能/MCP 描述中自动生成能力清单
使用 OpenAI Codex 分析现有技能、MCP、工具和组件,自动生成它们的能力清单。通过从描述和实现中推断先决条件、效果、领域和关系,来引导整个编排系统。
inputs:
skill_path: string # 技能目录路径(例如,SKILLS/rag-implementer)
resource_type: string # "skill" | "mcp" | "tool" | "component" | "integration"
description_file: string # 通常是 SKILL.md 或 README.md
implementation_file: string # 可选:用于验证的实际代码文件
output_path: string # 写入 manifest.yaml 的位置(默认:同一目录)
# 读取技能描述
DESCRIPTION=$(cat $skill_path/SKILL.md)
# 如果可用,读取实现
if [ -f "$skill_path/index.js" ]; then
IMPLEMENTATION=$(head -100 $skill_path/index.js)
fi
# 读取现有的注册表条目
REGISTRY_ENTRY=$(jq ".[] | select(.name==\"$skill_name\")" META/skill-registry.json)
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
codex exec "
分析这个 ${resource_type} 并生成一个能力清单。
描述:
${DESCRIPTION}
实现(如果可用):
${IMPLEMENTATION}
注册表条目:
${REGISTRY_ENTRY}
生成一个匹配此模式的 YAML 清单:
$(cat SCHEMAS/capability-manifest.schema.json)
推断以下内容:
1. 先决条件:必须存在哪些文件、依赖项或状态?
示例:
- file_exists('package.json')
- has_dependency('react')
- env_var_set('OPENAI_API_KEY')
- not file_exists('.vector-index')
2. 效果:这会创建/修改/删除什么?
示例:
- creates_vector_index
- adds_auth_middleware
- configures_database
- updates_tests
3. 领域:它涉及哪些技术领域?
示例:rag, auth, api, database, testing, nextjs, react
4. 兼容性:
- requires:必须先存在什么?
- conflicts_with:什么不能共存?
- composes_with:什么能很好地协同工作?
- enables:这解锁了什么?
5. 风险评估:
- cost: free/low/medium/high (API 调用,计算)
- latency: instant/fast/slow (执行时间)
- risk_level: safe/low/medium/high (副作用)
6. 成功信号:我们如何知道它成功了?
示例:
- 'tests pass'
- 'file exists: .vector-index'
- 'HTTP 200 from /api/search'
- 'can query vector database'
仅输出有效的 YAML。不要解释性文字。
"
# 根据模式验证生成的 YAML
npx ajv validate \
-s SCHEMAS/capability-manifest.schema.json \
-d /tmp/generated-manifest.yaml
# 写入输出位置
cp /tmp/generated-manifest.yaml $output_path
分析这个 ${kind} 并提取能力信息:
名称:${name}
描述:
${description}
${implementation ? "实现:\n" + implementation : ""}
生成一个能力清单,包含:
1. 先决条件(使用此功能必须满足什么条件?):
- 文件检查:file_exists('path'), not file_exists('path')
- 依赖检查:has_dependency('package-name')
- 环境变量检查:env_var_set('VAR_NAME')
- 状态检查:描述项目状态要求
2. 效果(它会产生什么变化?):
- 使用祈使动词:creates_, adds_, configures_, updates_, removes_
- 具体化:"creates_vector_index",而不是 "does vector stuff"
3. 领域(哪些技术领域?):
- 从以下选择:rag, auth, api, database, testing, nextjs, react, security, performance 等。
4. 兼容性:
- requires:[所需能力列表]
- conflicts_with:[不能共存的能力]
- composes_with:[能很好协同工作的能力]
- enables:[此功能解锁的能力]
5. 成本/延迟/风险:
- cost: free (无 API 调用), low (< $0.10), medium (< $1), high (> $1)
- latency: instant (< 1s), fast (< 10s), slow (> 10s)
- risk_level: safe (无副作用), low (幂等), medium (修改文件), high (不可逆更改)
6. 成功信号:什么确认它成功了?
输出为匹配 capability-manifest 模式的 YAML。
# SKILLS/rag-implementer/manifest.yaml
name: rag-implementer
kind: skill
description: 使用向量数据库和嵌入管道实现检索增强生成系统
preconditions:
- check: file_exists('package.json')
description: 具有 package.json 的 Node.js 项目
required: true
- check: not file_exists('.vector-index')
description: 向量数据库尚未配置
required: false
- check: env_var_set('OPENAI_API_KEY') or env_var_set('ANTHROPIC_API_KEY')
description: 用于嵌入的 LLM API 密钥
required: true
effects:
- creates_vector_index
- adds_embedding_pipeline
- configures_retrieval_api
- adds_rag_tests
domains:
- rag
- ai
- search
- embeddings
- api
cost: medium
latency: slow
risk_level: low
side_effects:
- modifies_files
- makes_api_calls
idempotent: false
success_signal: '向量索引已创建并可测试嵌入查询'
failure_signals:
- 'API 密钥无效'
- '向量数据库连接失败'
- '嵌入生成失败'
compatibility:
requires:
- openai-integration OR anthropic-integration
conflicts_with:
- existing-vector-database
composes_with:
- pinecone-mcp
- weaviate-mcp
- embedding-generator-mcp
enables:
- semantic-search
- document-qa
- knowledge-retrieval
observability:
logs:
- '嵌入 X 个文档'
- '向量索引已创建,维度为 Y'
- '检索查询:{query} 返回了 {count} 个结果'
metrics:
- embedding_count
- retrieval_latency_ms
- search_relevance_score
metadata:
version: '1.0.0'
created_at: '2025-10-28'
tags:
- rag
- vector-database
- embeddings
- semantic-search
examples:
- '为 Next.js 文档站点实现 RAG'
- '为现有 API 添加语义搜索'
- '构建文档问答系统'
运行此脚本为所有资源生成清单:
#!/bin/bash
# scripts/bootstrap-manifests.sh
echo "为所有技能生成清单..."
for skill_dir in SKILLS/*/; do
skill_name=$(basename "$skill_dir")
echo " 正在处理 $skill_name..."
# 使用 manifest-generator 技能
bash scripts/skills/manifest-generator.sh \
--path "$skill_dir" \
--type "skill" \
--description "$skill_dir/SKILL.md" \
--output "$skill_dir/manifest.yaml"
done
echo "\n为所有 MCP 生成清单..."
for mcp_dir in MCP-SERVERS/*/; do
mcp_name=$(basename "$mcp_dir")
echo " 正在处理 $mcp_name..."
bash scripts/skills/manifest-generator.sh \
--path "$mcp_dir" \
--type "mcp" \
--description "$mcp_dir/README.md" \
--implementation "$mcp_dir/index.js" \
--output "$mcp_dir/manifest.yaml"
done
echo "\n完成!生成了 $(find SKILLS MCP-SERVERS -name 'manifest.yaml' | wc -l) 个清单"
清单成为能力图中的节点。关系从兼容性字段推断。
规划器查询清单以找到匹配目标要求的能力。
验证器比较生成的清单与实际实现以发现差异。
每周安装次数
0
仓库
GitHub 星标数
18
首次出现
1970年1月1日
安全审计
Auto-generate capability manifests from skill/MCP descriptions using Codex
Uses OpenAI Codex to analyze existing skills, MCPs, tools, and components to automatically generate their capability manifests. This bootstraps the entire orchestration system by inferring preconditions, effects, domains, and relationships from descriptions and implementations.
inputs:
skill_path: string # Path to skill directory (e.g., SKILLS/rag-implementer)
resource_type: string # "skill" | "mcp" | "tool" | "component" | "integration"
description_file: string # Usually SKILL.md or README.md
implementation_file: string # Optional: actual code file for validation
output_path: string # Where to write manifest.yaml (default: same directory)
# Read skill description
DESCRIPTION=$(cat $skill_path/SKILL.md)
# Read implementation if available
if [ -f "$skill_path/index.js" ]; then
IMPLEMENTATION=$(head -100 $skill_path/index.js)
fi
# Read existing registry entry
REGISTRY_ENTRY=$(jq ".[] | select(.name==\"$skill_name\")" META/skill-registry.json)
codex exec "
Analyze this ${resource_type} and generate a capability manifest.
DESCRIPTION:
${DESCRIPTION}
IMPLEMENTATION (if available):
${IMPLEMENTATION}
REGISTRY ENTRY:
${REGISTRY_ENTRY}
Generate a YAML manifest matching this schema:
$(cat SCHEMAS/capability-manifest.schema.json)
Infer the following:
1. PRECONDITIONS: What files, dependencies, or state must exist?
Examples:
- file_exists('package.json')
- has_dependency('react')
- env_var_set('OPENAI_API_KEY')
- not file_exists('.vector-index')
2. EFFECTS: What does this create/modify/delete?
Examples:
- creates_vector_index
- adds_auth_middleware
- configures_database
- updates_tests
3. DOMAINS: What technical areas does it touch?
Examples: rag, auth, api, database, testing, nextjs, react
4. COMPATIBILITY:
- requires: What must exist first?
- conflicts_with: What can't coexist?
- composes_with: What works well together?
- enables: What does this unlock?
5. RISK ASSESSMENT:
- cost: free/low/medium/high (API calls, compute)
- latency: instant/fast/slow (execution time)
- risk_level: safe/low/medium/high (side effects)
6. SUCCESS SIGNAL: How do we know it worked?
Examples:
- 'tests pass'
- 'file exists: .vector-index'
- 'HTTP 200 from /api/search'
- 'can query vector database'
Output ONLY valid YAML. No explanatory text.
"
# Validate generated YAML against schema
npx ajv validate \
-s SCHEMAS/capability-manifest.schema.json \
-d /tmp/generated-manifest.yaml
# Write to output location
cp /tmp/generated-manifest.yaml $output_path
Analyze this ${kind} and extract capability information:
NAME: ${name}
DESCRIPTION:
${description}
${implementation ? "IMPLEMENTATION:\n" + implementation : ""}
Generate a capability manifest with:
1. PRECONDITIONS (what must be true to use this?):
- File checks: file_exists('path'), not file_exists('path')
- Dependency checks: has_dependency('package-name')
- Env checks: env_var_set('VAR_NAME')
- State checks: describe project state requirements
2. EFFECTS (what changes does it make?):
- Use imperative verbs: creates_, adds_, configures_, updates_, removes_
- Be specific: "creates_vector_index", not "does vector stuff"
3. DOMAINS (what technical areas?):
- Choose from: rag, auth, api, database, testing, nextjs, react, security, performance, etc.
4. COMPATIBILITY:
- requires: [list of required capabilities]
- conflicts_with: [capabilities that can't coexist]
- composes_with: [capabilities that work well together]
- enables: [capabilities this unlocks]
5. COST/LATENCY/RISK:
- cost: free (no API calls), low (< $0.10), medium (< $1), high (> $1)
- latency: instant (< 1s), fast (< 10s), slow (> 10s)
- risk_level: safe (no side effects), low (idempotent), medium (modifies files), high (irreversible changes)
6. SUCCESS_SIGNAL: What confirms it worked?
Output as YAML matching capability-manifest schema.
# SKILLS/rag-implementer/manifest.yaml
name: rag-implementer
kind: skill
description: Implement retrieval-augmented generation systems with vector databases and embedding pipelines
preconditions:
- check: file_exists('package.json')
description: Node.js project with package.json
required: true
- check: not file_exists('.vector-index')
description: Vector database not already configured
required: false
- check: env_var_set('OPENAI_API_KEY') or env_var_set('ANTHROPIC_API_KEY')
description: LLM API key for embeddings
required: true
effects:
- creates_vector_index
- adds_embedding_pipeline
- configures_retrieval_api
- adds_rag_tests
domains:
- rag
- ai
- search
- embeddings
- api
cost: medium
latency: slow
risk_level: low
side_effects:
- modifies_files
- makes_api_calls
idempotent: false
success_signal: 'Vector index created and queryable with test embeddings'
failure_signals:
- 'API key invalid'
- 'Vector database connection failed'
- 'Embedding generation failed'
compatibility:
requires:
- openai-integration OR anthropic-integration
conflicts_with:
- existing-vector-database
composes_with:
- pinecone-mcp
- weaviate-mcp
- embedding-generator-mcp
enables:
- semantic-search
- document-qa
- knowledge-retrieval
observability:
logs:
- 'Embedding X documents'
- 'Vector index created with Y dimensions'
- 'Retrieval query: {query} returned {count} results'
metrics:
- embedding_count
- retrieval_latency_ms
- search_relevance_score
metadata:
version: '1.0.0'
created_at: '2025-10-28'
tags:
- rag
- vector-database
- embeddings
- semantic-search
examples:
- 'Implement RAG for Next.js documentation site'
- 'Add semantic search to existing API'
- 'Build document Q&A system'
Run this to generate manifests for ALL resources:
#!/bin/bash
# scripts/bootstrap-manifests.sh
echo "Generating manifests for all skills..."
for skill_dir in SKILLS/*/; do
skill_name=$(basename "$skill_dir")
echo " Processing $skill_name..."
# Use manifest-generator skill
bash scripts/skills/manifest-generator.sh \
--path "$skill_dir" \
--type "skill" \
--description "$skill_dir/SKILL.md" \
--output "$skill_dir/manifest.yaml"
done
echo "\nGenerating manifests for all MCPs..."
for mcp_dir in MCP-SERVERS/*/; do
mcp_name=$(basename "$mcp_dir")
echo " Processing $mcp_name..."
bash scripts/skills/manifest-generator.sh \
--path "$mcp_dir" \
--type "mcp" \
--description "$mcp_dir/README.md" \
--implementation "$mcp_dir/index.js" \
--output "$mcp_dir/manifest.yaml"
done
echo "\nDone! Generated $(find SKILLS MCP-SERVERS -name 'manifest.yaml' | wc -l) manifests"
Manifests become nodes in the capability graph. Relationships inferred from compatibility fields.
Planner queries manifests to find capabilities matching goal requirements.
Validator compares generated manifest with actual implementation to find discrepancies.
Weekly Installs
0
Repository
GitHub Stars
18
First Seen
Jan 1, 1970
Security Audits
Azure RBAC 权限管理工具:查找最小角色、创建自定义角色与自动化分配
117,000 周安装