一键导入
nd-deploy-workflow
Use when deploying assets in batch, auditing deployment health, switching profiles, or syncing git sources. Orchestrates multi-step nd workflows.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when deploying assets in batch, auditing deployment health, switching profiles, or syncing git sources. Orchestrates multi-step nd workflows.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when creating a new nd source directory from scratch. Handles directory layout, asset type selection, manifest generation, and source registration.
Use when creating a new asset (skill, agent, command, rule, context, output-style, or hook) inside an existing nd source. Handles directory layout, file scaffolding, scanner validation, and deployment instructions.
| name | nd-deploy-workflow |
| description | Use when deploying assets in batch, auditing deployment health, switching profiles, or syncing git sources. Orchestrates multi-step nd workflows. |
Orchestrate common nd deployment tasks: batch-deploy assets, audit deployment health, switch profiles, and sync sources. Determine which workflow the user needs from their message, then execute the corresponding steps.
Parse the user's request to select one of the four workflows below. If the intent is ambiguous, present the options and ask the user to choose.
Batch-deploy multiple assets from available sources.
Step 1 — list available assets (script):
Run nd list --json to retrieve all assets across registered sources. Parse the JSON output and group results by type (skills, commands, rules, agents, context, output-styles, plugins, hooks).
Step 2 — show current status:
Run nd status --json to identify which assets are already deployed. Mark them in the list presented to the user.
Step 3 — let the user choose:
Present the grouped asset list. Already-deployed assets should be clearly indicated. Ask the user which assets they want to deploy. Accept asset references in any format nd supports: bare name, type/name, or comma-separated lists.
Step 4 — optional scope selection:
Ask whether to deploy globally (--scope global) or to the current project (--scope project). Default to global if the user does not specify.
Step 5 — deploy (script):
Run nd deploy <asset1> <asset2> ... --scope <scope> --yes with all selected assets in a single command. If any asset fails to deploy, capture the error and continue reporting on the rest.
Step 6 — verify:
Run nd status and present a summary showing which assets are now deployed and any that failed.
Check deployment health and surface problems.
Step 1 — run doctor (script):
Run nd doctor --json. Capture the full output.
Step 2 — run status (script):
Run nd status --json. Capture the full output.
Step 3 — interpret results: Analyze the doctor and status output for:
Step 4 — present findings: Report each category of issue with the affected asset names and paths. For each issue, include the recommended fix command. Example:
Broken symlinks (2):
skills/old-skill -> /path/to/missing/source
Fix: nd remove skills/old-skill
Orphaned deployments (1):
rules/stale-rule -> source "my-source" no longer registered
Fix: nd remove rules/stale-rule
Step 5 — offer remediation:
Ask the user whether to execute the suggested fixes. If they agree, run the repair commands. For broken symlinks, use nd sync --yes first (it repairs repairable links), then nd remove for anything that cannot be repaired.
Save current state and switch to a different profile.
Step 1 — show current state (script):
Run nd status --json and nd profile list --json in parallel. Present the current deployments and the list of available profiles.
Step 2 — offer snapshot:
Ask the user whether to save the current deployment state as a snapshot before switching. If yes, ask for a snapshot name (suggest a default based on the current date and time, e.g., pre-switch-2026-04-02). Run nd snapshot save <name>.
Step 3 — select target profile: If the user has not already specified a profile, ask them to choose from the available profiles listed in Step 1. If no profiles exist, offer to create one:
nd profile create <name> --from-current --description "<desc>" to create a profile from the current deployments, or collect asset references for a new custom profileStep 4 — switch (script):
Run nd profile switch <name> --yes. This removes assets not in the target profile and deploys the ones that are.
Step 5 — verify and report:
Run nd status to confirm the switch completed. Present a summary showing which assets were added, removed, and retained. If any pinned assets were preserved across the switch, note that.
Pull updates from git sources and verify deployment health.
Step 1 — check sources (script):
Run nd source list --json to enumerate registered sources. Identify which sources are git-backed.
Step 2 — sync (script):
Run nd sync --yes --verbose. This pulls updates from all git sources and repairs any broken symlinks. Capture the output.
Step 3 — report sync results: Present a summary of what happened:
Step 4 — post-sync health check (script):
Run nd doctor --json and nd status --json in parallel. Check for issues introduced or resolved by the sync.
Step 5 — present health report: If all checks pass, confirm that deployments are healthy. If issues remain, follow the same interpretation and remediation steps from the "Audit deployments" workflow (Steps 3-5).
--json when running nd commands for parsing. Use the non-JSON form only for final output shown to the user.--yes to skip confirmation prompts when executing commands on the user's behalf, since the user has already confirmed intent through the conversation.nd remove or nd profile switch without first explaining what will happen and getting the user's confirmation.nd doctor or nd status returns errors about missing configuration, suggest running nd init before proceeding.--scope project only when the user explicitly requests project-scoped operations. Default to --scope global.