$npx -y skills add redhat-developer/rhdh-skill --skill agent-readyAssesses a git repository's readiness for use by AI coding agents using the agentready CLI, then walks through and addresses each gap. RHDH-aware: detects RHDH repositories and uses rhdh-repos.md context to pre-fill AGENTS.md and skip inapplicable findings. Use when asked to "ass
| 1 | ## Prerequisites |
| 2 | |
| 3 | `uvx` is a hard dependency. Verify it is available before any other step: |
| 4 | |
| 5 | ```bash |
| 6 | uvx --version |
| 7 | ``` |
| 8 | |
| 9 | If missing, stop: "`uvx` is required. Install via `pip install uv` or see [uv installation](https://docs.astral.sh/uv/getting-started/installation/)." |
| 10 | |
| 11 | ## Step 1: Mode selection |
| 12 | |
| 13 | If no path was provided, present a structured choice: |
| 14 | |
| 15 | - **Single repo** — assess the current working directory (default) |
| 16 | - **Batch** — assess all RHDH repositories (see Batch mode below) |
| 17 | |
| 18 | If a path was provided, skip this and proceed to Step 2. |
| 19 | |
| 20 | ## Step 2: Setup |
| 21 | |
| 22 | **Path:** Use the provided path, or `.` for the current directory. Validate it is a git repository: |
| 23 | |
| 24 | ```bash |
| 25 | git -C . rev-parse --is-inside-work-tree # replace . with path if provided |
| 26 | ``` |
| 27 | |
| 28 | If not a git repository, stop and tell the user. |
| 29 | |
| 30 | **RHDH detection:** Check the repo's git remote URL: |
| 31 | |
| 32 | ```bash |
| 33 | git -C <path> remote get-url origin 2>/dev/null |
| 34 | ``` |
| 35 | |
| 36 | Attempt to read `~/.claude/skills/rhdh/references/rhdh-repos.md`. If the file does not exist, skip RHDH detection and proceed with generic assessment — do not stop or warn the user. If found, check whether the remote URL matches any repo's upstream URL. If matched, note the repo name, tech stack, key paths, and conventions — these inform AGENTS.md generation and finding triage. Store as `rhdh_context`. |
| 37 | |
| 38 | **Config file:** Only use a config file if the user explicitly provided one. Do not ask. |
| 39 | |
| 40 | ## Step 3: Run the assessment |
| 41 | |
| 42 | ```bash |
| 43 | REPORT_DIR=$(mktemp -d) # on Windows: use %TEMP% or Python tempfile |
| 44 | uvx --from git+https://github.com/ambient-code/agentready agentready -- assess \ |
| 45 | -o "$REPORT_DIR" \ |
| 46 | <path> |
| 47 | ``` |
| 48 | |
| 49 | Append `-c <config-path>` if the user provided a config file. |
| 50 | |
| 51 | Note the value of `$REPORT_DIR` — shell variables do not persist across tool calls. |
| 52 | |
| 53 | Parse `$REPORT_DIR/assessment-latest.json`. Extract: |
| 54 | - `overall_score`, `certification_level` |
| 55 | - `findings` — each with `attribute.id`, `attribute.tier`, `attribute.default_weight`, `attribute.name`, `status`, `score`, `evidence`, `remediation` |
| 56 | |
| 57 | ## Step 4: Present summary |
| 58 | |
| 59 | ``` |
| 60 | Score: <overall_score>/100 — <certification_level> |
| 61 | Failing: <N> findings (<N1> Tier 1, <N2> Tier 2, ...) |
| 62 | ``` |
| 63 | |
| 64 | If no failing findings, congratulate the user and stop. |
| 65 | |
| 66 | Otherwise ask: |
| 67 | |
| 68 | > "Fix applicable findings automatically, or review each one individually? |
| 69 | > **auto** (default) — apply self-contained fixes immediately; prompt only when input is needed |
| 70 | > **review** — prompt yes/skip/defer/quit for every finding" |
| 71 | |
| 72 | Default to **auto** if the user says yes, presses Enter, or says "fix everything". |
| 73 | |
| 74 | ## Step 5: Work through findings |
| 75 | |
| 76 | Work only through `status == "fail"` findings. Skip `not_applicable` and `pass` silently. |
| 77 | |
| 78 | **Sort order:** ascending tier, then descending `attribute.default_weight` within each tier. |
| 79 | |
| 80 | If `rhdh_context` is set, skip findings that clearly don't apply to the detected tech stack (e.g., lock file checks for a Bash-only repo, `src/` layout for a GitOps YAML repo) — note them in the summary. |
| 81 | |
| 82 | ### Auto mode |
| 83 | |
| 84 | Apply each fix without prompting **unless**: |
| 85 | |
| 86 | - The fix requires project-specific input (CI platform, package ecosystem) |
| 87 | - The finding might not apply to this repo type — present it and ask whether to apply or skip |
| 88 | |
| 89 | **Skip without prompting:** ADRs, design intent, architecture decisions — these require human rationale. Note them in the final summary. |
| 90 | |
| 91 | For the `agent_instructions` finding, follow the inline AGENTS.md generation in the `agent_instructions` section below — this applies in both auto and review modes. |
| 92 | |
| 93 | After processing, list what was applied, prompted, and skipped, then proceed to Step 6. |
| 94 | |
| 95 | ### Review mode |
| 96 | |
| 97 | For each finding: |
| 98 | |
| 99 | ``` |
| 100 | [Tier <N>] <attribute.name> — <score>/100 |
| 101 | Evidence: <evidence items> |
| 102 | |
| 103 | Remediation: <remediation.summary> |
| 104 | |
| 105 | Apply this fix? [yes / skip / defer / quit] |
| 106 | ``` |
| 107 | |
| 108 | **yes** — apply the fix, then move to the next finding. |
| 109 | **skip** — move on; do not revisit. Use this if the finding doesn't apply to this repo. |
| 110 | **defer** — note it; surface again after re-run. |
| 111 | **quit** — stop immediately. |
| 112 | |
| 113 | **ADR and design intent findings:** Do not use JSON remediation. Ask instead: |
| 114 | |
| 115 | > "Do you have any architectural decisions worth capturing? Describe the decision and rationale — I'll write the ADR. Skip to add manually later." |
| 116 | |
| 117 | Write only if the user provides input. Never invent rationale. |
| 118 | |
| 119 | ### `agent_instructions` finding (both modes) |
| 120 | |
| 121 | Generate `AGENTS.md` and `CLAUDE.md` inline — do not delegate to another skill. |