[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75PQ16N14SH0T44Q8GDXS01":3,"skill-same:01M75PQ16N14SH0T44Q8GDXS01":61},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":41,"commitSha":42,"skillDirectory":43,"forksCount":14,"repositoryHtmlUrl":44,"repositoryHomepageUrl":6,"ownerHtmlUrl":45,"ownerBlogUrl":46,"ownerDescription":6,"updatedAt":47,"install":48,"resources":60},"01M75PQ16N14SH0T44Q8GDXS01","setup-flow",null,"Use when onboarding a repository or agent to the standard development workflow — installs the required skills from the ai.skills store, installs or updates a MANDATORY workflow block in the agent's instruction file (CLAUDE.md, AGENTS.md, GEMINI.md, Copilot or Cursor rules), AND configures .claude\u002Fsettings.json with Serena MCP, sandbox, permissions, hooks, and plugins. Hooks are wired to the context-hooks kit, which speaks once per session instead of injecting text on every turn; re-running replaces earlier inline hooks rather than adding to them. Also writes .vscode\u002Fsettings.json to hide the empty shell dotfiles an agent sandbox leaves in the repo root. Use when setting up a new repo, switching agents, or refreshing the workflow rules.","Aliendreamer\u002Fai.skills","Aliendreamer","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F26008043?v=4","01M75PJZKADCYNHHZPMW7363F6","Teodor Stefanov","01M75PJZKYGDX0TDM0X5TX24G0",0,"MIT","https:\u002F\u002Fgithub.com\u002FAliendreamer\u002Fai.skills\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow\u002Fsetup-flow\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: setup-flow\ndescription:\n  \"Use when onboarding a repository or agent to the standard development workflow — installs the required\n  skills from the ai.skills store, installs or updates a MANDATORY workflow block in the agent's\n  instruction file (CLAUDE.md, AGENTS.md, GEMINI.md, Copilot or Cursor rules), AND configures\n  .claude\u002Fsettings.json with Serena MCP, sandbox, permissions, hooks, and plugins. Hooks are wired to the\n  context-hooks kit, which speaks once per session instead of injecting text on every turn; re-running\n  replaces earlier inline hooks rather than adding to them. Also writes .vscode\u002Fsettings.json to hide the\n  empty shell dotfiles an agent sandbox leaves in the repo root. Use when setting up a new repo,\n  switching agents, or refreshing the workflow rules.\"\ntype: skill\ndisable-model-invocation: false\nuser-invocable: true\ntags: [setup, onboarding, workflow, agent-config, developer-flow, serena, settings]\nagents: [claude, codex, cursor, gemini, copilot]\nversion: 0.6.0\nauthor: Aliendreamer\n---\n\n# Setup Flow\n\n## Overview\n\nOnboards a repository in three parts: **Phase 0** installs the required skills from the ai.skills store\n(so the workflow it wires up actually exists — no manual install); **Phase 1** seeds the **agent\ninstruction file** with a neutral, reusable **`## MANDATORY workflow`** block so every agent in that\nrepo follows the same loop (`developer-flow` for all changes, semantic code tools over raw text\nsearch, post-task skill optimization when there's concrete feedback); **Phase 2** configures\n`.claude\u002Fsettings.json`.\n\n**Core principle: idempotent.** The block is wrapped in markers and inserted-or-replaced — running this\nskill again updates the block in place, never duplicates it, and never disturbs the rest of the file.\n\n## When to Use\n\n- Onboarding a new repository, or starting work in a repo that has no workflow rules.\n- Switching to or adding a different agent (the rules need to live in that agent's file).\n- Refreshing the workflow block after `developer-flow` or the conventions change.\n\n**When NOT to use:** for one-off project-specific rules (write those directly in the instruction file);\nthis skill manages only the shared, neutral workflow block.\n\n## Target file (by agent)\n\nResolve the instruction file for the active agent. Create it (with a top-level `# \u003CProject>` heading)\nif it doesn't exist.\n\n| Agent | Instruction file |\n| ----- | ---------------- |\n| Claude \u002F Claude Code | `CLAUDE.md` |\n| Codex | `AGENTS.md` |\n| Gemini CLI | `GEMINI.md` |\n| GitHub Copilot | `.github\u002Fcopilot-instructions.md` |\n| Cursor | `.cursor\u002Frules\u002Fworkflow.md` (or `.cursorrules`) |\n\nIf the agent is unknown, default to `CLAUDE.md` (and `AGENTS.md` as a cross-agent fallback), or ask.\n\n## Phase 0 — Install the required skills\n\n**Runs first**, before injecting the workflow block. setup-flow provisions a mandatory skill set from\nthe ai.skills store so the workflow it wires up actually exists — the user never installs skills by\nhand. Idempotent: re-running re-installs\u002Fupdates each skill in place.\n\n### 0.1 Build the install list\n\nAlways install:\n\n- `developer-flow` — the canonical workflow skill the block and hook point at.\n- `context-hooks` — supplies the hook kit Phase 2.5 wires up. Required: Phase 2.5 no longer embeds\n  hook text in `settings.json`, so without this skill there are no hook scripts to point at.\n- `web-security-audit`\n- `llm-setup-audit`\n- `md-files-audit` — also the baseline reference used by Phase 2.7.\n\nConditionally install:\n\n- `audit-package-version` — only when the repo root has a `package.json` (JS \u002F Node project).\n\nOptional (opt-in — install when detected, or when the user asks):\n\n- `azure-devops-workflow` — when the repo uses Azure DevOps: an `azure-pipelines.yml`, a\n  `.azuredevops\u002F` directory, or a git remote on `dev.azure.com` \u002F `*.visualstudio.com`.\n\n### 0.2 Resolve the target agent\n\nUse the same agent as the Target file table below (`--agent` value): `claude`, `codex`, `cursor`,\n`gemini`, or `copilot`. Default to `claude` if unknown.\n\n### 0.3 Install via the store CLI\n\nRun the installer non-interactively — it fetches from the store and drops each skill into the agent's\nskills dir (e.g. `.claude\u002Fskills\u002F\u003Cid>\u002F`):\n\n```bash\nnpx -y @aliendreamer\u002Fai-skills add developer-flow web-security-audit llm-setup-audit \\\n  md-files-audit [audit-package-version] [azure-devops-workflow] \\\n  --agent \u003Cresolved-agent> --project --yes\n```\n\n- Include `audit-package-version` in the id list only when `package.json` was detected in 0.1.\n- Include `azure-devops-workflow` only when Azure DevOps was detected in 0.1, or the user opts in.\n- `--project` installs into the current repo; use `--global` (`~\u002F`) instead only if the user wants the\n  skills available across all their repos.\n- `-y` \u002F `--yes` skips prompts (it requires `--agent`). Re-running is safe and idempotent.\n\n### 0.4 Verify & report\n\nConfirm each expected skill folder now exists under the agent's skills dir, and report the list\ninstalled (and anything skipped — e.g. `audit-package-version` on a non-JS repo).\n\n**OpenSpec is not installed here.** `developer-flow` treats OpenSpec as optional; if the repo wants\nit, set it up separately.\n\n## The block to inject\n\nInsert this verbatim, including the marker comments. It is intentionally **neutral** — no project, org,\nstack, or gate count baked in:\n\n```markdown\n\u003C!-- setup-flow:start -->\n## MANDATORY workflow\n\n**For ANY feature, change, or bugfix you MUST follow the `developer-flow` skill.** Invoke it at the\nstart of implementation work; do not skip or reorder its steps: brainstorm → plan\u002Fproposal →\nimplement (TDD) → simplify → code review → run the repo's quality gates → report → user approval and\nmanual verification before archive\u002Fcommit. If a change adds or modifies a web endpoint, create or\nupdate its `.http` file as part of the same change.\n\n**Prefer semantic code tools for code search and edits** — e.g. Serena MCP or your editor's LSP\n(`find_symbol`, `replace_symbol_body`, `find_referencing_symbols`) — over raw text\u002Fgrep where a\nsemantic tool applies.\n\n**After finishing a task, optimize skills when there's concrete feedback for it.** If the session\nsurfaced specific learnings about how a skill performed — an activation gap, a regression, missing or\nmisleading guidance, or a confirmed improvement — refine that skill (use a skill-optimizing skill if\none is available) before moving on. Only when the feedback is specific; skip it otherwise.\n\u003C!-- setup-flow:end -->\n```\n\n## Procedure\n\n1. **Resolve the target file** for the active agent (table above). If it doesn't exist, create it with a\n   `# \u003CProject name>` heading first.\n2. **Look for the markers** `\u003C!-- setup-flow:start -->` … `\u003C!-- setup-flow:end -->` in the file.\n   - **Present:** replace everything between (and including) the markers with the current block.\n   - **Absent:** append the block to the end of the file, preceded by one blank line.\n3. **Leave all other content untouched** — never reorder, dedupe, or rewrite the rest of the file.\n4. **Verify** the file has exactly one `setup-flow:start`\u002F`setup-flow:end` pair and the block reads\n   correctly, then report which file you changed.\n\n## Common mistakes\n\n- **Duplicating the block.** Appending without checking for the markers first. Always insert-or-replace.\n- **Editing project-specific rules.** This skill owns only the marked block; don't touch the rest.\n- **Hardcoding specifics.** Keep the block neutral — no org, stack, repo path, or gate count. Repos add\n  their own details outside the markers.\n- **Writing to the wrong file.** Match the file to the active agent; don't put `CLAUDE.md` rules in a\n  Gemini repo.\n- **Renaming the skill reference.** It points at `developer-flow` — the canonical skill name.\n\n---\n\n## Phase 2: `.claude\u002Fsettings.json`\n\n**Claude Code only.** `.claude\u002Fsettings.json` is read exclusively by Claude Code. Skip Phase 2 when\nthe active agent is Gemini, Cursor, Copilot, or Codex — Phase 1 (the instruction file) is sufficient\nfor those agents.\n\nRuns immediately after Phase 1. Configures `.claude\u002Fsettings.json` for the repo with Serena MCP,\nsandbox, permissions, hooks, and plugins. Idempotent on re-run (merge mode preserves existing\ncustomisation).\n\n### 2.1 Existing file check\n\nCheck whether `.claude\u002Fsettings.json` already exists.\n\n- **Absent** → proceed, composing from scratch.\n- **Present** → ask the user: **merge** (add missing keys, union lists, preserve existing values)\n  or **replace** (overwrite entirely)?\n\n### 2.2 Project type detection\n\nScan the repo root for these files to determine the sandbox domain and path lists:\n\n| Detected file | Project type | Network domains to add | Filesystem write paths to add |\n|---|---|---|---|\n| `package.json` | npm \u002F Node | `registry.npmjs.org`, `*.npmjs.org`, `registry.yarnpkg.com`, `github.com`, `codeload.github.com`, `*.githubusercontent.com` | `~\u002F.npm`, `~\u002F.cache`, `~\u002F.local\u002Fshare\u002Fpnpm`, `\u002Fusr\u002Flocal\u002Fshare\u002F.yarn-global` |\n| `*.csproj` or `*.sln` | .NET | `api.nuget.org`, `*.nuget.org`, `github.com`, `codeload.github.com`, `*.githubusercontent.com` | `~\u002F.nuget`, `~\u002F.dotnet` |\n| `pyproject.toml`, `setup.py`, or `requirements*.txt` | Python | `pypi.org`, `files.pythonhosted.org`, `github.com`, `codeload.github.com`, `*.githubusercontent.com` | `~\u002F.cache\u002Fpip`, `~\u002F.local` |\n| `Cargo.toml` | Rust | `crates.io`, `static.crates.io`, `github.com`, `codeload.github.com`, `*.githubusercontent.com` | `~\u002F.cargo` |\n| `go.mod` | Go | `proxy.golang.org`, `sum.golang.org`, `github.com`, `codeload.github.com`, `*.githubusercontent.com` | `~\u002Fgo` |\n\nMultiple types may match (e.g. a repo with both `package.json` and `*.csproj`) — union all matching entries.\n\n**Fallback (nothing detected):** use the curated baseline:\n\n> **Note:** The curated fallback is npm- and Python-biased (covers the most common cases). For Rust\n> or Go projects whose manifest is not at the repo root (preventing auto-detection), manually add\n> `crates.io`\u002F`~\u002F.cargo` or `proxy.golang.org`\u002F`~\u002Fgo` entries after setup.\n\n```json\n{\n  \"network\": {\n    \"allowedDomains\": [\n      \"*.githubusercontent.com\",\n      \"*.npmjs.org\",\n      \"codeload.github.com\",\n      \"files.pythonhosted.org\",\n      \"github.com\",\n      \"pypi.org\",\n      \"registry.npmjs.org\",\n      \"registry.yarnpkg.com\"\n    ]\n  },\n  \"filesystem\": {\n    \"allowWrite\": [\n      \"\u002Fusr\u002Flocal\u002Fshare\u002F.yarn-global\",\n      \"~\u002F.cache\",\n      \"~\u002F.local\u002Fshare\u002Fpnpm\",\n      \"~\u002F.npm\"\n    ]\n  }\n}\n```\n\n### 2.3 Prettier detection\n\nCheck `package.json` in the repo root:\n\n- `devDependencies` or `dependencies` contains a key starting with `prettier` → **prettier present**.\n- OR `scripts` contains any value that references `prettier` → **prettier present**.\n- Otherwise → **prettier absent**; skip the PostToolUse hook.\n\n### 2.4 Plugin detection\n\nDiscover available plugins by checking (in order):\n\n1. Read `~\u002F.claude\u002Fsettings.json` → collect keys from its `enabledPlugins` object.\n2. List directory entries under `~\u002F.claude\u002Fplugins\u002F` if it exists.\n\nUnion the two sets into a list of plugin IDs. Present them to the user:\n\n> \"Detected plugins: [list]. Which should be enabled? (Select all that apply, or say 'all' \u002F 'none'.)\"\n\nWait for the user's answer before continuing. Build the `enabledPlugins` map: `{ \"\u003Cid>\": true\u002Ffalse }` per the user's selection.\n\n### 2.5 Compose and write `.claude\u002Fsettings.json`\n\nAssemble the settings object from all gathered inputs and write (or merge into) `.claude\u002Fsettings.json`.\n\n#### Always-included sections\n\n**`mcpServers`:**\n\n```json\n{\n  \"serena\": {\n    \"command\": \"uvx\",\n    \"args\": [\n      \"--from\",\n      \"git+https:\u002F\u002Fgithub.com\u002Foraios\u002Fserena\",\n      \"serena\",\n      \"start-mcp-server\",\n      \"--context\",\n      \"claude-code\",\n      \"--project-from-cwd\",\n      \"--open-web-dashboard\",\n      \"false\"\n    ]\n  }\n}\n```\n\n**`sandbox`** (defaults shown; the root flags are tunable per environment — see the flag guidance\nbelow. Domain\u002Fpath lists come from 2.2):\n\n```json\n{\n  \"enabled\": true,\n  \"failIfUnavailable\": true,\n  \"allowUnsandboxedCommands\": false,\n  \"network\": { \"allowedDomains\": [\"\u003Cfrom 2.2>\"] },\n  \"filesystem\": { \"allowWrite\": [\"\u003Cfrom 2.2>\"] }\n}\n```\n\n**Flag guidance — set these to fit the environment the agent runs in.** Ask the user where this repo\nruns (local dev, CI, WSL2) if it isn't obvious; default as shown and call out the exceptions:\n\n- **`enabled`** — keep `true`. Disabling removes the protection entirely; prefer widening the `2.2`\n  `network`\u002F`filesystem` lists, or `allowUnsandboxedCommands`, over turning the sandbox off.\n- **`failIfUnavailable`** — `true` refuses to start Claude Code when the sandbox can't initialise, so\n  you never silently run unsandboxed. Keep `true` for local dev on a supported platform. Set\n  **`false`** where sandboxing is unavailable or flaky — **CI runners**, **some WSL2 configs**, and\n  platforms with no sandbox support — otherwise the agent won't start there.\n- **`allowUnsandboxedCommands`** — `false` blocks any command from escaping the sandbox. Keep `false`\n  by default. Set **`true`** only when specific tooling genuinely needs it (e.g. build tools that fail\n  under the sandbox — some Nx \u002F `tsx` \u002F native-toolchain invocations); the agent then runs such\n  commands unsandboxed on approval. Where the agent supports per-command overrides, narrow to the\n  offending commands instead of a blanket `true`.\n\n**`permissions`** (fixed baseline — always the same):\n\n```json\n{\n  \"allow\": [\n    \"Bash(git*)\",\n    \"SKILL(*)\",\n    \"mcp__azure-devops__core_list_projects\",\n    \"mcp__azure-devops__search_workitem\",\n    \"mcp__azure-devops__wit_get_work_item\",\n    \"mcp__azure-devops__wit_get_work_item_attachment\",\n    \"mcp__azure-devops__wit_get_work_items_batch_by_ids\",\n    \"mcp__azure-devops__wit_list_work_item_comments\",\n    \"mcp__azure-devops__wit_query_by_wiql\",\n    \"mcp__plugin_serena_serena__*\"\n  ],\n  \"deny\": [\n    \"Bash(git branch --delete --force*)\",\n    \"Bash(git branch -D*)\",\n    \"Bash(git push --force*)\",\n    \"Bash(git push -f*)\",\n    \"Bash(git reset --hard*)\",\n    \"Bash(rm -rf*)\"\n  ]\n}\n```\n\n**`hooks`** (always included):\n\nHook text is NOT embedded here. A hook's `additionalContext` is injected on **every fire** and is\nnever compacted away, so an inline string is re-paid on every prompt and every search — measured at\nroughly 4.8k tokens per session on a repo running the previous inline version of this block. The\nhooks below point at the `context-hooks` kit instead, which says each thing once per session and\nkeeps the wording in project-owned text files.\n\n**Run Phase 2.5a (below) first** — it installs the kit. These entries are wiring only; they are\ninert until the scripts exist.\n\n> **Note:** `UserPromptSubmit` does not support a `matcher` field — the entry object contains only\n> `hooks`. Do not add a `matcher` key here (unlike `PreToolUse` and `PostToolUse` entries).\n\n```json\n{\n  \"UserPromptSubmit\": [\n    {\n      \"hooks\": [\n        {\n          \"type\": \"command\",\n          \"command\": \"\\\"${CLAUDE_PROJECT_DIR:-.}\u002F.claude\u002Fclaude-hooks\u002Fdev-flow-reminder.sh\\\"\",\n          \"statusMessage\": \"Loading development flow\"\n        }\n      ]\n    }\n  ],\n  \"PreToolUse\": [\n    {\n      \"matcher\": \"Grep\",\n      \"hooks\": [\n        {\n          \"type\": \"command\",\n          \"command\": \"\\\"${CLAUDE_PROJECT_DIR:-.}\u002F.claude\u002Fclaude-hooks\u002Fprefer-serena.sh\\\"\"\n        }\n      ]\n    },\n    {\n      \"matcher\": \"Bash\",\n      \"hooks\": [\n        {\n          \"type\": \"command\",\n          \"command\": \"\\\"${CLAUDE_PROJECT_DIR:-.}\u002F.claude\u002Fclaude-hooks\u002Fprefer-serena.sh\\\"\"\n        }\n      ]\n    }\n  ]\n}\n```\n\n### 2.5a Install the hook kit\n\nInvoke the `context-hooks` skill and follow it. In summary:\n\n1. Copy its `kit\u002F` to `.claude\u002Fclaude-hooks\u002F` and ensure the `.sh` files are executable.\n2. `context\u002Fprefer-serena.txt` ships ready to use — keep it, unless the agent instruction file\n   already carries that guidance always-loaded, in which case delete it so the hook stays silent.\n3. `context\u002Fdev-flow.full.txt` is repo-specific. **Ask before producing it** — writing it means\n   scanning the repo's instruction file and authoring a file on the user's behalf:\n\n   > \"Shall I scan `CLAUDE.md` and write `dev-flow.full.txt` — the workflow specifics it doesn't\n   > already carry? I'll show you the text first.\"\n\n   Declined is a valid outcome: leave the `.example` unrenamed, that hook stays silent, and the rest\n   of setup completes.\n\n4. Verify `jq` is on PATH. Without it the hooks exit 0 and stay silent by design — which is\n   indistinguishable from working, so check rather than assume.\n\n### 2.5b Replace old inline hooks — do not append\n\nThe `hooks` row of the Merge rules table below is append-if-absent, keyed on event plus command\nstring, and this step is what makes it safe. Earlier versions of\nthis skill wrote hook commands that embed an `additionalContext` string inline. Those commands do\nnot match the new ones, so appending would leave the repo running **both** generations — the\nevery-turn hook and its replacement together, strictly worse than before setup ran.\n\nBefore merging, scan the existing `hooks` for entries whose `command` contains\n`hookSpecificOutput` or `additionalContext` as literal text. Each one is a previous-generation\ninline hook: **replace it** with the corresponding entry above rather than adding alongside it.\nLeave any hook that does real work (formatters, linters, validators) untouched — this rule applies\nonly to hooks whose whole purpose is injecting text.\n\n**PostToolUse prettier hook** (only if prettier detected in 2.3):\n\n```json\n{\n  \"PostToolUse\": [\n    {\n      \"matcher\": \"Write|Edit\",\n      \"hooks\": [\n        {\n          \"type\": \"command\",\n          \"command\": \"f=$(jq -r '.tool_input.file_path \u002F\u002F .tool_response.filePath \u002F\u002F empty' 2>\u002Fdev\u002Fnull); case \\\"$f\\\" in *.ts|*.tsx|*.js|*.jsx|*.scss|*.css) [ -f \\\"$f\\\" ] && .\u002Fnode_modules\u002F.bin\u002Fprettier --ignore-unknown --write \\\"$f\\\" >\u002Fdev\u002Fnull 2>&1 ;; esac; exit 0\",\n          \"statusMessage\": \"Formatting with prettier…\"\n        }\n      ]\n    }\n  ]\n}\n```\n\n**`enabledPlugins`** — map from 2.4 with user-selected true\u002Ffalse values.\n\n> **Note:** `SKILL(*)` pre-approves skill invocations. This is supported in Claude Code with the\n> superpowers plugin; verify it is supported in your agent before including it.\n\n#### Merge rules (when user chose merge in 2.1)\n\n| Section | Merge behaviour |\n|---|---|\n| `mcpServers.serena` | Add key only if absent; leave other servers untouched |\n| `sandbox.network.allowedDomains` | Union with existing (deduplicate + sort) |\n| `sandbox.filesystem.allowWrite` | Union with existing (deduplicate + sort) |\n| `sandbox` root flags | Set only if the key is absent; never overwrite |\n| `permissions.allow` | Append entries not already present |\n| `permissions.deny` | Append entries not already present |\n| `hooks` | **Replace, then add.** First apply 2.5b: any existing entry whose `command` contains literal `hookSpecificOutput` or `additionalContext` is a previous-generation inline hook — replace it with this version's entry for the same event\u002Fmatcher. Then add remaining missing entries; skip true duplicates — for entries with a `matcher`: match on event + matcher + command; for `UserPromptSubmit` (no matcher): match on event + command string. Never append a text-injecting hook beside one it supersedes: both would fire |\n| `enabledPlugins` | Add new keys from detection; preserve existing values; only update values user explicitly chose |\n\n### 2.6 Report\n\nAfter writing `.claude\u002Fsettings.json`, tell the user:\n\n- Path written: `.claude\u002Fsettings.json`\n- Sections written: which top-level keys were added\u002Fupdated\n- Prettier hook: included or skipped (reason)\n- Plugins enabled\u002Fdisabled: the final map\n- If merge: which keys already existed and were preserved\n- **Hooks replaced (2.5b): one line per replaced entry, quoting the old command.** This rewrites\n  configuration the user may have hand-edited, so it must be visible here and reviewable in\n  `git diff` — never a silent swap. Say \"no inline hooks found\" when none were replaced.\n- Hook kit: whether `.claude\u002Fclaude-hooks\u002F` was installed, whether `dev-flow.full.txt` was authored\n  or declined, and whether `jq` was found\n\n### 2.7 Markdown lint detection (optional)\n\nCheck whether the repo tracks `.md` files and has `markdownlint-cli2` configured:\n\n- `package.json` scripts contain `markdownlint-cli2` → **markdownlint present**.\n- OR `.markdownlint-cli2.jsonc` \u002F `.markdownlintrc.json` exists at repo root → **markdownlint\n  present**.\n- Otherwise → **markdownlint absent**; skip this step and do not add lint:md scripts.\n\nWhen markdownlint is present, verify:\n\n1. `lint:md` and `lint:md:fix` scripts exist in `package.json` (add if missing).\n2. `.markdownlint-cli2.jsonc` exists and covers the right globs (use **md-files-audit** as the\n   reference for a correct baseline config).\n3. Run `pnpm lint:md` — if it exits non-zero, run `pnpm lint:md:fix` and re-check.\n\n### 2.8 Editor noise — `.vscode\u002Fsettings.json`\n\nRunning an agent in a sandbox leaves **empty shell dotfiles** in the repo root. They are artifacts,\nnever project files, and they clutter the explorer and file-search for everyone who works in the\nrepo. Hide them.\n\nWrite `.vscode\u002Fsettings.json` with this `files.exclude` block:\n\n```json\n{\n  \"files.exclude\": {\n    \".bashrc\": true,\n    \".bash_profile\": true,\n    \".profile\": true,\n    \".zshrc\": true,\n    \".zprofile\": true,\n    \".gitconfig\": true,\n    \".ripgreprc\": true,\n    \".gitmodules\": true,\n    \".idea\": true\n  }\n}\n```\n\n**Merge, never overwrite.** If `.vscode\u002Fsettings.json` exists, add only the missing keys inside\n`files.exclude` and leave every other setting — and every existing exclusion — untouched. A\ndeveloper's editor config is theirs.\n\n**Do not change `.gitignore`.** Write the file whether or not `.vscode` is ignored, and leave the\nrepo's ignore policy alone:\n\n- `.vscode` **ignored** → the exclusions are per-developer. Each person gets them when they run\n  setup-flow.\n- `.vscode` **tracked** → the exclusions are shared, which is usually right: the artifacts appear\n  for everyone using the agent, so hiding them once helps the whole team.\n\nSome teams deliberately share `.vscode`; others deliberately ignore it. Either is fine, and\nneither is setup-flow's call to make.\n\nTwo entries in that list are **not** sandbox artifacts, and are included because they are ordinary\neditor noise:\n\n- `.idea` — JetBrains' project directory.\n- `.gitmodules` — a real git file. Hiding it is a display choice only; say so in the report, so\n  nobody debugging submodules concludes the file is missing.\n\n**Do not add `.mcp.json` to the list.** It is a real project MCP configuration in most repos;\nhiding it would conceal working config. It only looks like an artifact when a sandbox has masked\nit.\n\n**Never hide the repo's secrets file.** It is a file people legitimately open and edit, and making\nit invisible causes more confusion than the screenshare exposure it would prevent. `.gitignore` and\nthe `permissions.deny` rules are the controls that matter there.\n\nReport which keys were added and which already existed.\n\n### Common mistakes (Phase 2)\n\n| Mistake | Fix |\n|---|---|\n| Writing `PostToolUse` hook when prettier is absent | Check `package.json` first; skip the hook if not found |\n| Overwriting existing sandbox flags on merge | Only `set` a root flag if the key is absent |\n| Disabling the sandbox to unblock a command | Keep `enabled: true`; widen `network`\u002F`filesystem` or use `allowUnsandboxedCommands` instead |\n| Setting `failIfUnavailable: false` everywhere | Keep `true` for local dev; only relax it for CI \u002F WSL2 \u002F unsupported platforms |\n| Assuming `.claude\u002Fsettings.json` lives at repo root | It lives at `.claude\u002Fsettings.json` relative to the repo |\n| Not deduplicating domain\u002Fpath lists | Use a Set merge; sort the result |\n| Auto-enabling all detected plugins | Always ask the user; never auto-enable |\n| Writing the PAT or any secret into settings.json | `secrets.json` is the home for secrets; never touch them here |\n| Overwriting an existing `.vscode\u002Fsettings.json` | Merge only the missing `files.exclude` keys; a developer's editor config is theirs |\n| Adding `.vscode` to `.gitignore` | Leave the repo's ignore policy alone — sharing or ignoring `.vscode` is a team decision |\n| Hiding `.mcp.json` or the secrets file | Both are real files people need; hiding them conceals working config |\n","# Setup Flow\n\n## Overview\n\nOnboards a repository in three parts: **Phase 0** installs the required skills from the ai.skills store\n(so the workflow it wires up actually exists — no manual install); **Phase 1** seeds the **agent\ninstruction file** with a neutral, reusable **`## MANDATORY workflow`** block so every agent in that\nrepo follows the same loop (`developer-flow` for all changes, semantic code tools over raw text\nsearch, post-task skill optimization when there's concrete feedback); **Phase 2** configures\n`.claude\u002Fsettings.json`.\n\n**Core principle: idempotent.** The block is wrapped in markers and inserted-or-replaced — running this\nskill again updates the block in place, never duplicates it, and never disturbs the rest of the file.\n\n## When to Use\n\n- Onboarding a new repository, or starting work in a repo that has no workflow rules.\n- Switching to or adding a different agent (the rules need to live in that agent's file).\n- Refreshing the workflow block after `developer-flow` or the conventions change.\n\n**When NOT to use:** for one-off project-specific rules (write those directly in the instruction file);\nthis skill manages only the shared, neutral workflow block.\n\n## Target file (by agent)\n\nResolve the instruction file for the active agent. Create it (with a top-level `# \u003CProject>` heading)\nif it doesn't exist.\n\n| Agent | Instruction file |\n| ----- | ---------------- |\n| Claude \u002F Claude Code | `CLAUDE.md` |\n| Codex | `AGENTS.md` |\n| Gemini CLI | `GEMINI.md` |\n| GitHub Copilot | `.github\u002Fcopilot-instructions.md` |\n| Cursor | `.cursor\u002Frules\u002Fworkflow.md` (or `.cursorrules`) |\n\nIf the agent is unknown, default to `CLAUDE.md` (and `AGENTS.md` as a cross-agent fallback), or ask.\n\n## Phase 0 — Install the required skills\n\n**Runs first**, before injecting the workflow block. setup-flow provisions a mandatory skill set from\nthe ai.skills store so the workflow it wires up actually exists — the user never installs skills by\nhand. Idempotent: re-running re-installs\u002Fupdates each skill in place.\n\n### 0.1 Build the install list\n\nAlways install:\n\n- `developer-flow` — the canonical workflow skill the block and hook point at.\n- `context-hooks` — supplies the hook kit Phase 2.5 wires up. Required: Phase 2.5 no longer embeds\n  hook text in `settings.json`, so without this skill there are no hook scripts to point at.\n- `web-security-audit`\n- `llm-setup-audit`\n- `md-files-audit` — also the baseline reference used by Phase 2.7.\n\nConditionally install:\n\n- `audit-package-version` — only when the repo root has a `package.json` (JS \u002F Node project).\n\nOptional (opt-in — install when detected, or when the user asks):\n\n- `azure-devops-workflow` — when the repo uses Azure DevOps: an `azure-pipelines.yml`, a\n  `.azuredevops\u002F` directory, or a git remote on `dev.azure.com` \u002F `*.visualstudio.com`.\n\n### 0.2 Resolve the target agent\n\nUse the same agent as the Target file table below (`--agent` value): `claude`, `codex`, `cursor`,\n`gemini`, or `copilot`. Default to `claude` if unknown.\n\n### 0.3 Install via the store CLI\n\nRun the installer non-interactively — it fetches from the store and drops each skill into the agent's\nskills dir (e.g. `.claude\u002Fskills\u002F\u003Cid>\u002F`):\n\n```bash\nnpx -y @aliendreamer\u002Fai-skills add developer-flow web-security-audit llm-setup-audit \\\n  md-files-audit [audit-package-version] [azure-devops-workflow] \\\n  --agent \u003Cresolved-agent> --project --yes\n```\n\n- Include `audit-package-version` in the id list only when `package.json` was detected in 0.1.\n- Include `azure-devops-workflow` only when Azure DevOps was detected in 0.1, or the user opts in.\n- `--project` installs into the current repo; use `--global` (`~\u002F`) instead only if the user wants the\n  skills available across all their repos.\n- `-y` \u002F `--yes` skips prompts (it requires `--agent`). Re-running is safe and idempotent.\n\n### 0.4 Verify & report\n\nConfirm each expected skill folder now exists under the agent's skills dir, and report the list\ninstalled (and anything skipped — e.g. `audit-package-version` on a non-JS repo).\n\n**OpenSpec is not installed here.** `developer-flow` treats OpenSpec as optional; if the repo wants\nit, set it up separately.\n\n## The block to inject\n\nInsert this verbatim, including the marker comments. It is intentionally **neutral** — no project, org,\nstack, or gate count baked in:\n\n```markdown\n\u003C!-- setup-flow:start -->\n## MANDATORY workflow\n\n**For ANY feature, change, or bugfix you MUST follow the `developer-flow` skill.** Invoke it at the\nstart of implementation work; do not skip or reorder its steps: brainstorm → plan\u002Fproposal →\nimplement (TDD) → simplify → code review → run the repo's quality gates → report → user approval and\nmanual verification before archive\u002Fcommit. If a change adds or modifies a web endpoint, create or\nupdate its `.http` file as part of the same change.\n\n**Prefer semantic code tools for code search and edits** — e.g. Serena MCP or your editor's LSP\n(`find_symbol`, `replace_symbol_body`, `find_referencing_symbols`) — over raw text\u002Fgrep where a\nsemantic tool applies.\n\n**After finishing a task, optimize skills when there's concrete feedback for it.** If the session\nsurfaced specific learnings about how a skill performed — an activation gap, a regression, missing or\nmisleading guidance, or a confirmed improvement — refine that skill (use a skill-optimizing skill if\none is available) before moving on. Only when the feedback is specific; skip it otherwise.\n\u003C!-- setup-flow:end -->\n```\n\n## Procedure\n\n1. **Resolve the target file** for the active agent (table above). If it doesn't exist, create it with a\n   `# \u003CProject name>` heading first.\n2. **Look for the markers** `\u003C!-- setup-flow:start -->` … `\u003C!-- setup-flow:end -->` in the file.\n   - **Present:** replace everything between (and including) the markers with the current block.\n   - **Absent:** append the block to the end of the file, preceded by one blank line.\n3. **Leave all other content untouched** — never reorder, dedupe, or rewrite the rest of the file.\n4. **Verify** the file has exactly one `setup-flow:start`\u002F`setup-flow:end` pair and the block reads\n   correctly, then report which file you changed.\n\n## Common mistakes\n\n- **Duplicating the block.** Appending without checking for the markers first. Always insert-or-replace.\n- **Editing project-specific rules.** This skill owns only the marked block; don't touch the rest.\n- **Hardcoding specifics.** Keep the block neutral — no org, stack, repo path, or gate count. Repos add\n  their own details outside the markers.\n- **Writing to the wrong file.** Match the file to the active agent; don't put `CLAUDE.md` rules in a\n  Gemini repo.\n- **Renaming the skill reference.** It points at `developer-flow` — the canonical skill name.\n\n---\n\n## Phase 2: `.claude\u002Fsettings.json`\n\n**Claude Code only.** `.claude\u002Fsettings.json` is read exclusively by Claude Code. Skip Phase 2 when\nthe active agent is Gemini, Cursor, Copilot, or Codex — Phase 1 (the instruction file) is sufficient\nfor those agents.\n\nRuns immediately after Phase 1. Configures `.claude\u002Fsettings.json` for the repo with Serena MCP,\nsandbox, permissions, hooks, and plugins. Idempotent on re-run (merge mode preserves existing\ncustomisation).\n\n### 2.1 Existing file check\n\nCheck whether `.claude\u002Fsettings.json` already exists.\n\n- **Absent** → proceed, composing from scratch.\n- **Present** → ask the user: **merge** (add missing keys, union lists, preserve existing values)\n  or **replace** (overwrite entirely)?\n\n### 2.2 Project type detection\n\nScan the repo root for these files to determine the sandbox domain and path lists:\n\n| Detected file | Project type | Network domains to add | Filesystem write paths to add |\n|---|---|---|---|\n| `package.json` | npm \u002F Node | `registry.npmjs.org`, `*.npmjs.org`, `registry.yarnpkg.com`, `github.com`, `codeload.github.com`, `*.githubusercontent.com` | `~\u002F.npm`, `~\u002F.cache`, `~\u002F.local\u002Fshare\u002Fpnpm`, `\u002Fusr\u002Flocal\u002Fshare\u002F.yarn-global` |\n| `*.csproj` or `*.sln` | .NET | `api.nuget.org`, `*.nuget.org`, `github.com`, `codeload.github.com`, `*.githubusercontent.com` | `~\u002F.nuget`, `~\u002F.dotnet` |\n| `pyproject.toml`, `setup.py`, or `requirements*.txt` | Python | `pypi.org`, `files.pythonhosted.org`, `github.com`, `codeload.github.com`, `*.githubusercontent.com` | `~\u002F.cache\u002Fpip`, `~\u002F.local` |\n| `Cargo.toml` | Rust | `crates.io`, `static.crates.io`, `github.com`, `codeload.github.com`, `*.githubusercontent.com` | `~\u002F.cargo` |\n| `go.mod` | Go | `proxy.golang.org`, `sum.golang.org`, `github.com`, `codeload.github.com`, `*.githubusercontent.com` | `~\u002Fgo` |\n\nMultiple types may match (e.g. a repo with both `package.json` and `*.csproj`) — union all matching entries.\n\n**Fallback (nothing detected):** use the curated baseline:\n\n> **Note:** The curated fallback is npm- and Python-biased (covers the most common cases). For Rust\n> or Go projects whose manifest is not at the repo root (preventing auto-detection), manually add\n> `crates.io`\u002F`~\u002F.cargo` or `proxy.golang.org`\u002F`~\u002Fgo` entries after setup.\n\n```json\n{\n  \"network\": {\n    \"allowedDomains\": [\n      \"*.githubusercontent.com\",\n      \"*.npmjs.org\",\n      \"codeload.github.com\",\n      \"files.pythonhosted.org\",\n      \"github.com\",\n      \"pypi.org\",\n      \"registry.npmjs.org\",\n      \"registry.yarnpkg.com\"\n    ]\n  },\n  \"filesystem\": {\n    \"allowWrite\": [\n      \"\u002Fusr\u002Flocal\u002Fshare\u002F.yarn-global\",\n      \"~\u002F.cache\",\n      \"~\u002F.local\u002Fshare\u002Fpnpm\",\n      \"~\u002F.npm\"\n    ]\n  }\n}\n```\n\n### 2.3 Prettier detection\n\nCheck `package.json` in the repo root:\n\n- `devDependencies` or `dependencies` contains a key starting with `prettier` → **prettier present**.\n- OR `scripts` contains any value that references `prettier` → **prettier present**.\n- Otherwise → **prettier absent**; skip the PostToolUse hook.\n\n### 2.4 Plugin detection\n\nDiscover available plugins by checking (in order):\n\n1. Read `~\u002F.claude\u002Fsettings.json` → collect keys from its `enabledPlugins` object.\n2. List directory entries under `~\u002F.claude\u002Fplugins\u002F` if it exists.\n\nUnion the two sets into a list of plugin IDs. Present them to the user:\n\n> \"Detected plugins: [list]. Which should be enabled? (Select all that apply, or say 'all' \u002F 'none'.)\"\n\nWait for the user's answer before continuing. Build the `enabledPlugins` map: `{ \"\u003Cid>\": true\u002Ffalse }` per the user's selection.\n\n### 2.5 Compose and write `.claude\u002Fsettings.json`\n\nAssemble the settings object from all gathered inputs and write (or merge into) `.claude\u002Fsettings.json`.\n\n#### Always-included sections\n\n**`mcpServers`:**\n\n```json\n{\n  \"serena\": {\n    \"command\": \"uvx\",\n    \"args\": [\n      \"--from\",\n      \"git+https:\u002F\u002Fgithub.com\u002Foraios\u002Fserena\",\n      \"serena\",\n      \"start-mcp-server\",\n      \"--context\",\n      \"claude-code\",\n      \"--project-from-cwd\",\n      \"--open-web-dashboard\",\n      \"false\"\n    ]\n  }\n}\n```\n\n**`sandbox`** (defaults shown; the root flags are tunable per environment — see the flag guidance\nbelow. Domain\u002Fpath lists come from 2.2):\n\n```json\n{\n  \"enabled\": true,\n  \"failIfUnavailable\": true,\n  \"allowUnsandboxedCommands\": false,\n  \"network\": { \"allowedDomains\": [\"\u003Cfrom 2.2>\"] },\n  \"filesystem\": { \"allowWrite\": [\"\u003Cfrom 2.2>\"] }\n}\n```\n\n**Flag guidance — set these to fit the environment the agent runs in.** Ask the user where this repo\nruns (local dev, CI, WSL2) if it isn't obvious; default as shown and call out the exceptions:\n\n- **`enabled`** — keep `true`. Disabling removes the protection entirely; prefer widening the `2.2`\n  `network`\u002F`filesystem` lists, or `allowUnsandboxedCommands`, over turning the sandbox off.\n- **`failIfUnavailable`** — `true` refuses to start Claude Code when the sandbox can't initialise, so\n  you never silently run unsandboxed. Keep `true` for local dev on a supported platform. Set\n  **`false`** where sandboxing is unavailable or flaky — **CI runners**, **some WSL2 configs**, and\n  platforms with no sandbox support — otherwise the agent won't start there.\n- **`allowUnsandboxedCommands`** — `false` blocks any command from escaping the sandbox. Keep `false`\n  by default. Set **`true`** only when specific tooling genuinely needs it (e.g. build tools that fail\n  under the sandbox — some Nx \u002F `tsx` \u002F native-toolchain invocations); the agent then runs such\n  commands unsandboxed on approval. Where the agent supports per-command overrides, narrow to the\n  offending commands instead of a blanket `true`.\n\n**`permissions`** (fixed baseline — always the same):\n\n```json\n{\n  \"allow\": [\n    \"Bash(git*)\",\n    \"SKILL(*)\",\n    \"mcp__azure-devops__core_list_projects\",\n    \"mcp__azure-devops__search_workitem\",\n    \"mcp__azure-devops__wit_get_work_item\",\n    \"mcp__azure-devops__wit_get_work_item_attachment\",\n    \"mcp__azure-devops__wit_get_work_items_batch_by_ids\",\n    \"mcp__azure-devops__wit_list_work_item_comments\",\n    \"mcp__azure-devops__wit_query_by_wiql\",\n    \"mcp__plugin_serena_serena__*\"\n  ],\n  \"deny\": [\n    \"Bash(git branch --delete --force*)\",\n    \"Bash(git branch -D*)\",\n    \"Bash(git push --force*)\",\n    \"Bash(git push -f*)\",\n    \"Bash(git reset --hard*)\",\n    \"Bash(rm -rf*)\"\n  ]\n}\n```\n\n**`hooks`** (always included):\n\nHook text is NOT embedded here. A hook's `additionalContext` is injected on **every fire** and is\nnever compacted away, so an inline string is re-paid on every prompt and every search — measured at\nroughly 4.8k tokens per session on a repo running the previous inline version of this block. The\nhooks below point at the `context-hooks` kit instead, which says each thing once per session and\nkeeps the wording in project-owned text files.\n\n**Run Phase 2.5a (below) first** — it installs the kit. These entries are wiring only; they are\ninert until the scripts exist.\n\n> **Note:** `UserPromptSubmit` does not support a `matcher` field — the entry object contains only\n> `hooks`. Do not add a `matcher` key here (unlike `PreToolUse` and `PostToolUse` entries).\n\n```json\n{\n  \"UserPromptSubmit\": [\n    {\n      \"hooks\": [\n        {\n          \"type\": \"command\",\n          \"command\": \"\\\"${CLAUDE_PROJECT_DIR:-.}\u002F.claude\u002Fclaude-hooks\u002Fdev-flow-reminder.sh\\\"\",\n          \"statusMessage\": \"Loading development flow\"\n        }\n      ]\n    }\n  ],\n  \"PreToolUse\": [\n    {\n      \"matcher\": \"Grep\",\n      \"hooks\": [\n        {\n          \"type\": \"command\",\n          \"command\": \"\\\"${CLAUDE_PROJECT_DIR:-.}\u002F.claude\u002Fclaude-hooks\u002Fprefer-serena.sh\\\"\"\n        }\n      ]\n    },\n    {\n      \"matcher\": \"Bash\",\n      \"hooks\": [\n        {\n          \"type\": \"command\",\n          \"command\": \"\\\"${CLAUDE_PROJECT_DIR:-.}\u002F.claude\u002Fclaude-hooks\u002Fprefer-serena.sh\\\"\"\n        }\n      ]\n    }\n  ]\n}\n```\n\n### 2.5a Install the hook kit\n\nInvoke the `context-hooks` skill and follow it. In summary:\n\n1. Copy its `kit\u002F` to `.claude\u002Fclaude-hooks\u002F` and ensure the `.sh` files are executable.\n2. `context\u002Fprefer-serena.txt` ships ready to use — keep it, unless the agent instruction file\n   already carries that guidance always-loaded, in which case delete it so the hook stays silent.\n3. `context\u002Fdev-flow.full.txt` is repo-specific. **Ask before producing it** — writing it means\n   scanning the repo's instruction file and authoring a file on the user's behalf:\n\n   > \"Shall I scan `CLAUDE.md` and write `dev-flow.full.txt` — the workflow specifics it doesn't\n   > already carry? I'll show you the text first.\"\n\n   Declined is a valid outcome: leave the `.example` unrenamed, that hook stays silent, and the rest\n   of setup completes.\n\n4. Verify `jq` is on PATH. Without it the hooks exit 0 and stay silent by design — which is\n   indistinguishable from working, so check rather than assume.\n\n### 2.5b Replace old inline hooks — do not append\n\nThe `hooks` row of the Merge rules table below is append-if-absent, keyed on event plus command\nstring, and this step is what makes it safe. Earlier versions of\nthis skill wrote hook commands that embed an `additionalContext` string inline. Those commands do\nnot match the new ones, so appending would leave the repo running **both** generations — the\nevery-turn hook and its replacement together, strictly worse than before setup ran.\n\nBefore merging, scan the existing `hooks` for entries whose `command` contains\n`hookSpecificOutput` or `additionalContext` as literal text. Each one is a previous-generation\ninline hook: **replace it** with the corresponding entry above rather than adding alongside it.\nLeave any hook that does real work (formatters, linters, validators) untouched — this rule applies\nonly to hooks whose whole purpose is injecting text.\n\n**PostToolUse prettier hook** (only if prettier detected in 2.3):\n\n```json\n{\n  \"PostToolUse\": [\n    {\n      \"matcher\": \"Write|Edit\",\n      \"hooks\": [\n        {\n          \"type\": \"command\",\n          \"command\": \"f=$(jq -r '.tool_input.file_path \u002F\u002F .tool_response.filePath \u002F\u002F empty' 2>\u002Fdev\u002Fnull); case \\\"$f\\\" in *.ts|*.tsx|*.js|*.jsx|*.scss|*.css) [ -f \\\"$f\\\" ] && .\u002Fnode_modules\u002F.bin\u002Fprettier --ignore-unknown --write \\\"$f\\\" >\u002Fdev\u002Fnull 2>&1 ;; esac; exit 0\",\n          \"statusMessage\": \"Formatting with prettier…\"\n        }\n      ]\n    }\n  ]\n}\n```\n\n**`enabledPlugins`** — map from 2.4 with user-selected true\u002Ffalse values.\n\n> **Note:** `SKILL(*)` pre-approves skill invocations. This is supported in Claude Code with the\n> superpowers plugin; verify it is supported in your agent before including it.\n\n#### Merge rules (when user chose merge in 2.1)\n\n| Section | Merge behaviour |\n|---|---|\n| `mcpServers.serena` | Add key only if absent; leave other servers untouched |\n| `sandbox.network.allowedDomains` | Union with existing (deduplicate + sort) |\n| `sandbox.filesystem.allowWrite` | Union with existing (deduplicate + sort) |\n| `sandbox` root flags | Set only if the key is absent; never overwrite |\n| `permissions.allow` | Append entries not already present |\n| `permissions.deny` | Append entries not already present |\n| `hooks` | **Replace, then add.** First apply 2.5b: any existing entry whose `command` contains literal `hookSpecificOutput` or `additionalContext` is a previous-generation inline hook — replace it with this version's entry for the same event\u002Fmatcher. Then add remaining missing entries; skip true duplicates — for entries with a `matcher`: match on event + matcher + command; for `UserPromptSubmit` (no matcher): match on event + command string. Never append a text-injecting hook beside one it supersedes: both would fire |\n| `enabledPlugins` | Add new keys from detection; preserve existing values; only update values user explicitly chose |\n\n### 2.6 Report\n\nAfter writing `.claude\u002Fsettings.json`, tell the user:\n\n- Path written: `.claude\u002Fsettings.json`\n- Sections written: which top-level keys were added\u002Fupdated\n- Prettier hook: included or skipped (reason)\n- Plugins enabled\u002Fdisabled: the final map\n- If merge: which keys already existed and were preserved\n- **Hooks replaced (2.5b): one line per replaced entry, quoting the old command.** This rewrites\n  configuration the user may have hand-edited, so it must be visible here and reviewable in\n  `git diff` — never a silent swap. Say \"no inline hooks found\" when none were replaced.\n- Hook kit: whether `.claude\u002Fclaude-hooks\u002F` was installed, whether `dev-flow.full.txt` was authored\n  or declined, and whether `jq` was found\n\n### 2.7 Markdown lint detection (optional)\n\nCheck whether the repo tracks `.md` files and has `markdownlint-cli2` configured:\n\n- `package.json` scripts contain `markdownlint-cli2` → **markdownlint present**.\n- OR `.markdownlint-cli2.jsonc` \u002F `.markdownlintrc.json` exists at repo root → **markdownlint\n  present**.\n- Otherwise → **markdownlint absent**; skip this step and do not add lint:md scripts.\n\nWhen markdownlint is present, verify:\n\n1. `lint:md` and `lint:md:fix` scripts exist in `package.json` (add if missing).\n2. `.markdownlint-cli2.jsonc` exists and covers the right globs (use **md-files-audit** as the\n   reference for a correct baseline config).\n3. Run `pnpm lint:md` — if it exits non-zero, run `pnpm lint:md:fix` and re-check.\n\n### 2.8 Editor noise — `.vscode\u002Fsettings.json`\n\nRunning an agent in a sandbox leaves **empty shell dotfiles** in the repo root. They are artifacts,\nnever project files, and they clutter the explorer and file-search for everyone who works in the\nrepo. Hide them.\n\nWrite `.vscode\u002Fsettings.json` with this `files.exclude` block:\n\n```json\n{\n  \"files.exclude\": {\n    \".bashrc\": true,\n    \".bash_profile\": true,\n    \".profile\": true,\n    \".zshrc\": true,\n    \".zprofile\": true,\n    \".gitconfig\": true,\n    \".ripgreprc\": true,\n    \".gitmodules\": true,\n    \".idea\": true\n  }\n}\n```\n\n**Merge, never overwrite.** If `.vscode\u002Fsettings.json` exists, add only the missing keys inside\n`files.exclude` and leave every other setting — and every existing exclusion — untouched. A\ndeveloper's editor config is theirs.\n\n**Do not change `.gitignore`.** Write the file whether or not `.vscode` is ignored, and leave the\nrepo's ignore policy alone:\n\n- `.vscode` **ignored** → the exclusions are per-developer. Each person gets them when they run\n  setup-flow.\n- `.vscode` **tracked** → the exclusions are shared, which is usually right: the artifacts appear\n  for everyone using the agent, so hiding them once helps the whole team.\n\nSome teams deliberately share `.vscode`; others deliberately ignore it. Either is fine, and\nneither is setup-flow's call to make.\n\nTwo entries in that list are **not** sandbox artifacts, and are included because they are ordinary\neditor noise:\n\n- `.idea` — JetBrains' project directory.\n- `.gitmodules` — a real git file. Hiding it is a display choice only; say so in the report, so\n  nobody debugging submodules concludes the file is missing.\n\n**Do not add `.mcp.json` to the list.** It is a real project MCP configuration in most repos;\nhiding it would conceal working config. It only looks like an artifact when a sandbox has masked\nit.\n\n**Never hide the repo's secrets file.** It is a file people legitimately open and edit, and making\nit invisible causes more confusion than the screenshare exposure it would prevent. `.gitignore` and\nthe `permissions.deny` rules are the controls that matter there.\n\nReport which keys were added and which already existed.\n\n### Common mistakes (Phase 2)\n\n| Mistake | Fix |\n|---|---|\n| Writing `PostToolUse` hook when prettier is absent | Check `package.json` first; skip the hook if not found |\n| Overwriting existing sandbox flags on merge | Only `set` a root flag if the key is absent |\n| Disabling the sandbox to unblock a command | Keep `enabled: true`; widen `network`\u002F`filesystem` or use `allowUnsandboxedCommands` instead |\n| Setting `failIfUnavailable: false` everywhere | Keep `true` for local dev; only relax it for CI \u002F WSL2 \u002F unsupported platforms |\n| Assuming `.claude\u002Fsettings.json` lives at repo root | It lives at `.claude\u002Fsettings.json` relative to the repo |\n| Not deduplicating domain\u002Fpath lists | Use a Set merge; sort the result |\n| Auto-enabling all detected plugins | Always ask the user; never auto-enable |\n| Writing the PAT or any secret into settings.json | `secrets.json` is the home for secrets; never touch them here |\n| Overwriting an existing `.vscode\u002Fsettings.json` | Merge only the missing `files.exclude` keys; a developer's editor config is theirs |\n| Adding `.vscode` to `.gitignore` | Leave the repo's ignore policy alone — sharing or ignoring `.vscode` is a team decision |\n| Hiding `.mcp.json` or the secrets file | Both are real files people need; hiding them conceals working config |\n",{"name":5,"tags":24,"type":32,"agents":33,"author":9,"version":39,"description":7,"user-invocable":40,"disable-model-invocation":20},[25,26,27,28,29,30,31],"setup","onboarding","workflow","agent-config","developer-flow","serena","settings","skill",[34,35,36,37,38],"claude","codex","cursor","gemini","copilot","0.6.0",true,"main","4cd6c294735ac014fa15da54a397d33d6cdbed57","skills\u002Fworkflow\u002Fsetup-flow","https:\u002F\u002Fgithub.com\u002FAliendreamer\u002Fai.skills","https:\u002F\u002Fgithub.com\u002FAliendreamer","www.linkedin.com\u002Fin\u002Fteodor-stefanov-205aba174","2026-11-12 22:47:39",{"source":8,"skillName":5,"commands":49,"prompt":59,"zipAvailable":40},[50,53,56],{"tool":51,"command":52},"npx","npx skills add Aliendreamer\u002Fai.skills --skill setup-flow",{"tool":54,"command":55},"bunx","bunx skills add Aliendreamer\u002Fai.skills --skill setup-flow",{"tool":57,"command":58},"pnpm","pnpm dlx skills add Aliendreamer\u002Fai.skills --skill setup-flow","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FAliendreamer\u002Fai.skills\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow\u002Fsetup-flow\u002FSKILL.md",[],[62,69,75,82,89,96],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":19},"01M75PQ9W6ZHVTADCMX9JRVEQ8","setup-git-credentials","Use when the user wants Git to stop using a PAT in the remote URL or a plain-text credential store, wants Git Credential Manager (GCM) with OAuth for GitHub, GitLab or Azure DevOps on Ubuntu\u002FDebian or WSL2, or sees 'cannot persist Microsoft authentication token cache securely' \u002F 'using plain-text fallback token cache'. Asks whether this is WSL, which Git hosts and which parts to set up, checks what is already done, sets git config itself after confirmation and hands every sudo or interactive step (apt, gpg, pass init, secret-tool, first sign-in) to the user. Bundles gcm-keyring-session.sh to start or reuse a D-Bus + GNOME Keyring session without systemd. Trigger terms - git credentials, PAT in URL, token in remote, git credential manager, gcm, github auth, gitlab auth, azure devops auth, pass, gpg store, secret service, gnome keyring, msal token cache, wsl git auth.","https:\u002F\u002Fgithub.com\u002FAliendreamer\u002Fai.skills\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow\u002Fsetup-git-credentials\u002FSKILL.md",[],[],{"skillNo":70,"name":29,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M75PPVEK6WWJEBA9PYYR06R6","Use when starting, implementing, or completing any feature, change, or fix in any software project — at feature start, before writing code, and before claiming a change is done, fixed, working, or green. A strict ordered flow with a gate per phase; stack-agnostic and repo-agnostic (OpenSpec optional, gates discovered).","https:\u002F\u002Fgithub.com\u002FAliendreamer\u002Fai.skills\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow\u002Fdeveloper-flow\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M75PPPGQP9MV3BAHAP2W2KVV","daily-log-check","Use to check whether everyone on duty filed their Azure DevOps time-log Tasks for a given day, per platform — reports tickets, hours and activities per person against the headcount you give. Fires on \"did everyone log yesterday\", \"check web 4 mobile 3\", \"who is missing for 8.09\", \"daily log check\". Read-only. Org and project come from configuration.","https:\u002F\u002Fgithub.com\u002FAliendreamer\u002Fai.skills\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow\u002Fdaily-log-check\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M75PPJFQSRGSRPF8RR0Z8CRS","daily-activity-log","Use at end of day to file the Azure DevOps time-log Tasks — one closed Task per Activity worked that day, Original Estimate in decimal hours, parented to the current sprint's Feature. Fires on \"log my day\", \"fill my tasks\", \"close my daily tasks\", \"I had 2h meetings and 4h development\". Org and project come from configuration.","https:\u002F\u002Fgithub.com\u002FAliendreamer\u002Fai.skills\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow\u002Fdaily-activity-log\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":19},"01M75PPFK8HSW0VB92VRMWAAJE","conventional-commits","Write commit messages that follow the Conventional Commits specification so tooling can derive versions and changelogs.","https:\u002F\u002Fgithub.com\u002FAliendreamer\u002Fai.skills\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow\u002Fconventional-commits\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":19},"01M75PPBQQGMQNQ1FTZPFAPPK6","complexity-sizing","Use when sizing or checking an Azure DevOps work item — Story Points must be derived from the Complexity field, never estimated freehand. Fires on \"size this ticket\", \"what SP\", \"is the SP right\", \"check complexity\", \"backfill story points\", or whenever a ticket's Complexity\u002FSP pair is read. Org and project come from configuration.","https:\u002F\u002Fgithub.com\u002FAliendreamer\u002Fai.skills\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow\u002Fcomplexity-sizing\u002FSKILL.md",[],[]]