一键导入
adapt
Adapt project-local flowai primitives (skills, agents, AGENTS.md artifacts, hooks) to project specifics. Standalone adaptation — independent of update.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Adapt project-local flowai primitives (skills, agents, AGENTS.md artifacts, hooks) to project specifics. Standalone adaptation — independent of update.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when the user asks for a project health audit, maintenance sweep, or multi-category lead-engineer scan followed by interactive issue-by-issue resolution with user approval. Do NOT trigger on routine lint/test runs, single-file cleanups, or standard "check project" requests.
Create, maintain, and run evidence-based benchmarks for AI agents. Use when setting up testing infrastructure, writing new test scenarios, or evaluating agent performance.
Generate a .devcontainer (devcontainer.json plus optional Dockerfile) for AI-IDE development with AI CLI integration, skill mounting, and security hardening. Use when the user wants to set up or containerize a dev environment for Claude Code, OpenCode, or flowai.
Guide for creating effective Agent Skills (SKILL.md packages). Use when users want to create a new skill, write a skill, author a SKILL.md, or ask about skill structure, best practices, or skill file format. Works across IDEs (Cursor, Claude Code, OpenCode).
Estimate total token usage and cost across conversation history, system prompts, and active rules. Use when the user asks how much context or how many tokens are in use, to audit context size, or to estimate session cost.
Design and build plugins for AI IDEs (skills, MCP tools, hooks, packaging, manifests, marketplaces, per-IDE validation). Use when the user wants to create, design, or package an AI-IDE plugin.
| name | adapt |
| description | Adapt project-local flowai primitives (skills, agents, AGENTS.md artifacts, hooks) to project specifics. Standalone adaptation — independent of update. |
| argument-hint | [--skills|--agents|--hooks|--assets] [name] |
Adapt project-local flowai framework primitives (skills, agents, AGENTS.md artifacts, hooks) to the current project's tech stack and conventions. Runs independently of update — use after first project-local install, stack change, or selectively for specific resources.
Plugin-installed and user-level primitives are read-only for this command. If flowai is installed through an IDE plugin or a global/user config directory, do not rewrite those files. Report that no project-local primitives are available unless the user asks to create a local copy.
The AGENTS template (AGENTS.template.md) is a read-only framework source whose location depends on install mode: a skill-local plugin asset (.{ide}/skills/adapt/assets/AGENTS.template.md) for plugin/user installs, a project-local copy (.{ide}/assets/AGENTS.template.md) for CLI flowai sync, or a user-level copy. Read it wherever found; never edit it.
Adaptation state is tracked through git history — no extra metadata fields needed. The working tree contains the current version; git show HEAD:<path> provides the previous adapted version for 3-way merge.
Two subagents handle the actual adaptation work:
skill-adapter — adapts a single skill's SKILL.mdagent-adapter — adapts a single agent's .md body (preserving frontmatter)
<step_by_step>
Detect IDE config directories
.claude/, .cursor/, .opencode/.Parse arguments
--skills -> only skills.--agents -> only agents.--assets -> only AGENTS.md artifacts.--hooks -> only hooks.Adapt skills (when applicable)
flowai-* directories in {ide}/skills/.deno test, deno lint, deno fmt in a Python/pytest or Go project).
d. Skip skills that do not contain stack-specific commands/examples, and mention them in the summary.
e. For no-arg full adaptation, cap the first automatic batch to the highest-signal skills (prefer commit, do, and stack setup skills) so the run can still verify assets and ask confirmation before timeout. Report remaining candidates as deferred follow-ups.skill-adapter subagent per selected skill — all in parallel.git show HEAD:<path>/SKILL.md (previous adapted version, if exists)git diff HEAD -- <skill-path>.git checkout HEAD -- <skill-path>.Adapt agents (when applicable)
flowai-* files in {ide}/agents/.commit for skills and console-expert for agents when they contain stale commands.--- through closing ---) for that agent.agent-adapter subagent per selected agent — all in parallel..md (current version)git show HEAD:<path> (previous adapted version, if exists)deno test, deno lint, or deno fmt as recommended project commands, rerun or fix that agent before presenting the diff.git diff HEAD -- <agent-path>.git checkout HEAD -- <agent-path>.Verify AGENTS.md artifacts (when applicable)
pack.yaml from installed packs (via .flowai.yaml) to get the assets: mapping (template name -> artifact path).pack.yaml is unavailable, use default mapping:
AGENTS.template.md -> AGENTS.mddocuments/AGENTS.md or scripts/AGENTS.md, defer to update or init to run the legacy-collapse procedure — do NOT handle collapse here.{ide}/assets/). Check these in order and use the first that exists:
.claude/skills/adapt/assets/AGENTS.template.md.cursor/skills/adapt/assets/AGENTS.template.md.opencode/skills/adapt/assets/AGENTS.template.md.codex/skills/adapt/assets/AGENTS.template.md*/skills/adapt/assets/AGENTS.template.md when visible in the project.flowai sync layout):
.claude/assets/AGENTS.template.md.cursor/assets/AGENTS.template.md.opencode/assets/AGENTS.template.md.codex/assets/AGENTS.template.md~/.claude/assets/AGENTS.template.md~/.cursor/assets/AGENTS.template.md~/.config/opencode/assets/AGENTS.template.md~/.codex/assets/AGENTS.template.mdAGENTS.template.md was not found (install flowai via plugin manager or flowai CLI, then rerun) and skip artifact verification — do NOT fabricate template content.git diff --no-index -- <template> <artifact>.
d. Ignore {{PLACEHOLDER}} sections in the diff.
e. Focus on framework-originated sections (rules, TDD flow, doc formats, planning rules).
f. If framework sections are outdated -> propose update with before/after.Adapt hooks (when applicable)
{ide}/scripts/ (installed by flowai).deno lint, npm test).Summary
</step_by_step>