Logo Setup Generate

Setup Generate

Cộng đồng
jmagly
setup-generate

Tạo tệp `setup.manifest.yaml` cho một dự án bằng `setup.aiwg.io/v1`

Add to TypingMind

Tổng quan

Nhà phát hànhjmagly
Kho mãaiwg
Tên kỹ năngsetup-generate
Sao
225
Bản fork
34
Tệp đi kèm
Chỉ có hướng dẫn
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được jmagly công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Setup Generate trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/jmagly/aiwg/tree/main/agentic/code/addons/agentic-installer/skills/setup-generate
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/jmagly/aiwg.git /tmp/aiwg
mkdir -p .claude/skills
cp -r /tmp/aiwg/agentic/code/addons/agentic-installer/skills/setup-generate .claude/skills/setup-generate
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Setup Generate trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Setup Generate ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Setup Generate với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

setup-generate

Generate a setup.manifest.yaml file for a project using the setup.aiwg.io/v1 SetupManifest language.

Trigger Phrases

  • "generate a setup manifest for [project]"
  • "create installer for [project]"
  • "scaffold setup manifest"
  • "write a setup.manifest.yaml for [directory]"
  • "generate install workflow for [project]"
  • "generate dev installer for [project]"

Parameters

project-dir (positional, optional)

Path to the project root. Defaults to ..

--output (optional)

Manifest path to create. Default: ./setup.manifest.yaml.

--name (optional)

Manifest metadata.name. Default: package name or project directory name.

--type (optional)

Install type: user, developer, or ci. Default: developer.

--platform (optional)

Target platform: linux, macos, windows, or docker.

--force (optional)

Overwrite existing generated manifest/script files.

--type (optional)

Install type to generate: user, developer, or ci. Default: user.

  • user — production/end-user deployment (default, behavior unchanged from previous versions)
  • developer — local development environment standup with OS configuration
  • ci — headless pipeline setup

When --type developer, output filename is setup.dev.manifest.yaml. When --type user, output is setup.user.manifest.yaml (or setup.manifest.yaml if no type is specified for backwards compatibility).

--interactive (optional)

Ask clarifying questions before generating.

Execution Flow

Phase 1: Discovery

  1. Read the project root to understand structure:
    • Check for package.json, requirements.txt, Cargo.toml, go.mod, Makefile, etc.
    • Check for README.md, INSTALL.md, docs/install.md
    • Check for existing setup.manifest.yaml
  2. Parse local project cues when they are available; the CLI entrypoint emits a conservative starter manifest and leaves richer project-specific authoring to the agent skill.
  3. If --interactive, ask:
    • What OSes must be supported?
    • What are the hard prerequisites (git, node, python version)?
    • Is there a config directory that needs to be created?
    • Does the project chain sub-projects?
Developer Install Discovery (when --type developer)

Additional discovery steps for developer manifests:

  1. Scan for dev-specific indicators: .nvmrc, .tool-versions, mise.toml, pyproject.toml [dev], Brewfile, .devcontainer/
  2. Detect Docker-in-dev usage patterns (bind mounts, live reload, --watch flags)
  3. If --interactive or key information is absent, ask mandatory interactive questions:
    • "What OS(es) do developers use? (linux/macos/windows)"
    • "Is there a local domain for HTTPS development? (e.g., myapp.local)"
    • "Do developers need GPU access for local dev? (yes/no)"
    • "Is SSH key setup required as a project prerequisite? (yes/no)"
    • "Which IDE(s) are standard? (vscode/jetbrains/none)"
    • "Any kernel/OS parameters required? (inotify watches, vm.max_map_count, etc.)"
    • "Does the project use a local certificate authority for HTTPS dev?"

Phase 2: Assemble Manifest

Build the manifest YAML following this priority order:

  1. metadata block — include install_type matching --type flag (default: developer)
  2. platform block — from --platform or detected by project type
  3. params block — standard params: INSTALL_DIR, BRANCH (default: main); add CONFIG_DIR if a config step is needed
  4. prerequisites block — from project type (e.g., node for npm projects, python3 for Python)
  5. steps block — construct from script templates:
    • Always start with a clone or verify-existing detect step
    • Add install-deps-* steps for each target platform
    • Add configure step if config files are needed
    • End with a verify step
  6. recovery_procedures block — always include a full-reset fallback
