Skip to main content

Declarative setup CLI for FORCE Lab AI Agent Skills (reads skill-setup.yaml)

Project description

mcp2skill-setup

Declarative setup CLI for FORCE Lab AI Agent Skills.

Eliminates duplicate setup.py scripts across AI Agent Skills by providing a unified mcp2skill-setup setup <skill-dir> command that reads a skill-setup.yaml config file.

Installation

pip install mcp2skill-setup
# or use without installing:
uvx mcp2skill-setup setup <skill-dir>

Usage

# Initialize a skill (reads skill-dir/skill-setup.yaml)
uvx mcp2skill-setup setup ~/.claude/skills/hitl
uvx mcp2skill-setup setup ~/.claude/skills/tapd-story-intake

# List configured MCP bakes
uvx mcp2skill-setup list-bakes

skill-setup.yaml Format

Each skill directory contains a skill-setup.yaml that declaratively describes:

  • env: required environment variables and how to obtain them
  • bakes: mcp2cli baked connections to create
  • verify: post-setup verification steps

Env fetch strategies

Strategy Description
prompt Ask the user interactively
playwright Auto-extract via headless browser (requires npx)
ai-platform-config Auto-discover from Cursor / Claude Desktop MCP config

Example: hitl skill

name: hitl
env:
  - key: HITL_CHAT_ID
    fetch: prompt
    prompt: "请输入企微群 Chat ID(格式: wrkXXXXX)"
    required: true
bakes:
  - name: hitl
    type: stdio
    command: "npx -y hitl-mcp --service-url https://hitl.woa.com/api --chat-id {HITL_CHAT_ID} --timeout 3600"
    clear_proxy: true
verify:
  - bake: hitl
    expect_tool: send-and-wait-reply

Example: tapd-story-intake skill (Playwright auto-fetch + optional HITL)

name: tapd-story-intake
env:
  - key: TAPD_ACCESS_TOKEN
    fetch: playwright
    url: "https://tapd.woa.com/platform/myhome#tab=tab-mytoken"
    pattern: "[a-f0-9]{40}"
    fallback: prompt
    prompt: "无法自动获取,请手动粘贴 TAPD token"
  - key: HITL_CHAT_ID
    fetch: prompt
    prompt: "请输入企微群 Chat ID(可选,留空跳过)"
    required: false
bakes:
  - name: tapd
    type: http
    url: "https://mcpgw.knot.woa.com/tapd/"
    auth_header: "X-Tapd-Access-Token:env:TAPD_ACCESS_TOKEN"
    transport: streamable
  - name: hitl
    type: stdio
    command: "npx -y hitl-mcp --service-url https://hitl.woa.com/api --chat-id {HITL_CHAT_ID} --timeout 3600"
    clear_proxy: true
    skip_if_empty: [HITL_CHAT_ID]
verify:
  - bake: tapd
    expect_list: true

Example: mr-review skill (auto-discover gongfeng token)

name: mr-review
env:
  - key: GONGFENG_ACCESS_TOKEN
    fetch: ai-platform-config
    server_hint: gongfeng
    fallback: prompt
    prompt: "请输入工蜂 Access Token"
    derive:
      - key: GONGFENG_AUTH_HEADER
        value: "Bearer {value}"
bakes:
  - name: gongfeng
    type: http
    url: "https://mcpgw.knot.woa.com/gongfeng"
    auth_header: "Authorization:env:GONGFENG_AUTH_HEADER"
    transport: streamable
verify:
  - bake: gongfeng
    tool: get-current-user
    expect_field: username

Publishing

cd infra/mcp2skill
pip install hatch
hatch build && hatch publish   # requires PyPI token

Development

pip install -e "."
mcp2skill-setup --help
mcp2skill-setup setup path/to/skill

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp2skill_setup-0.1.0.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp2skill_setup-0.1.0-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file mcp2skill_setup-0.1.0.tar.gz.

File metadata

  • Download URL: mcp2skill_setup-0.1.0.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for mcp2skill_setup-0.1.0.tar.gz
Algorithm Hash digest
SHA256 32f0beaeff3cd76fb440b9ff6728f0e2b731854058617db4c3ff3803376df6eb
MD5 e36433a90e033e800f8d6215a055b28e
BLAKE2b-256 0f0830a9ec1f6ff9294d70e30fa8c99c7a570b9a19d801d8727e02308148e393

See more details on using hashes here.

File details

Details for the file mcp2skill_setup-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp2skill_setup-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8b5ad6002f2ca8a17ab414c295cf3eafb176cda358bdc67ea04c3119457436f9
MD5 8c48a838de34e4eb114e4638ab97d956
BLAKE2b-256 66be8afa1025cd4daf41c8eec71be60056cf48801600148b4fc1bfa84e6e8428

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page