From agent-flow
Validates agent-flow pipeline configuration including automation config, MCP server connectivity, and auth tokens. Reports what works, what's missing, and what failed.
How this skill is triggered — by the user, by Claude, or both
Slash command
/agent-flow:check-setup [--skip-build][--skip-build]This skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Check the project configuration for the agent-flow pipeline. Report: what works, what is missing, what failed.
Check the project configuration for the agent-flow pipeline. Report: what works, what is missing, what failed.
If $ARGUMENTS contains --skip-build, skip running build/test commands.
## Automation Config section → [OK] or [FAIL]| Section | Required keys |
|---|---|
| Issue Tracker | Type (or default youtrack), Instance, Project, Bug query, State transitions, On start set |
| Source Control | Remote, Base branch, Branch naming |
| PR Rules | Labels (Title format optional) |
| PR Description Template | (subsection present) |
| Build & Test | Build command, Test command |
Path note:
trackers.mdlives in the plugin installation directory, not in the consuming project. Glob is used to handle CWD-context mismatch.
Locate trackers.md: Glob with pattern .claude/plugins/**/docs/reference/trackers.md first.
If no results, Glob with **/docs/reference/trackers.md. If still none, try docs/reference/trackers.md relative to CWD.
If multiple results, prefer the path containing .claude/plugins/ or agent-flow/; if ambiguous → [WARN] "Multiple trackers.md found — using {path}."
If the file cannot be found → [WARN] "trackers.md not found — per-tracker validation skipped. Verify plugin installation." and skip the rest of Step 3a.
Find the row matching the configured Type in the Validation Rules table.
For each key: verify that the value exists and is NOT a placeholder (<...>)
Verify optional sections (if they exist, check the format):
docker or native → [WARN] if neither; Start command and Stop command must be non-empty → [WARN] if missingreproduce, verify, or reproduce, verify → [WARN] if other; Stop command (optional) must be non-empty if present → [WARN] if emptyRead .mcp.json in the project root:
Compare MCP servers with Automation Config:
Verify that tokens in .mcp.json are not empty or placeholders → [OK] or [FAIL]
gitea AND .mcp.json contains a command field referencing forgejo-mcp: emit [WARN] forgejo-mcp detected in .mcp.json for Type: gitea — re-run /agent-flow:setup-mcp to install gitea-mcp.which curl — if curl is not available, skip probe and emit:
[FAIL] "Issue tracker — TLS error detected. Add NODE_OPTIONS: --use-system-ca to .mcp.json env block. (curl not available for confirmation probe)"curl -s -o /dev/null -w "%{http_code}" --max-time 5 {Instance}env block (first value starting with https:// or http://). If no URL found,
check if the server command/package matches a well-known host (server-github → https://github.com,
server-gitlab → https://gitlab.com). If neither yields a URL, skip the curl probe.
If {sc_base_url} was derived, run a curl probe:
which curl — if curl is not available, skip probe and emit:
[FAIL] "Source control — TLS error detected. Add NODE_OPTIONS: --use-system-ca to .mcp.json env block. (curl not available for confirmation probe)"curl -s -o /dev/null -w "%{http_code}" --max-time 5 {sc_base_url}--skip-build is NOT in $ARGUMENTS:
--skip-build IS in $ARGUMENTS → [SKIP]# Block 4b: Docker dry-build (optional)
if [ -n "$skip_build" ] && [ "$skip_build" = "true" ]; then
echo "[SKIP] Docker - skipped (--skip-build flag)"
elif [ ! -f Dockerfile ]; then
echo "[SKIP] Docker - no Dockerfile"
elif ! command -v docker >/dev/null 2>&1; then
echo "[SKIP] Docker - docker binary not found"
else
# NOTE: --skip-build flag handled at top of block (skips Docker check identically to other build steps)
if docker build --no-cache -t check-setup-test . > /tmp/check-setup-docker.log 2>&1; then
echo "[OK] Docker - build passed"
docker rmi check-setup-test >/dev/null 2>&1 || true
else
err=$(tail -3 /tmp/check-setup-docker.log | tr '\n' ' ')
echo "[FAIL] Docker - $err"
fi
fi
Where $skip_build is set to "true" when --skip-build is present in $ARGUMENTS (same flag used by Block 4). The 4-branch decision tree:
--skip-build flag → [SKIP] Docker - skipped (--skip-build flag)[SKIP] Docker - no Dockerfiledocker binary not on PATH → [SKIP] Docker - docker binary not found (handles CI environments without Docker)[OK] Docker - build passed (image cleaned up with docker rmi)[FAIL] Docker - {last 3 lines of build log}## Setup report — {Remote from Automation Config}
### Automation Config
[OK] ## Automation Config found in CLAUDE.md
[OK] Issue Tracker — all keys filled (Type: {type})
[OK] Source Control — all keys filled
[FAIL] PR Description Template — section missing
[FAIL] Build & Test — Test command is empty
### MCP servers
[OK] .mcp.json found
[OK] Issue tracker MCP server configured ({instance})
[FAIL] Source control MCP server not found for remote {owner/repo}
### Connectivity
[OK] Issue tracker — connection OK, project {PROJECT} found, X bugs
[FAIL] Issue tracker — server reachable but MCP connection failed (likely TLS) — add NODE_OPTIONS: --use-system-ca to the env block in .mcp.json
[FAIL] Source control — authentication failed. Token needs repository:read scope.
### Build & Test
[SKIP] Skipped (--skip-build)
### Docker
[SKIP] Docker - no Dockerfile
### Agent Overrides
[FAIL] Agent overrides - .toml overlays present (customization/browser-agent.toml customization/fixer.toml) but neither tomllib (Python 3.11+) nor the tomli backport is importable by python3. The injector will SILENTLY DROP these overlays. Fix: install Python 3.11+, or run 'python3 -m pip install tomli'.
---
Result: {N} FAIL, {M} WARN — {verdict}
Verdict:
.claude/plugins.json, .claude-plugins, or another file with plugin metadata (exact location depends on the Claude Code version — if none of these files exist → [SKIP] "Plugin registry not found — conflict detection skipped")hooks/validate-dispatch.sh exists in the plugin installation directory.
.claude/plugins/**/hooks/validate-dispatch.sh; if not found, try hooks/validate-dispatch.sh relative to CWD.~/.claude/settings.json contains a PostToolUse hook entry referencing validate-dispatch.~/.claude/settings.json (if accessible).validate-dispatch → [OK] "PostToolUse hook wired in ~/.claude/settings.json"The override injector (../../core/agent-override-injector.md) parses customization/{agent}.toml
overlays via python3 — tomllib (Python 3.11+ stdlib) or the tomli backport on older Pythons.
If that parser is unavailable, parse_toml_overlay returns non-zero, resolve_overlay fails, and
the injector's mandatory guarded assignment (|| additional_instructions="") absorbs the error and
dispatches the agent with the bare prompt. This failure is silent — the pipeline never
blocks on overlay failure by design — so a project can carry .toml overlays that never actually
apply, and nothing surfaces it. This block catches that exact condition. The same silent drop also
happens on TOML syntax errors and unknown-key validation failures, so present-but-unparseable
overlays are validated end-to-end too.
### Agent Overrides → Path in Automation Config
(default customization/). Set $override_path to the resolved value and run the probe:# Block 7: Agent override (TOML) parsing prerequisite
override_path="${agent_overrides_path:-customization}"
override_path="${override_path%/}"
if [ ! -d "$override_path" ]; then
echo "[SKIP] Agent overrides - '$override_path/' not present"
else
toml_files=$(find "$override_path" -maxdepth 1 -type f -name '*.toml' 2>/dev/null | sort)
if [ -z "$toml_files" ]; then
echo "[SKIP] Agent overrides - no .toml overlays in '$override_path/'"
elif ! command -v python3 >/dev/null 2>&1; then
echo "[FAIL] Agent overrides - .toml overlays present but python3 is not on PATH. The override injector parses TOML with python3 and will SILENTLY DROP every overlay (the pipeline never blocks on overlay failure). Fix: install Python 3.11+ (tomllib), or Python 3.10 plus 'python3 -m pip install tomli'."
elif python3 -c "import tomllib" >/dev/null 2>&1 || python3 -c "import tomli" >/dev/null 2>&1; then
pyver=$(python3 -c "import sys; print('%d.%d' % sys.version_info[:2])" 2>/dev/null)
echo "[OK] Agent overrides - TOML parser available (python3 ${pyver}); $(echo "$toml_files" | grep -c .) overlay file(s) found"
else
files=$(echo "$toml_files" | tr '\n' ',' | sed 's/,$//; s/,/, /g')
echo "[FAIL] Agent overrides - .toml overlays present (${files}) but neither tomllib (Python 3.11+) nor the tomli backport is importable by python3. The injector will SILENTLY DROP these overlays — configured per-agent customizations are NOT applied. Fix: install Python 3.11+, or run 'python3 -m pip install tomli'."
fi
fi
[OK] (parser available) AND at least one overlay exists, validate each
overlay end-to-end so syntax errors and unknown-key violations — which also drop the overlay
silently — are caught. Locate the parser library with Glob: pattern
.claude/plugins/**/skills/setup-agents/lib/toml-merge.sh first, then
**/skills/setup-agents/lib/toml-merge.sh, then skills/setup-agents/lib/toml-merge.sh
relative to CWD. If located, source it. Note: toml-merge.sh runs set -euo pipefail,
which propagates into the check-setup shell, so call its functions in guarded form — capture
stdout into a variable and branch on the exit status — otherwise a parse/validation failure
would abort the whole probe instead of being reported as a per-file [FAIL]. For each
customization/{agent}.toml file (where {agent} is the filename without the .toml
extension) run if json=$(parse_toml_overlay "$f") && validate_overlay_keys "$json" "{agent}" "$f"; then
… else … fi and emit:
toml-merge.sh cannot be located → [WARN] "Agent overrides - parser library not found;
per-file validation skipped (parser-availability check only)."All [FAIL] results in this block count toward the final FAIL verdict — a present-but-unparseable
overlay means a configured customization is silently not being applied, which is a setup defect. A
clean project with no overlays yields [SKIP] and never affects the verdict.
After all primary checks complete, scan for deprecated config sections and emit advisories. These do NOT change the exit code — they're warnings only.
# Deprecated section detector
if grep -q '^### Extra labels' "$CLAUDE_MD" 2>/dev/null; then
echo "[WARN] Deprecated config section detected: ### Extra labels"
echo " Move any labels into ### PR Rules → Labels"
echo " (which fully supports the use case). See CHANGELOG.md."
fi
This warning does NOT change the exit code (no exit 1, no FAIL, no fail(), no return 1). It is purely advisory.
<...> in values = FAILnpx claudepluginhub asysta-act/agent-flow --plugin agent-flowGenerates .mcp.json and .claude/settings.json to configure MCP servers, tokens, and tool permissions for agent-flow pipeline. Supports CLI flags for tracker type, instance URL, and source control remote.
Audits a repository for baseline compliance across 9 categories including code quality, security, CI/CD, testing, and documentation. Emits Markdown report and JSON sidecar.
Validates Claude project MCP configurations: JSON structure in .claude/settings.json, mcpServers object, commands/args/env vars, essential MCPs (memory, filesystem, github), security for hardcoded secrets. Suggests fixes.