Developer Manifest Assembly Rules (when --type developer)

When assembling developer manifests, apply these additional rules:

os_config block — emit entries based on detection:

ConditionEntry
Linux + Docker in projectdocker-group (requires_relogin: true)
Linux + file watchers detected (webpack/jest/vite/nodemon)inotify-watches
Linux + Elasticsearch/Weaviate/OpenSearch detectedvm-mapcount
macOSxcode-cli-tools (interactive: true)
HTTPS dev + local domainmkcert install step (not os_config, but a script step)
GPU devnvidia-container-toolkit os_config entry

params — emit with interactive_required: true for:

  • LOCAL_DOMAIN — when HTTPS dev or local domain detected
  • SSH_EMAIL — when SSH key setup is required
  • GIT_USER_NAME, GIT_USER_EMAIL — when git config step is included
  • GIT_GPG_KEY_ID — when GPG signing is requested
  • IDE — when IDE-specific extension installation is included

steps — emit os-config steps for each os_config entry:

yaml
- id: apply-docker-group
  type: os-config
  config_id: docker-group
  depends_on: [install-docker]
  platform: linux

dev-specific prerequisites — add as detected:

  • nvm or mise — when .nvmrc or .tool-versions found
  • mkcert — when HTTPS dev requested
  • act — when GitHub Actions local testing detected

Docker-based Project Detection

When docker-compose.yml or compose.yaml is found during Phase 1 discovery, apply these additional behaviors:

Platform (#676):

  • Include macos in the platform block alongside linux — Docker Desktop covers both.
  • Any GPU or nvidia steps must add when: "$(uname -s) = Linux" so they are skipped on macOS.
  • Update install_hint for docker prereqs to include macOS install links.

Prerequisites (#672, #674):

  • Replace command -v docker with docker version --format '{{.Server.Version}}' 2>/dev/null to catch both "not installed" and "installed but no permission" cases.
  • Expand the docker install_hint to mention sudo usermod -aG docker $USER.
  • When Docker images or ML models are present, add disk space prereq (≥20GB free):
    yaml
    - name: disk-space
      detect: "df --output=avail -BG / | tail -1 | tr -d ' G'"
      version_min: "20"
      install_hint: "At least 20GB free disk space required for Docker images."
  • When ML models are detected (Ollama, HuggingFace, etc.), add RAM prereq (≥8GB):
    yaml
    - name: ram
      detect: "awk '/MemTotal/ {printf \"%.0f\", $2/1024/1024}' /proc/meminfo"
      version_min: "8"
      install_hint: "At least 8GB RAM recommended. 16GB+ for GPU profiles."

Params (#671, #675):

  • When a DOMAIN or ISSUER_URL param is emitted, also emit a PROTOCOL param with a smart default:
    yaml
    - name: PROTOCOL
      type: choice
      choices: [http, https]
      default: "$(echo ${DOMAIN} | grep -qE '^(localhost|127\\.0\\.0\\.1)' && echo http || echo https)"
      description: "Protocol for OAuth/API URLs. Defaults to http for localhost."
    Then reference ${PROTOCOL}://${DOMAIN} in configure.sh instead of hardcoding https://.
  • Default DATA_DIR to ${INSTALL_DIR}/data (project-local, user-writable) rather than any system path like /var/lib/<project>. If the project explicitly requires a system path, emit a check-data-dir step (see steps below).

Steps (#673, #675, #677):

  • Emit a check-ports step before deploy that validates all ports declared in the compose file are free:
    yaml
    - id: check-ports
      type: script
      script: installer/scripts/check-ports.sh
      depends_on: [configure]
  • When the default DATA_DIR is a system path, emit a check-data-dir step before configure:
    yaml
    - id: check-data-dir
      type: script
      script: installer/scripts/check-data-dir.sh
      depends_on: [clone]
  • When Ollama is detected in the compose file or .env template, emit a pull-models step after deploy:
    yaml
    - id: pull-models
      type: script
      description: Pull Ollama models (may take several minutes)
      script: installer/scripts/pull-models.sh
      depends_on: [deploy]
      verify: "docker exec $(docker compose ps -q ollama) ollama list | grep -q ${OLLAMA_GEN_MODEL%%:*}"

Script templates used for Docker projects:

  • installer/scripts/check-ports.sh — port availability check before deploy
  • installer/scripts/pull-models.sh — Ollama model pull after deploy (when applicable)

Phase 3: Script Assembly

For each script step:

  1. Copy the relevant template from agentic/code/addons/agentic-installer/scripts/templates/
  2. For developer manifests, copy dev templates from scripts/templates/dev/
  3. Place in <project>/installer/scripts/ (user install) or <project>/installer/scripts/dev/ (developer install)
  4. Customize placeholders (package lists, config paths, extension IDs, etc.)
  5. Record relative path in the manifest script: field

Phase 4: Output

Write the manifest to the appropriate path:

  • installer/setup.user.manifest.yaml — user install (when installer/ dir exists)
  • installer/setup.dev.manifest.yaml — developer install (when installer/ dir exists)
  • setup.manifest.yaml — backwards-compatible default (no --type flag, no installer/ dir)

Report:

Generated: setup.manifest.yaml
  Install type:  developer
  Platform:      linux
  Steps:         setup
  Scripts:       scripts/setup.sh

Validate with: aiwg setup-validate --manifest setup.manifest.yaml
Run with:      aiwg setup-run --manifest setup.manifest.yaml --dry-run

Output File Structure

A full-suite project (both user and developer install) ships these files:

installer/
├── setup.user.manifest.yaml          # end-user deploy
├── setup.dev.manifest.yaml           # developer standup
├── docs/
│   ├── install-user-linux.md
│   ├── install-user-macos.md
│   ├── install-user-windows.md
│   ├── install-dev-linux.md
│   ├── install-dev-macos.md
│   ├── install-dev-windows.md
│   └── install-dev-wsl2.md
└── scripts/
    ├── clone.sh
    ├── configure.sh
    ├── verify.sh
    ├── dev/
    │   ├── configure-dev.sh
    │   ├── install-mkcert.sh
    │   ├── apply-docker-group.sh
    │   ├── apply-inotify.sh
    │   ├── apply-vm-mapcount.sh
    │   ├── install-ide-extensions.sh
    │   ├── setup-git-config.sh
    │   ├── setup-ssh-key.sh
    │   └── verify-dev.sh
    └── user/
        ├── install-deps-ubuntu.sh
        ├── install-deps-macos.sh
        └── install-deps-windows.ps1

Script-First Rule

Every step that can be scripted MUST be a script step. Only use type: agentic for:

  • Steps that require real-time environment inspection that cannot be expressed in bash
  • Recovery from unexpected failures where the script approach has been exhausted

Example Output (Developer Manifest)

yaml
apiVersion: setup.aiwg.io/v1
kind: SetupManifest
metadata:
  name: myapp-dev
  version: 1.0.0
  description: Developer environment setup for myapp
  install_type: developer

spec:
  platforms:
    - os: linux
      distros: [ubuntu, debian, fedora]
      arch: [x86_64, arm64]
      shell: bash
    - os: macos
      arch: [x86_64, arm64]
      shell: zsh

  params:
    - name: INSTALL_DIR
      type: path
      required: true
      description: Directory to clone the project into
    - name: LOCAL_DOMAIN
      type: string
      interactive_required: true
      description: Local domain for HTTPS dev (e.g., myapp.local)
    - name: SSH_EMAIL
      type: string
      interactive_required: true
      description: Email address for SSH key generation
    - name: IDE
      type: choice
      choices: [vscode, jetbrains, none]
      interactive_required: true
      description: IDE to install extensions for

  prerequisites:
    - name: git
      detect: "command -v git"
      version_min: "2.30"
      install_hint: "Install git: https://git-scm.com"
    - name: docker
      detect: "docker version --format '{{.Server.Version}}' 2>/dev/null"
      install_hint: "Install Docker: https://docs.docker.com/get-docker/"

  os_config:
    - id: docker-group
      description: Add current user to docker group (avoids sudo for docker)
      check: "id -nG | grep -qw docker"
      apply: "sudo usermod -aG docker ${USER}"
      requires_relogin: true
      platforms: [linux]

    - id: inotify-watches
      description: Increase inotify watches for file watchers (webpack, jest, vite)
      check: "sysctl fs.inotify.max_user_watches | awk '{print $3}' | xargs -I{} test {} -ge 524288"
      apply: |
        echo 'fs.inotify.max_user_watches=524288' | sudo tee -a /etc/sysctl.d/99-dev.conf
        sudo sysctl -p /etc/sysctl.d/99-dev.conf
      platforms: [linux]

    - id: xcode-cli-tools
      description: Xcode Command Line Tools (required for native compilation on macOS)
      check: "xcode-select -p 2>/dev/null | grep -q CommandLineTools"
      apply: "xcode-select --install"
      interactive: true
      platforms: [macos]

  steps:
    - id: clone
      type: script
      script: installer/scripts/clone.sh
      verify: "test -d ${INSTALL_DIR}/.git"

    - id: setup-git-config
      type: script
      script: installer/scripts/dev/setup-git-config.sh
      params: [GIT_USER_NAME, GIT_USER_EMAIL]
      depends_on: [clone]

    - id: setup-ssh-key
      type: script
      script: installer/scripts/dev/setup-ssh-key.sh
      params: [SSH_EMAIL]
      depends_on: [clone]

    - id: apply-docker-group
      type: os-config
      config_id: docker-group
      platform: linux
      depends_on: [clone]

    - id: apply-inotify
      type: os-config
      config_id: inotify-watches
      platform: linux
      depends_on: [clone]

    - id: apply-xcode-tools
      type: os-config
      config_id: xcode-cli-tools
      platform: macos
      depends_on: [clone]

    - id: install-mkcert
      type: script
      script: installer/scripts/dev/install-mkcert.sh
      params: [LOCAL_DOMAIN]
      depends_on: [clone]

    - id: configure-dev
      type: script
      script: installer/scripts/dev/configure-dev.sh
      params: [INSTALL_DIR, LOCAL_DOMAIN]
      depends_on: [install-mkcert]

    - id: install-ide-extensions
      type: script
      script: installer/scripts/dev/install-ide-extensions.sh
      params: [IDE]
      depends_on: [clone]

    - id: verify-dev
      type: script
      script: installer/scripts/dev/verify-dev.sh
      params: [LOCAL_DOMAIN]
      depends_on: [configure-dev, apply-docker-group, apply-inotify]

  recovery:
    - id: full-reset
      steps:
        - id: reset
          type: script
          script: installer/scripts/reset.sh

References

  • Schema: agentic/code/addons/agentic-installer/schemas/v1/setup-manifest.schema.json
  • Templates (user): agentic/code/addons/agentic-installer/scripts/templates/
  • Templates (dev): agentic/code/addons/agentic-installer/scripts/templates/dev/
  • Run skill: agentic/code/addons/agentic-installer/skills/setup-run/SKILL.md
  • Validate skill: agentic/code/addons/agentic-installer/skills/setup-validate/SKILL.md

Câu hỏi thường gặp

Kỹ năng AI Setup Generate làm được gì?

Tạo tệp `setup.manifest.yaml` cho một dự án bằng `setup.aiwg.io/v1`

Vì sao nên dùng Setup Generate trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Setup Generate là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Setup Generate trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/jmagly/aiwg/tree/main/agentic/code/addons/agentic-installer/skills/setup-generate. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Setup Generate?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Setup Generate với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Setup Generate với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Setup Generate có miễn phí không?

Có. Kỹ năng này được jmagly phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